Recompile under CYGWIN64.

Move DEBUGM code to eval and exec.
This commit is contained in:
Renaud 2013-10-08 10:20:01 +08:00
parent a3be4fea81
commit df349fa061
7 changed files with 26 additions and 25 deletions

View File

@ -170,7 +170,7 @@ isearch.o: isearch.c isearch.h basic.h buffer.h crypt.h line.h utf8.h \
line.o: line.c line.h utf8.h buffer.h crypt.h edef.h estruct.h retcode.h \
log.h window.h defines.h
lock.o: lock.c lock.h estruct.h retcode.h display.h edef.h buffer.h \
crypt.h line.h utf8.h input.h pklock.h
crypt.h line.h utf8.h input.h
log.o: log.c log.h retcode.h
main.o: main.c basic.h bind.h edef.h buffer.h crypt.h line.h utf8.h \
estruct.h retcode.h bindable.h display.h eval.h execute.h file.h input.h \
@ -181,8 +181,7 @@ names.o: names.c names.h basic.h bind.h edef.h buffer.h crypt.h line.h \
isearch.h region.h random.h search.h spawn.h window.h defines.h word.h
pklock.o: pklock.c pklock.h estruct.h retcode.h edef.h buffer.h crypt.h \
line.h utf8.h
posix.o: posix.c termio.h estruct.h retcode.h edef.h buffer.h crypt.h \
line.h utf8.h
posix.o: posix.c termio.h
random.o: random.c random.h basic.h buffer.h crypt.h line.h utf8.h \
display.h estruct.h retcode.h edef.h execute.h input.h log.h search.h \
terminal.h defines.h window.h
@ -196,7 +195,7 @@ spawn.o: spawn.c spawn.h defines.h buffer.h crypt.h line.h utf8.h \
terminal.h window.h
tcap.o: tcap.c terminal.h defines.h display.h estruct.h retcode.h edef.h \
buffer.h crypt.h line.h utf8.h termio.h
termio.o: termio.c termio.h
termio.o: termio.c termio.h estruct.h retcode.h utf8.h
utf8.o: utf8.c utf8.h
vmsvt.o: vmsvt.c estruct.h retcode.h edef.h buffer.h crypt.h line.h \
utf8.h

5
edef.h
View File

@ -86,9 +86,4 @@ extern struct buffer *blistp; /* Buffer for C-X C-B */
extern char sres[NBUFN]; /* Current screen resolution. */
#if DEBUGM
/* Vars needed for macro debugging output. */
extern char outline[]; /* Global string to hold debug line text. */
#endif
#endif /* EDEF_H_ */

View File

@ -129,7 +129,6 @@
#define CLRMSG 0 /* space clears the message line with no insert */
#define CFENCE 1 /* fench matching in CMODE */
#define TYPEAH 1 /* type ahead causes update to be skipped */
#define DEBUGM 1 /* $debug triggers macro debugging */
#define VISMAC 0 /* update display during keyboard macros */
#define CTRLZ 0 /* add a ^Z at end of files under MSDOS only */
#define ADDCR 0 /* ajout d'un CR en fin de chaque ligne (ST520) */

13
eval.c
View File

@ -32,6 +32,11 @@
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
#if DEBUGM
/* vars needed for macro debugging output */
char outline[ NSTRING] ; /* global string to hold debug line text */
#endif
/* Max #chars in a var name. */
#define NVSIZE 10
@ -587,10 +592,6 @@ char *gtenv(char *vname)
int setvar(int f, int n)
{
int status; /* status return */
#if DEBUGM
char *sp; /* temp string pointer */
char *ep; /* ptr to end of outline */
#endif
struct variable_description vd; /* variable num/type */
char var[NVSIZE + 1]; /* name of variable to fetch */
char value[NSTRING]; /* value to set variable to */
@ -631,6 +632,8 @@ int setvar(int f, int n)
that effect here. */
if (macbug) {
char *sp ; /* temp string pointer */
strcpy(outline, "(((");
/* assignment status */
@ -649,6 +652,8 @@ int setvar(int f, int n)
sp = outline;
while (*sp)
if (*sp++ == '%') {
char *ep ; /* ptr to end of outline */
/* advance to the end */
ep = --sp;
while (*ep++);

10
eval.h
View File

@ -1,6 +1,16 @@
#ifndef _EVAL_H_
#define _EVAL_H_
#define DEBUGM 1 /* $debug triggers macro debugging */
#if DEBUGM
/* Vars needed for macro debugging output. */
extern char outline[] ; /* Global string to hold debug line text. */
#endif
/* Macro argument token types */
#define TKNUL 0 /* end-of-string */

9
exec.c
View File

@ -495,11 +495,6 @@ static int dobuf(struct buffer *bp)
char *eline; /* text of line to execute */
char tkn[NSTRING]; /* buffer to evaluate an expresion in */
#if DEBUGM
char *sp; /* temp for building debug string */
char *ep; /* ptr to end of outline */
#endif
/* clear IF level flags/while ptr */
execlevel = 0;
whlist = NULL;
@ -616,6 +611,8 @@ static int dobuf(struct buffer *bp)
^G will abort the command */
if (macbug) {
char *sp ; /* temp for building debug string */
strcpy(outline, "<<<");
/* debug macro name */
@ -634,6 +631,8 @@ static int dobuf(struct buffer *bp)
sp = outline;
while (*sp)
if (*sp++ == '%') {
char *ep ; /* ptr to end of outline */
/* advance to the end */
ep = --sp;
while (*ep++);

View File

@ -54,9 +54,3 @@ struct buffer *bheadp; /* Head of list of buffers */
struct buffer *blistp; /* Buffer for C-X C-B */
char sres[NBUFN]; /* current screen resolution */
#if DEBUGM
/* vars needed for macro debugging output */
char outline[NSTRING]; /* global string to hold debug line text */
#endif