mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 15:56:24 -05:00
uemacs: convert typedef struct KILL to struct kill.
Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c206895b9e
commit
1f271323f8
4
edef.h
4
edef.h
@ -64,8 +64,8 @@ extern int abortc; /* current abort command char */
|
|||||||
extern int quotec; /* quote char during mlreply() */
|
extern int quotec; /* quote char during mlreply() */
|
||||||
extern int tabmask;
|
extern int tabmask;
|
||||||
extern char *cname[]; /* names of colors */
|
extern char *cname[]; /* names of colors */
|
||||||
extern KILL *kbufp; /* current kill buffer chunk pointer */
|
extern struct kill *kbufp; /* current kill buffer chunk pointer */
|
||||||
extern KILL *kbufh; /* kill buffer header pointer */
|
extern struct kill *kbufh; /* kill buffer header pointer */
|
||||||
extern int kused; /* # of bytes used in KB */
|
extern int kused; /* # of bytes used in KB */
|
||||||
extern struct window *swindow; /* saved window pointer */
|
extern struct window *swindow; /* saved window pointer */
|
||||||
extern int cryptflag; /* currently encrypting? */
|
extern int cryptflag; /* currently encrypting? */
|
||||||
|
@ -609,17 +609,17 @@ struct name_bind {
|
|||||||
int (*n_func)(int, int); /* function name is bound to */
|
int (*n_func)(int, int); /* function name is bound to */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The editor holds deleted text chunks in the KILL buffer. The
|
/* The editor holds deleted text chunks in the struct kill buffer. The
|
||||||
kill buffer is logically a stream of ascii characters, however
|
kill buffer is logically a stream of ascii characters, however
|
||||||
due to its unpredicatable size, it gets implemented as a linked
|
due to its unpredicatable size, it gets implemented as a linked
|
||||||
list of chunks. (The d_ prefix is for "deleted" text, as k_
|
list of chunks. (The d_ prefix is for "deleted" text, as k_
|
||||||
was taken up by the keycode structure)
|
was taken up by the keycode structure)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct KILL {
|
struct kill {
|
||||||
struct KILL *d_next; /* link to next chunk, NULL if last */
|
struct kill *d_next; /* link to next chunk, NULL if last */
|
||||||
char d_chunk[KBLOCK]; /* deleted text */
|
char d_chunk[KBLOCK]; /* deleted text */
|
||||||
} KILL;
|
};
|
||||||
|
|
||||||
/* When emacs' command interpetor needs to get a variable's name,
|
/* When emacs' command interpetor needs to get a variable's name,
|
||||||
rather than it's value, it is passed back as a VDESC variable
|
rather than it's value, it is passed back as a VDESC variable
|
||||||
|
@ -58,8 +58,8 @@ char *cname[] = { /* names of colors */
|
|||||||
, "HIGH"
|
, "HIGH"
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
KILL *kbufp = NULL; /* current kill buffer chunk pointer */
|
struct kill *kbufp = NULL; /* current kill buffer chunk pointer */
|
||||||
KILL *kbufh = NULL; /* kill buffer header pointer */
|
struct kill *kbufh = NULL; /* kill buffer header pointer */
|
||||||
int kused = KBLOCK; /* # of bytes used in kill buffer */
|
int kused = KBLOCK; /* # of bytes used in kill buffer */
|
||||||
struct window *swindow = NULL; /* saved window pointer */
|
struct window *swindow = NULL; /* saved window pointer */
|
||||||
int cryptflag = FALSE; /* currently encrypting? */
|
int cryptflag = FALSE; /* currently encrypting? */
|
||||||
|
8
line.c
8
line.c
@ -551,7 +551,7 @@ int ldelnewline(void)
|
|||||||
*/
|
*/
|
||||||
void kdelete(void)
|
void kdelete(void)
|
||||||
{
|
{
|
||||||
KILL *kp; /* ptr to scan kill buffer chunk list */
|
struct kill *kp; /* ptr to scan kill buffer chunk list */
|
||||||
|
|
||||||
if (kbufh != NULL) {
|
if (kbufh != NULL) {
|
||||||
|
|
||||||
@ -577,11 +577,11 @@ void kdelete(void)
|
|||||||
*/
|
*/
|
||||||
int kinsert(int c)
|
int kinsert(int c)
|
||||||
{
|
{
|
||||||
KILL *nchunk; /* ptr to newly malloced chunk */
|
struct kill *nchunk; /* ptr to newly malloced chunk */
|
||||||
|
|
||||||
/* check to see if we need a new chunk */
|
/* check to see if we need a new chunk */
|
||||||
if (kused >= KBLOCK) {
|
if (kused >= KBLOCK) {
|
||||||
if ((nchunk = (KILL *) malloc(sizeof(KILL))) == NULL)
|
if ((nchunk = (struct kill *)malloc(sizeof(struct kill))) == NULL)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
if (kbufh == NULL) /* set head ptr if first time */
|
if (kbufh == NULL) /* set head ptr if first time */
|
||||||
kbufh = nchunk;
|
kbufh = nchunk;
|
||||||
@ -607,7 +607,7 @@ int yank(int f, int n)
|
|||||||
int c;
|
int c;
|
||||||
int i;
|
int i;
|
||||||
char *sp; /* pointer into string to insert */
|
char *sp; /* pointer into string to insert */
|
||||||
KILL *kp; /* pointer into kill buffer */
|
struct kill *kp; /* pointer into kill buffer */
|
||||||
|
|
||||||
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
if (curbp->b_mode & MDVIEW) /* don't allow this command if */
|
||||||
return (rdonly()); /* we are in read only mode */
|
return (rdonly()); /* we are in read only mode */
|
||||||
|
Loading…
Reference in New Issue
Block a user