From b71ee14235e13382fd1f69d96bd42cbf5c2a0a11 Mon Sep 17 00:00:00 2001 From: Thiago Farina Date: Sun, 29 Aug 2010 22:21:42 -0300 Subject: [PATCH] uemacs: Remove two completly unused functions (fnclabel and spal). The implementation of these functions are doing anything at all at this moment. So cleanup a bit the code by removing fnclabel and spal functions completly. Signed-off-by: Thiago Farina Signed-off-by: Linus Torvalds --- ansi.c | 17 ------------- efunc.h | 3 --- estruct.h | 1 - eval.c | 4 ---- ibmpc.c | 18 -------------- names.c | 3 --- tcap.c | 71 ++++++++++++++++++------------------------------------- vmsvt.c | 25 -------------------- vt52.c | 16 ------------- 9 files changed, 23 insertions(+), 135 deletions(-) diff --git a/ansi.c b/ansi.c index 57dac03..a60eb64 100644 --- a/ansi.c +++ b/ansi.c @@ -179,12 +179,6 @@ int ansicres() return TRUE; } -/* Change pallette settings. */ -void spal(void) -{ - /* none for now */ -} - void ansibeep(void) { ttputc(BEL); @@ -244,15 +238,4 @@ void ansikclose(void) { } -#if FNLABEL -/* Label a function key. - * f: default flag - * n: numeric argument [unused] - */ -int fnclabel(int f, int n) -{ - /* On machines with no function keys...don't bother. */ - return TRUE; -} -#endif #endif diff --git a/efunc.h b/efunc.h index 1dcf83b..c9b2526 100644 --- a/efunc.h +++ b/efunc.h @@ -375,6 +375,3 @@ extern void lckerror(char *errstr); /* pklock.c */ extern char *dolock(char *fname); extern char *undolock(char *fname); - -/* tcap.c */ -extern void spal(char *dummy); diff --git a/estruct.h b/estruct.h index 3d85a17..4f2a2c8 100644 --- a/estruct.h +++ b/estruct.h @@ -150,7 +150,6 @@ #define ISRCH 1 /* Incremental searches like ITS EMACS */ #define WORDPRO 1 /* Advanced word processing features */ -#define FNLABEL 0 /* function key label code [HP150] */ #define APROP 1 /* Add code for Apropos command */ #define CRYPT 1 /* file encryption enabled? */ #define MAGIC 1 /* include regular expression matching? */ diff --git a/eval.c b/eval.c index 1e5635a..3a5999c 100644 --- a/eval.c +++ b/eval.c @@ -571,10 +571,6 @@ int svar(VDESC *var, char *value) case EVSTATUS: cmdstatus = stol(value); break; - case EVPALETTE: - strncpy(palstr, value, 48); - spal(palstr); - break; case EVASAVE: gasave = atoi(value); break; diff --git a/ibmpc.c b/ibmpc.c index ab16a03..577017d 100644 --- a/ibmpc.c +++ b/ibmpc.c @@ -285,12 +285,6 @@ void ibmscroll_reg(from, to, howmany) #endif -/* Reset the pallette registers. */ -void spal(void) -{ - /* nothin here now..... */ -} - void ibmbeep(void) { bdos(6, BEL, 0); @@ -498,16 +492,4 @@ void scwrite(int row, char *outstr, int forg, int bacg) movmem(&sline[0], scptr[row], term.t_ncol * 2); } -#if FNLABEL -/* Label a function key. - * - * @f: default flag - * @n: numeric argument [unused]. - */ -int fnclabel(int f, int n) -{ - /* on machines with no function keys...don't bother */ - return TRUE; -} -#endif #endif diff --git a/names.c b/names.c index 0700599..5d73c76 100644 --- a/names.c +++ b/names.c @@ -139,9 +139,6 @@ struct name_bind names[] = { #endif {"kill-region", killregion}, {"kill-to-end-of-line", killtext}, -#if FNLABEL - {"label-function-key", fnclabel}, -#endif {"list-buffers", listbuffers}, {"meta-prefix", metafn}, {"move-window-down", mvdnwind}, diff --git a/tcap.c b/tcap.c index d2665a5..33a2f22 100644 --- a/tcap.c +++ b/tcap.c @@ -1,4 +1,4 @@ -/* TCAP.C +/* tcap.c * * Unix V7 SysV and BS4 Termcap video driver * @@ -6,21 +6,20 @@ */ /* - * defining this to 1 breaks tcapopen() - it doesn't check if the + * Defining this to 1 breaks tcapopen() - it doesn't check if the * sceen size has changed. * -lbt */ #define USE_BROKEN_OPTIMIZATION 0 -#define termdef 1 /* don't define "term" external */ +#define termdef 1 /* Don't define "term" external. */ -#include #include +#include #include -#include "estruct.h" -#include "edef.h" -#include "efunc.h" - +#include "estruct.h" +#include "edef.h" +#include "efunc.h" #if TERMCAP @@ -30,7 +29,7 @@ #define MARGIN 8 #define SCRSIZ 64 -#define NPAUSE 10 /* # times thru update to pause */ +#define NPAUSE 10 /* # times thru update to pause. */ #define BEL 0x07 #define ESC 0x1B @@ -46,32 +45,31 @@ static void tcapscrollregion(int top, int bot); static void putpad(char *str); static void tcapopen(void); -#if PKCODE +#if PKCODE static void tcapclose(void); #endif -#if COLOR +#if COLOR static void tcapfcol(void); static void tcapbcol(void); #endif -#if SCROLLCODE +#if SCROLLCODE static void tcapscroll_reg(int from, int to, int linestoscroll); static void tcapscroll_delins(int from, int to, int linestoscroll); #endif - #define TCAPSLEN 315 static char tcapbuf[TCAPSLEN]; static char *UP, PC, *CM, *CE, *CL, *SO, *SE; -#if PKCODE +#if PKCODE static char *TI, *TE; #if USE_BROKEN_OPTIMIZATION static int term_init_ok = 0; #endif #endif -#if SCROLLCODE +#if SCROLLCODE static char *CS, *DL, *AL, *SF, *SR; #endif @@ -217,7 +215,6 @@ static void tcapopen(void) } #if PKCODE - static void tcapclose(void) { putpad(tgoto(CM, 0, term.t_nrow)); @@ -256,9 +253,9 @@ static void tcapeeop(void) } /* - * change reverse video status + * Change reverse video status * - * int state; FALSE = normal video, TRUE = reverse video + * @state: FALSE = normal video, TRUE = reverse video. */ static void tcaprev(int state) { @@ -269,8 +266,9 @@ static void tcaprev(int state) putpad(SE); } +/* Change screen resolution. */ static int tcapcres(char *res) -{ /* change screen resolution */ +{ return TRUE; } @@ -328,18 +326,14 @@ static void tcapscrollregion(int top, int bot) #endif -void spal(char *dummy) -{ /* change palette string */ - /* Does nothing here */ -} - -#if COLOR +#if COLOR +/* No colors here, ignore this. */ static void tcapfcol(void) -{ /* no colors here, ignore this */ +{ } - +/* No colors here, ignore this. */ static void tcapbcol(void) -{ /* no colors here, ignore this */ +{ } #endif @@ -352,23 +346,4 @@ static void putpad(char *str) { tputs(str, 1, ttputc); } - -#if FNLABEL -/* - * label a function key - * - * int f, n; default flag, numeric argument [unused] - */ -static int fnclabel(int f, int n) -{ - /* on machines with no function keys...don't bother */ - return TRUE; -} -#endif -#else - -static void hello(void) -{ -} - -#endif +#endif /* TERMCAP */ diff --git a/vmsvt.c b/vmsvt.c index cb1d6fd..b04dab0 100644 --- a/vmsvt.c +++ b/vmsvt.c @@ -486,29 +486,4 @@ vmskclose() { } - -/*** - * fnclabel - Label function keys (not used) - * - * Nothing returned - ***/ -#if FNLABEL -fnclabel(f, n) /* label a function key */ -int f, n; /* default flag, numeric argument [unused] */ -{ - /* on machines with no function keys...don't bother */ - return TRUE; -} -#endif - - -/*** - * spal - Set palette type (Are you kidding?) - * - * Nothing returned - ***/ -spal() -{ -} - #endif diff --git a/vt52.c b/vt52.c index aacd747..bec7267 100644 --- a/vt52.c +++ b/vt52.c @@ -115,11 +115,6 @@ vt52cres() return TRUE; } -spal() -{ /* change palette string */ - /* Does nothing here */ -} - #if COLOR vt52fcol() { /* set the forground color [NOT IMPLIMENTED] */ @@ -164,15 +159,4 @@ vt52kclose() { } - -#if FNLABEL -fnclabel(f, n) - /* label a function key */ -int f, n; /* default flag, numeric argument [unused] */ - -{ - /* on machines with no function keys...don't bother */ - return TRUE; -} -#endif #endif