diff --git a/Include/Win32/geode.mk b/Include/Win32/geode.mk index 3a307f46d..d46893fb5 100644 --- a/Include/Win32/geode.mk +++ b/Include/Win32/geode.mk @@ -593,7 +593,7 @@ $(DEPFILE) : $(SRCS) $(GPFILE) #endif ## -del $(.TARGET:X\\[*\\].*).BAK ## -copy $(.TARGET) $(.TARGET:X\\[*\\].*).BAK - $(MAKEDPND) $(ROOT_DIR) $(DEVEL_DIR) $(INSTALL_DIR) -o$(.TARGET:S|DEPENDENCIES.MK|dependencies.mk|) `$(PRODUCT_FLAGS) goc $(PRODUCT)` $(CMODULES) ENDCMODULES $(MODULES) ENDASMMODULES $(GOCDEPENDS) $(CDEPENDS) $(ASMDEPENDS) $(SRCS:M*.GOC) $(SRCS:M*.goc) $(SRCS:M*.C) $(SRCS:M*.c) $(UI_TO_RDFS) $(ASM_TO_OBJS) ENDFILES + $(MAKEDPND) $(ROOT_DIR) $(DEVEL_DIR) $(INSTALL_DIR) -o$(.TARGET:S|DEPENDENCIES.MK|dependencies.mk|) `$(PRODUCT_FLAGS) goc $(PRODUCT)` $(CMODULES) ENDCMODULES $(MODULES) ENDASMMODULES $(GOCDEPENDS) $(CDEPENDS) $(ASMDEPENDS) $(SRCS:M*.[gG][oO][cC]) $(SRCS:M*.[cC]) $(UI_TO_RDFS) $(ASM_TO_OBJS) ENDFILES #if exists($(.ALLSRC:M*.gp)) findlbdr $(.ALLSRC:M*.gp) $(.TARGET) $(GEODES) #elif exists($(.ALLSRC:M*.GP)) diff --git a/Installed/Appl/Breadbox/BbxBrow/Makefile b/Installed/Appl/Breadbox/BbxBrow/Makefile index 36ab99ba2..6bf495756 100644 --- a/Installed/Appl/Breadbox/BbxBrow/Makefile +++ b/Installed/Appl/Breadbox/BbxBrow/Makefile @@ -38,7 +38,7 @@ SRCS = $(JS) $(URLFRAME) $(URLTEXT) $(ASMTOOLS) $(INIT)\ $(COMMON) LOBJS = -PRODUCTS = AB JSAB +PRODUCTS = SYSMAKEFILE = geode.mk diff --git a/Installed/Tools/pmake/makedpnd/Makefile b/Installed/Tools/pmake/makedpnd/Makefile index 69a46bc2f..a75462119 100644 --- a/Installed/Tools/pmake/makedpnd/Makefile +++ b/Installed/Tools/pmake/makedpnd/Makefile @@ -43,14 +43,14 @@ DEFTARGET = linux DEFTARGET = win32 #endif -MISRCS = fileargs.c makedpnd.c +MISRCS = makedpnd.c win32SRCS = $(MISRCS) win32.md/ -win32OBJS = win32.md/fileargs.obj win32.md/makedpnd.obj +win32OBJS = win32.md/makedpnd.obj win32LIBS = linuxSRCS = $(MISRCS) linux.md/ -linuxOBJS = linux.md/fileargs.o linux.md/makedpnd.o +linuxOBJS = linux.md/makedpnd.o linuxLIBS = SUBDIRS = diff --git a/TechDocs/Markdown/Tools/ttools.md b/TechDocs/Markdown/Tools/ttools.md index b58e09847..a3df0ef0f 100644 --- a/TechDocs/Markdown/Tools/ttools.md +++ b/TechDocs/Markdown/Tools/ttools.md @@ -1633,7 +1633,7 @@ Any line may be continued over multiple lines by ending it with a backslash following line are compressed into a single space before the input line is examined by pmake. -#####10.13.4.1 Dependency Lines +##### 10.13.4.1 Dependency Lines In any system, there are dependencies between the files that make up the system. For instance, in a program made up of several C source files and one @@ -2465,7 +2465,7 @@ by the shell, where * means zero or more characters of any sort; that is one of "a", "b", "c" or "d" (there may be any number of characters between the brackets); [0-9] matches any single character that is between "0" and "9" (i.e. any digit. This form -may be freely mixed with the other bracket form), and `\' is +may be freely mixed with the other bracket form), and `\\' is used to escape any of the characters "*", "?", "[" or ":", leaving them as regular characters to match themselves in a word. diff --git a/Tools/pmake/makedpnd/fileargs.c b/Tools/pmake/makedpnd/fileargs.c deleted file mode 100644 index bf549ad35..000000000 --- a/Tools/pmake/makedpnd/fileargs.c +++ /dev/null @@ -1,335 +0,0 @@ -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - Copyright (c) GeoWorks 1992 -- All Rights Reserved - -PROJECT: PC GEOS -MODULE: -FILE: fileargs.c - -AUTHOR: Josh Putnam, Jun 15, 1992 - -METHODS: - -Name Description ----- ----------- - -FUNCTIONS: - -Scope Name Description ------ ---- ----------- - -REVISION HISTORY: - Name Date Description - ---- ---- ----------- - JP 6/15/92 Initial version. - -DESCRIPTION: - routines so that tools can read their arguments from files - due to dos limitations on the length of command lines. - - $Id: fileargs.c,v 1.7 96/06/13 17:24:42 dbaumann Exp $ - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - -#include - -#include -#include -#include - -#include -#include - -/* forward declarations */ -static char *LoadFileIntoMemory(FILE *); -static void LexArgs(char *argBuf, int *argcPtr, char ***argvPtr); - -#include - - - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - GetFileArgs -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -SYNOPSIS: - -CALLED BY: - -PASS: name of file to read args from, pointer to argc, ptr to argv - -RETURN: argc and argv go into contents of ptr. - -DESTROYED: - -PSEUDO CODE/STRATEGY: - -CHECKS: - -KNOWN BUGS/SIDE EFFECTS/IDEAS: - -REVISION HISTORY: - Name Date Description - ---- ---- ----------- - JP 6/15/92 Initial version. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - -void GetFileArgs (char *file,int *argcPtr,char ***argvPtr) -{ - FILE *argfile; - char *argBuf; - - if((argfile = fopen((file),"r")) == NULL){ - fprintf(stderr,"Fatal Error: can't open argfile %s\n",file); - exit(1); - }else{ - argBuf = LoadFileIntoMemory(argfile); - LexArgs(argBuf,argcPtr,argvPtr); - fclose(argfile); - } -} /* End of GetFileArgs. */ - - - - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - LoadFileIntoMemory -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -SYNOPSIS: return a dynamically allocated char * with a stream's contents. - -CALLED BY: main - -PASS: FILE * of file - -RETURN: char * - -DESTROYED: Nothing. - -PSEUDO CODE/STRATEGY: allocate (as needed)and stuff buffer - -CHECKS: - -KNOWN BUGS/SIDE EFFECTS/IDEAS: - -REVISION HISTORY: - Name Date Description - ---- ---- ----------- - JP 6/15/92 Initial version. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - - - - - -#define BUF_INC 256 - -static char *LoadFileIntoMemory (FILE *argfile) -{ - int bufInsp = 0, bufSize = BUF_INC; - int cc; - char *x = (char *)malloc(BUF_INC); - - - /* - * invariants: - * bufInsp == place to insert next char - * bufSize == size of allocated block - */ - for(;;){ - cc = fread(x+bufInsp,1,BUF_INC,argfile); /** fill buf, maintain bufInsp **/ - bufInsp += cc; - - if(bufInsp == bufSize){ /** grow buf, maintain bufSize.**/ - x = (char *)realloc(x,bufSize + BUF_INC); - bufSize += BUF_INC; - if(!x){ - fprintf(stderr,"Fatal Error: Virtual Memory Exhausted\n"); - exit(2); - } - - } - - - if(cc != BUF_INC){ - if(ferror(argfile)){ - fprintf(stderr,"error reading argument file\n"); - exit(-2); - }else{ - x[bufInsp] = '\0'; /** terminate string with a null **/ - assert(strlen(x) < bufSize); - return x; - } - } - } -} - - - - - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - CountUnwantedChars -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -SYNOPSIS: return the number of unwanted chars before the next token - e.g. for ' ','\t','\n' return 1. - - - IF IT BECOMES NECESSARY TO HACK "\\\N", WE JUST CHANGE - THIS ROUTINE TO RETURN 2. - -CALLED BY: LexArgs - -PASS: char * to arg buffer - -RETURN: count - -DESTROYED: Nothing. - -PSEUDO CODE/STRATEGY: - -CHECKS: - -KNOWN BUGS/SIDE EFFECTS/IDEAS: - -REVISION HISTORY: - Name Date Description - ---- ---- ----------- - JP 6/15/92 Initial version. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - -static int CountUnwantedChars(char *argBuf) -{ - int x = 0; - while(argBuf[x] && isspace(argBuf[x])) - x++; - return x; -} - - - - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - TerminateArg -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -SYNOPSIS: Slice the current token out of the buffer by adding a null - after it. - -CALLED BY: - -PASS: - -RETURN: If the token is the last token, return the index of the null - byte, else return the index of the byte after the null. - -DESTROYED/SPECIAL EFFECTS: - - A token delimiter byte in the arg buffer will get set to null. - -PSEUDO CODE/STRATEGY: - -CHECKS: - -KNOWN BUGS/SIDE EFFECTS/IDEAS: - -REVISION HISTORY: - Name Date Description - ---- ---- ----------- - JP 6/15/92 Initial version. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ - -static int TerminateArg(char *argBuf) -{ - int x = 0, result; - - while(argBuf[x] && !isspace(argBuf[x])){ - x++; - } - result = (argBuf[x] == '\0')? x : (x+1); - argBuf[x] = '\0'; - - return result; -} - - -/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - LexArgs -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -SYNOPSIS: break up a string into little strings, - set argc and argv to the count of the args, and have - the ptrs in argv point to the args. - -CALLED BY: - -PASS: arg string (a char *), ptr to argc and ptr to argv - -RETURN: nothing - -DESTROYED: arg string - -PSEUDO CODE/STRATEGY: - -CHECKS: - -KNOWN BUGS/SIDE EFFECTS/IDEAS: - -REVISION HISTORY: - Name Date Description - ---- ---- ----------- - JP 6/15/92 Initial version. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#define ARG_INC 5 -static void LexArgs(char *argBuf,int *argcPtr, char ***argvPtr) -{ - char **argv = (char **) calloc(ARG_INC,sizeof(char *)); - int argvSize = ARG_INC; - int curArg = 0; - - /* - * invariants: - * curArg is the insertion point of the next arg (starts at 1) - * skip over the command itself - * argvSize is the size of argv in (char *). - */ - - for(curArg = 1,argv[1] = argBuf;;curArg++){ - if(curArg == argvSize){ - argv = (char **) realloc((void *)argv, - (curArg + ARG_INC) * sizeof(char *)); - if(!argv){ - fprintf(stderr,"Fatal Error: Virtual Memory Exhausted\n"); - exit(2); - } - argvSize += ARG_INC; - } - - /* we don't use strtok to lex the args because we may need to */ - /* read escaped newlines as a single space later == need more control */ - - - argBuf += CountUnwantedChars(argBuf); - - /* check to see if at last arg */ - if(!*argBuf){ - argv[curArg] = NULL; - *argvPtr = argv; - *argcPtr = curArg; - return; - } - argv[curArg] = argBuf; - argBuf += TerminateArg(argBuf); - } -} - - - - - diff --git a/Tools/pmake/makedpnd/fileargs.h b/Tools/pmake/makedpnd/fileargs.h deleted file mode 100644 index 928cc3950..000000000 --- a/Tools/pmake/makedpnd/fileargs.h +++ /dev/null @@ -1,44 +0,0 @@ - -/*********************************************************************** - * - * Copyright (c) GeoWorks 1989 -- All Rights Reserved - * - * PROJECT: PCGEOS - * MODULE: Tools Library -- File Argument Parsing - * FILE: fileargs.h - * - * AUTHOR: Josh Putnam 6/15/92 - * - * REVISION HISTORY: - * Date Name Description - * ---- ---- ----------- - * 6/15/92 josh Initial version - * - * DESCRIPTION: - * Due to limitations of the PC environment, make will not be able to - * hundreds of characters to programs like goc and glue. - * - * The solution is to provide a way for tools to get their many - * arguments from temporary files. - * - * By calling GetFileArgs with a path, pointer to int (argc) and - * pointer to char ** (argv), the tool can get its arguments in - * the standard format. - * - * $Id: fileargs.h,v 1.2 92/09/02 18:27:18 josh Exp $ - * - ***********************************************************************/ -#ifndef _FILEARGS_H_ -#define _FILEARGS_H_ - - -/* in the arglist @file means we read our args from "file" */ -#define FILE_PREFIX "@" -#define FILE_PREFIX_LEN 1 - -#define HAS_ARGS_FILE(argv) (!strncmp(argv[1],FILE_PREFIX,FILE_PREFIX_LEN)) -#define ARGS_FILE(argv) (argv[1] + FILE_PREFIX_LEN) - -extern void GetFileArgs(char *path, int *argcPtr, char ***argvPtr); - -#endif diff --git a/Tools/pmake/makedpnd/local.mk b/Tools/pmake/makedpnd/local.mk index bc1118f00..9a89de7e2 100644 --- a/Tools/pmake/makedpnd/local.mk +++ b/Tools/pmake/makedpnd/local.mk @@ -7,14 +7,16 @@ #ifndef unix .SUFFIXES : .lib .a -win32LIBS = $(.TARGET:H)/compat.lib lst.lib \ +win32LIBS = $(.TARGET:H)/compat.lib $(.TARGET:H)/utils.lib lst.lib \ sprite.lib -linuxLIBS = $(.TARGET:H)/libcompat.a liblst.a \ +linuxLIBS = $(.TARGET:H)/libcompat.a $(.TARGET:H)/libutils.a liblst.a \ libsprite.a -.PATH.lib : ../../compat $(INSTALL_DIR:H)/compat \ +.PATH.lib : ../../compat $(INSTALL_DIR:H:H)/compat \ + ../../utils $(INSTALL_DIR:H:H)/utils \ ../../pmake/lib/sprite $(INSTALL_DIR:H:H)/pmake/lib/sprite \ ../../pmake/lib/lst $(INSTALL_DIR:H:H)/pmake/lib/lst -.PATH.a : ../../compat $(INSTALL_DIR:H)/compat \ +.PATH.a : ../../compat $(INSTALL_DIR:H:H)/compat \ + ../../utils $(INSTALL_DIR:H:H)/utils \ ../../pmake/lib/sprite $(INSTALL_DIR:H:H)/pmake/lib/sprite \ ../../pmake/lib/lst $(INSTALL_DIR:H:H)/pmake/lib/lst #endif diff --git a/Tools/utils/printf.c b/Tools/utils/printf.c index 16b132ef6..97e69118f 100644 --- a/Tools/utils/printf.c +++ b/Tools/utils/printf.c @@ -675,9 +675,9 @@ i_vfprintf(FILE *stream, /* Where to output formatted results. */ * automatically. */ #if defined(__HIGHC__) || defined(_MSC_VER) || defined(__WATCOMC__) - if ((c == '\n') && (stream->_flag & _O_BINARY)) { + if (isstrm && (c == '\n') && (stream->_flag & _O_BINARY)) { #else - if ((c == '\n') && (stream->flags & _F_BIN)) { + if (isstrm && (c == '\n') && (stream->flags & _F_BIN)) { #endif i_putc('\r', stream); }