home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-29 | 40.0 KB | 1,267 lines |
- Newsgroups: comp.sources.misc
- From: dvadura@plg.waterloo.edu (Dennis Vadura)
- Subject: v27i137: dmake - dmake Version 3.8, Part36/41
- Message-ID: <1992Jan29.165106.1636@sparky.imd.sterling.com>
- X-Md4-Signature: 5912b66844077232f11fff95925e0cc4
- Date: Wed, 29 Jan 1992 16:51:06 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
- Posting-number: Volume 27, Issue 137
- Archive-name: dmake/part36
- Environment: Atari-ST, Coherent, Mac, MSDOS, OS/2, UNIX
- Supersedes: dmake: Volume 19, Issue 22-58
-
- ---- Cut Here and feed the following to sh ----
- # this is dmake.shar.36 (part 36 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file dmake/unix/bsd43/vf/make.sh continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 36; then
- echo Please unpack part "$Scheck" next!
- exit 1
- else
- exit 0
- fi
- ) < _shar_seq_.tmp || exit 1
- if test -f _shar_wnt_.tmp; then
- sed 's/^X//' << 'SHAR_EOF' >> 'dmake/unix/bsd43/vf/make.sh' &&
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O stat.c
- mv stat.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O expand.c
- mv expand.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmstring.c
- mv dmstring.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O hash.c
- mv hash.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dag.c
- mv dag.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmake.c
- mv dmake.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O path.c
- mv path.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O imacs.c
- mv imacs.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O sysintf.c
- mv sysintf.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O parse.c
- mv parse.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O getinp.c
- mv getinp.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O quit.c
- mv quit.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O state.c
- mv state.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O basename.c
- mv basename.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O dmdump.c
- mv dmdump.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O macparse.c
- mv macparse.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O rulparse.c
- mv rulparse.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O percent.c
- mv percent.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O function.c
- mv function.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/arlib.c
- mv arlib.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/dirbrk.c
- mv dirbrk.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/rmprq.c
- mv rmprq.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/ruletab.c
- mv ruletab.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/runargv.c
- mv runargv.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/putenv.c
- mv putenv.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/tempnam.c
- mv tempnam.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/utime.c
- mv utime.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/setvbuf.c
- mv setvbuf.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/vf/memcpy.c
- mv memcpy.o objects
- cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O unix/bsd43/vf/vfprintf.c
- mv vfprintf.o objects
- cc -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o objects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o objects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o objects/quit.o objects/state.o objects/basename.o objects/dmdump.o objects/macparse.o objects/rulparse.o objects/percent.o objects/function.o objects/arlib.o objects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/putenv.o objects/tempnam.o objects/utime.o objects/setvbuf.o objects/memcpy.o objects/vfprintf.o
- cp unix/bsd43/vf/startup.mk startup.mk
- SHAR_EOF
- chmod 0640 dmake/unix/bsd43/vf/make.sh ||
- echo 'restore of dmake/unix/bsd43/vf/make.sh failed'
- Wc_c="`wc -c < 'dmake/unix/bsd43/vf/make.sh'`"
- test 3196 -eq "$Wc_c" ||
- echo 'dmake/unix/bsd43/vf/make.sh: original size 3196, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/bsd43/vf/memcpy.c ==============
- if test -f 'dmake/unix/bsd43/vf/memcpy.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/bsd43/vf/memcpy.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/memcpy.c' &&
- char *
- memcpy(t, f, n)
- register char *t, *f;
- register n;
- {
- X register char *p = t;
- X
- X while( --n >= 0 ) *t++ = *f++;
- X
- X return (p);
- }
- SHAR_EOF
- chmod 0640 dmake/unix/bsd43/vf/memcpy.c ||
- echo 'restore of dmake/unix/bsd43/vf/memcpy.c failed'
- Wc_c="`wc -c < 'dmake/unix/bsd43/vf/memcpy.c'`"
- test 137 -eq "$Wc_c" ||
- echo 'dmake/unix/bsd43/vf/memcpy.c: original size 137, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/bsd43/vf/public.h ==============
- if test -f 'dmake/unix/bsd43/vf/public.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/bsd43/vf/public.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/public.h' &&
- /* RCS -- $Header$
- -- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
- --
- -- SYNOPSIS -- Local functions exported to be visible by others.
- --
- -- DESCRIPTION
- -- This file is generated by 'genpub'. Function declarations
- -- that appear in this file are extracted by 'genpub' from
- -- source files. Any function in the source file whose definition
- -- appears like:
- --
- -- PUBLIC return_type
- -- function( arg_list );
- -- type_expr1 arg1;
- -- ...
- --
- -- has its definition extracted and a line of the form:
- --
- -- return_type function ANSI((type_expr1,type_expr2,...));
- --
- -- entered into the output file.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log$
- */
- X
- #ifndef _DMAKE_PUBLIC_h
- #define _DMAKE_PUBLIC_h
- X
- void Infer_recipe ANSI((CELLPTR, CELLPTR));
- int Make_targets ANSI(());
- int Exec_commands ANSI((CELLPTR));
- void Print_cmnd ANSI((char *, int, int));
- void Pop_dir ANSI((int));
- void Append_line ANSI((char *, int, FILE *, char *, int, int));
- void Stat_target ANSI((CELLPTR, int));
- char * Expand ANSI((char *));
- char * Apply_edit ANSI((char *, char *, char *, int, int));
- void Map_esc ANSI((char *));
- char* Apply_modifiers ANSI((int, char *));
- char* Tokenize ANSI((char *, char *));
- char * _strjoin ANSI((char *, char *, int, int));
- char * _stradd ANSI((char *, char *, int));
- char * _strapp ANSI((char *, char *));
- char * _strdup ANSI((char *));
- char * _strdup2 ANSI((char *));
- char * _strpbrk ANSI((char *, char *));
- char * _strspn ANSI((char *, char *));
- char * _strstr ANSI((char *, char *));
- char * _substr ANSI((char *, char *));
- uint16 Hash ANSI((char *, uint32 *));
- HASHPTR Get_name ANSI((char *, HASHPTR *, int));
- HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
- HASHPTR Def_macro ANSI((char *, char *, int));
- CELLPTR Def_cell ANSI((char *));
- LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
- void Clear_prerequisites ANSI((CELLPTR));
- int Test_circle ANSI((CELLPTR, int));
- STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
- t_attr Rcp_attribute ANSI((char *));
- int main ANSI((int, char **));
- FILE * Openfile ANSI((char *, int, int));
- FILE * Closefile ANSI(());
- FILE * Search_file ANSI((char *, char **));
- char * Filename ANSI(());
- int Nestlevel ANSI(());
- void No_ram ANSI(());
- int Usage ANSI((int));
- int Version ANSI(());
- char * Get_suffix ANSI((char *));
- char * Build_path ANSI((char *, char *));
- void Make_rules ANSI(());
- void Create_macro_vars ANSI(());
- time_t Do_stat ANSI((char *, char *, char **));
- int Do_touch ANSI((char *, char *, char **));
- void Void_lib_cache ANSI((char *, char *));
- time_t Do_time ANSI(());
- int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
- char ** Pack_argv ANSI((int, int, char *));
- char * Read_env_string ANSI((char *));
- int Write_env_string ANSI((char *, char *));
- void ReadEnvironment ANSI(());
- void Catch_signals ANSI((void (*)()));
- void Clear_signals ANSI(());
- void Prolog ANSI((int, char* []));
- void Epilog ANSI((int));
- char * Get_current_dir ANSI(());
- int Set_dir ANSI((char*));
- char Get_switch_char ANSI(());
- FILE* Get_temp ANSI((char **, char *, int));
- FILE * Start_temp ANSI((char *, CELLPTR, char **));
- void Open_temp_error ANSI((char *, char *));
- void Link_temp ANSI((CELLPTR, FILE *, char *));
- void Close_temp ANSI((CELLPTR, FILE *));
- void Unlink_temp_files ANSI((CELLPTR));
- void Handle_result ANSI((int, int, int, CELLPTR));
- void Update_time_stamp ANSI((CELLPTR));
- int Remove_file ANSI((char *));
- void Parse ANSI((FILE *));
- int Get_line ANSI((char *, FILE *));
- char * Do_comment ANSI((char *, char **, int));
- char * Get_token ANSI((TKSTRPTR, char *, int));
- void Quit ANSI(());
- void Read_state ANSI(());
- void Write_state ANSI(());
- int Check_state ANSI((CELLPTR, STRINGPTR *, int));
- char* basename ANSI((char *));
- void Dump ANSI(());
- void Dump_recipe ANSI((STRINGPTR));
- int Parse_macro ANSI((char *, int));
- int Macro_op ANSI((char *));
- int Parse_rule_def ANSI((int *));
- int Rule_op ANSI((char *));
- void Add_recipe_to_list ANSI((char *, int, int));
- void Bind_rules_to_targets ANSI((int));
- int Set_group_attributes ANSI((char *));
- DFALINKPTR Match_dfa ANSI((char *));
- void Check_circle_dfa ANSI(());
- void Add_nfa ANSI((char *));
- char * Exec_function ANSI((char *));
- time_t seek_arch ANSI((char *, char *));
- int If_root_path ANSI((char *));
- void Remove_prq ANSI((CELLPTR));
- int runargv ANSI((CELLPTR, int, int, int, int, char *));
- int Wait_for_child ANSI((int, int));
- void Clean_up_processes ANSI(());
- X
- #endif
- SHAR_EOF
- chmod 0640 dmake/unix/bsd43/vf/public.h ||
- echo 'restore of dmake/unix/bsd43/vf/public.h failed'
- Wc_c="`wc -c < 'dmake/unix/bsd43/vf/public.h'`"
- test 5448 -eq "$Wc_c" ||
- echo 'dmake/unix/bsd43/vf/public.h: original size 5448, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/bsd43/vf/startup.mk ==============
- if test -f 'dmake/unix/bsd43/vf/startup.mk' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/bsd43/vf/startup.mk (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/startup.mk' &&
- # Generic UNIX DMAKE startup file. Customize to suit your needs.
- # Should work for both SYSV, and BSD 4.3
- # See the documentation for a description of internally defined macros.
- #
- # Disable warnings for macros redefined here that were given
- # on the command line.
- __.SILENT := $(.SILENT)
- .SILENT := yes
- X
- # Configuration parameters for DMAKE startup.mk file
- # Set these to NON-NULL if you wish to turn the parameter on.
- _HAVE_RCS := yes # yes => RCS is installed.
- _HAVE_SCCS := yes # yes => SCCS is installed.
- X
- # Applicable suffix definitions
- A := .a # Libraries
- E := # Executables
- F := .f # Fortran
- O := .o # Objects
- P := .p # Pascal
- S := .s # Assembler sources
- V := ,v # RCS suffix
- X
- # Recipe execution configurations
- SHELL := /bin/sh
- SHELLFLAGS := -ce
- GROUPSHELL := $(SHELL)
- GROUPFLAGS :=
- SHELLMETAS := |();&<>?*][$$:\\#`'"
- GROUPSUFFIX :=
- DIVFILE = $(TMPFILE)
- X
- # Standard C-language command names and flags
- X CPP := /lib/cpp # C-preprocessor
- X CC := cc # C-compiler and flags
- X CFLAGS +=
- X
- X AS := as # Assembler and flags
- X ASFLAGS +=
- X
- X LD = $(CC) # Loader and flags
- X LDFLAGS +=
- X LDLIBS =
- X
- # Definition of $(MAKE) macro for recursive makes.
- X MAKE = $(MAKECMD) $(MFLAGS)
- X
- # Definition of Print command for this system.
- X PRINT = lpr
- X
- # Language and Parser generation Tools and their flags
- X YACC := yacc # standard yacc
- X YFLAGS +=
- X YTAB := y.tab # yacc output files name stem.
- X
- X LEX := lex # standard lex
- X LFLAGS +=
- X LEXYY := lex.yy # lex output file
- X
- # Other Compilers, Tools and their flags
- X PC := pc # pascal compiler
- X RC := f77 # ratfor compiler
- X FC := f77 # fortran compiler
- X
- X CO := co # check out for RCS
- X COFLAGS += -q
- X
- X AR := ar # archiver
- X ARFLAGS+= ruv
- X
- X RM := /bin/rm # remove a file command
- X RMFLAGS +=
- X
- # Implicit generation rules for making inferences.
- # We don't provide .yr or .ye rules here. They're obsolete.
- # Rules for making *$O
- X %$O : %.c ; $(CC) $(CFLAGS) -c $<
- X %$O : %$P ; $(PC) $(PFLAGS) -c $<
- X %$O : %$S ; $(AS) $(ASFLAGS) $<
- X %$O : %.cl ; class -c $<
- X %$O : %.e %.r %.F %$F
- X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
- X
- # Executables
- X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
- X
- # lex and yacc rules
- X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
- X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
- X
- # This rule tells how to make *.out from it's immediate list of prerequisites
- # UNIX only.
- X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
- X
- # RCS support
- .IF $(_HAVE_RCS)
- X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
- X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
- .END
- X
- # SCCS support
- .IF $(_HAVE_SCCS)
- X % : s.% ; get $<
- X .NOINFER : s.%
- .END
- X
- # Recipe to make archive files.
- %$A :
- [
- X $(AR) $(ARFLAGS) $@ $?
- X $(RM) $(RMFLAGS) $?
- X ranlib $@
- ]
- X
- # DMAKE uses this recipe to remove intermediate targets
- .REMOVE :; $(RM) -f $<
- X
- # AUGMAKE extensions for SYSV compatibility
- @B = $(@:b)
- @D = $(@:d)
- @F = $(@:f)
- "*B" = $(*:b)
- "*D" = $(*:d)
- "*F" = $(*:f)
- <B = $(<:b)
- <D = $(<:d)
- <F = $(<:f)
- ?B = $(?:b)
- ?F = $(?:f)
- ?D = $(?:d)
- X
- # Turn warnings back to previous setting.
- .SILENT := $(__.SILENT)
- X
- # Local startup file if any
- .INCLUDE .IGNORE: "_startup.mk"
- SHAR_EOF
- chmod 0640 dmake/unix/bsd43/vf/startup.mk ||
- echo 'restore of dmake/unix/bsd43/vf/startup.mk failed'
- Wc_c="`wc -c < 'dmake/unix/bsd43/vf/startup.mk'`"
- test 3227 -eq "$Wc_c" ||
- echo 'dmake/unix/bsd43/vf/startup.mk: original size 3227, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/bsd43/vf/vfprintf.c ==============
- if test -f 'dmake/unix/bsd43/vf/vfprintf.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/bsd43/vf/vfprintf.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/vfprintf.c' &&
- /*
- X * Copyright (c) 1988 Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms are permitted
- X * provided that the above copyright notice and this paragraph are
- X * duplicated in all such forms and that any documentation,
- X * advertising materials, and other materials related to such
- X * distribution and use acknowledge that the software was developed
- X * by the University of California, Berkeley. The name of the
- X * University may not be used to endorse or promote products derived
- X * from this software without specific prior written permission.
- X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- X * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- X * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X */
- X
- #if defined(LIBC_SCCS) && !defined(lint)
- static char sccsid[] = "@(#)vfprintf.c 5.2 (Berkeley) 6/27/88";
- #endif /* LIBC_SCCS and not lint */
- X
- #include <stdio.h>
- #include <varargs.h>
- X
- int
- vfprintf(iop, fmt, ap)
- X FILE *iop;
- X char *fmt;
- X va_list ap;
- {
- X int len;
- X char localbuf[BUFSIZ];
- X
- X if (iop->_flag & _IONBF) {
- X iop->_flag &= ~_IONBF;
- X iop->_ptr = iop->_base = localbuf;
- X len = _doprnt(fmt, ap, iop);
- X (void) fflush(iop);
- X iop->_flag |= _IONBF;
- X iop->_base = NULL;
- X iop->_bufsiz = 0;
- X iop->_cnt = 0;
- X } else
- X len = _doprnt(fmt, ap, iop);
- X
- X return (ferror(iop) ? EOF : len);
- }
- X
- SHAR_EOF
- chmod 0640 dmake/unix/bsd43/vf/vfprintf.c ||
- echo 'restore of dmake/unix/bsd43/vf/vfprintf.c failed'
- Wc_c="`wc -c < 'dmake/unix/bsd43/vf/vfprintf.c'`"
- test 1409 -eq "$Wc_c" ||
- echo 'dmake/unix/bsd43/vf/vfprintf.c: original size 1409, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/config.h ==============
- if test ! -d 'dmake/unix/coherent'; then
- mkdir 'dmake/unix/coherent'
- fi
- if test -f 'dmake/unix/coherent/config.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/config.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/config.h' &&
- /*
- -- COHERENT config.h
- -- SYNOPSIS -- Configurarion include file.
- --
- -- DESCRIPTION
- -- There is one of these for each specific machine configuration.
- -- It can be used to further tweek the machine specific sources
- -- so that they compile.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log: config.h,v $
- X * Revision 1.1 1992/01/24 03:28:39 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- /* define this for configurations that don't have the coreleft function
- X * so that the code compiles. To my knowledge coreleft exists only on
- X * Turbo C, but it is needed here since the function is used in many debug
- X * macros. */
- #define coreleft() 0L
- X
- extern char *getcwd ();
- X
- /* Define setvbuf, SysV doesn't have one */
- #define setvbuf(fp, bp, type, len) setbuf( fp, NULL );
- #define tzset settz
- X
- /* We don't care about CONST */
- #define CONST
- #define void int
- typedef paddr_t off_t;
- X
- /* options. . . */
- #define ASCARCH 0
- X
- /* a small problem with pointer to voids on some unix machines needs this */
- #define PVOID void *
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/config.h ||
- echo 'restore of dmake/unix/coherent/config.h failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/config.h'`"
- test 1972 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/config.h: original size 1972, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/config.mk ==============
- if test -f 'dmake/unix/coherent/config.mk' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/config.mk (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/config.mk' &&
- # This is the COHERENT configuration file for DMAKE
- # It simply modifies the values of SRC, and checks to see if
- # OSENVIRONMENT is defined. If so it includes the appropriate
- # config.mk file.
- #
- # It also sets the values of .SOURCE.c and .SOURCE.h to include the local
- # directory.
- #
- osrdir := $(OS)$(DIRSEPSTR)$(OSRELEASE)
- X
- # The following are required sources
- OSDSRC := vfprintf.c getcwd.c
- .IF $(OSDSRC)
- X SRC += $(OSDSRC)
- X .SETDIR=$(osrdir) : $(OSDSRC)
- .END
- X
- .SOURCE.h : $(osrdir)
- X
- # Local configuration modifications for CFLAGS, there's local SysV includes
- # too.
- CFLAGS += -I$(osrdir)
- X
- # See if we modify anything in the lower levels.
- .IF $(OSENVIRONMENT) != $(NULL)
- X .INCLUDE .IGNORE : $(osrdir)$(DIRSEPSTR)$(OSENVIRONMENT)$(DIRSEPSTR)config.mk
- .END
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/config.mk ||
- echo 'restore of dmake/unix/coherent/config.mk failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/config.mk'`"
- test 765 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/config.mk: original size 765, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/getcwd.c ==============
- if test -f 'dmake/unix/coherent/getcwd.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/getcwd.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/getcwd.c' &&
- #if __STDC__
- char *getcwd(char *buffer, int length)
- #else
- char *getcwd (buffer, length)
- char *buffer;
- int length;
- #endif
- {
- X extern char *getwd();
- X
- X char *dir;
- X dir = getwd();
- X if (dir)
- X {
- X strncpy(buffer,dir,length);
- X return buffer;
- X }
- X else
- X {
- X *buffer = 0;
- X return (char *) 0;
- X }
- }
- X
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/getcwd.c ||
- echo 'restore of dmake/unix/coherent/getcwd.c failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/getcwd.c'`"
- test 306 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/getcwd.c: original size 306, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/make.sh ==============
- if test -f 'dmake/unix/coherent/make.sh' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/make.sh (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/make.sh' &&
- mkdir objects
- cc -c -I. -Iunix -Iunix/coherent -O infer.c
- mv infer.o objects
- cc -c -I. -Iunix -Iunix/coherent -O make.c
- mv make.o objects
- cc -c -I. -Iunix -Iunix/coherent -O stat.c
- mv stat.o objects
- cc -c -I. -Iunix -Iunix/coherent -O expand.c
- mv expand.o objects
- cc -c -I. -Iunix -Iunix/coherent -O dmstring.c
- mv dmstring.o objects
- cc -c -I. -Iunix -Iunix/coherent -O hash.c
- mv hash.o objects
- cc -c -I. -Iunix -Iunix/coherent -O dag.c
- mv dag.o objects
- cc -c -I. -Iunix -Iunix/coherent -O dmake.c
- mv dmake.o objects
- cc -c -I. -Iunix -Iunix/coherent -O path.c
- mv path.o objects
- cc -c -I. -Iunix -Iunix/coherent -O imacs.c
- mv imacs.o objects
- cc -c -I. -Iunix -Iunix/coherent -O sysintf.c
- mv sysintf.o objects
- cc -c -I. -Iunix -Iunix/coherent -O parse.c
- mv parse.o objects
- cc -c -I. -Iunix -Iunix/coherent -O getinp.c
- mv getinp.o objects
- cc -c -I. -Iunix -Iunix/coherent -O quit.c
- mv quit.o objects
- cc -c -I. -Iunix -Iunix/coherent -O state.c
- mv state.o objects
- cc -c -I. -Iunix -Iunix/coherent -O basename.c
- mv basename.o objects
- cc -c -I. -Iunix -Iunix/coherent -O dmdump.c
- mv dmdump.o objects
- cc -c -I. -Iunix -Iunix/coherent -O macparse.c
- mv macparse.o objects
- cc -c -I. -Iunix -Iunix/coherent -O rulparse.c
- mv rulparse.o objects
- cc -c -I. -Iunix -Iunix/coherent -O percent.c
- mv percent.o objects
- cc -c -I. -Iunix -Iunix/coherent -O function.c
- mv function.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/arlib.c
- mv arlib.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/dirbrk.c
- mv dirbrk.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/rmprq.c
- mv rmprq.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/ruletab.c
- mv ruletab.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/runargv.c
- mv runargv.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/coherent/vfprintf.c
- mv vfprintf.o objects
- cc -c -I. -Iunix -Iunix/coherent -O unix/coherent/getcwd.c
- mv getcwd.o objects
- cc -o dmake objects/infer.o objects/make.o objects/stat.o objects/expand.o objects/dmstring.o objects/hash.o objects/dag.o objects/dmake.o objects/path.o objects/imacs.o objects/sysintf.o objects/parse.o objects/getinp.o objects/quit.o objects/state.o objects/basename.o objects/dmdump.o objects/macparse.o objects/rulparse.o objects/percent.o objects/function.o objects/arlib.o objects/dirbrk.o objects/rmprq.o objects/ruletab.o objects/runargv.o objects/vfprintf.o objects/getcwd.o
- cp unix/coherent/startup.mk startup.mk
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/make.sh ||
- echo 'restore of dmake/unix/coherent/make.sh failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/make.sh'`"
- test 2405 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/make.sh: original size 2405, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/public.h ==============
- if test -f 'dmake/unix/coherent/public.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/public.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/public.h' &&
- /* RCS -- $Header$
- -- WARNING -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
- --
- -- SYNOPSIS -- Local functions exported to be visible by others.
- --
- -- DESCRIPTION
- -- This file is generated by 'genpub'. Function declarations
- -- that appear in this file are extracted by 'genpub' from
- -- source files. Any function in the source file whose definition
- -- appears like:
- --
- -- PUBLIC return_type
- -- function( arg_list );
- -- type_expr1 arg1;
- -- ...
- --
- -- has its definition extracted and a line of the form:
- --
- -- return_type function ANSI((type_expr1,type_expr2,...));
- --
- -- entered into the output file.
- --
- -- AUTHOR
- -- Dennis Vadura, dvadura@watdragon.uwaterloo.ca
- -- CS DEPT, University of Waterloo, Waterloo, Ont., Canada
- --
- -- COPYRIGHT
- -- Copyright (c) 1990 by Dennis Vadura. All rights reserved.
- --
- -- This program is free software; you can redistribute it and/or
- -- modify it under the terms of the GNU General Public License
- -- (version 1), as published by the Free Software Foundation, and
- -- found in the file 'LICENSE' included with this distribution.
- --
- -- This program is distributed in the hope that it will be useful,
- -- but WITHOUT ANY WARRANTY; without even the implied warrant of
- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- -- GNU General Public License for more details.
- --
- -- You should have received a copy of the GNU General Public License
- -- along with this program; if not, write to the Free Software
- -- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- --
- -- LOG
- -- $Log$
- */
- X
- #ifndef _DMAKE_PUBLIC_h
- #define _DMAKE_PUBLIC_h
- X
- void Infer_recipe ANSI((CELLPTR, CELLPTR));
- int Make_targets ANSI(());
- int Exec_commands ANSI((CELLPTR));
- void Print_cmnd ANSI((char *, int, int));
- void Pop_dir ANSI((int));
- void Append_line ANSI((char *, int, FILE *, char *, int, int));
- void Stat_target ANSI((CELLPTR, int));
- char * Expand ANSI((char *));
- char * Apply_edit ANSI((char *, char *, char *, int, int));
- void Map_esc ANSI((char *));
- char* Apply_modifiers ANSI((int, char *));
- char* Tokenize ANSI((char *, char *));
- char * _strjoin ANSI((char *, char *, int, int));
- char * _stradd ANSI((char *, char *, int));
- char * _strapp ANSI((char *, char *));
- char * _strdup ANSI((char *));
- char * _strdup2 ANSI((char *));
- char * _strpbrk ANSI((char *, char *));
- char * _strspn ANSI((char *, char *));
- char * _strstr ANSI((char *, char *));
- char * _substr ANSI((char *, char *));
- uint16 Hash ANSI((char *, uint32 *));
- HASHPTR Get_name ANSI((char *, HASHPTR *, int));
- HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
- HASHPTR Def_macro ANSI((char *, char *, int));
- CELLPTR Def_cell ANSI((char *));
- LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
- void Clear_prerequisites ANSI((CELLPTR));
- int Test_circle ANSI((CELLPTR, int));
- STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
- t_attr Rcp_attribute ANSI((char *));
- int main ANSI((int, char **));
- FILE * Openfile ANSI((char *, int, int));
- FILE * Closefile ANSI(());
- FILE * Search_file ANSI((char *, char **));
- char * Filename ANSI(());
- int Nestlevel ANSI(());
- void No_ram ANSI(());
- int Usage ANSI((int));
- int Version ANSI(());
- char * Get_suffix ANSI((char *));
- char * Build_path ANSI((char *, char *));
- void Make_rules ANSI(());
- void Create_macro_vars ANSI(());
- time_t Do_stat ANSI((char *, char *, char **));
- int Do_touch ANSI((char *, char *, char **));
- void Void_lib_cache ANSI((char *, char *));
- time_t Do_time ANSI(());
- int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
- char ** Pack_argv ANSI((int, int, char *));
- char * Read_env_string ANSI((char *));
- int Write_env_string ANSI((char *, char *));
- void ReadEnvironment ANSI(());
- void Catch_signals ANSI((void (*)()));
- void Clear_signals ANSI(());
- void Prolog ANSI((int, char* []));
- void Epilog ANSI((int));
- char * Get_current_dir ANSI(());
- int Set_dir ANSI((char*));
- char Get_switch_char ANSI(());
- FILE* Get_temp ANSI((char **, char *, int));
- FILE * Start_temp ANSI((char *, CELLPTR, char **));
- void Open_temp_error ANSI((char *, char *));
- void Link_temp ANSI((CELLPTR, FILE *, char *));
- void Close_temp ANSI((CELLPTR, FILE *));
- void Unlink_temp_files ANSI((CELLPTR));
- void Handle_result ANSI((int, int, int, CELLPTR));
- void Update_time_stamp ANSI((CELLPTR));
- int Remove_file ANSI((char *));
- void Parse ANSI((FILE *));
- int Get_line ANSI((char *, FILE *));
- char * Do_comment ANSI((char *, char **, int));
- char * Get_token ANSI((TKSTRPTR, char *, int));
- void Quit ANSI(());
- void Read_state ANSI(());
- void Write_state ANSI(());
- int Check_state ANSI((CELLPTR, STRINGPTR *, int));
- char* basename ANSI((char *));
- void Dump ANSI(());
- void Dump_recipe ANSI((STRINGPTR));
- int Parse_macro ANSI((char *, int));
- int Macro_op ANSI((char *));
- int Parse_rule_def ANSI((int *));
- int Rule_op ANSI((char *));
- void Add_recipe_to_list ANSI((char *, int, int));
- void Bind_rules_to_targets ANSI((int));
- int Set_group_attributes ANSI((char *));
- DFALINKPTR Match_dfa ANSI((char *));
- void Check_circle_dfa ANSI(());
- void Add_nfa ANSI((char *));
- char * Exec_function ANSI((char *));
- time_t seek_arch ANSI((char *, char *));
- int If_root_path ANSI((char *));
- void Remove_prq ANSI((CELLPTR));
- int runargv ANSI((CELLPTR, int, int, int, int, char *));
- int Wait_for_child ANSI((int, int));
- void Clean_up_processes ANSI(());
- X
- #endif
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/public.h ||
- echo 'restore of dmake/unix/coherent/public.h failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/public.h'`"
- test 5448 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/public.h: original size 5448, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/startup.mk ==============
- if test -f 'dmake/unix/coherent/startup.mk' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/startup.mk (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/startup.mk' &&
- # Generic UNIX DMAKE startup file. Customize to suit your needs.
- # Should work for both SYSV, and BSD 4.3
- # See the documentation for a description of internally defined macros.
- #
- # Disable warnings for macros redefined here that were given
- # on the command line.
- __.SILENT := $(.SILENT)
- .SILENT := yes
- X
- # Configuration parameters for DMAKE startup.mk file
- # Set these to NON-NULL if you wish to turn the parameter on.
- _HAVE_RCS := yes # yes => RCS is installed.
- _HAVE_SCCS := yes # yes => SCCS is installed.
- X
- # Applicable suffix definitions
- A := .a # Libraries
- E := # Executables
- F := .f # Fortran
- O := .o # Objects
- P := .p # Pascal
- S := .s # Assembler sources
- V := ,v # RCS suffix
- X
- # Recipe execution configurations
- SHELL := /bin/sh
- SHELLFLAGS := -ce
- GROUPSHELL := $(SHELL)
- GROUPFLAGS :=
- SHELLMETAS := |();&<>?*][$$:\\#`'"
- GROUPSUFFIX :=
- DIVFILE = $(TMPFILE)
- X
- # Standard C-language command names and flags
- X CPP := /lib/cpp # C-preprocessor
- X CC := cc # C-compiler and flags
- X CFLAGS +=
- X
- X AS := as # Assembler and flags
- X ASFLAGS +=
- X
- X LD = $(CC) # Loader and flags
- X LDFLAGS +=
- X LDLIBS =
- X
- # Definition of $(MAKE) macro for recursive makes.
- X MAKE = $(MAKECMD) $(MFLAGS)
- X
- # Definition of Print command for this system.
- X PRINT = lpr
- X
- # Language and Parser generation Tools and their flags
- X YACC := yacc # standard yacc
- X YFLAGS +=
- X YTAB := y.tab # yacc output files name stem.
- X
- X LEX := lex # standard lex
- X LFLAGS +=
- X LEXYY := lex.yy # lex output file
- X
- # Other Compilers, Tools and their flags
- X PC := pc # pascal compiler
- X RC := f77 # ratfor compiler
- X FC := f77 # fortran compiler
- X
- X CO := co # check out for RCS
- X COFLAGS += -q
- X
- X AR := ar # archiver
- X ARFLAGS+= ruv
- X
- X RM := /bin/rm # remove a file command
- X RMFLAGS +=
- X
- # Implicit generation rules for making inferences.
- # We don't provide .yr or .ye rules here. They're obsolete.
- # Rules for making *$O
- X %$O : %.c ; $(CC) $(CFLAGS) -c $<
- X %$O : %$P ; $(PC) $(PFLAGS) -c $<
- X %$O : %$S ; $(AS) $(ASFLAGS) $<
- X %$O : %.cl ; class -c $<
- X %$O : %.e %.r %.F %$F
- X $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
- X
- # Executables
- X %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
- X
- # lex and yacc rules
- X %.c : %.y ; $(YACC) $(YFLAGS) $<; mv $(YTAB).c $@
- X %.c : %.l ; $(LEX) $(LFLAGS) $<; mv $(LEXYY).c $@
- X
- # This rule tells how to make *.out from it's immediate list of prerequisites
- # UNIX only.
- X %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
- X
- # RCS support
- .IF $(_HAVE_RCS)
- X % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
- X .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
- .END
- X
- # SCCS support
- .IF $(_HAVE_SCCS)
- X % : s.% ; get $<
- X .NOINFER : s.%
- .END
- X
- # Recipe to make archive files.
- %$A :
- [
- X $(AR) $(ARFLAGS) $@ $?
- X $(RM) $(RMFLAGS) $?
- X ranlib $@
- ]
- X
- # DMAKE uses this recipe to remove intermediate targets
- .REMOVE :; $(RM) -f $<
- X
- # AUGMAKE extensions for SYSV compatibility
- @B = $(@:b)
- @D = $(@:d)
- @F = $(@:f)
- "*B" = $(*:b)
- "*D" = $(*:d)
- "*F" = $(*:f)
- <B = $(<:b)
- <D = $(<:d)
- <F = $(<:f)
- ?B = $(?:b)
- ?F = $(?:f)
- ?D = $(?:d)
- X
- # Turn warnings back to previous setting.
- .SILENT := $(__.SILENT)
- X
- # Local startup file if any
- .INCLUDE .IGNORE: "_startup.mk"
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/startup.mk ||
- echo 'restore of dmake/unix/coherent/startup.mk failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/startup.mk'`"
- test 3227 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/startup.mk: original size 3227, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/stdarg.h ==============
- if test -f 'dmake/unix/coherent/stdarg.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/stdarg.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/stdarg.h' &&
- /*
- X * stdarg.h
- X *
- X * defines ANSI style macros for accessing arguments of a function which takes
- X * a variable number of arguments
- X *
- X */
- X
- #if !defined(__STDARG_H__)
- #define __STDARG_H__
- X
- #if !defined(_VA_LIST_) && !defined(_VA_LIST)
- #define _VA_LIST_
- #define _VA_LIST
- typedef char *va_list;
- #endif
- X
- #define va_dcl int va_alist
- #define va_start(ap,v) ap = (va_list)&va_alist
- #define va_arg(ap,t) ((t*)(ap += sizeof(t)))[-1]
- #define va_end(ap) ap = NULL
- #endif
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/stdarg.h ||
- echo 'restore of dmake/unix/coherent/stdarg.h failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/stdarg.h'`"
- test 469 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/stdarg.h: original size 469, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/stdlib.h ==============
- if test -f 'dmake/unix/coherent/stdlib.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/stdlib.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/stdlib.h' &&
- #ifndef _STDLIB_INCLUDED_
- #define _STDLIB_INCLUDED_
- X
- extern /*GOTO*/ _exit();
- extern /*GOTO*/ exit();
- extern /*GOTO*/ abort();
- extern int system();
- extern char *getenv();
- extern char *calloc();
- extern char *malloc();
- extern char *realloc();
- extern free();
- extern int errno;
- X
- #ifndef EIO
- # include <errno.h>
- #endif
- X
- #endif /* _STDLIB_INCLUDED_ */
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/stdlib.h ||
- echo 'restore of dmake/unix/coherent/stdlib.h failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/stdlib.h'`"
- test 346 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/stdlib.h: original size 346, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/time.h ==============
- if test -f 'dmake/unix/coherent/time.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/time.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/time.h' &&
- /*
- ** Berkeley get this wrong!
- */
- #ifndef TIME_h
- #define TIME_h
- X
- typedef long time_t; /* this is the thing we use */
- X
- #endif TIME_h
- X
- SHAR_EOF
- chmod 0640 dmake/unix/coherent/time.h ||
- echo 'restore of dmake/unix/coherent/time.h failed'
- Wc_c="`wc -c < 'dmake/unix/coherent/time.h'`"
- test 133 -eq "$Wc_c" ||
- echo 'dmake/unix/coherent/time.h: original size 133, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/unix/coherent/vfprintf.c ==============
- if test -f 'dmake/unix/coherent/vfprintf.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/unix/coherent/vfprintf.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/coherent/vfprintf.c' &&
- /* Portable vfprintf and vprintf by Robert A. Larson <blarson@skat.usc.edu> */
- X
- /* Copyright 1989 Robert A. Larson.
- X * Distribution in any form is allowed as long as the author
- X * retains credit, changes are noted by their author and the
- X * copyright message remains intact. This program comes as-is
- X * with no warentee of fitness for any purpouse.
- X *
- X * Thanks to Doug Gwen, Chris Torek, and others who helped clarify
- X * the ansi printf specs.
- X *
- X * Please send any bug fixes and improvments to blarson@skat.usc.edu .
- X * The use of goto is NOT a bug.
- X */
- X
- /* Feb 9, 1989 blarson First usenet release */
- X
- /* This code implements the vfprintf function, without relying on
- X * the existance of _doprint or other system specific code.
- X *
- X * Define NOVOID if void * is not a supported type.
- X *
- X * Two compile options are available for efficency:
- X * INTSPRINTF should be defined if sprintf is int and returns
- X * the number of chacters formated.
- X * LONGINT should be defined if sizeof(long) == sizeof(int)
- X *
- X * They only make the code smaller and faster, they need not be
- X * defined.
- X *
- X * UNSIGNEDSPECIAL should be defined if unsigned is treated differently
- X * than int in argument passing. If this is definded, and LONGINT is not,
- X * the compiler must support the type unsingned long.
- X *
- X * Most quirks and bugs of the available fprintf fuction are duplicated,
- X * however * in the width and precision fields will work correctly
- X * even if fprintf does not support this. The %n format and the return
- X * count will only work if fprintf returns the number of characters
- X * formatted.
- X *
- X * Bad format strings, or those with very long width and precision
- X * fields (including expanded * fields) will cause undesired results.
- X */
- X
- #ifdef OSK /* os9/68k can take advantage of both */
- #define INTSPRINTF
- #define LONGINT
- #endif
- #define NOVOID 1
- X
- /* This must be a typedef not a #define! */
- #ifdef NOVOID
- typedef char *pointer;
- #else
- typedef void *pointer;
- #endif
- X
- #include <stdio.h>
- X
- #ifdef INTSPRINTF
- #define Sprintf(string,format,arg) (sprintf((string),(format),(arg)))
- #else
- #define Sprintf(string,format,arg) (\
- X sprintf((string),(format),(arg)),\
- X strlen(string)\
- )
- #endif
- X
- #include <stdarg.h>
- X
- typedef int *intp;
- X
- int vfprintf(dest, format, args)
- FILE *dest;
- register char *format;
- va_list args;
- {
- X register char c;
- X register char *tp;
- X register int count = 0;
- X char tempfmt[64];
- #ifndef LONGINT
- X int longflag;
- #endif
- X
- X tempfmt[0] = '%';
- X while(c = *format++) {
- X if(c=='%') {
- X tp = &tempfmt[1];
- #ifndef LONGINT
- X longflag = 0;
- #endif
- continue_format:
- X switch(c = *format++) {
- X case 's':
- X *tp++ = c;
- X *tp = '\0';
- X count += fprintf(dest, tempfmt, va_arg(args, char *));
- X break;
- X case 'u':
- X case 'x':
- X case 'o':
- SHAR_EOF
- true || echo 'restore of dmake/unix/coherent/vfprintf.c failed'
- fi
- echo 'End of part 36, continue with part 37'
- echo 37 > _shar_seq_.tmp
- exit 0
- exit 0 # Just in case...
-