v19i054: dmake - dmake version 3.7, Part33/37
Dennis Vadura
dvadura at watdragon.waterloo.edu
Tue May 14 00:53:55 AEST 1991
Submitted-by: Dennis Vadura <dvadura at watdragon.waterloo.edu>
Posting-number: Volume 19, Issue 54
Archive-name: dmake/part33
Supersedes: dmake-3.6: Volume 15, Issue 52-77
---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is dmake.shar.33 (part 33 of a multipart archive)
# do not concatenate these parts, unpack them in order with /bin/sh
# file dmake/unix/arlib.c continued
#
if test ! -r _shar_seq_.tmp; then
echo 'Please unpack part 1 first!'
exit 1
fi
(read Scheck
if test "$Scheck" != 33; 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/arlib.c' &&
X
X fseek(f, arhdroffset + (unsigned long)(((struct ar_hdr *)0)->ar_date), 0);
X
#if ASCARCH
X fprintf(f, "%lu", now);
#else
X fwrite((char *)now, sizeof(now), 1, f);
#endif
X
X return( ferror(f) ? 0 : 1 );
}
X
X
#if LC
typedef struct mem {
X time_t m_time; /* modify time of member*/
X struct mem *m_next; /* next member in lib */
X char m_valid; /* valid cache entry */
X char m_name[1]; /* lib member name */
} MEM, *MEMPTR;
X
typedef struct lib {
X struct lib *lb_next; /* next library in list */
X struct mem *lb_members; /* list of lib members */
X char lb_valid; /* valid cache entry */
X char *lb_name; /* library name */
} LIB, *LIBPTR;
X
static LIBPTR _cache = NIL(LIB);
static MEMPTR _find_member ANSI(( LIBPTR, char * ));
X
static int
_check_cache( name, lib, pmtime, touch )/*
==========================================
X Check to see if we have cached member in lib, if so return time in pmtime
X and return TRUE, otherwise return FALSE, if touch is TRUE then touch
X the archive member instead. */
char *name;
char *lib;
time_t *pmtime;
int touch;
{
X register MEMPTR mp;
X register LIBPTR lp;
X
X for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
X if( lp == NIL(LIB) ) return( FALSE );
X
X mp = _find_member( lp, name );
X if( mp == NIL(MEM) || !mp->m_valid ) return( FALSE );
X
X if( touch == TRUE )
X {
X mp->m_time = *pmtime;
X mp->m_valid = 1;
X }
X else
X *pmtime = mp->m_time;
X
X lp->lb_valid = 1;
X lp->lb_members = mp;
X
X return( TRUE );
}
X
X
X
static int
_cache_member( name, lib, mtime )/*
===================================
X Cache name in lib along with it's time */
char *name;
char *lib;
time_t mtime;
{
X register MEMPTR mp;
X register LIBPTR lp;
X
X for( lp=_cache;
X lp != NIL(LIB) && lp->lb_name != NIL(char) && lp->lb_name != lib;
X lp=lp->lb_next);
X
X if( lp == NIL(LIB) )
X {
X lp = (LIBPTR) malloc(sizeof(LIB));
X if( lp == NIL(LIB) ) No_ram();
X
X lp->lb_name = lib;
X lp->lb_members = NIL(MEM);
X lp->lb_next = _cache;
X lp->lb_valid = 0;
X _cache = lp;
X }
X
X /* On UNIX ar does not allow multiple copies of the same .o file to live
X * in the same AR file. If this is not TRUE then use the commented out
X * version to set the value of mp. */
X
X /*mp = _find_member(lp, name);*/
X mp = NIL(MEM);
X
X if( mp == NIL(MEM) )
X {
X mp = (MEMPTR) malloc(sizeof(char)*offsetof(MEM,m_name[strlen(name)+1]));
X if( mp == NIL(MEM) ) No_ram();
X
X strcpy( mp->m_name, name );
X mp->m_time = mtime;
X
X if( lp->lb_members == NIL(MEM) ) {
X mp->m_next = mp;
X lp->lb_members = mp;
X }
X else {
X mp->m_next = lp->lb_members->m_next;
X lp->lb_members->m_next = mp;
X lp->lb_members = mp;
X }
X }
X else
X mp->m_time = mtime;
X
X mp->m_valid = 1;
X
X return( lp->lb_valid );
}
X
X
static MEMPTR
_find_member( lp, name )
LIBPTR lp;
char *name;
{
X register MEMPTR mp = lp->lb_members;
X
X if( mp == NIL(MEM) ) return(mp);
X
X do {
X if( !strcmp(mp->m_name, name ) ) return( mp );
X mp = mp->m_next;
X }
X while( mp != lp->lb_members );
X
X return( NIL(MEM) );
}
#endif
X
X
X
void
void_lcache( lib, member )/*
============================
X Void the library cache for lib. If member is NIL(char) then nuke all
X of the members, if member is NOT NIL(char) then invalidate only that
X member. */
char *lib;
char *member;
{
#if LC
X register LIBPTR lp;
X register MEMPTR mp;
X register MEMPTR tmp;
X
X for( lp=_cache; lp != NIL(LIB) && lp->lb_name != lib; lp=lp->lb_next );
X if( lp == NIL(LIB) ) return;
X
X if( member == NIL(char) ) {
X mp = lp->lb_members;
X do {
X tmp = mp->m_next;
X (void) free( mp );
X mp = tmp;
X } while( mp != lp->lb_members );
X
X lp->lb_valid = 0;
X lp->lb_members = NIL(MEM);
X lp->lb_name = NIL(char);
X }
X else {
X mp=lp->lb_members;
X do {
X if( strcmp( member, mp->m_name) == 0 ) {
X lp->lb_members = mp->m_next;
X mp->m_valid = 0;
X }
X
X mp=mp->m_next;
X } while( mp != lp->lb_members );
X }
#endif
}
SHAR_EOF
chmod 0640 dmake/unix/arlib.c ||
echo 'restore of dmake/unix/arlib.c failed'
Wc_c="`wc -c < 'dmake/unix/arlib.c'`"
test 14467 -eq "$Wc_c" ||
echo 'dmake/unix/arlib.c: original size 14467, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/config.h ==============
if test ! -d 'dmake/unix/bsd43'; then
mkdir 'dmake/unix/bsd43'
fi
if test -f 'dmake/unix/bsd43/config.h' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/config.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/config.h' &&
/* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/RCS/config.h,v 1.1 91/05/06 15:28:56 dvadura Exp $
-- 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 at 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 91/05/06 15:28:56 dvadura
X * dmake Release Version 3.7
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
/* Define the getcwd function that is used in the code, since BSD does
X * not have getcwd, but call it getwd instead. */
extern char* getwd ANSI((char*));
#define getcwd(buf,siz) getwd(buf)
X
/* Sun unix on 386i's has a broken ar.h that does not assume PORTAR format
X * by default, so we fix it here. */
#ifdef i386
#define PORTAR 1
#endif
X
/* We don't care about CONST */
#define CONST
SHAR_EOF
chmod 0640 dmake/unix/bsd43/config.h ||
echo 'restore of dmake/unix/bsd43/config.h failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/config.h'`"
test 2075 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/config.h: original size 2075, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/config.mk ==============
if test -f 'dmake/unix/bsd43/config.mk' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/config.mk (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/config.mk' &&
# This is the BSD 4.3 UNIX 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 sources are required for BSD4.3
OSDSRC := putenv.c tempnam.c utime.c setvbuf.c
.IF $(OSDSRC)
X SRC += $(OSDSRC)
X .SETDIR=$(osrdir) : $(OSDSRC)
.END
X
.SOURCE.h : $(osrdir)
X
# Local configuration modifications for CFLAGS, there's local BSD 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/bsd43/config.mk ||
echo 'restore of dmake/unix/bsd43/config.mk failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/config.mk'`"
test 796 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/config.mk: original size 796, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/make.sh ==============
if test -f 'dmake/unix/bsd43/make.sh' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/make.sh (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/make.sh' &&
mkdir objects
cc -c -I. -Iunix -Iunix/bsd43 -O infer.c
mv infer.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O make.c
mv make.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O stat.c
mv stat.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O expand.c
mv expand.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O dmstring.c
mv dmstring.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O hash.c
mv hash.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O dag.c
mv dag.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O dmake.c
mv dmake.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O path.c
mv path.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O imacs.c
mv imacs.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O sysintf.c
mv sysintf.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O parse.c
mv parse.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O getinp.c
mv getinp.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O quit.c
mv quit.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O state.c
mv state.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O basename.c
mv basename.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O dmdump.c
mv dmdump.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O macparse.c
mv macparse.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O rulparse.c
mv rulparse.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O percent.c
mv percent.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O function.c
mv function.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/arlib.c
mv arlib.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/dirbrk.c
mv dirbrk.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/rmprq.c
mv rmprq.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/ruletab.c
mv ruletab.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/runargv.c
mv runargv.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/putenv.c
mv putenv.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/tempnam.c
mv tempnam.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/utime.c
mv utime.o objects
cc -c -I. -Iunix -Iunix/bsd43 -O unix/bsd43/setvbuf.c
mv setvbuf.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/se
tvbuf.o
cp unix/bsd43/startup.mk startup.mk
SHAR_EOF
chmod 0640 dmake/unix/bsd43/make.sh ||
echo 'restore of dmake/unix/bsd43/make.sh failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/make.sh'`"
test 2489 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/make.sh: original size 2489, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/public.h ==============
if test -f 'dmake/unix/bsd43/public.h' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/public.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/public.h' &&
/* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/RCS/public.h,v 1.1 91/05/06 15:28:57 dvadura Exp Locker: dvadura $
-- 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 at 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: public.h,v $
X * Revision 1.1 91/05/06 15:28:57 dvadura
X * dmake Release Version 3.7
X *
*/
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 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 * _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(());
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));
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/public.h ||
echo 'restore of dmake/unix/bsd43/public.h failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/public.h'`"
test 5521 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/public.h: original size 5521, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/putenv.c ==============
if test -f 'dmake/unix/bsd43/putenv.c' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/putenv.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/putenv.c' &&
/* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/RCS/putenv.c,v 1.1 91/05/06 15:28:58 dvadura Exp $
-- SYNOPSIS -- my own putenv for BSD like systems.
--
-- DESCRIPTION
-- This originally came from MKS, but I rewrote it to fix a bug with
-- replacing existing strings, probably never happened but the code
-- was wrong nonetheless.
--
-- AUTHOR
-- Dennis Vadura, dvadura at 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: putenv.c,v $
X * Revision 1.1 91/05/06 15:28:58 dvadura
X * dmake Release Version 3.7
X *
*/
X
#include <stdio.h>
#include <string.h>
X
int
putenv( str )/*
===============
X Take a string of the form NAME=value and stick it into the environment.
X We do this by allocating a new set of pointers if we have to add a new
X string and by replacing an existing pointer if the value replaces the value
X of an existing string. */
char *str;
{
X extern char **environ; /* The current environment. */
X static char **ourenv = NULL; /* A new environment */
X register char **p;
X register char *q;
X int size;
X
X /* First search the current environment and see if we can replace a
X * string. */
X for( p=environ; *p; p++ ) {
X register char *s = str;
X
X for( q = *p; *q && *s && *s == *q; q++, s++ )
X if( *s == '=' ) {
X *p = str;
X return(0); /* replaced it so go away */
X }
X }
X
X /* Ok, can't replace a string so need to grow the environment. */
X size = p - environ + 2; /* size of new environment */
X /* size of old is size-1 */
X
X /* It's the first time, so allocate a new environment since we don't know
X * where the old one is comming from. */
X if( ourenv == NULL ) {
X if( (ourenv = (char **) malloc( sizeof(char *)*size )) == NULL )
X return(1);
X
X memcpy( (char *)ourenv, (char *)environ, (size-2)*sizeof(char *) );
X }
X else if( (ourenv = (char **)realloc( ourenv, size*sizeof(char *))) == NULL )
X return(1);
X
X ourenv[--size] = NULL;
X ourenv[--size] = str;
X
X environ = ourenv;
X return(0);
}
SHAR_EOF
chmod 0640 dmake/unix/bsd43/putenv.c ||
echo 'restore of dmake/unix/bsd43/putenv.c failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/putenv.c'`"
test 2930 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/putenv.c: original size 2930, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/setvbuf.c ==============
if test -f 'dmake/unix/bsd43/setvbuf.c' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/setvbuf.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/setvbuf.c' &&
/* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/RCS/setvbuf.c,v 1.1 91/05/06 15:28:59 dvadura Exp $
-- SYNOPSIS -- setvbuf for BSD
--
-- DESCRIPTION
-- A sysv call, standard BSD doesn't have this.
--
-- AUTHOR
-- Dennis Vadura, dvadura at 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: setvbuf.c,v $
X * Revision 1.1 91/05/06 15:28:59 dvadura
X * dmake Release Version 3.7
X *
*/
X
#include <stdio.h>
X
setvbuf(fp, bp, type, len_unused)
FILE* fp;
char* bp;
int type;
int len_unused;
{
X switch (type) {
X case _IOLBF: setlinebuf(fp); return;
X case _IONBF: setbuf(fp, NULL); return;
X default: setbuf(fp, bp); return;
X }
}
X
SHAR_EOF
chmod 0640 dmake/unix/bsd43/setvbuf.c ||
echo 'restore of dmake/unix/bsd43/setvbuf.c failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/setvbuf.c'`"
test 1581 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/setvbuf.c: original size 1581, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/startup.mk ==============
if test -f 'dmake/unix/bsd43/startup.mk' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/startup.mk (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/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/startup.mk ||
echo 'restore of dmake/unix/bsd43/startup.mk failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/startup.mk'`"
test 3221 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/startup.mk: original size 3221, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/stdarg.h ==============
if test -f 'dmake/unix/bsd43/stdarg.h' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/stdarg.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/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
typedef char *va_list;
X
#if defined(sparc)
# define va_alist __builtin_va_alist
#endif
# define va_dcl int va_alist
# define va_start(list,v) list = (char *)&va_alist
# define va_end(list) list = NULL
# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
X
SHAR_EOF
chmod 0640 dmake/unix/bsd43/stdarg.h ||
echo 'restore of dmake/unix/bsd43/stdarg.h failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/stdarg.h'`"
test 409 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/stdarg.h: original size 409, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/stdlib.h ==============
if test -f 'dmake/unix/bsd43/stdlib.h' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/stdlib.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/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/bsd43/stdlib.h ||
echo 'restore of dmake/unix/bsd43/stdlib.h failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/stdlib.h'`"
test 346 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/stdlib.h: original size 346, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/string.h ==============
if test -f 'dmake/unix/bsd43/string.h' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/string.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/string.h' &&
/*
** BSD does this wrong
*/
#include <strings.h>
X
#include "stdmacs.h"
extern char* strpbrk ANSI((char* src, char* any));
X
#ifndef DBUG
#define strchr(str,c) index(str,c)
#define strrchr(str,c) rindex(str,c)
#else
char *strchr ANSI((char*, char));
char *strrchr ANSI((char*, char));
#endif
X
SHAR_EOF
chmod 0640 dmake/unix/bsd43/string.h ||
echo 'restore of dmake/unix/bsd43/string.h failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/string.h'`"
test 292 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/string.h: original size 292, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/tempnam.c ==============
if test -f 'dmake/unix/bsd43/tempnam.c' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/tempnam.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/tempnam.c' &&
/*LINTLIBRARY*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
X
#define max(A,B) (((A)<(B))?(B):(A))
X
extern char *mktemp();
extern int access();
X
static char *cpdir();
static char *seed="AAA";
X
/* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
#ifndef P_tmpdir
static char *P_tmpdir = "/tmp";
#endif
X
char *
tempnam(dir, prefix)
char *dir; /* use this directory please (if non-NULL) */
char *prefix; /* use this (if non-NULL) as filename prefix */
{
X register char *p, *q, *tmpdir;
X int tl=0, dl=0, pl;
X
X pl = strlen(P_tmpdir);
X
X if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
X if( dir != NULL ) dl = strlen(dir);
X
X if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
X return(NULL);
X
X *p = '\0';
X
X if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
X if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
X if( access( cpdir(p, P_tmpdir), 3) != 0 )
X if( access( cpdir(p, "/tmp"), 3) != 0 )
X return(NULL);
X
X (void) strcat(p, "/");
X if(prefix)
X {
X *(p+strlen(p)+5) = '\0';
X (void)strncat(p, prefix, 5);
X }
X
X (void)strcat(p, seed);
X (void)strcat(p, "XXXXXX");
X
X q = seed;
X while(*q == 'Z') *q++ = 'A';
X ++*q;
X
X if(*mktemp(p) == '\0') return(NULL);
X return(p);
}
X
X
X
static char *
cpdir(buf, str)
char *buf;
char *str;
{
X char *p;
X
X if(str != NULL)
X {
X (void) strcpy(buf, str);
X p = buf - 1 + strlen(buf);
X if(*p == '/') *p = '\0';
X }
X
X return(buf);
}
SHAR_EOF
chmod 0640 dmake/unix/bsd43/tempnam.c ||
echo 'restore of dmake/unix/bsd43/tempnam.c failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/tempnam.c'`"
test 1506 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/tempnam.c: original size 1506, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/utime.c ==============
if test -f 'dmake/unix/bsd43/utime.c' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/utime.c (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/utime.c' &&
/*
** change access and modify times of file
*/
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/file.h>
X
int
utime(name, timep)
char* name;
time_t timep[2];
{
X struct timeval tv[2], *tvp;
X struct stat buf;
X int fil;
X char data;
X
X if (timep!=0)
X {
X tvp = tv, tv[0].tv_sec = timep[0], tv[1].tv_sec = timep[1];
X if (utimes(name, tvp)==0)
X return (0);
X }
X
X if (stat(name, &buf) != 0)
X return (-1);
X if (buf.st_size != 0) {
X if ((fil = open(name, O_RDWR, 0666)) < 0)
X return (-1);
X if (read(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X lseek(fil, 0L, 0);
X if (write(fil, &data, 1) < 1) {
X close(fil);
X return (-1);
X }
X close(fil);
X return (0);
X } else if ((fil = creat(name, 0666)) < 0) {
X return (-1);
X } else {
X close(fil);
X return (0);
X }
}
SHAR_EOF
chmod 0640 dmake/unix/bsd43/utime.c ||
echo 'restore of dmake/unix/bsd43/utime.c failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/utime.c'`"
test 808 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/utime.c: original size 808, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/uw/config.mk ==============
if test ! -d 'dmake/unix/bsd43/uw'; then
mkdir 'dmake/unix/bsd43/uw'
fi
if test -f 'dmake/unix/bsd43/uw/config.mk' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/uw/config.mk (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/config.mk' &&
# This is the BSD 4.3 University of Waterloo (uw) UNIX configuration file
# for DMAKE
# It simply modifies the values of LDLIBS to include libuw.a
# so that vfprintf can be found.
#
X
LDLIBS += -luw
osredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
CFLAGS += -I$(osredir)
X
# install script for UW's /usr/software hierarchy...
install:
X mkdir ../bin; strip ./dmake; mv ./dmake ../bin
X chmod a+rx ../bin/dmake ../bin
X mkdir ../lib; chmod a+rx ../lib
X cp $(STARTUPFILE) ../lib
X chmod a+r ../lib/startup.mk
SHAR_EOF
chmod 0640 dmake/unix/bsd43/uw/config.mk ||
echo 'restore of dmake/unix/bsd43/uw/config.mk failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/uw/config.mk'`"
test 521 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/uw/config.mk: original size 521, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/uw/make.sh ==============
if test -f 'dmake/unix/bsd43/uw/make.sh' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/uw/make.sh (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/make.sh' &&
mkdir objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O infer.c
mv infer.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O make.c
mv make.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O stat.c
mv stat.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O expand.c
mv expand.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmstring.c
mv dmstring.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O hash.c
mv hash.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dag.c
mv dag.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmake.c
mv dmake.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O path.c
mv path.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O imacs.c
mv imacs.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O sysintf.c
mv sysintf.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O parse.c
mv parse.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O getinp.c
mv getinp.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O quit.c
mv quit.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O state.c
mv state.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O basename.c
mv basename.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmdump.c
mv dmdump.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O macparse.c
mv macparse.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O rulparse.c
mv rulparse.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O percent.c
mv percent.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O function.c
mv function.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/arlib.c
mv arlib.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/dirbrk.c
mv dirbrk.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/rmprq.c
mv rmprq.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/ruletab.c
mv ruletab.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/runargv.c
mv runargv.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/putenv.c
mv putenv.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/tempnam.c
mv tempnam.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/utime.c
mv utime.o objects
cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/setvbuf.c
mv setvbuf.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/se
tvbuf.o -luw
cp unix/bsd43/uw/startup.mk startup.mk
SHAR_EOF
chmod 0640 dmake/unix/bsd43/uw/make.sh ||
echo 'restore of dmake/unix/bsd43/uw/make.sh failed'
Wc_c="`wc -c < 'dmake/unix/bsd43/uw/make.sh'`"
test 2977 -eq "$Wc_c" ||
echo 'dmake/unix/bsd43/uw/make.sh: original size 2977, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= dmake/unix/bsd43/uw/public.h ==============
if test -f 'dmake/unix/bsd43/uw/public.h' -a X"$1" != X"-c"; then
echo 'x - skipping dmake/unix/bsd43/uw/public.h (File already exists)'
rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/public.h' &&
/* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/uw/RCS/public.h,v 1.1 91/05/06 15:29:14 dvadura Exp Locker: dvadura $
-- 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 at 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
SHAR_EOF
true || echo 'restore of dmake/unix/bsd43/uw/public.h failed'
fi
echo 'End of part 33, continue with part 34'
echo 34 > _shar_seq_.tmp
exit 0
exit 0 # Just in case...
--
Kent Landfield INTERNET: kent at sparky.IMD.Sterling.COM
Sterling Software, IMD UUCP: uunet!sparky!kent
Phone: (402) 291-8300 FAX: (402) 291-4362
Please send comp.sources.misc-related mail to kent at uunet.uu.net.
More information about the Comp.sources.misc
mailing list