Initial checkin for GNO, such that it actually compiles and links.

No functional differences.  Not tested.
This commit is contained in:
gdr 1997-12-08 16:07:19 +00:00
parent be57edaf08
commit d34f9db837
7 changed files with 70 additions and 28 deletions

24
usr.orca.bin/udl/Makefile Normal file
View File

@ -0,0 +1,24 @@
#
# This file is intended for use when building udl from within
# the GNO base distribution. For building stand-alone on the
# IIgs or on another platform, use one of the other makefiles.
#
# Devin Reade, October 1997.
#
# $Id: Makefile,v 1.1 1997/12/08 16:07:19 gdr Exp $
#
PROG = udl
SRCS = udlgs.c udluse.c common.c globals.c
MAIN = udlgs
# OPTIMIZE= 0
# DEBUG =
# See the README for these macros.
CFLAGS += -DHAS_ATEXIT -DOVERFLOW_CHECK # -D__STACK_CHECK__
STACK = 4096
BINDIR = /usr/bin
.INCLUDE: /src/gno/prog.mk
head.o:: def.h extern.h

View File

@ -4,7 +4,7 @@ udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
(c) 1993-1996 Soenke Behrens, Devin Reade
Version 1.1.5: $Id: README,v 1.10 1997/08/02 21:09:13 gdr Exp $
Version 1.1.5: $Id: README,v 1.11 1997/12/08 16:07:19 gdr Exp $
=============================================================================
Udl converts text files between the various end-of-line conventions, i.e.
@ -67,8 +67,14 @@ breaking the code for other platforms).
Installation
============
Apple IIgs with GNO
^^^^^^^^^^^^^^^^^^^
Apple IIgs with GNO v2.0.6 (Source Distribution)
^^^^^^^^^^^^^^^^^^^^^^^^^^
Type 'dmake install' to install to a live system.
Type 'dmake release' when building a binary release.
Apple IIgs with GNO v2.0.4
^^^^^^^^^^^^^^^^^^^^^^^^^^
Type 'dmake install -f Makefile.gs'. By default this copies the binary
into "/usr/local/bin" and the man page into "/usr/local/man/man1". (You
_are_ using version 3.x of 'man', are you not? *blatant plug*) If you
@ -105,7 +111,8 @@ your operating system as returned by `uname -sr | tr ' ' '_'`.
HAS_ATEXIT if your system has atexit()
_POSIX_C_SOURCE and _POSIX_SOURCE if your compiler is Posix compliant
_POSIX_C_SOURCE and _POSIX_SOURCE if your compiler, libraries,
and headers are POSIX-1.1988 compliant
READDIR_RETURNS_DOT if your direct readdir() function will return
entries for "." and "..". SunOS 4.x and 5.x (Solaris) are known to

View File

@ -4,12 +4,12 @@
*
* Routines common to both the Unix and Apple IIgs versions.
*
* $Id: common.c,v 1.9 1996/02/04 01:34:26 gdr Exp $
* $Id: common.c,v 1.10 1997/12/08 16:07:19 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
#ifdef GNO
#ifdef __GNO__
#pragma noroot
#endif
@ -602,12 +602,12 @@ void cleanup (void) {
void usage (void) {
extern char use1[]; /* from udluse.c */
#ifdef GNO
#ifdef __GNO__
extern char use2[];
#endif
fprintf(stderr,"%s",use1);
#ifdef GNO
#ifdef __GNO__
if(!needsgno())
fprintf(stderr,"%s",use2);
#endif
@ -837,7 +837,7 @@ char *Mktemp(const char *base)
}
/* Make sure the file name does not already exist */
#ifdef GNO
#ifdef __GNO__
if (needsgno() == TRUE) {
#endif
if (stat(st,&tstat) == 0)
@ -845,7 +845,7 @@ char *Mktemp(const char *base)
free (st);
st = Mktemp (base);
}
#ifdef GNO
#ifdef __GNO__
} else { /* ORCA/Shell doesn't like stat one little bit */
FILE *fp;
if ((fp = fopen(st,"r")) != NULL)

View File

@ -4,12 +4,12 @@
*
* Contains definitions of global variables declared in common.h
*
* $Id: globals.c,v 1.6 1996/02/04 01:34:28 gdr Exp $
* $Id: globals.c,v 1.7 1997/12/08 16:07:19 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
#ifdef GNO
#ifdef __GNO__
#pragma noroot
#endif

View File

@ -1,8 +1,8 @@
.\" Copyright (c) 1993-1996 Soenke Behrens, Devin Reade
.\" Copyright (c) 1993-1997 Soenke Behrens, Devin Reade
.\"
.\" $Id: udl.1,v 1.11 1997/08/02 21:09:13 gdr Exp $
.\" $Id: udl.1,v 1.12 1997/12/08 16:07:19 gdr Exp $
.\"
.TH UDL 1 "Commands and Applications" "31 January 1996" "Version 1.1.5"
.TH UDL 1 "31 January 1996" GNO "Commands and Applications"
.SH NAME
udl - convert text files between different architectures
.SH SYNOPSIS
@ -95,6 +95,6 @@ Bug reports should be directed to one of the two addresses below.
Soenke Behrens <sbehrens@contech.demon.co.uk> with contributions by
Devin Reade <gdr@myrias.ab.ca>.
.SH VERSION
This is
This manual page documents
.B udl
version 1.1.5.

View File

@ -4,7 +4,7 @@
*
* Apple IIgs specific routines.
*
* $Id: udlgs.c,v 1.10 1997/08/02 21:09:13 gdr Exp $
* $Id: udlgs.c,v 1.11 1997/12/08 16:07:19 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
@ -12,7 +12,17 @@
#include <orca.h>
#include <shell.h>
#include <gsos.h>
#include <stdlib.h>
#ifdef __GNO__
#include <unistd.h>
#include <gno/gno.h>
#else
#include <getopt.h>
#endif
/* We having a naming inconsistency in <shell.h> */
#define Next_WildcardGSPB NextWildcardGSPB
#include "common.h"
@ -29,9 +39,6 @@ Init_WildcardGSPB InitWild;
extern pascal void SystemQuitFlags (unsigned);
extern pascal void SystemQuitPath (GSString255Ptr);
extern int needsgno(void);
extern void begin_stack_check(void);
extern int end_stack_check(void);
/*
* Prototypes of functions in this file
@ -41,6 +48,13 @@ extern int CheckGSOSType (char *name);
extern void SetGSOSType (char *name, int type, int auxtype);
extern int right_shell_version (void);
#ifdef __STACK_CHECK__
static void
printStack (void) {
fprintf(stderr, "stack usage: %d bytes\n", _endStackCheck());
}
#endif
int main(int argc,char *argv[]) {
FILE *infile, *outfile;
int Tunix = FALSE;
@ -67,8 +81,9 @@ int main(int argc,char *argv[]) {
*currentDirectory = '\0';
recursionDepth=0;
#ifdef CHECK_STACK
begin_stack_check();
#ifdef __STACK_CHECK__
_beginStackCheck();
atexit(printStack);
#endif
/* In case of exit(), free the mem I allocated */
@ -314,10 +329,6 @@ int main(int argc,char *argv[]) {
p++;
} /* end while */
#ifdef CHECK_STACK
fprintf(stderr,"stack usage: %d bytes\n",end_stack_check());
#endif
return (EXIT_SUCCESS);
}

View File

@ -4,12 +4,12 @@
*
* Usage strings.
*
* $Id: udluse.c,v 1.10 1997/08/02 21:09:13 gdr Exp $
* $Id: udluse.c,v 1.11 1997/12/08 16:07:19 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
#ifdef GNO
#ifdef __GNO__
#pragma noroot
#endif