mirror of https://github.com/GnoConsortium/gno.git
- minor changes to build under the GNO base distribution
This commit is contained in:
parent
48574decdd
commit
ef3c68dfac
|
@ -1,19 +1,10 @@
|
|||
# Makefile for basename(1) and dirname(1)
|
||||
#
|
||||
# Use TESTFLAGS to check stack usage.
|
||||
|
||||
CFLAGS += -w -O -s 768 -c
|
||||
LDFLAGS += -O
|
||||
TESTFLAGS += -w -G25 -DSTACK_CHECK
|
||||
|
||||
all : basename dirname
|
||||
|
||||
basename : basename.o basename.r
|
||||
$(CC) $(LDFLAGS) -o $@ $@.o
|
||||
$(CATREZ) -d $@ $@.r
|
||||
|
||||
dirname : dirname.o dirname.r
|
||||
$(CC) $(LDFLAGS) -o $@ $@.o
|
||||
$(CATREZ) -d $@ $@.r
|
||||
# $Id: Makefile,v 1.2 1998/03/29 20:47:08 gdr-ftp Exp $
|
||||
#
|
||||
|
||||
PROG = basename
|
||||
BINDIR = /usr/bin
|
||||
STACK *= 768
|
||||
OPTIMIZE *= -1
|
||||
|
||||
.INCLUDE : /src/gno/prog.mk
|
||||
|
|
|
@ -33,9 +33,9 @@
|
|||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" @(#)basename.1 8.2 (Berkeley) 4/18/94
|
||||
.\" $Id: basename.1,v 1.1 1998/03/25 15:08:16 gdr-ftp Exp $
|
||||
.\" $Id: basename.1,v 1.2 1998/03/29 20:47:09 gdr-ftp Exp $
|
||||
.\"
|
||||
.TH BASENAME 1
|
||||
.TH BASENAME 1 "25 March 1998" GNO "Commands and Applications"
|
||||
.SH NAME
|
||||
.PP
|
||||
\fBbasename\fR, \fBdirname\fR
|
||||
|
@ -85,8 +85,6 @@ the deliminator.
|
|||
The \fBbasename\fR and \fBdirname\fR functions are
|
||||
expected to be POSIX 1003.2 compatible.
|
||||
.SH COPYRIGHT
|
||||
.PP
|
||||
.nf
|
||||
This program contains material from the ORCA/C
|
||||
Run-Time Libraries, copyright 1987-1992
|
||||
by ByteWorks, Inc. Used with Permission.
|
||||
|
|
|
@ -45,7 +45,9 @@ static char sccsid[] = "@(#)basename.c 8.4 (Berkeley) 5/4/95";
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#ifdef __GNO__
|
||||
#include <gno/gno.h>
|
||||
#endif
|
||||
|
||||
void usage (void);
|
||||
|
||||
|
@ -55,9 +57,9 @@ main(int argc, char **argv)
|
|||
char *p, delimiter = '/';
|
||||
int ch;
|
||||
|
||||
# ifdef STACK_CHECK
|
||||
_beginStackCheck();
|
||||
# endif
|
||||
#ifdef __GNO__
|
||||
__REPORT_STACK()
|
||||
#endif
|
||||
|
||||
while ((ch = getopt(argc, argv, "")) != -1)
|
||||
switch(ch) {
|
||||
|
@ -148,10 +150,6 @@ main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
(void)printf("%s\n", p);
|
||||
|
||||
# ifdef STACK_CHECK
|
||||
fprintf(stdout, "stack used: %d\n", _endStackCheck());
|
||||
# endif
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
* This is a CVS/RCS identification line -- an excellent tool for maintaining
|
||||
* your sources:
|
||||
*
|
||||
* $Id: basename.rez,v 1.1 1998/03/25 15:08:21 gdr-ftp Exp $
|
||||
* $Id: basename.rez,v 1.2 1998/03/29 20:47:12 gdr-ftp Exp $
|
||||
*/
|
||||
|
||||
#include "Types.Rez"
|
||||
#include "Proginfo.Rez"
|
||||
#include "/src/gno/build.tools/builddate.rez"
|
||||
|
||||
resource rVersion (0x1, purgeable3, nocrossbank) {
|
||||
|
||||
|
@ -21,7 +22,8 @@ resource rVersion (0x1, purgeable3, nocrossbank) {
|
|||
/* Note that \n is used to separate lines here. */
|
||||
"Strips the pathname from a fully expanded file path.\n"
|
||||
"Ported from FreeBSD source code.\n"
|
||||
"Scott Moberly <smoberly@s-cwis.unomaha.edu>"
|
||||
"Scott Moberly <smoberly@s-cwis.unomaha.edu>\n"
|
||||
BUILD_DATE
|
||||
};
|
||||
|
||||
#define ON 1
|
||||
|
|
Loading…
Reference in New Issue