gno/usr.orca.bin/udl/globals.c
gdr 3cef5cabcf Fixed bug (via the BROKEN_DIRENT_STRUCT macro) that was causing
filename-munging on Solaris.  It seems that the sys/stat.h header
file doesn't agree with the stat implementation.

Modified Makefile.gs to properly write the new executable over
the old resource fork for udl.  The resource fork originates with
the file udl.r.

Added suggested defines to the README for various Unix platforms.

Man page changes, including grammar and the deletion of a bug that
no longer exists.

Fixed bug where invoking 'udl -u directory' would attempt to
deref a NULL pointer, causing either memory tromping (IIgs) or
a core dump (Unix).

Tested under SunOS 4.x, SunOS 5.x (Solaris), and AIX.
1995-02-08 06:12:49 +00:00

39 lines
1.4 KiB
C

#ifdef __CCFRONT__
#line 2
#endif
/*
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
* and Apple (CR).
*
* Contains definitions of global variables declared in common.h
*
* $Id: globals.c,v 1.3 1995/02/08 06:12:38 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
#ifdef GNO
#pragma noroot
#endif
#include "common.h"
char *program_name; /* How was udl invoked? */
char *current_file; /* Name of current file */
char *tempfile; /* Name of temporary file */
unsigned char *in_buffer; /* My own buffering scheme instead of */
unsigned char *out_buffer; /* setvbuf() */
int verbose;
char filebuffer[MAXPATHLEN]; /* a scratch buffer for file names */
char currentDirectory[MAXPATHLEN];
char rootdir[MAXPATHLEN]; /* the initial directory */
struct stat tstat; /* temporary variable used to stat files */
int pathSlotsUsed; /* number of used and available slots in pathList,*/
int pathSlots; /* respectively. Both are initially zero. */
char **pathList; /* the list of files to process, given relative */
/* to the initial directory. Initially NULL, */
/* and NULL terminated. */
char dirbrk; /* the character used to separate parts of a path name */
int recursionDepth; /* levels of subdirectories that we've traversed */