1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-10-01 09:45:58 -04:00

uemacs: convert typedef struct TERM to struct terminal.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Thiago Farina 2010-07-11 14:54:48 -03:00 committed by Linus Torvalds
parent bbf253858a
commit af9710adc4
7 changed files with 39 additions and 35 deletions

2
ansi.c
View File

@ -56,7 +56,7 @@ int cbcolor = -1; /* current background color */
* Standard terminal interface dispatch table. Most of the fields point into
* "termio" code.
*/
TERM term = {
struct terminal term = {
#if PKCODE
MROW - 1,
#else

47
edef.h
View File

@ -1,4 +1,4 @@
/* EDEF.H
/* edef.h
*
* Global variable definitions
*
@ -7,17 +7,19 @@
* greatly modified by Daniel Lawrence
* modified by Petri Kutvonen
*/
#ifndef EDEF_H_
#define EDEF_H_
/* some global fuction declarations */
#include <stdlib.h>
#include <string.h>
/* Some global fuction declarations. */
typedef int (*fn_t)(int, int);
struct video;
/* initialized global external declarations */
/* Initialized global external declarations. */
extern int fillcol; /* Fill column */
extern short kbdm[]; /* Holds kayboard macro data */
@ -33,7 +35,7 @@ extern char *modename[]; /* text names of modes */
extern char *mode2name[]; /* text names of modes */
extern char modecode[]; /* letters to represent modes */
extern struct key_tab keytab[]; /* key bind to functions table */
extern struct name_bind names[]; /* name to function table */
extern struct name_bind names[];/* name to function table */
extern int gmode; /* global editor mode */
extern int gflags; /* global control flag */
extern int gfcolor; /* global forgrnd color (white) */
@ -96,7 +98,7 @@ extern int justflag; /* justify, don't fill */
extern int overlap; /* line overlap in forw/back page */
extern int scrollcount; /* number of lines to scroll */
/* uninitialized global external declarations */
/* Uninitialized global external declarations. */
extern int currow; /* Cursor row */
extern int curcol; /* Cursor column */
@ -105,17 +107,18 @@ extern int lastflag; /* Flags, last command */
extern int curgoal; /* Goal for C-P, C-N */
extern window_t *curwp; /* Current window */
extern struct buffer *curbp; /* Current buffer */
extern window_t *wheadp; /* Head of list of windows */
extern window_t *wheadp; /* Head of list of windows */
extern struct buffer *bheadp; /* Head of list of buffers */
extern struct buffer *blistp; /* Buffer for C-X C-B */
extern struct buffer *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */
extern window_t *wpopup(void); /* Pop up window creation */
extern struct line *lalloc(int); /* Allocate a line */
extern char sres[NBUFN]; /* current screen resolution */
extern char pat[]; /* Search pattern */
extern char tap[]; /* Reversed pattern array. */
extern char rpat[]; /* replacement pattern */
/* Lookup a buffer by name. */
extern struct buffer *bfind(char *bname, int cflag, int bflag);
extern window_t *wpopup(void); /* Pop up window creation. */
extern struct line *lalloc(int); /* Allocate a line. */
extern char sres[NBUFN]; /* Current screen resolution. */
extern char pat[]; /* Search pattern. */
extern char tap[]; /* Reversed pattern array. */
extern char rpat[]; /* Replacement pattern. */
extern unsigned int matchlen;
extern unsigned int mlenold;
@ -126,17 +129,19 @@ extern int matchoff;
#if MAGIC
extern short int magical;
extern short int rmagical;
extern MC mcpat[NPAT]; /* the magic pattern */
extern MC tapcm[NPAT]; /* the reversed magic pattern */
extern RMC rmcpat[NPAT]; /* the replacement magic array */
extern MC mcpat[NPAT]; /* The magic pattern. */
extern MC tapcm[NPAT]; /* The reversed magic patterni. */
extern RMC rmcpat[NPAT]; /* The replacement magic array. */
#endif
extern char *dname[]; /* directive name table */
extern char *dname[]; /* Directive name table. */
#if DEBUGM
/* vars needed for macro debugging output */
extern char outline[]; /* global string to hold debug line text */
/* Vars needed for macro debugging output. */
extern char outline[]; /* Global string to hold debug line text. */
#endif
/* terminal table defined only in TERM.C */
extern TERM term; /* Terminal information. */
/* Terminal table defined only in term.c */
extern struct terminal term;
#endif /* EDEF_H_ */

View File

@ -546,7 +546,7 @@ struct line {
* "termp->t_field" style in the future, to make it possible to run more than
* one terminal type.
*/
typedef struct {
struct terminal {
short t_mrow; /* max number of rows allowable */
short t_nrow; /* current number of rows used */
short t_mcol; /* max Number of columns. */
@ -574,7 +574,7 @@ typedef struct {
#if SCROLLCODE
void (*t_scroll)(int, int,int); /* scroll a region of the screen */
#endif
} TERM;
};
/* TEMPORARY macros for terminal I/O (to be placed in a machine
dependant place later) */

View File

@ -99,7 +99,7 @@ int ctrans[] = /* ansi to ibm color translation table */
* Standard terminal interface dispatch table. Most of the fields point into
* "termio" code.
*/
TERM term = {
struct terminal term = {
NROW - 1,
NROW - 1,
NCOL,

4
tcap.c
View File

@ -75,8 +75,8 @@ static int term_init_ok = 0;
static char *CS, *DL, *AL, *SF, *SR;
#endif
TERM term = {
0, /* these four values are set dynamically at open time */
struct terminal term = {
0, /* These four values are set dynamically at open time. */
0,
0,
0,

View File

@ -46,7 +46,7 @@ static int termtype;
#if SCROLLCODE
#define SMG$K_SCROLL_FORWARD 561 /* from sys$library:smgtrmptr.h */
#define SMG$K_SCROLL_FORWARD 561 /* from sys$library:smgtrmptr.h */
#define SMG$K_SCROLL_REVERSE 562
#define SMG$K_SET_SCROLL_REGION 572
@ -55,7 +55,7 @@ static char *scroll_forward, *scroll_reverse;
#endif
/* Dispatch table. All hard fields just point into the terminal I/O code. */
TERM term = {
struct terminal term = {
#if PKCODE
MAXROW,
#else

11
vt52.c
View File

@ -1,4 +1,4 @@
/* VT52.C
/* vt52.c
*
* The routines in this file
* provide support for VT52 style terminals
@ -43,17 +43,16 @@ extern int vt52cres();
extern int vt52kopen();
extern int vt52kclose();
#if COLOR
#if COLOR
extern int vt52fcol();
extern int vt52bcol();
#endif
/*
* Dispatch table. All the
* hard fields just point into the
* terminal I/O code.
* Dispatch table.
* All the hard fields just point into the terminal I/O code.
*/
TERM term = {
struct terminal term = {
NROW - 1,
NROW - 1,
NCOL,