From 918d33c61da4a61249e9991125c0a6c9ef85540f Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Tue, 18 Feb 2003 20:35:35 +0000 Subject: [PATCH] formatting --- misc/args.c | 64 +++++++++++++------------------------------------ misc/byteswap.c | 3 ++- misc/d_delay.c | 5 +++- misc/d_io.c | 7 ++++-- misc/dos_disk.h | 1 + misc/error.c | 30 +++++++++++------------ misc/hash.c | 5 ++-- misc/parsarg.c | 5 ++-- misc/parsarg.h | 49 ++++++++++++++++++------------------- misc/strio.c | 5 +++- misc/strutil.c | 5 ++-- 11 files changed, 82 insertions(+), 97 deletions(-) diff --git a/misc/args.c b/misc/args.c index 6e455079..8a91a44e 100644 --- a/misc/args.c +++ b/misc/args.c @@ -1,3 +1,4 @@ +/* $Id: args.c,v 1.8 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,79 +8,48 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ + /* - * $Source: /cvs/cvsroot/d2x/misc/args.c,v $ - * $Revision: 1.7 $ - * $Author: bradleyb $ - * $Date: 2002-02-11 07:36:23 $ - * - * Functions for accessing arguments. - * - * $Log: not supported by cvs2svn $ - * Revision 1.6 2002/01/18 07:02:23 bradleyb - * formatting - * - * Revision 1.5 2001/11/09 06:57:27 bradleyb - * use d2x.ini for option file - * - * Revision 1.4 2001/11/05 07:39:26 bradleyb - * Change args_init back to InitArgs - * - * Revision 1.3 2001/01/31 15:18:04 bradleyb - * Makefile and conf.h fixes - * - * Revision 1.2 2001/01/24 04:29:48 bradleyb - * changed args_find to FindArg * - * Revision 1.1.1.1 2001/01/19 03:30:14 bradleyb - * Import of d2x-0.0.8 - * - * Revision 1.3 1999/08/05 22:53:41 sekmu - * - * D3D patch(es) from ADB - * - * Revision 1.2 1999/06/14 23:44:11 donut - * Orulz' svgalib/ggi/noerror patches. - * - * Revision 1.1.1.1 1999/06/14 22:05:15 donut - * Import of d1x 1.37 source. + * Functions for accessing arguments. * + * Old Log: * Revision 2.0 1995/02/27 11:31:22 john * New version 2.0, which has no anonymous unions, builds with * Watcom 10.0, and doesn't require parsing BITMAPS.TBL. - * + * * Revision 1.9 1994/11/29 01:07:57 john * Took out some unused vars. - * + * * Revision 1.8 1994/11/29 01:04:30 john * Took out descent.ini stuff. - * + * * Revision 1.7 1994/09/20 19:29:15 matt * Made args require exact (not substring), though still case insensitive. - * + * * Revision 1.6 1994/07/25 12:33:11 john * Network "pinging" in. - * + * * Revision 1.5 1994/06/17 18:07:50 matt * Took out printf - * + * * Revision 1.4 1994/05/11 19:45:33 john * *** empty log message *** - * + * * Revision 1.3 1994/05/11 18:42:11 john * Added Descent.ini config file. - * + * * Revision 1.2 1994/05/09 17:03:30 john * Split command line parameters into arg.c and arg.h. * Also added /dma, /port, /irq to digi.c - * + * * Revision 1.1 1994/05/09 16:49:11 john * Initial revision - * - * + * + * */ #ifdef HAVE_CONFIG_H @@ -87,7 +57,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: args.c,v 1.7 2002-02-11 07:36:23 bradleyb Exp $"; +static char rcsid[] = "$Id: args.c,v 1.8 2003-02-18 20:35:35 btb Exp $"; #endif #include diff --git a/misc/byteswap.c b/misc/byteswap.c index 8cc69e95..499332b0 100644 --- a/misc/byteswap.c +++ b/misc/byteswap.c @@ -1,3 +1,4 @@ +/* $Id: byteswap.c,v 1.3 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,7 +8,7 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ diff --git a/misc/d_delay.c b/misc/d_delay.c index 44bf1523..56c1f74f 100644 --- a/misc/d_delay.c +++ b/misc/d_delay.c @@ -1,4 +1,7 @@ -//added on 9/2/98 by Matt Mueller +/* $Id: d_delay.c,v 1.5 2003-02-18 20:35:35 btb Exp $ */ +/* + * added on 9/2/98 by Matt Mueller + */ #ifdef HAVE_CONFIG_H #include diff --git a/misc/d_io.c b/misc/d_io.c index 81771375..cfa61974 100644 --- a/misc/d_io.c +++ b/misc/d_io.c @@ -1,5 +1,8 @@ -// some misc. file/disk routines -// Arne de Bruijn, 1998 +/* $Id: d_io.c,v 1.5 2003-02-18 20:35:35 btb Exp $ */ +/* + * some misc. file/disk routines + * Arne de Bruijn, 1998 + */ #ifdef HAVE_CONFIG_H #include diff --git a/misc/dos_disk.h b/misc/dos_disk.h index c983fce4..880e8c64 100644 --- a/misc/dos_disk.h +++ b/misc/dos_disk.h @@ -1,3 +1,4 @@ +/* $Id: dos_disk.h,v 1.2 2003-02-18 20:35:35 btb Exp $ */ #ifndef _DISK_H #define _DISK_H diff --git a/misc/error.c b/misc/error.c index 4b5ece46..b753eedd 100644 --- a/misc/error.c +++ b/misc/error.c @@ -1,4 +1,4 @@ -/* $Id: error.c,v 1.3 2002-08-02 11:05:26 btb Exp $ */ +/* $Id: error.c,v 1.4 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -8,7 +8,7 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* @@ -18,41 +18,41 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. * Old Log: * Revision 1.12 1994/12/07 18:49:39 matt * error_init() can now take NULL as parm - * + * * Revision 1.11 1994/11/29 15:42:07 matt * Added newline before error message - * + * * Revision 1.10 1994/11/27 23:20:39 matt * Made changes for new mprintf calling convention - * + * * Revision 1.9 1994/06/20 21:20:56 matt * Allow NULL for warn func, to kill warnings - * + * * Revision 1.8 1994/05/20 15:11:35 mike * mprintf Warning message so you can actually see it. - * + * * Revision 1.7 1994/02/10 18:02:38 matt * Changed 'if DEBUG_ON' to 'ifndef NDEBUG' - * + * * Revision 1.6 1993/10/17 18:19:10 matt * If error_init() not called, Error() now prints the error message before * calling exit() - * + * * Revision 1.5 1993/10/14 15:29:11 matt * Added new function clear_warn_func() - * + * * Revision 1.4 1993/10/08 16:17:19 matt * Made Assert() call function _Assert(), rather to do 'if...' inline. - * + * * Revision 1.3 1993/09/28 12:45:25 matt * Fixed wrong print call, and made Warning() not append a CR to string - * + * * Revision 1.2 1993/09/27 11:46:35 matt * Added function set_warn_func() - * + * * Revision 1.1 1993/09/23 20:17:33 matt * Initial revision - * + * * */ @@ -61,7 +61,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: error.c,v 1.3 2002-08-02 11:05:26 btb Exp $"; +static char rcsid[] = "$Id: error.c,v 1.4 2003-02-18 20:35:35 btb Exp $"; #endif #include diff --git a/misc/hash.c b/misc/hash.c index 1608a1aa..e7f059cb 100644 --- a/misc/hash.c +++ b/misc/hash.c @@ -1,3 +1,4 @@ +/* $Id: hash.c,v 1.3 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,7 +8,7 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ @@ -16,7 +17,7 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #endif #ifdef RCS -static char rcsid[] = "$Id: hash.c,v 1.2 2001-01-31 15:18:04 bradleyb Exp $"; +static char rcsid[] = "$Id: hash.c,v 1.3 2003-02-18 20:35:35 btb Exp $"; #endif #include diff --git a/misc/parsarg.c b/misc/parsarg.c index f53cd56f..05afdc64 100644 --- a/misc/parsarg.c +++ b/misc/parsarg.c @@ -1,3 +1,4 @@ +/* $Id: parsarg.c,v 1.2 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,12 +8,12 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ #pragma off (unreferenced) -static char rcsid[] = "$Id: parsarg.c,v 1.1.1.1 2001-01-19 03:30:14 bradleyb Exp $"; +static char rcsid[] = "$Id: parsarg.c,v 1.2 2003-02-18 20:35:35 btb Exp $"; #pragma on (unreferenced) #include diff --git a/misc/parsarg.h b/misc/parsarg.h index 55ae878b..af639aaf 100644 --- a/misc/parsarg.h +++ b/misc/parsarg.h @@ -1,3 +1,4 @@ +/* $Id: parsarg.h,v 1.2 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,35 +8,35 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* - - Routine to parse the command line. Will also read and parse args - from a file. - - parse_args() is called with argc & argv from main(), the function - to be called with each argument, and flags. argc & argv are usually - adjusted to not pass the first parameter (the program file name). - Thus the general method of calling is: - - parse_args(argc-1,argv+1,hander_func,flags); - - handler_func() is then called with each parameter. - - If the PA_EXPAND flag is passed, all arguments which do not start - with '-' are assumed to be filenames and are expanded for wildcards, - with the handler function called for each match. If a spec matches - nothing, the spec itself is passed to the handler func. - - Args that start with '@' are assumed to be argument files. These - files are opened, and arguments are read from them just as if they - were specified on the command line. Arg files can be nested. - -*/ + * + * Routine to parse the command line. Will also read and parse args + * from a file. + * + * parse_args() is called with argc & argv from main(), the function + * to be called with each argument, and flags. argc & argv are usually + * adjusted to not pass the first parameter (the program file name). + * Thus the general method of calling is: + * + * parse_args(argc-1,argv+1,hander_func,flags); + * + * handler_func() is then called with each parameter. + * + * If the PA_EXPAND flag is passed, all arguments which do not start + * with '-' are assumed to be filenames and are expanded for wildcards, + * with the handler function called for each match. If a spec matches + * nothing, the spec itself is passed to the handler func. + * + * Args that start with '@' are assumed to be argument files. These + * files are opened, and arguments are read from them just as if they + * were specified on the command line. Arg files can be nested. + * + */ //Flags diff --git a/misc/strio.c b/misc/strio.c index 93173825..0326ca24 100644 --- a/misc/strio.c +++ b/misc/strio.c @@ -1,4 +1,7 @@ -/**strio.c: string/file manipulation functions by Victor Rachels **/ +/* $Id: strio.c,v 1.3 2003-02-18 20:35:35 btb Exp $ */ +/* + * strio.c: string/file manipulation functions by Victor Rachels + */ #ifdef HAVE_CONFIG_H #include diff --git a/misc/strutil.c b/misc/strutil.c index 352e1a15..2378e55c 100644 --- a/misc/strutil.c +++ b/misc/strutil.c @@ -1,3 +1,4 @@ +/* $Id: strutil.c,v 1.8 2003-02-18 20:35:35 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -7,10 +8,10 @@ IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. +AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ - + #ifdef HAVE_CONFIG_H #include #endif -- 2.39.2