version 1.18, 2003/07/22 21:50:21 |
version 1.19, 2003/07/28 18:35:36 |
|
|
|
|
#define DEBUGGING |
#define DEBUGGING |
|
|
#include <stdio.h> |
|
|
|
/* constants */ |
/* constants */ |
|
|
#define TRUE 1 |
#define TRUE 1 |
|
|
|
|
/* globals */ |
/* globals */ |
|
|
EXT int Argc; /* guess */ |
extern int filemode; |
EXT char **Argv; |
|
EXT int Argc_last; /* for restarting plan_b */ |
|
EXT char **Argv_last; |
|
|
|
EXT struct stat filestat; /* file statistics area */ |
extern char buf[MAXLINELEN];/* general purpose buffer */ |
EXT int filemode INIT(0644); |
|
|
|
EXT char buf[MAXLINELEN];/* general purpose buffer */ |
extern bool using_plan_a; /* try to keep everything in memory */ |
EXT FILE *ofp INIT(NULL); /* output file pointer */ |
extern bool out_of_mem; /* ran out of memory in plan a */ |
EXT FILE *rejfp INIT(NULL); /* reject file pointer */ |
|
|
|
EXT int myuid; /* cache getuid return value */ |
|
|
|
EXT bool using_plan_a INIT(TRUE); /* try to keep everything in memory */ |
|
EXT bool out_of_mem INIT(FALSE);/* ran out of memory in plan a */ |
|
|
|
#define MAXFILEC 2 |
#define MAXFILEC 2 |
EXT int filec INIT(0); /* how many file arguments? */ |
|
EXT char *filearg[MAXFILEC]; |
|
EXT bool ok_to_create_file INIT(FALSE); |
|
EXT char *bestguess INIT(NULL); /* guess at correct filename */ |
|
|
|
EXT char *outname INIT(NULL); |
extern char *filearg[MAXFILEC]; |
|
extern bool ok_to_create_file; |
|
extern char *outname; |
|
extern char *origprae; |
|
|
EXT char *origprae INIT(NULL); |
extern char *TMPOUTNAME; |
|
extern char *TMPINNAME; |
|
extern char *TMPREJNAME; |
|
extern char *TMPPATNAME; |
|
extern bool toutkeep; |
|
extern bool trejkeep; |
|
|
EXT char *TMPOUTNAME; |
|
EXT char *TMPINNAME; |
|
EXT char *TMPREJNAME; |
|
EXT char *TMPPATNAME; |
|
EXT bool toutkeep INIT(FALSE); |
|
EXT bool trejkeep INIT(FALSE); |
|
|
|
EXT LINENUM last_offset INIT(0); |
|
#ifdef DEBUGGING |
#ifdef DEBUGGING |
EXT int debug INIT(0); |
extern int debug; |
#endif |
#endif |
EXT LINENUM maxfuzz INIT(2); |
|
EXT bool force INIT(FALSE); |
extern bool force; |
EXT bool batch INIT(FALSE); |
extern bool batch; |
EXT bool verbose INIT(TRUE); |
extern bool verbose; |
EXT bool reverse INIT(FALSE); |
extern bool reverse; |
EXT bool noreverse INIT(FALSE); |
extern bool noreverse; |
EXT bool skip_rest_of_patch INIT(FALSE); |
extern bool skip_rest_of_patch; |
EXT int strippath INIT(957); |
extern int strippath; |
EXT bool canonicalize INIT(FALSE); |
extern bool canonicalize; |
/* TRUE if -C was specified on command line. */ |
/* TRUE if -C was specified on command line. */ |
EXT bool check_only INIT(FALSE); |
extern bool check_only; |
|
|
|
|
#define CONTEXT_DIFF 1 |
#define CONTEXT_DIFF 1 |
|
|
#define ED_DIFF 3 |
#define ED_DIFF 3 |
#define NEW_CONTEXT_DIFF 4 |
#define NEW_CONTEXT_DIFF 4 |
#define UNI_DIFF 5 |
#define UNI_DIFF 5 |
EXT int diff_type INIT(0); |
|
|
|
EXT bool do_defines INIT(FALSE);/* patch using ifdef, ifndef, etc. */ |
extern int diff_type; |
EXT char if_defined[128];/* #ifdef xyzzy */ |
extern char *revision; /* prerequisite revision, if any */ |
EXT char not_defined[128]; /* #ifndef xyzzy */ |
extern LINENUM input_lines; /* how long is input file in lines */ |
EXT char else_defined[] INIT("#else\n"); /* #else */ |
|
EXT char end_defined[128]; /* #endif xyzzy */ |
|
|
|
EXT char *revision INIT(NULL); /* prerequisite revision, if any */ |
|