Finish move of globals into input and random.

Remove globals.
This commit is contained in:
Renaud 2013-10-10 12:33:13 +08:00
parent ceac004e30
commit 2fe2d9c153
32 changed files with 73 additions and 116 deletions

View File

@ -1,8 +1,8 @@
# Makefile for emacs, updated Wed, Oct 09, 2013 1:41:31 PM
# Makefile for emacs, updated Thu, Oct 10, 2013 12:28:18 PM
SRC=ansi.c basic.c bind.c bindable.c buffer.c crypt.c display.c ebind.c eval.c exec.c execute.c file.c fileio.c flook.c globals.c ibmpc.c input.c isearch.c line.c lock.c log.c main.c names.c pklock.c posix.c random.c region.c search.c spawn.c tcap.c termio.c utf8.c vmsvt.c vt52.c window.c word.c wrapper.c
OBJ=ansi.o basic.o bind.o bindable.o buffer.o crypt.o display.o ebind.o eval.o exec.o execute.o file.o fileio.o flook.o globals.o ibmpc.o input.o isearch.o line.o lock.o log.o main.o names.o pklock.o posix.o random.o region.o search.o spawn.o tcap.o termio.o utf8.o vmsvt.o vt52.o window.o word.o wrapper.o
HDR=basic.h bind.h bindable.h buffer.h crypt.h defines.h display.h ebind.h efunc.h estruct.h eval.h exec.h execute.h file.h fileio.h flook.h globals.h input.h isearch.h line.h lock.h log.h names.h pklock.h random.h region.h retcode.h search.h spawn.h terminal.h termio.h utf8.h version.h window.h word.h wrapper.h
SRC=ansi.c basic.c bind.c bindable.c buffer.c crypt.c display.c ebind.c eval.c exec.c execute.c file.c fileio.c flook.c ibmpc.c input.c isearch.c line.c lock.c log.c main.c names.c pklock.c posix.c random.c region.c search.c spawn.c tcap.c termio.c utf8.c vmsvt.c vt52.c window.c word.c wrapper.c
OBJ=ansi.o basic.o bind.o bindable.o buffer.o crypt.o display.o ebind.o eval.o exec.o execute.o file.o fileio.o flook.o ibmpc.o input.o isearch.o line.o lock.o log.o main.o names.o pklock.o posix.o random.o region.o search.o spawn.o tcap.o termio.o utf8.o vmsvt.o vt52.o window.o word.o wrapper.o
HDR=basic.h bind.h bindable.h buffer.h crypt.h defines.h display.h ebind.h efunc.h estruct.h eval.h exec.h execute.h file.h fileio.h flook.h input.h isearch.h line.h lock.h log.h names.h pklock.h random.h region.h retcode.h search.h spawn.h terminal.h termio.h utf8.h version.h window.h word.h wrapper.h
# DO NOT ADD OR MODIFY ANY LINES ABOVE THIS -- make source creates them
@ -126,82 +126,77 @@ depend: ${SRC}
# DO NOT DELETE THIS LINE -- make depend uses it
ansi.o: ansi.c estruct.h retcode.h globals.h
ansi.o: ansi.c estruct.h retcode.h
basic.o: basic.c basic.h buffer.h crypt.h line.h utf8.h display.h \
estruct.h retcode.h globals.h input.h bind.h random.h terminal.h \
defines.h window.h
bind.o: bind.c bind.h estruct.h retcode.h globals.h bindable.h buffer.h \
crypt.h line.h utf8.h display.h ebind.h exec.h file.h flook.h input.h \
names.h window.h defines.h
estruct.h retcode.h input.h bind.h random.h terminal.h defines.h \
window.h
bind.o: bind.c bind.h estruct.h retcode.h bindable.h buffer.h crypt.h \
line.h utf8.h display.h ebind.h exec.h file.h flook.h input.h names.h \
window.h defines.h
bindable.o: bindable.c bindable.h defines.h buffer.h crypt.h line.h \
utf8.h display.h estruct.h retcode.h globals.h file.h input.h bind.h \
lock.h terminal.h
utf8.h display.h estruct.h retcode.h file.h input.h bind.h lock.h \
terminal.h
buffer.o: buffer.c buffer.h crypt.h line.h utf8.h defines.h display.h \
estruct.h retcode.h globals.h file.h input.h bind.h window.h
estruct.h retcode.h file.h input.h bind.h window.h
crypt.o: crypt.c crypt.h
display.o: display.c display.h buffer.h crypt.h line.h utf8.h estruct.h \
retcode.h globals.h input.h bind.h termio.h terminal.h defines.h \
version.h wrapper.h window.h
ebind.o: ebind.c ebind.h basic.h bind.h estruct.h retcode.h globals.h \
bindable.h buffer.h crypt.h line.h utf8.h eval.h exec.h file.h isearch.h \
random.h region.h search.h spawn.h window.h defines.h word.h
retcode.h input.h bind.h termio.h terminal.h defines.h version.h \
wrapper.h window.h
ebind.o: ebind.c ebind.h basic.h bind.h estruct.h retcode.h bindable.h \
buffer.h crypt.h line.h utf8.h eval.h exec.h file.h isearch.h random.h \
region.h search.h spawn.h window.h defines.h word.h
eval.o: eval.c eval.h basic.h bind.h buffer.h crypt.h line.h utf8.h \
display.h estruct.h retcode.h globals.h exec.h execute.h flook.h input.h \
random.h search.h terminal.h defines.h termio.h version.h window.h
display.h estruct.h retcode.h exec.h execute.h flook.h input.h random.h \
search.h terminal.h defines.h termio.h version.h window.h
exec.o: exec.c exec.h retcode.h buffer.h crypt.h line.h utf8.h bind.h \
display.h estruct.h globals.h eval.h file.h flook.h input.h window.h \
display.h estruct.h eval.h file.h flook.h input.h random.h window.h \
defines.h
execute.o: execute.c execute.h estruct.h retcode.h globals.h bind.h \
random.h display.h file.h crypt.h buffer.h line.h utf8.h terminal.h \
defines.h window.h
file.o: file.c file.h crypt.h retcode.h buffer.h line.h utf8.h defines.h \
estruct.h globals.h execute.h fileio.h input.h bind.h lock.h log.h \
execute.o: execute.c execute.h estruct.h retcode.h bind.h random.h \
display.h file.h crypt.h buffer.h line.h utf8.h terminal.h defines.h \
window.h
file.o: file.c file.h crypt.h retcode.h buffer.h line.h utf8.h defines.h \
estruct.h execute.h fileio.h input.h bind.h lock.h log.h window.h
fileio.o: fileio.c fileio.h crypt.h retcode.h defines.h
flook.o: flook.c flook.h retcode.h defines.h fileio.h crypt.h
globals.o: globals.c globals.h defines.h
ibmpc.o: ibmpc.c estruct.h retcode.h globals.h
input.o: input.c input.h bind.h estruct.h retcode.h globals.h bindable.h \
display.h exec.h names.h terminal.h defines.h wrapper.h
ibmpc.o: ibmpc.c estruct.h retcode.h
input.o: input.c input.h bind.h estruct.h retcode.h bindable.h display.h \
exec.h names.h terminal.h defines.h wrapper.h
isearch.o: isearch.c isearch.h basic.h buffer.h crypt.h line.h utf8.h \
display.h estruct.h retcode.h globals.h exec.h input.h bind.h search.h \
terminal.h defines.h window.h
line.o: line.c line.h utf8.h buffer.h crypt.h estruct.h retcode.h \
globals.h log.h window.h defines.h
lock.o: lock.c lock.h estruct.h retcode.h display.h globals.h input.h \
bind.h
display.h estruct.h retcode.h exec.h input.h bind.h search.h terminal.h \
defines.h window.h
line.o: line.c line.h utf8.h buffer.h crypt.h estruct.h retcode.h log.h \
window.h defines.h
lock.o: lock.c lock.h estruct.h retcode.h display.h input.h bind.h
log.o: log.c log.h retcode.h
main.o: main.c estruct.h retcode.h basic.h bind.h bindable.h buffer.h \
crypt.h line.h utf8.h display.h globals.h eval.h execute.h file.h \
input.h lock.h log.h random.h search.h terminal.h defines.h termio.h \
version.h window.h
crypt.h line.h utf8.h display.h eval.h execute.h file.h input.h lock.h \
log.h random.h search.h terminal.h defines.h termio.h version.h window.h
names.o: names.c names.h basic.h bind.h bindable.h buffer.h crypt.h \
line.h utf8.h display.h eval.h exec.h retcode.h file.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 globals.h
pklock.o: pklock.c pklock.h estruct.h retcode.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 globals.h execute.h input.h bind.h log.h \
search.h terminal.h defines.h window.h
display.h estruct.h retcode.h execute.h input.h bind.h log.h search.h \
terminal.h defines.h window.h
region.o: region.c region.h line.h utf8.h buffer.h crypt.h estruct.h \
retcode.h globals.h log.h window.h defines.h
retcode.h log.h random.h window.h defines.h
search.o: search.c search.h line.h utf8.h basic.h buffer.h crypt.h \
display.h estruct.h retcode.h globals.h input.h bind.h log.h terminal.h \
defines.h window.h
display.h estruct.h retcode.h input.h bind.h log.h terminal.h defines.h \
window.h
spawn.o: spawn.c spawn.h defines.h buffer.h crypt.h line.h utf8.h \
display.h estruct.h retcode.h exec.h file.h flook.h input.h bind.h log.h \
terminal.h window.h
tcap.o: tcap.c terminal.h defines.h retcode.h display.h estruct.h \
globals.h termio.h
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 globals.h
vt52.o: vt52.c estruct.h retcode.h globals.h
vmsvt.o: vmsvt.c estruct.h retcode.h
vt52.o: vt52.c estruct.h retcode.h
window.o: window.c window.h defines.h buffer.h crypt.h line.h utf8.h \
basic.h display.h estruct.h retcode.h globals.h execute.h terminal.h \
wrapper.h
basic.h display.h estruct.h retcode.h execute.h terminal.h wrapper.h
word.o: word.c word.h basic.h buffer.h crypt.h line.h utf8.h estruct.h \
retcode.h globals.h log.h random.h region.h window.h defines.h
retcode.h log.h random.h region.h window.h defines.h
wrapper.o: wrapper.c wrapper.h
# DEPENDENCIES MUST END AT END OF FILE

2
ansi.c
View File

@ -11,7 +11,7 @@
#include <stdio.h>
#include "estruct.h"
#include "globals.h"
#if ANSI

View File

@ -19,7 +19,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "input.h"
#include "line.h"
#include "random.h"

1
bind.c
View File

@ -14,7 +14,6 @@
#include <string.h>
#include "estruct.h"
#include "globals.h"
#include "bindable.h"
#include "buffer.h"
#include "display.h"

View File

@ -8,7 +8,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "file.h"
#include "input.h"
#include "lock.h"

View File

@ -19,7 +19,6 @@
#include "defines.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "file.h"
#include "input.h"
#include "window.h"

View File

@ -20,7 +20,6 @@
#include "buffer.h"
#include "estruct.h"
#include "globals.h"
#include "input.h"
#include "line.h"
#include "termio.h"

View File

@ -14,7 +14,6 @@
#include "basic.h"
#include "bind.h"
#include "estruct.h"
#include "globals.h"
#include "bindable.h"
#include "buffer.h"
#include "eval.h"

1
eval.c
View File

@ -18,7 +18,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "exec.h"
#include "execute.h"
#include "flook.h"

2
exec.c
View File

@ -18,12 +18,12 @@
#include "bind.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "eval.h"
#include "file.h"
#include "flook.h"
#include "input.h"
#include "line.h"
#include "random.h"
#include "window.h"

View File

@ -4,7 +4,6 @@
#include <stdlib.h>
#include "estruct.h"
#include "globals.h"
#include "bind.h"
#include "random.h"
#include "display.h"

1
file.c
View File

@ -19,7 +19,6 @@
#include "crypt.h"
#include "defines.h"
#include "estruct.h"
#include "globals.h"
#include "execute.h"
#include "fileio.h"
#include "input.h"

View File

@ -1,16 +0,0 @@
/* globals.c -- implements globals.h */
#include "globals.h"
#include "defines.h"
/* initialized global definitions */
int metac = CONTROL | '['; /* current meta character */
int ctlxc = CONTROL | 'X'; /* current control X prefix char */
int reptc = CONTROL | 'U'; /* current universal repeat char */
int abortc = CONTROL | 'G'; /* current abort command char */
/* uninitialized global definitions */
int thisflag; /* Flags, this command */
int lastflag; /* Flags, last command */

View File

@ -1,21 +0,0 @@
/* globals.h -- Global variable definitions */
#ifndef __GLOBALS_H__
#define __GLOBALS_H__
/* Initialized global external declarations. */
extern int metac; /* current meta character */
extern int ctlxc; /* current control X prefix char */
extern int reptc; /* current universal repeat char */
extern int abortc; /* current abort command char */
/* Uninitialized global external declarations. */
#define CFCPCN 0x0001 /* Last command was C-P, C-N */
#define CFKILL 0x0002 /* Last command was a kill */
extern int thisflag; /* Flags, this command */
extern int lastflag; /* Flags, last command */
#endif

View File

@ -12,7 +12,6 @@
#include <stdio.h>
#include "estruct.h"
#include "globals.h"
#if IBMPC
#if PKCODE

View File

@ -16,7 +16,6 @@
#include "bind.h"
#include "estruct.h"
#include "globals.h"
#include "bindable.h"
#include "display.h"
#include "exec.h"
@ -47,7 +46,12 @@ int kbdrep = 0 ; /* number of repetitions */
int disinp = TRUE ; /* display input characters */
static const int quotec = 0x11 ; /* quote char during mlreply() */
int metac = CONTROL | '[' ; /* current meta character */
int ctlxc = CONTROL | 'X' ; /* current control X prefix char */
int reptc = CONTROL | 'U' ; /* current universal repeat char */
int abortc = CONTROL | 'G' ; /* current abort command char */
static const int quotec = 0x11 ; /* quote char during mlreply() */
/*
* Ask a yes or no question in the message line. Return either TRUE, FALSE, or

View File

@ -14,6 +14,11 @@ extern int kbdm[] ; /* Holds kayboard macro data */
extern int *kbdptr ; /* current position in keyboard buf */
extern int *kbdend ; /* ptr to end of the keyboard */
extern int disinp ; /* display input characters */
extern int metac; /* current meta character */
extern int ctlxc; /* current control X prefix char */
extern int reptc; /* current universal repeat char */
extern int abortc; /* current abort command char */
int mlyesno( const char *prompt) ;
int mlreply( const char *prompt, char *buf, int nbuf) ;

View File

@ -31,7 +31,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "exec.h"
#include "input.h"
#include "line.h"

1
line.c
View File

@ -22,7 +22,6 @@
#include "buffer.h"
#include "estruct.h"
#include "globals.h"
#include "log.h"
#include "window.h"

1
lock.c
View File

@ -11,7 +11,6 @@
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "input.h"
#if (FILOCK && BSD) || SVR4

1
main.c
View File

@ -69,7 +69,6 @@
#include "bindable.h"
#include "buffer.h"
#include "display.h"
#include "globals.h" /* Global definitions. */
#include "eval.h"
#include "execute.h"
#include "file.h"

View File

@ -6,7 +6,6 @@
*/
#include "estruct.h"
#include "globals.h"
#if (FILOCK && BSD) || SVR4
#include <sys/types.h>

View File

@ -23,7 +23,6 @@
#include <unistd.h>
#include "estruct.h"
#include "globals.h"
#include "utf8.h"
int ttrow = HUGE ; /* Row location of HW cursor */

View File

@ -16,7 +16,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "execute.h"
#include "input.h"
#include "line.h"
@ -42,6 +41,11 @@ int gbcolor = 0 ; /* global backgrnd color (black) */
int tabsize ; /* Tab size (0: use real tabs) */
int fillcol = 72 ; /* Current fill column */
/* uninitialized global definitions */
int thisflag ; /* Flags, this command */
int lastflag ; /* Flags, last command */
/*
* Set fill column to n.

View File

@ -7,6 +7,14 @@ extern int tabsize ; /* Tab size (0: use real tabs). */
extern int fillcol ; /* Fill column */
/* Uninitialized global external declarations. */
#define CFCPCN 0x0001 /* Last command was C-P, C-N */
#define CFKILL 0x0002 /* Last command was a kill */
extern int thisflag ; /* Flags, this command */
extern int lastflag ; /* Flags, last command */
int setfillcol( int f, int n) ;
int showcpos( int f, int n) ;
int getcline( void) ;

View File

@ -14,9 +14,9 @@
#include "buffer.h"
#include "estruct.h"
#include "globals.h"
#include "line.h"
#include "log.h"
#include "random.h"
#include "window.h"
/*

View File

@ -68,7 +68,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "input.h"
#include "line.h"
#include "log.h"

1
tcap.c
View File

@ -29,7 +29,6 @@
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "termio.h"
#if TERMCAP

View File

@ -11,7 +11,6 @@
#include <stdio.h> /* Standard I/O package */
#include "estruct.h" /* Emacs' structures */
#include "globals.h" /* Emacs' definitions */
#if VMSVT

1
vt52.c
View File

@ -15,7 +15,6 @@
#include <stdio.h>
#include "estruct.h"
#include "globals.h"
#if VT52

View File

@ -15,7 +15,6 @@
#include "buffer.h"
#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "execute.h"
#include "line.h"
#include "terminal.h"

1
word.c
View File

@ -15,7 +15,6 @@
#include "basic.h"
#include "buffer.h"
#include "estruct.h"
#include "globals.h"
#include "line.h"
#include "log.h"
#include "random.h"