mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-21 23:29:16 +00:00
Soenke's 3 Feb 95 changes for version 1.14.
Cleaned up the makefiles a bit. Ran ccprep on the *.c files, so that occ with -g produces good debug code. (Reported problem with Orca/C's #append directive.) Fixed stat() bug when running under Orca/Shell.
This commit is contained in:
parent
c254e15a3b
commit
89c33fa060
@ -3,7 +3,7 @@
|
|||||||
# Copyright (c) 1993-1994 Soenke Behrens
|
# Copyright (c) 1993-1994 Soenke Behrens
|
||||||
# For use with dmake
|
# For use with dmake
|
||||||
#
|
#
|
||||||
# $Id: Makefile.gs,v 1.4 1995/02/08 05:25:09 gdr Exp $
|
# $Id: Makefile.gs,v 1.5 1995/02/08 05:47:43 gdr Exp $
|
||||||
#
|
#
|
||||||
# Define the following as necessary:
|
# Define the following as necessary:
|
||||||
#
|
#
|
||||||
@ -29,10 +29,8 @@
|
|||||||
|
|
||||||
DEFINES = -DGNO -D_POSIX_C_SOURCE -D_POSIX_SOURCE -DHAS_ATEXIT \
|
DEFINES = -DGNO -D_POSIX_C_SOURCE -D_POSIX_SOURCE -DHAS_ATEXIT \
|
||||||
-DOVERFLOW_CHECK
|
-DOVERFLOW_CHECK
|
||||||
#CFLAGS = $(DEFINES) -O -w -v -s2048
|
CFLAGS = $(DEFINES) -O -w -v -s2048
|
||||||
#LDFLAGS = -v -l/usr/lib/gnulib -s2048
|
LDFLAGS = -v -l/usr/lib/gnulib -s2048
|
||||||
CFLAGS = $(DEFINES) -O -v -s2048
|
|
||||||
LDFLAGS = -v -s2048
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# You should not have to modify anything beyond this point
|
# You should not have to modify anything beyond this point
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
|
#ifdef __CCFRONT__
|
||||||
|
#line 2
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
||||||
* and Apple (CR).
|
* and Apple (CR).
|
||||||
*
|
*
|
||||||
* Routines common to both the Unix and Apple IIgs versions.
|
* Routines common to both the Unix and Apple IIgs versions.
|
||||||
*
|
*
|
||||||
* $Id: common.c,v 1.4 1995/02/08 05:25:15 gdr Exp $
|
* $Id: common.c,v 1.5 1995/02/08 05:47:48 gdr Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
||||||
*/
|
*/
|
||||||
@ -857,16 +860,35 @@ char *mktemp(const char *base)
|
|||||||
*p1 = 'A';
|
*p1 = 'A';
|
||||||
p1--;
|
p1--;
|
||||||
} else {
|
} else {
|
||||||
*p1++;
|
*p1 += 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure the file name does not already exist */
|
/* Make sure the file name does not already exist */
|
||||||
if (stat(st,&tstat) == 0)
|
#ifdef GNO
|
||||||
{
|
if (needsgno() == TRUE) {
|
||||||
|
#endif
|
||||||
|
if (stat(st,&tstat) == 0)
|
||||||
|
{
|
||||||
free (st);
|
free (st);
|
||||||
st = mktemp (base);
|
st = mktemp (base);
|
||||||
|
}
|
||||||
|
#ifdef GNO
|
||||||
|
} else { /* ORCA/Shell doesn't like stat one little bit */
|
||||||
|
FILE *fp;
|
||||||
|
if ((fp = fopen(st,"r")) != NULL)
|
||||||
|
{
|
||||||
|
fclose(fp);
|
||||||
|
free (st);
|
||||||
|
st = mktemp (base);
|
||||||
|
} else if ((fp = fopen(st,"a")) == NULL) {
|
||||||
|
free(st);
|
||||||
|
st = mktemp (base);
|
||||||
|
} else {
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
}
|
}
|
||||||
@ -888,7 +910,7 @@ char *get_path (const char *name)
|
|||||||
|
|
||||||
strcpy(filebuffer, name);
|
strcpy(filebuffer, name);
|
||||||
|
|
||||||
for (i = strlen(filebuffer) - 1; i >= 0 && filebuffer[i] != dirbrk; i--)
|
for (i = strlen(filebuffer) - 1; i > 0 && filebuffer[i] != dirbrk; i--)
|
||||||
; /* empty loop to find end of path in name */
|
; /* empty loop to find end of path in name */
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
|
#ifdef __CCFRONT__
|
||||||
|
#line 2
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
||||||
* and Apple (CR).
|
* and Apple (CR).
|
||||||
*
|
*
|
||||||
* Contains definitions of global variables declared in common.h
|
* Contains definitions of global variables declared in common.h
|
||||||
*
|
*
|
||||||
* $Id: globals.c,v 1.1 1995/02/08 05:25:18 gdr Exp $
|
* $Id: globals.c,v 1.2 1995/02/08 05:47:52 gdr Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
||||||
*/
|
*/
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
|
#ifdef __CCFRONT__
|
||||||
|
#line 2
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
||||||
* and Apple (CR).
|
* and Apple (CR).
|
||||||
*
|
*
|
||||||
* Apple IIgs specific routines.
|
* Apple IIgs specific routines.
|
||||||
*
|
*
|
||||||
* $Id: udlgs.c,v 1.4 1995/02/08 05:25:22 gdr Exp $
|
* $Id: udlgs.c,v 1.5 1995/02/08 05:47:55 gdr Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
||||||
*/
|
*/
|
||||||
@ -183,7 +186,9 @@ int main(int argc,char *argv[]) {
|
|||||||
} else {
|
} else {
|
||||||
InitWild.flags = 0;
|
InitWild.flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dirbrk = ':'; /* enforced by NextWildcardGS */
|
||||||
|
|
||||||
/* loop through all command line args */
|
/* loop through all command line args */
|
||||||
for (; optind < argc; optind++) {
|
for (; optind < argc; optind++) {
|
||||||
size_t i;
|
size_t i;
|
||||||
@ -259,7 +264,7 @@ int main(int argc,char *argv[]) {
|
|||||||
infile = tryopen(current_file,"rwb");
|
infile = tryopen(current_file,"rwb");
|
||||||
tempfile = mktemp(strcat(get_path(current_file), "udltmpXX"));
|
tempfile = mktemp(strcat(get_path(current_file), "udltmpXX"));
|
||||||
outfile = tryopen(tempfile,"wb");
|
outfile = tryopen(tempfile,"wb");
|
||||||
|
|
||||||
if (careful) {
|
if (careful) {
|
||||||
converted = TRUE; /* always */
|
converted = TRUE; /* always */
|
||||||
|
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
|
#ifdef __CCFRONT__
|
||||||
|
#line 2
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
||||||
* and Apple (CR).
|
* and Apple (CR).
|
||||||
*
|
*
|
||||||
* Unix specific routines.
|
* Unix specific routines.
|
||||||
*
|
*
|
||||||
* $Id: udlunix.c,v 1.4 1995/02/08 05:25:24 gdr Exp $
|
* $Id: udlunix.c,v 1.5 1995/02/08 05:47:57 gdr Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
||||||
*/
|
*/
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
|
#ifdef __CCFRONT__
|
||||||
|
#line 2
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
* udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
|
||||||
* and Apple (CR).
|
* and Apple (CR).
|
||||||
*
|
*
|
||||||
* Usage strings.
|
* Usage strings.
|
||||||
*
|
*
|
||||||
* $Id: udluse.c,v 1.4 1995/02/08 05:25:26 gdr Exp $
|
* $Id: udluse.c,v 1.5 1995/02/08 05:47:59 gdr Exp $
|
||||||
*
|
*
|
||||||
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
* Copyright (c) 1993-1995 Soenke Behrens, Devin Glyn Reade
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user