wdvi

network DVI viewer
Log | Files | Refs

commit 4c268af062b5196a27eef1fca9b63ad0d3884009
parent a49ebe7b7ec659e94798de32242bfee30cf14934
Author: Kyle Milz <krwmilz@gmail.com>
Date:   Mon, 16 Aug 2021 22:33:54 +0000

Remove EXTERN

Turns out this is #defined to nothing anyways.

Diffstat:
Mxdvi.c | 3---
Mxdvi.h | 203+++++++++++++++++++++++++++++++++++++++----------------------------------------
2 files changed, 100 insertions(+), 106 deletions(-)

diff --git a/xdvi.c b/xdvi.c @@ -72,9 +72,6 @@ NOTE: * GS_PATH path to call the Ghostscript interpreter by */ -#define EXTERN -#define INIT(x) =x - #include "xdvi.h" #if !lint diff --git a/xdvi.h b/xdvi.h @@ -150,10 +150,7 @@ typedef char Bool3; /* Yes/No/Maybe */ * Types and data * *******************************/ -#ifndef EXTERN -#define EXTERN extern -#define INIT(x) -#endif +#define INIT(x) =x #define MAXDIM 32767 @@ -217,7 +214,7 @@ struct drawinf { /* this information is saved when using virtual fonts */ #endif }; -EXTERN struct drawinf currinf; +struct drawinf currinf; /* entries below with the characters 'dvi' in them are actually stored in scaled pixel units */ @@ -232,14 +229,14 @@ EXTERN struct drawinf currinf; #define ZZ currinf.data.z #define ROUNDUP(x,y) (((x)+(y)-1)/(y)) -EXTERN int current_page; -EXTERN int total_pages; -EXTERN int pageno_correct INIT(1); -EXTERN long magnification; -EXTERN double dimconv; -EXTERN double tpic_conv; -EXTERN int n_files_left INIT(32767); /* for LRU closing of fonts */ -EXTERN unsigned int page_w, page_h; +int current_page; +int total_pages; +int pageno_correct INIT(1); +long magnification; +double dimconv; +double tpic_conv; +int n_files_left INIT(32767); /* for LRU closing of fonts */ +unsigned int page_w, page_h; #if defined(GS_PATH) && !defined(PS_GS) #define PS_GS 1 @@ -251,18 +248,18 @@ EXTERN unsigned int page_w, page_h; #define PS 0 #endif -EXTERN int scanned_page; /* last page prescanned */ +int scanned_page; /* last page prescanned */ #if PS -EXTERN int scanned_page_ps; /* last page scanned for PS specials */ -EXTERN int scanned_page_ps_bak; /* save the above if PS is turned off */ +int scanned_page_ps; /* last page scanned for PS specials */ +int scanned_page_ps_bak; /* save the above if PS is turned off */ #endif #if COLOR -EXTERN int scanned_page_color; /* last page scanned for color spcls */ +int scanned_page_color; /* last page scanned for color spcls */ #endif -EXTERN int scanned_page_reset; /* number to reset the above to */ +int scanned_page_reset; /* number to reset the above to */ /* * The following is set when we're prescanning before opening up the windows, @@ -270,7 +267,7 @@ EXTERN int scanned_page_reset; /* number to reset the above to */ * a window to associate the process to, so we have to prescan twice. */ #if PS_GS -EXTERN Boolean gs_postpone_prescan INIT(False); +Boolean gs_postpone_prescan INIT(False); #endif /* @@ -284,34 +281,34 @@ struct per_page { unsigned int ww, wh; /* window size */ }; -EXTERN struct per_page *page_info; +struct per_page *page_info; /* * Set if the -paper option overrides papersize specials. */ -EXTERN Boolean ignore_papersize_specials INIT(False); +Boolean ignore_papersize_specials INIT(False); /* * Mechanism for reducing repeated warning about specials, lost characters, etc. */ -EXTERN Boolean warn_spec_now; +Boolean warn_spec_now; /* * If we're in the middle of a PSFIG special. */ -EXTERN Boolean psfig_begun INIT(False); +Boolean psfig_begun INIT(False); /* * Page on which to draw box from forward source special searching. */ -EXTERN int source_fwd_box_page INIT(-1); /* -1 means no box */ +int source_fwd_box_page INIT(-1); /* -1 means no box */ /* * Information on deferred source operation. See do_pages() for meaning. */ -EXTERN const char *source_forward_string INIT(NULL); -EXTERN int source_reverse_x, source_reverse_y; -EXTERN int source_show_all; +const char *source_forward_string INIT(NULL); +int source_reverse_x, source_reverse_y; +int source_show_all; /* @@ -420,11 +417,11 @@ struct tn { struct font *fontp; /* pointer to the rest of the info */ }; -EXTERN struct font *tn_table[TNTABLELEN]; -EXTERN struct font *font_head INIT(NULL); -EXTERN struct tn *tn_head INIT(NULL); -EXTERN ubyte maxchar; -EXTERN unsigned short current_timestamp INIT(0); +struct font *tn_table[TNTABLELEN]; +struct font *font_head INIT(NULL); +struct tn *tn_head INIT(NULL); +ubyte maxchar; +unsigned short current_timestamp INIT(0); /* * Command line flags. @@ -539,11 +536,11 @@ extern struct _resource { #if GREY -EXTERN Pixel plane_masks[4]; +Pixel plane_masks[4]; #endif #if GREY || COLOR -EXTERN XColor color_data[2]; +XColor color_data[2]; #define fore_color_data color_data[0] #define back_color_data color_data[1] #endif @@ -561,19 +558,19 @@ struct pagecolor { }; /* Information on background color and initial color stack for each page. */ -EXTERN struct pagecolor *page_colors INIT(NULL); +struct pagecolor *page_colors INIT(NULL); /* The initial color stack is gotten from the pagecolor record for a page. */ -EXTERN const struct rgb *color_bottom; -EXTERN unsigned int color_bot_size; /* number of entries */ +const struct rgb *color_bottom; +unsigned int color_bot_size; /* number of entries */ /* Additions to the runtime color stack on a given page are stored in a linked list. "struct colorframe" is defined in special.c. */ -EXTERN struct colorframe *rcs_top; +struct colorframe *rcs_top; /* Color states. */ -EXTERN struct rgb fg_initial; /* Initial fg (from command line) */ -EXTERN struct rgb bg_initial; /* Initial bg */ +struct rgb fg_initial; /* Initial fg (from command line) */ +struct rgb bg_initial; /* Initial bg */ /* * For each (foreground, background) color pair, we keep information (depending @@ -600,18 +597,18 @@ struct fgrec { #endif }; -EXTERN struct bgrec *bg_head INIT(NULL); /* head of list */ -EXTERN struct bgrec *bg_current INIT(NULL); /* current bg value */ -EXTERN struct fgrec *fg_current; /* current fg value */ -EXTERN struct fgrec *fg_active INIT(NULL); /* where the GCs are */ +struct bgrec *bg_head INIT(NULL); /* head of list */ +struct bgrec *bg_current INIT(NULL); /* current bg value */ +struct fgrec *fg_current; /* current fg value */ +struct fgrec *fg_active INIT(NULL); /* where the GCs are */ /* List of allocated colors (to be deallocated upon document change) */ -EXTERN Pixel *color_list; /* list of colors */ -EXTERN unsigned int color_list_len INIT(0); /* current len of list*/ -EXTERN unsigned int color_list_max INIT(0); /* allocated size */ +Pixel *color_list; /* list of colors */ +unsigned int color_list_len INIT(0); /* current len of list*/ +unsigned int color_list_max INIT(0); /* allocated size */ /* Whether the color situation has been warned about. */ -EXTERN Boolean color_warned INIT(False); +Boolean color_warned INIT(False); /* Cursor color (for XRecolorCursor). */ extern XColor cr_Color; @@ -624,7 +621,7 @@ extern struct mg_size_rec { } mg_size[5]; -EXTERN int debug INIT(0); +int debug INIT(0); #define DBG_BITMAP 1 #define DBG_DVI 2 @@ -636,48 +633,48 @@ EXTERN int debug INIT(0); #define DBG_CLIENT 128 #define DBG_ALL (~DBG_BATCH) -EXTERN int offset_x, offset_y; -EXTERN unsigned int unshrunk_paper_w, unshrunk_paper_h; -EXTERN unsigned int unshrunk_page_w, unshrunk_page_h; +int offset_x, offset_y; +unsigned int unshrunk_paper_w, unshrunk_paper_h; +unsigned int unshrunk_page_w, unshrunk_page_h; -EXTERN char *dvi_name INIT(NULL); /* dvi file name */ -EXTERN FILE *dvi_file; /* user's file */ -EXTERN Boolean dvi_file_ready INIT(False); +char *dvi_name INIT(NULL); /* dvi file name */ +FILE *dvi_file; /* user's file */ +Boolean dvi_file_ready INIT(False); /* done with font generation and prescanning */ -EXTERN time_t dvi_time; /* last modification time */ -EXTERN ino_t dvi_inode; /* used for source specials */ -EXTERN unsigned char *dvi_property; /* for setting in window */ -EXTERN size_t dvi_property_length; -EXTERN Boolean titles_are_stale INIT(True); +time_t dvi_time; /* last modification time */ +ino_t dvi_inode; /* used for source specials */ +unsigned char *dvi_property; /* for setting in window */ +size_t dvi_property_length; +Boolean titles_are_stale INIT(True); /* replace icon/window titles */ -EXTERN const char *prog; -EXTERN int bak_shrink; /* last shrink factor != 1 */ -EXTERN Dimension window_w, window_h; -EXTERN XImage *image; -EXTERN int backing_store; -EXTERN int home_x, home_y; - -EXTERN Display *DISP; -EXTERN Screen *SCRN; +const char *prog; +int bak_shrink; /* last shrink factor != 1 */ +Dimension window_w, window_h; +XImage *image; +int backing_store; +int home_x, home_y; + +Display *DISP; +Screen *SCRN; extern XtActionsRec Actions[]; extern Cardinal num_actions; -EXTERN XtAccelerators accels_cr, accels_cr_click; +XtAccelerators accels_cr, accels_cr_click; #ifdef GREY -EXTERN Visual *our_visual; -EXTERN unsigned int our_depth; -EXTERN Colormap our_colormap; +Visual *our_visual; +unsigned int our_depth; +Colormap our_colormap; #else #define our_depth (unsigned int) DefaultDepthOfScreen(SCRN) #define our_visual DefaultVisualOfScreen(SCRN) #define our_colormap DefaultColormapOfScreen(SCRN) #endif -EXTERN GC ruleGC; -EXTERN GC foreGC, highGC; -EXTERN GC foreGC2; -EXTERN GC copyGC; -EXTERN Boolean copy; +GC ruleGC; +GC foreGC, highGC; +GC foreGC2; +GC copyGC; +Boolean copy; -EXTERN Cursor redraw_cursor, ready_cursor, drag_cursor[3]; +Cursor redraw_cursor, ready_cursor, drag_cursor[3]; struct xdvi_action { struct xdvi_action *next; @@ -695,12 +692,12 @@ struct wheel_acts { struct xdvi_action *action; }; -EXTERN struct wheel_acts *wheel_actions; +struct wheel_acts *wheel_actions; #ifdef GREY -EXTERN Pixel *pixeltbl; -EXTERN Pixel *pixeltbl_t; +Pixel *pixeltbl; +Pixel *pixeltbl_t; #endif /* GREY */ /* @@ -734,9 +731,9 @@ EXTERN Pixel *pixeltbl_t; #define EV_NOWAIT EV_GE_IDLE -EXTERN unsigned int ev_flags INIT(EV_IDLE); -EXTERN volatile int event_counter INIT(0); -EXTERN jmp_buf canit_env; +unsigned int ev_flags INIT(EV_IDLE); +volatile int event_counter INIT(0); +jmp_buf canit_env; struct xchild { struct xchild *next; /* link to next in list */ @@ -783,19 +780,19 @@ struct WindowRec { }; extern struct WindowRec mane, alt, currwin; -EXTERN int min_x, max_x, min_y, max_y; -EXTERN Boolean drawing_mag INIT(False); +int min_x, max_x, min_y, max_y; +Boolean drawing_mag INIT(False); #define shrink_factor currwin.shrinkfactor -EXTERN Widget top_level INIT(0); -EXTERN Widget vport_widget, draw_widget, clip_widget; +Widget top_level INIT(0); +Widget vport_widget, draw_widget, clip_widget; # if BUTTONS -EXTERN Widget form_widget; -EXTERN int xtra_wid INIT(0); +Widget form_widget; +int xtra_wid INIT(0); extern const char default_button_config[]; /* defined in events.c */ -EXTERN Widget panel_widget; -EXTERN Cursor panel_cursor INIT(0); +Widget panel_widget; +Cursor panel_cursor INIT(0); # endif #define WARN(t, s) (void) warning_popup(s, "OK", NULL) @@ -809,10 +806,10 @@ EXTERN Cursor panel_cursor INIT(0); * and then raise them later, due to unpredictable window manager behavior. */ -EXTERN Boolean postpone_popups INIT(True); -EXTERN size_t n_init_popups INIT(0); -EXTERN Widget *init_popups; -EXTERN size_t alloc_init_popups INIT(0); +Boolean postpone_popups INIT(True); +size_t n_init_popups INIT(0); +Widget *init_popups; +size_t alloc_init_popups INIT(0); /* * Structure to use for status popups. @@ -826,11 +823,11 @@ struct status_popup { Boolean spurious; }; -EXTERN char *ffline INIT(NULL); /* an array used by filefind to store */ +char *ffline INIT(NULL); /* an array used by filefind to store */ /* the file name being formed. */ /* It expands as needed. */ /* Also used elsewhere. */ -EXTERN size_t ffline_len INIT(0); /* current length of ffline[] */ +size_t ffline_len INIT(0); /* current length of ffline[] */ #if FREETYPE || PS @@ -904,13 +901,13 @@ struct geom_info { typedef void (*mouse_proc) ARGS((XEvent *)); extern void null_mouse ARGS((XEvent *)); -EXTERN mouse_proc mouse_motion INIT(null_mouse); -EXTERN mouse_proc mouse_release INIT(null_mouse); +mouse_proc mouse_motion INIT(null_mouse); +mouse_proc mouse_release INIT(null_mouse); /* Used for source special lookup (forward search) and for window manager delete protocol (toolkit only). */ -EXTERN Atom atoms[5]; +Atom atoms[5]; #define ATOM_XDVI_WINDOWS (atoms[0]) #define ATOM_DVI_FILE (atoms[1]) @@ -919,7 +916,7 @@ EXTERN Atom atoms[5]; #define XA_WM_PROTOCOLS (atoms[4]) #ifdef SELFAUTO -EXTERN const char *argv0; /* argv[0] */ +const char *argv0; /* argv[0] */ #endif #if PS