From 3c7bd9a7d294ed9f34e952fab792644c5caf6c18 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 10 Jul 2012 17:42:19 -0700 Subject: [PATCH] Make kbd macro save area use 'int' instead of short I'm starting to expand the input value from 'short' (with flags in the upper eight bytes) to 'int' (with negative values having flags). Small baby steps. Signed-off-by: Linus Torvalds --- edef.h | 6 +++--- globals.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/edef.h b/edef.h index 31fb735..b70c9cd 100644 --- a/edef.h +++ b/edef.h @@ -19,7 +19,7 @@ typedef int (*fn_t)(int, int); /* Initialized global external declarations. */ extern int fillcol; /* Fill column */ -extern short kbdm[]; /* Holds kayboard macro data */ +extern int kbdm[]; /* Holds kayboard macro data */ extern char pat[]; /* Search pattern */ extern char rpat[]; /* Replacement pattern */ extern char *execstr; /* pointer to string to execute */ @@ -66,8 +66,8 @@ extern struct kill *kbufh; /* kill buffer header pointer */ extern int kused; /* # of bytes used in KB */ extern struct window *swindow; /* saved window pointer */ extern int cryptflag; /* currently encrypting? */ -extern short *kbdptr; /* current position in keyboard buf */ -extern short *kbdend; /* ptr to end of the keyboard */ +extern int *kbdptr; /* current position in keyboard buf */ +extern int *kbdend; /* ptr to end of the keyboard */ extern int kbdmode; /* current keyboard macro mode */ extern int kbdrep; /* number of repetitions */ extern int restflag; /* restricted use? */ diff --git a/globals.c b/globals.c index 235e2f3..c2d4c37 100644 --- a/globals.c +++ b/globals.c @@ -4,7 +4,7 @@ /* initialized global definitions */ int fillcol = 72; /* Current fill column */ -short kbdm[NKBDM]; /* Macro */ +int kbdm[NKBDM]; /* Macro */ char *execstr = NULL; /* pointer to string to execute */ char golabel[NPAT] = ""; /* current line to go to */ int execlevel = 0; /* execution IF level */ @@ -63,8 +63,8 @@ struct kill *kbufh = NULL; /* kill buffer header pointer */ int kused = KBLOCK; /* # of bytes used in kill buffer */ struct window *swindow = NULL; /* saved window pointer */ int cryptflag = FALSE; /* currently encrypting? */ -short *kbdptr; /* current position in keyboard buf */ -short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */ +int *kbdptr; /* current position in keyboard buf */ +int *kbdend = &kbdm[0]; /* ptr to end of the keyboard */ int kbdmode = STOP; /* current keyboard macro mode */ int kbdrep = 0; /* number of repetitions */ int restflag = FALSE; /* restricted use? */