Checkin of v1.1.5:

- Changed source slightly to compile under djgpp (MS-DOS) and Linux,
	  linted source.
	- Unix makefile changed by Devin Reade to automatically detect OS
	  type.
	- Apple IIgs source now opens files with "r+b" instead of "rwb"
This commit is contained in:
gdr 1997-08-02 21:09:13 +00:00
parent 316b9588e8
commit 86337db335
8 changed files with 50 additions and 28 deletions

View File

@ -7,7 +7,7 @@ udl - Convert EOL formats freely between MS-DOS (CR/LF), Unix/Amiga (LF),
Version 1.1.5
$Id: HISTORY,v 1.2 1996/02/11 20:05:45 gdr Exp $
$Id: HISTORY,v 1.3 1997/08/02 21:09:12 gdr Exp $
=============================================================================
Udl converts text files between CR, LF and CR/LF (Apple, Unix and MS-DOS).
@ -78,4 +78,6 @@ v1.1.5
(Soenke Behrens, Devin Reade, January 1996)
Changed source slightly to compile under djgpp (MS-DOS) and Linux,
linted source
Unix makefile changed by Devin Reade to automatically detect OS type
Unix makefile changed by Devin Reade to automatically detect OS
type
Apple IIgs source now opens files with "r+b" instead of "rwb"

View File

@ -4,7 +4,7 @@
#
# This makefile should be used with dmake.
#
# $Id: Makefile.gs,v 1.10 1996/02/11 20:05:47 gdr Exp $
# $Id: Makefile.gs,v 1.11 1997/08/02 21:09:13 gdr Exp $
#
# Where do we put the binaries and man page?
@ -20,7 +20,7 @@ DEFINES = -DGNO -D_POSIX_C_SOURCE -D_POSIX_SOURCE -DHAS_ATEXIT \
# Use optimization and a 2k stack.
CFLAGS = $(DEFINES) -O -s2048
LDFLAGS = -s2048
LDFLAGS =
# Depending on how you have your libraries set up, you may not need
# this next line. In that case, just comment it out.

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.9 1996/02/04 01:34:25 gdr Exp $
Version 1.1.5: $Id: README,v 1.10 1997/08/02 21:09:13 gdr Exp $
=============================================================================
Udl converts text files between the various end-of-line conventions, i.e.
@ -76,7 +76,7 @@ don't like these locations, either modify the BINDIR and MANDIR
macros in the makefile or install the files by hand.
If you have describe(1) installed, you can update the udl(1) entry
with the file "describe.udl". See the descu(8) and descc(8) man pages
with the file "udl.desc". See the descu(8) and descc(8) man pages
for details.
Apple IIgs with Orca/Shell
@ -168,7 +168,7 @@ Files
The following files are present in the udl package:
README This file
History Revision history
HISTORY Revision history
Makefile.gs make(1) script for GNO
Makefile.unx make(1) script for Unix
Makefile.msd make(1) script for MS-DOS
@ -176,7 +176,7 @@ The following files are present in the udl package:
common.h Header file for common.c
globals.c Global variable definitions
udl.1 Man page for udl command
describe.udl short description of udl, FTP info
udl.desc short description of udl, FTP info
udlgs.c Apple IIgs specific routines
udl.rez Apple IIgs REZ source for resource fork
udlunix.c Unix specific routines
@ -207,6 +207,9 @@ such and the unmodified source is included.
This program contains material from the Orca/C Run-Time Libraries,
Copyright 1987-1995 by Byte Works, Inc. Used with permission.
The GS executable of udl contains code CopyLeft by the FSF (Free Software
Foundation). Source and binaries to GNU getopt are available on request.
=======
Authors
=======

View File

@ -1,6 +1,6 @@
.\" Copyright (c) 1993-1996 Soenke Behrens, Devin Reade
.\"
.\" $Id: udl.1,v 1.10 1996/02/11 20:05:48 gdr Exp $
.\" $Id: udl.1,v 1.11 1997/08/02 21:09:13 gdr Exp $
.\"
.TH UDL 1 "Commands and Applications" "31 January 1996" "Version 1.1.5"
.SH NAME
@ -9,7 +9,7 @@ udl - convert text files between different architectures
.BR udl
.BR -u | m | g
[
.B -Rvp
.B -RvpVh
]
.I file1
[
@ -64,6 +64,10 @@ Be pedantic, only affects Unix<->Apple conversions, see below.
Recurse through subdirectories.
.IP \fB\-v\fP
Be verbose, show the file udl is currently working on.
.IP \fB\-V\fP
Print out udl's version number and abort.
.IP \fB\-h\fP
Print out usage information for udl.
.PP
If you specify the
.B -p

View File

@ -1,9 +1,10 @@
Name: udl
Version: 1.15
Version: 1.1.5
Shell: GNO/ME, ORCA/Shell
Author: Soenke Behrens, Devin Reade
Contact: sbehrens@contech.demon.co.uk, gdr@myrias.ab.ca
Where: /usr/local/bin
FTP: ftp.cco.caltech.edu, grind.isca.uiowa.edu
FTP: apple2.caltech.edu, grind.isca.uiowa.edu
Converts text between the CR, LF and CR/LF forms. Also available for Unix
machines, reasonably fast yet secure.

View File

@ -4,7 +4,7 @@
*
* Apple IIgs specific routines.
*
* $Id: udlgs.c,v 1.9 1996/02/04 01:34:29 gdr Exp $
* $Id: udlgs.c,v 1.10 1997/08/02 21:09:13 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
@ -89,7 +89,7 @@ int main(int argc,char *argv[]) {
exit (EXIT_FAILURE);
}
if (argc < 3) {
if (argc < 2) {
usage();
exit (EXIT_FAILURE);
}
@ -98,7 +98,7 @@ int main(int argc,char *argv[]) {
optind = 0;
opterr = 1;
while ((c = getopt (argc, argv, "pvugmR")) != EOF) {
while ((c = getopt (argc, argv, "pvugmRVh")) != EOF) {
switch (c) {
case 'v':
verbose = TRUE;
@ -138,8 +138,13 @@ int main(int argc,char *argv[]) {
case 'R':
R_flag++;
break;
case '?':
case 'V':
printf ("%s %s\n",program_name,UDL_VERSION);
exit (EXIT_FAILURE);
case '?':
case 'h':
usage();
exit (EXIT_FAILURE);
@ -264,7 +269,7 @@ int main(int argc,char *argv[]) {
printf("%s: Working on %s\n",program_name,current_file);
}
infile = tryopen(current_file,"rwb");
infile = tryopen(current_file,"r+b");
tempfile = Mktemp(strcat(get_path(current_file), "udltmpXX"));
outfile = tryopen(tempfile,"wb");

View File

@ -4,7 +4,7 @@
*
* Unix specific routines.
*
* $Id: udlunix.c,v 1.9 1996/02/04 01:34:30 gdr Exp $
* $Id: udlunix.c,v 1.10 1997/08/02 21:09:13 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
@ -44,7 +44,7 @@ int main(int argc,char *argv[]) {
exit (EXIT_FAILURE);
}
if (argc < 3) {
if (argc < 2) {
usage();
exit (EXIT_FAILURE);
}
@ -52,7 +52,7 @@ int main(int argc,char *argv[]) {
/* Get and process arguments */
opterr = 1;
while ((c = getopt (argc, argv, "pvugmR")) != EOF) {
while ((c = getopt (argc, argv, "pvugmRVh")) != EOF) {
switch (c) {
case 'v':
verbose = TRUE;
@ -92,8 +92,13 @@ int main(int argc,char *argv[]) {
case 'R':
R_flag++;
break;
case 'V':
printf ("%s %s\n",program_name,UDL_VERSION);
exit (EXIT_FAILURE);
case '?':
case 'h':
usage();
exit (EXIT_FAILURE);

View File

@ -4,7 +4,7 @@
*
* Usage strings.
*
* $Id: udluse.c,v 1.9 1996/02/04 01:34:31 gdr Exp $
* $Id: udluse.c,v 1.10 1997/08/02 21:09:13 gdr Exp $
*
* Copyright (c) 1993-1995 Soenke Behrens, Devin Reade
*/
@ -15,14 +15,16 @@
char use1 [] =
"udl 1.1.5 by Soenke Behrens, Devin Reade\n"
"Usage: udl -u|g|m [-Rvp] file1 [file2 ...]\n\n"
"Usage: udl -u|g|m [-RvpVh] file1 [file2 ...]\n\n"
"Options:\n"
" -u Convert file to use LF as EOL character.\n"
" -g Convert file to use CR as EOL character.\n"
" -m Convert file to use LF/CR as EOL character.\n"
" -u Convert file to use LF as EOL character (Unix).\n"
" -g Convert file to use CR as EOL character (Apple).\n"
" -m Convert file to use LF/CR as EOL character (MS-DOS).\n"
" -R Recurse through subdirectories.\n"
" -p Be pedantic.\n"
" -v Be verbose about it.\n\n"
" -v Be verbose about it.\n"
" -V Print out version number.\n"
" -h Display this help screen.\n\n"
"udl creates a temporary file in the directory of the original file.\n"
"The original file is overwritten after conversion.\n";