Skip to content

Commit

Permalink
Finish move of globals into input and random.
Browse files Browse the repository at this point in the history
Remove globals.
  • Loading branch information
rfivet committed Dec 22, 2014
1 parent ceac004 commit 2fe2d9c
Show file tree
Hide file tree
Showing 32 changed files with 73 additions and 116 deletions.
97 changes: 46 additions & 51 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <stdio.h>
#include "estruct.h"
#include "globals.h"


#if ANSI

Expand Down
1 change: 0 additions & 1 deletion basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <string.h>

#include "estruct.h"
#include "globals.h"
#include "bindable.h"
#include "buffer.h"
#include "display.h"
Expand Down
1 change: 0 additions & 1 deletion bindable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion display.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

#include "buffer.h"
#include "estruct.h"
#include "globals.h"
#include "input.h"
#include "line.h"
#include "termio.h"
Expand Down
1 change: 0 additions & 1 deletion ebind.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down
1 change: 0 additions & 1 deletion execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <stdlib.h>

#include "estruct.h"
#include "globals.h"
#include "bind.h"
#include "random.h"
#include "display.h"
Expand Down
1 change: 0 additions & 1 deletion file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
16 changes: 0 additions & 16 deletions globals.c

This file was deleted.

21 changes: 0 additions & 21 deletions globals.h

This file was deleted.

1 change: 0 additions & 1 deletion ibmpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include <stdio.h>
#include "estruct.h"
#include "globals.h"

#if IBMPC
#if PKCODE
Expand Down
8 changes: 6 additions & 2 deletions input.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "bind.h"
#include "estruct.h"
#include "globals.h"
#include "bindable.h"
#include "display.h"
#include "exec.h"
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions input.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;
Expand Down
1 change: 0 additions & 1 deletion isearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion line.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

#include "buffer.h"
#include "estruct.h"
#include "globals.h"
#include "log.h"
#include "window.h"

Expand Down
1 change: 0 additions & 1 deletion lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "display.h"
#include "estruct.h"
#include "globals.h"
#include "input.h"

#if (FILOCK && BSD) || SVR4
Expand Down
1 change: 0 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion pklock.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

#include "estruct.h"
#include "globals.h"

#if (FILOCK && BSD) || SVR4
#include <sys/types.h>
Expand Down
1 change: 0 additions & 1 deletion posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <unistd.h>

#include "estruct.h"
#include "globals.h"
#include "utf8.h"

int ttrow = HUGE ; /* Row location of HW cursor */
Expand Down
6 changes: 5 additions & 1 deletion random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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.
Expand Down
8 changes: 8 additions & 0 deletions random.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;
Expand Down
Loading

0 comments on commit 2fe2d9c

Please sign in to comment.