home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / dmake / part35 < prev    next >
Encoding:
Text File  |  1992-01-29  |  40.0 KB  |  1,297 lines

  1. Newsgroups: comp.sources.misc
  2. From: dvadura@plg.waterloo.edu (Dennis Vadura)
  3. Subject:  v27i136:  dmake - dmake Version 3.8, Part35/41
  4. Message-ID: <1992Jan29.165033.1565@sparky.imd.sterling.com>
  5. X-Md4-Signature: f3776f4dd9f4076dcdf90fcc38a42d69
  6. Date: Wed, 29 Jan 1992 16:50:33 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
  10. Posting-number: Volume 27, Issue 136
  11. Archive-name: dmake/part35
  12. Environment: Atari-ST, Coherent, Mac, MSDOS, OS/2, UNIX
  13. Supersedes: dmake: Volume 19, Issue 22-58
  14.  
  15. ---- Cut Here and feed the following to sh ----
  16. # this is dmake.shar.35 (part 35 of a multipart archive)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file dmake/unix/bsd43/make.sh continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 35; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test -f _shar_wnt_.tmp; then
  33. sed 's/^X//' << 'SHAR_EOF' >> 'dmake/unix/bsd43/make.sh' &&
  34. cp unix/bsd43/startup.mk startup.mk
  35. SHAR_EOF
  36. chmod 0640 dmake/unix/bsd43/make.sh ||
  37. echo 'restore of dmake/unix/bsd43/make.sh failed'
  38. Wc_c="`wc -c < 'dmake/unix/bsd43/make.sh'`"
  39. test 2489 -eq "$Wc_c" ||
  40.     echo 'dmake/unix/bsd43/make.sh: original size 2489, current size' "$Wc_c"
  41. rm -f _shar_wnt_.tmp
  42. fi
  43. # ============= dmake/unix/bsd43/public.h ==============
  44. if test -f 'dmake/unix/bsd43/public.h' -a X"$1" != X"-c"; then
  45.     echo 'x - skipping dmake/unix/bsd43/public.h (File already exists)'
  46.     rm -f _shar_wnt_.tmp
  47. else
  48. > _shar_wnt_.tmp
  49. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/public.h' &&
  50. /* RCS      -- $Header$
  51. -- WARNING  -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
  52. --
  53. -- SYNOPSIS -- Local functions exported to be visible by others.
  54. --
  55. -- DESCRIPTION
  56. --      This file is generated by 'genpub'.  Function declarations
  57. --      that appear in this file are extracted by 'genpub' from
  58. --      source files.  Any function in the source file whose definition
  59. --      appears like:
  60. --
  61. --          PUBLIC return_type
  62. --          function( arg_list );
  63. --          type_expr1 arg1;
  64. --          ...
  65. --
  66. --      has its definition extracted and a line of the form:
  67. --
  68. --          return_type function ANSI((type_expr1,type_expr2,...));
  69. --
  70. --      entered into the output file.
  71. --
  72. -- AUTHOR
  73. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  74. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  75. --
  76. -- COPYRIGHT
  77. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  78. -- 
  79. --      This program is free software; you can redistribute it and/or
  80. --      modify it under the terms of the GNU General Public License
  81. --      (version 1), as published by the Free Software Foundation, and
  82. --      found in the file 'LICENSE' included with this distribution.
  83. -- 
  84. --      This program is distributed in the hope that it will be useful,
  85. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  86. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  87. --      GNU General Public License for more details.
  88. -- 
  89. --      You should have received a copy of the GNU General Public License
  90. --      along with this program;  if not, write to the Free Software
  91. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  92. --
  93. -- LOG
  94. --     $Log$
  95. */
  96. X
  97. #ifndef _DMAKE_PUBLIC_h
  98. #define _DMAKE_PUBLIC_h
  99. X
  100. void Infer_recipe ANSI((CELLPTR, CELLPTR));
  101. int Make_targets ANSI(());
  102. int Exec_commands ANSI((CELLPTR));
  103. void Print_cmnd ANSI((char *, int, int));
  104. void Pop_dir ANSI((int));
  105. void Append_line ANSI((char *, int, FILE *, char *, int, int));
  106. void Stat_target ANSI((CELLPTR, int));
  107. char * Expand ANSI((char *));
  108. char * Apply_edit ANSI((char *, char *, char *, int, int));
  109. void Map_esc ANSI((char *));
  110. char* Apply_modifiers ANSI((int, char *));
  111. char* Tokenize ANSI((char *, char *));
  112. char * _strjoin ANSI((char *, char *, int, int));
  113. char * _stradd ANSI((char *, char *, int));
  114. char * _strapp ANSI((char *, char *));
  115. char * _strdup ANSI((char *));
  116. char * _strdup2 ANSI((char *));
  117. char * _strpbrk ANSI((char *, char *));
  118. char * _strspn ANSI((char *, char *));
  119. char * _strstr ANSI((char *, char *));
  120. char * _substr ANSI((char *, char *));
  121. uint16 Hash ANSI((char *, uint32 *));
  122. HASHPTR Get_name ANSI((char *, HASHPTR *, int));
  123. HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
  124. HASHPTR Def_macro ANSI((char *, char *, int));
  125. CELLPTR Def_cell ANSI((char *));
  126. LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
  127. void Clear_prerequisites ANSI((CELLPTR));
  128. int Test_circle ANSI((CELLPTR, int));
  129. STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
  130. t_attr Rcp_attribute ANSI((char *));
  131. int main ANSI((int, char **));
  132. FILE * Openfile ANSI((char *, int, int));
  133. FILE * Closefile ANSI(());
  134. FILE * Search_file ANSI((char *, char **));
  135. char * Filename ANSI(());
  136. int Nestlevel ANSI(());
  137. void No_ram ANSI(());
  138. int Usage ANSI((int));
  139. int Version ANSI(());
  140. char * Get_suffix ANSI((char *));
  141. char * Build_path ANSI((char *, char *));
  142. void Make_rules ANSI(());
  143. void Create_macro_vars ANSI(());
  144. time_t Do_stat ANSI((char *, char *, char **));
  145. int Do_touch ANSI((char *, char *, char **));
  146. void Void_lib_cache ANSI((char *, char *));
  147. time_t Do_time ANSI(());
  148. int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
  149. char ** Pack_argv ANSI((int, int, char *));
  150. char * Read_env_string ANSI((char *));
  151. int Write_env_string ANSI((char *, char *));
  152. void ReadEnvironment ANSI(());
  153. void Catch_signals ANSI((void (*)()));
  154. void Clear_signals ANSI(());
  155. void Prolog ANSI((int, char* []));
  156. void Epilog ANSI((int));
  157. char * Get_current_dir ANSI(());
  158. int Set_dir ANSI((char*));
  159. char Get_switch_char ANSI(());
  160. FILE* Get_temp ANSI((char **, char *, int));
  161. FILE * Start_temp ANSI((char *, CELLPTR, char **));
  162. void Open_temp_error ANSI((char *, char *));
  163. void Link_temp ANSI((CELLPTR, FILE *, char *));
  164. void Close_temp ANSI((CELLPTR, FILE *));
  165. void Unlink_temp_files ANSI((CELLPTR));
  166. void Handle_result ANSI((int, int, int, CELLPTR));
  167. void Update_time_stamp ANSI((CELLPTR));
  168. int Remove_file ANSI((char *));
  169. void Parse ANSI((FILE *));
  170. int Get_line ANSI((char *, FILE *));
  171. char * Do_comment ANSI((char *, char **, int));
  172. char * Get_token ANSI((TKSTRPTR, char *, int));
  173. void Quit ANSI(());
  174. void Read_state ANSI(());
  175. void Write_state ANSI(());
  176. int Check_state ANSI((CELLPTR, STRINGPTR *, int));
  177. char* basename ANSI((char *));
  178. void Dump ANSI(());
  179. void Dump_recipe ANSI((STRINGPTR));
  180. int Parse_macro ANSI((char *, int));
  181. int Macro_op ANSI((char *));
  182. int Parse_rule_def ANSI((int *));
  183. int Rule_op ANSI((char *));
  184. void Add_recipe_to_list ANSI((char *, int, int));
  185. void Bind_rules_to_targets ANSI((int));
  186. int Set_group_attributes ANSI((char *));
  187. DFALINKPTR Match_dfa ANSI((char *));
  188. void Check_circle_dfa ANSI(());
  189. void Add_nfa ANSI((char *));
  190. char * Exec_function ANSI((char *));
  191. time_t seek_arch ANSI((char *, char *));
  192. int If_root_path ANSI((char *));
  193. void Remove_prq ANSI((CELLPTR));
  194. int runargv ANSI((CELLPTR, int, int, int, int, char *));
  195. int Wait_for_child ANSI((int, int));
  196. void Clean_up_processes ANSI(());
  197. X
  198. #endif
  199. SHAR_EOF
  200. chmod 0640 dmake/unix/bsd43/public.h ||
  201. echo 'restore of dmake/unix/bsd43/public.h failed'
  202. Wc_c="`wc -c < 'dmake/unix/bsd43/public.h'`"
  203. test 5448 -eq "$Wc_c" ||
  204.     echo 'dmake/unix/bsd43/public.h: original size 5448, current size' "$Wc_c"
  205. rm -f _shar_wnt_.tmp
  206. fi
  207. # ============= dmake/unix/bsd43/putenv.c ==============
  208. if test -f 'dmake/unix/bsd43/putenv.c' -a X"$1" != X"-c"; then
  209.     echo 'x - skipping dmake/unix/bsd43/putenv.c (File already exists)'
  210.     rm -f _shar_wnt_.tmp
  211. else
  212. > _shar_wnt_.tmp
  213. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/putenv.c' &&
  214. /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/putenv.c,v 1.1 1992/01/24 03:28:09 dvadura Exp $
  215. -- SYNOPSIS -- my own putenv for BSD like systems.
  216. -- 
  217. -- DESCRIPTION
  218. --     This originally came from MKS, but I rewrote it to fix a bug with
  219. --    replacing existing strings, probably never happened but the code
  220. --    was wrong nonetheless.
  221. --
  222. -- AUTHOR
  223. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  224. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  225. --
  226. -- COPYRIGHT
  227. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  228. -- 
  229. --      This program is free software; you can redistribute it and/or
  230. --      modify it under the terms of the GNU General Public License
  231. --      (version 1), as published by the Free Software Foundation, and
  232. --      found in the file 'LICENSE' included with this distribution.
  233. -- 
  234. --      This program is distributed in the hope that it will be useful,
  235. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  236. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  237. --      GNU General Public License for more details.
  238. -- 
  239. --      You should have received a copy of the GNU General Public License
  240. --      along with this program;  if not, write to the Free Software
  241. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  242. --
  243. -- LOG
  244. --     $Log: putenv.c,v $
  245. X * Revision 1.1  1992/01/24  03:28:09  dvadura
  246. X * dmake Version 3.8, Initial revision
  247. X *
  248. */
  249. X
  250. #include <stdio.h>
  251. #include <string.h>
  252. X
  253. int
  254. putenv( str )/*
  255. ===============
  256. X   Take a string of the form NAME=value and stick it into the environment.
  257. X   We do this by allocating a new set of pointers if we have to add a new
  258. X   string and by replacing an existing pointer if the value replaces the value
  259. X   of an existing string. */
  260. char *str;
  261. {
  262. X   extern char **environ;        /* The current environment. */
  263. X   static char **ourenv = NULL;        /* A new environment        */
  264. X   register char **p;
  265. X   register char *q;
  266. X   int      size;
  267. X
  268. X   /* First search the current environment and see if we can replace a
  269. X    * string. */
  270. X   for( p=environ; *p; p++ ) {
  271. X      register char *s = str;
  272. X
  273. X      for( q = *p; *q && *s && *s == *q; q++, s++ )
  274. X     if( *s == '=' ) {
  275. X        *p = str;
  276. X        return(0);            /* replaced it so go away */
  277. X     }
  278. X   }
  279. X
  280. X   /* Ok, can't replace a string so need to grow the environment. */
  281. X   size = p - environ + 2;    /* size of new environment */
  282. X                /* size of old is size-1   */
  283. X
  284. X   /* It's the first time, so allocate a new environment since we don't know
  285. X    * where the old one is comming from. */
  286. X   if( ourenv == NULL ) {
  287. X      if( (ourenv = (char **) malloc( sizeof(char *)*size )) == NULL )
  288. X     return(1);
  289. X
  290. X      memcpy( (char *)ourenv, (char *)environ, (size-2)*sizeof(char *) );
  291. X   }
  292. X   else if( (ourenv = (char **)realloc( ourenv, size*sizeof(char *))) == NULL )
  293. X      return(1);
  294. X
  295. X   ourenv[--size] = NULL;
  296. X   ourenv[--size] = str;
  297. X
  298. X   environ = ourenv;
  299. X   return(0);
  300. }
  301. SHAR_EOF
  302. chmod 0640 dmake/unix/bsd43/putenv.c ||
  303. echo 'restore of dmake/unix/bsd43/putenv.c failed'
  304. Wc_c="`wc -c < 'dmake/unix/bsd43/putenv.c'`"
  305. test 2939 -eq "$Wc_c" ||
  306.     echo 'dmake/unix/bsd43/putenv.c: original size 2939, current size' "$Wc_c"
  307. rm -f _shar_wnt_.tmp
  308. fi
  309. # ============= dmake/unix/bsd43/setvbuf.c ==============
  310. if test -f 'dmake/unix/bsd43/setvbuf.c' -a X"$1" != X"-c"; then
  311.     echo 'x - skipping dmake/unix/bsd43/setvbuf.c (File already exists)'
  312.     rm -f _shar_wnt_.tmp
  313. else
  314. > _shar_wnt_.tmp
  315. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/setvbuf.c' &&
  316. /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/setvbuf.c,v 1.1 1992/01/24 03:28:10 dvadura Exp $
  317. -- SYNOPSIS -- setvbuf for BSD
  318. -- 
  319. -- DESCRIPTION
  320. --     A sysv call, standard BSD doesn't have this.
  321. --
  322. -- AUTHOR
  323. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  324. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  325. --
  326. -- COPYRIGHT
  327. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  328. -- 
  329. --      This program is free software; you can redistribute it and/or
  330. --      modify it under the terms of the GNU General Public License
  331. --      (version 1), as published by the Free Software Foundation, and
  332. --      found in the file 'LICENSE' included with this distribution.
  333. -- 
  334. --      This program is distributed in the hope that it will be useful,
  335. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  336. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  337. --      GNU General Public License for more details.
  338. -- 
  339. --      You should have received a copy of the GNU General Public License
  340. --      along with this program;  if not, write to the Free Software
  341. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  342. --
  343. -- LOG
  344. --     $Log: setvbuf.c,v $
  345. X * Revision 1.1  1992/01/24  03:28:10  dvadura
  346. X * dmake Version 3.8, Initial revision
  347. X *
  348. */
  349. X
  350. #include <stdio.h>
  351. X
  352. setvbuf(fp, bp, type, len_unused)
  353. FILE*    fp;
  354. char*    bp;
  355. int    type;
  356. int    len_unused;
  357. {
  358. X   switch (type) {
  359. X      case _IOLBF: setlinebuf(fp);   return;
  360. X      case _IONBF: setbuf(fp, NULL); return;
  361. X      default:     setbuf(fp, bp);   return;
  362. X   }
  363. }
  364. X
  365. SHAR_EOF
  366. chmod 0640 dmake/unix/bsd43/setvbuf.c ||
  367. echo 'restore of dmake/unix/bsd43/setvbuf.c failed'
  368. Wc_c="`wc -c < 'dmake/unix/bsd43/setvbuf.c'`"
  369. test 1590 -eq "$Wc_c" ||
  370.     echo 'dmake/unix/bsd43/setvbuf.c: original size 1590, current size' "$Wc_c"
  371. rm -f _shar_wnt_.tmp
  372. fi
  373. # ============= dmake/unix/bsd43/startup.mk ==============
  374. if test -f 'dmake/unix/bsd43/startup.mk' -a X"$1" != X"-c"; then
  375.     echo 'x - skipping dmake/unix/bsd43/startup.mk (File already exists)'
  376.     rm -f _shar_wnt_.tmp
  377. else
  378. > _shar_wnt_.tmp
  379. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/startup.mk' &&
  380. # Generic UNIX DMAKE startup file.  Customize to suit your needs.
  381. # Should work for both SYSV, and BSD 4.3
  382. # See the documentation for a description of internally defined macros.
  383. #
  384. # Disable warnings for macros redefined here that were given
  385. # on the command line.
  386. __.SILENT := $(.SILENT)
  387. .SILENT   := yes
  388. X
  389. # Configuration parameters for DMAKE startup.mk file
  390. # Set these to NON-NULL if you wish to turn the parameter on.
  391. _HAVE_RCS    := yes        # yes => RCS  is installed.
  392. _HAVE_SCCS    := yes        # yes => SCCS is installed.
  393. X
  394. # Applicable suffix definitions
  395. A := .a        # Libraries
  396. E :=        # Executables
  397. F := .f        # Fortran
  398. O := .o        # Objects
  399. P := .p        # Pascal
  400. S := .s        # Assembler sources
  401. V := ,v        # RCS suffix
  402. X
  403. # Recipe execution configurations
  404. SHELL        := /bin/sh
  405. SHELLFLAGS    := -ce
  406. GROUPSHELL    := $(SHELL)
  407. GROUPFLAGS    := 
  408. SHELLMETAS    := |();&<>?*][$$:\\#`'"
  409. GROUPSUFFIX    :=
  410. DIVFILE         = $(TMPFILE)
  411. X
  412. # Standard C-language command names and flags
  413. X   CPP       := /lib/cpp        # C-preprocessor
  414. X   CC      := cc        # C-compiler and flags
  415. X   CFLAGS  +=
  416. X
  417. X   AS      := as        # Assembler and flags
  418. X   ASFLAGS += 
  419. X
  420. X   LD       = $(CC)        # Loader and flags
  421. X   LDFLAGS +=
  422. X   LDLIBS   =
  423. X
  424. # Definition of $(MAKE) macro for recursive makes.
  425. X   MAKE = $(MAKECMD) $(MFLAGS)
  426. X
  427. # Definition of Print command for this system.
  428. X   PRINT = lpr
  429. X
  430. # Language and Parser generation Tools and their flags
  431. X   YACC      := yacc        # standard yacc
  432. X   YFLAGS +=
  433. X   YTAB      := y.tab        # yacc output files name stem.
  434. X
  435. X   LEX      := lex        # standard lex
  436. X   LFLAGS +=
  437. X   LEXYY  := lex.yy        # lex output file
  438. X
  439. # Other Compilers, Tools and their flags
  440. X   PC    := pc            # pascal compiler
  441. X   RC    := f77            # ratfor compiler
  442. X   FC    := f77            # fortran compiler
  443. X
  444. X   CO       := co        # check out for RCS
  445. X   COFLAGS += -q
  446. X
  447. X   AR     := ar            # archiver
  448. X   ARFLAGS+= ruv
  449. X
  450. X   RM       := /bin/rm        # remove a file command
  451. X   RMFLAGS +=
  452. X
  453. # Implicit generation rules for making inferences.
  454. # We don't provide .yr or .ye rules here.  They're obsolete.
  455. # Rules for making *$O
  456. X   %$O : %.c ; $(CC) $(CFLAGS) -c $<
  457. X   %$O : %$P ; $(PC) $(PFLAGS) -c $<
  458. X   %$O : %$S ; $(AS) $(ASFLAGS) $<
  459. X   %$O : %.cl ; class -c $<
  460. X   %$O : %.e %.r %.F %$F
  461. X    $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  462. X
  463. # Executables
  464. X   %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
  465. X
  466. # lex and yacc rules
  467. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  468. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  469. X
  470. # This rule tells how to make *.out from it's immediate list of prerequisites
  471. # UNIX only.
  472. X   %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  473. X
  474. # RCS support
  475. .IF $(_HAVE_RCS)
  476. X   % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  477. X   .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  478. .END
  479. X
  480. # SCCS support
  481. .IF $(_HAVE_SCCS)
  482. X   % : s.% ; get $<
  483. X   .NOINFER : s.%
  484. .END
  485. X
  486. # Recipe to make archive files.
  487. %$A :
  488. [
  489. X   $(AR) $(ARFLAGS) $@ $?
  490. X   $(RM) $(RMFLAGS) $?
  491. X   ranlib $@
  492. ]
  493. X
  494. # DMAKE uses this recipe to remove intermediate targets
  495. .REMOVE :; $(RM) -f $<
  496. X
  497. # AUGMAKE extensions for SYSV compatibility
  498. @B = $(@:b)
  499. @D = $(@:d)
  500. @F = $(@:f)
  501. "*B" = $(*:b)
  502. "*D" = $(*:d)
  503. "*F" = $(*:f)
  504. <B = $(<:b)
  505. <D = $(<:d)
  506. <F = $(<:f)
  507. ?B = $(?:b)
  508. ?F = $(?:f)
  509. ?D = $(?:d)
  510. X
  511. # Turn warnings back to previous setting.
  512. .SILENT := $(__.SILENT)
  513. X
  514. # Local startup file if any
  515. .INCLUDE .IGNORE: "_startup.mk"
  516. SHAR_EOF
  517. chmod 0640 dmake/unix/bsd43/startup.mk ||
  518. echo 'restore of dmake/unix/bsd43/startup.mk failed'
  519. Wc_c="`wc -c < 'dmake/unix/bsd43/startup.mk'`"
  520. test 3227 -eq "$Wc_c" ||
  521.     echo 'dmake/unix/bsd43/startup.mk: original size 3227, current size' "$Wc_c"
  522. rm -f _shar_wnt_.tmp
  523. fi
  524. # ============= dmake/unix/bsd43/stdarg.h ==============
  525. if test -f 'dmake/unix/bsd43/stdarg.h' -a X"$1" != X"-c"; then
  526.     echo 'x - skipping dmake/unix/bsd43/stdarg.h (File already exists)'
  527.     rm -f _shar_wnt_.tmp
  528. else
  529. > _shar_wnt_.tmp
  530. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/stdarg.h' &&
  531. /*
  532. X * stdarg.h
  533. X *
  534. X * defines ANSI style macros for accessing arguments of a function which takes
  535. X * a variable number of arguments
  536. X *
  537. X */
  538. X
  539. typedef char *va_list;
  540. X
  541. #if defined(sparc)
  542. # define va_alist __builtin_va_alist
  543. #endif
  544. # define va_dcl int va_alist
  545. # define va_start(list,v) list = (char *)&va_alist
  546. # define va_end(list)     list = NULL
  547. # define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1]
  548. X
  549. SHAR_EOF
  550. chmod 0640 dmake/unix/bsd43/stdarg.h ||
  551. echo 'restore of dmake/unix/bsd43/stdarg.h failed'
  552. Wc_c="`wc -c < 'dmake/unix/bsd43/stdarg.h'`"
  553. test 409 -eq "$Wc_c" ||
  554.     echo 'dmake/unix/bsd43/stdarg.h: original size 409, current size' "$Wc_c"
  555. rm -f _shar_wnt_.tmp
  556. fi
  557. # ============= dmake/unix/bsd43/stdlib.h ==============
  558. if test -f 'dmake/unix/bsd43/stdlib.h' -a X"$1" != X"-c"; then
  559.     echo 'x - skipping dmake/unix/bsd43/stdlib.h (File already exists)'
  560.     rm -f _shar_wnt_.tmp
  561. else
  562. > _shar_wnt_.tmp
  563. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/stdlib.h' &&
  564. #ifndef _STDLIB_INCLUDED_
  565. #define _STDLIB_INCLUDED_
  566. X
  567. extern /*GOTO*/ _exit();
  568. extern /*GOTO*/ exit();
  569. extern /*GOTO*/ abort();
  570. extern int system();
  571. extern char *getenv();
  572. extern char *calloc();
  573. extern char *malloc();
  574. extern char *realloc();
  575. extern free();
  576. extern int errno;
  577. X
  578. #ifndef EIO
  579. #    include <errno.h>
  580. #endif
  581. X
  582. #endif /* _STDLIB_INCLUDED_ */
  583. SHAR_EOF
  584. chmod 0640 dmake/unix/bsd43/stdlib.h ||
  585. echo 'restore of dmake/unix/bsd43/stdlib.h failed'
  586. Wc_c="`wc -c < 'dmake/unix/bsd43/stdlib.h'`"
  587. test 346 -eq "$Wc_c" ||
  588.     echo 'dmake/unix/bsd43/stdlib.h: original size 346, current size' "$Wc_c"
  589. rm -f _shar_wnt_.tmp
  590. fi
  591. # ============= dmake/unix/bsd43/string.h ==============
  592. if test -f 'dmake/unix/bsd43/string.h' -a X"$1" != X"-c"; then
  593.     echo 'x - skipping dmake/unix/bsd43/string.h (File already exists)'
  594.     rm -f _shar_wnt_.tmp
  595. else
  596. > _shar_wnt_.tmp
  597. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/string.h' &&
  598. /*
  599. ** BSD does this wrong
  600. */
  601. #include <strings.h>
  602. X
  603. #include "stdmacs.h"
  604. extern    char*    strpbrk ANSI((char* src, char* any));
  605. X
  606. #ifndef DBUG
  607. #define    strchr(str,c)    index(str,c)
  608. #define    strrchr(str,c)    rindex(str,c)
  609. #else
  610. char *strchr ANSI((char*, char));
  611. char *strrchr ANSI((char*, char));
  612. #endif
  613. X
  614. SHAR_EOF
  615. chmod 0640 dmake/unix/bsd43/string.h ||
  616. echo 'restore of dmake/unix/bsd43/string.h failed'
  617. Wc_c="`wc -c < 'dmake/unix/bsd43/string.h'`"
  618. test 292 -eq "$Wc_c" ||
  619.     echo 'dmake/unix/bsd43/string.h: original size 292, current size' "$Wc_c"
  620. rm -f _shar_wnt_.tmp
  621. fi
  622. # ============= dmake/unix/bsd43/tempnam.c ==============
  623. if test -f 'dmake/unix/bsd43/tempnam.c' -a X"$1" != X"-c"; then
  624.     echo 'x - skipping dmake/unix/bsd43/tempnam.c (File already exists)'
  625.     rm -f _shar_wnt_.tmp
  626. else
  627. > _shar_wnt_.tmp
  628. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/tempnam.c' &&
  629. /*LINTLIBRARY*/
  630. #include <stdio.h>
  631. #include <string.h>
  632. #include <stdlib.h>
  633. X
  634. #define max(A,B) (((A)<(B))?(B):(A))
  635. X
  636. extern char *mktemp();
  637. extern int access();
  638. X
  639. static char *cpdir();
  640. static char  *seed="AAA";
  641. X
  642. /* BSD stdio.h doesn't define P_tmpdir, so let's do it here */
  643. #ifndef P_tmpdir
  644. static char *P_tmpdir = "/tmp";
  645. #endif
  646. X
  647. char *
  648. tempnam(dir, prefix)
  649. char *dir;        /* use this directory please (if non-NULL) */
  650. char *prefix;        /* use this (if non-NULL) as filename prefix */
  651. {
  652. X   register char *p, *q, *tmpdir;
  653. X   int            tl=0, dl=0, pl;
  654. X
  655. X   pl = strlen(P_tmpdir);
  656. X
  657. X   if( (tmpdir = getenv("TMPDIR")) != NULL ) tl = strlen(tmpdir);
  658. X   if( dir != NULL ) dl = strlen(dir);
  659. X
  660. X   if( (p = malloc((unsigned)(max(max(dl,tl),pl)+16))) == NULL )
  661. X     return(NULL);
  662. X
  663. X   *p = '\0';
  664. X
  665. X   if( (tl == 0) || (access( cpdir(p, tmpdir), 3) != 0) )
  666. X     if( (dl == 0) || (access( cpdir(p, dir), 3) != 0) )
  667. X    if( access( cpdir(p, P_tmpdir),   3) != 0 )
  668. X       if( access( cpdir(p, "/tmp"),  3) != 0 )
  669. X          return(NULL);
  670. X
  671. X   (void) strcat(p, "/");
  672. X   if(prefix)
  673. X   {
  674. X      *(p+strlen(p)+5) = '\0';
  675. X      (void)strncat(p, prefix, 5);
  676. X   }
  677. X
  678. X   (void)strcat(p, seed);
  679. X   (void)strcat(p, "XXXXXX");
  680. X
  681. X   q = seed;
  682. X   while(*q == 'Z') *q++ = 'A';
  683. X   ++*q;
  684. X
  685. X   if(*mktemp(p) == '\0') return(NULL);
  686. X   return(p);
  687. }
  688. X
  689. X
  690. X
  691. static char *
  692. cpdir(buf, str)
  693. char *buf;
  694. char *str;
  695. {
  696. X   char *p;
  697. X
  698. X   if(str != NULL)
  699. X   {
  700. X      (void) strcpy(buf, str);
  701. X      p = buf - 1 + strlen(buf);
  702. X      if(*p == '/') *p = '\0';
  703. X   }
  704. X
  705. X   return(buf);
  706. }
  707. SHAR_EOF
  708. chmod 0640 dmake/unix/bsd43/tempnam.c ||
  709. echo 'restore of dmake/unix/bsd43/tempnam.c failed'
  710. Wc_c="`wc -c < 'dmake/unix/bsd43/tempnam.c'`"
  711. test 1506 -eq "$Wc_c" ||
  712.     echo 'dmake/unix/bsd43/tempnam.c: original size 1506, current size' "$Wc_c"
  713. rm -f _shar_wnt_.tmp
  714. fi
  715. # ============= dmake/unix/bsd43/utime.c ==============
  716. if test -f 'dmake/unix/bsd43/utime.c' -a X"$1" != X"-c"; then
  717.     echo 'x - skipping dmake/unix/bsd43/utime.c (File already exists)'
  718.     rm -f _shar_wnt_.tmp
  719. else
  720. > _shar_wnt_.tmp
  721. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/utime.c' &&
  722. /*
  723. ** change access and modify times of file
  724. */
  725. #include <sys/types.h>
  726. #include <sys/time.h>
  727. #include <sys/stat.h>
  728. #include <sys/file.h>
  729. X
  730. int
  731. utime(name, timep)
  732. char*    name;
  733. time_t    timep[2];
  734. {
  735. X    struct timeval tv[2], *tvp;
  736. X    struct stat buf;
  737. X    int    fil;
  738. X    char    data;
  739. X
  740. X    if (timep!=0)
  741. X    {
  742. X        tvp = tv, tv[0].tv_sec = timep[0], tv[1].tv_sec = timep[1];
  743. X        if (utimes(name, tvp)==0)
  744. X            return (0);
  745. X    }
  746. X
  747. X    if (stat(name, &buf) != 0)
  748. X        return (-1);
  749. X    if (buf.st_size != 0)  {
  750. X        if ((fil = open(name, O_RDWR, 0666)) < 0)
  751. X            return (-1);
  752. X        if (read(fil, &data, 1) < 1) {
  753. X            close(fil);
  754. X            return (-1);
  755. X        }
  756. X        lseek(fil, 0L, 0);
  757. X        if (write(fil, &data, 1) < 1) {
  758. X            close(fil);
  759. X            return (-1);
  760. X        }
  761. X        close(fil);
  762. X        return (0);
  763. X    } else     if ((fil = creat(name, 0666)) < 0) {
  764. X        return (-1);
  765. X    } else {
  766. X        close(fil);
  767. X        return (0);
  768. X    }
  769. }
  770. SHAR_EOF
  771. chmod 0640 dmake/unix/bsd43/utime.c ||
  772. echo 'restore of dmake/unix/bsd43/utime.c failed'
  773. Wc_c="`wc -c < 'dmake/unix/bsd43/utime.c'`"
  774. test 808 -eq "$Wc_c" ||
  775.     echo 'dmake/unix/bsd43/utime.c: original size 808, current size' "$Wc_c"
  776. rm -f _shar_wnt_.tmp
  777. fi
  778. # ============= dmake/unix/bsd43/uw/config.mk ==============
  779. if test ! -d 'dmake/unix/bsd43/uw'; then
  780.     mkdir 'dmake/unix/bsd43/uw'
  781. fi
  782. if test -f 'dmake/unix/bsd43/uw/config.mk' -a X"$1" != X"-c"; then
  783.     echo 'x - skipping dmake/unix/bsd43/uw/config.mk (File already exists)'
  784.     rm -f _shar_wnt_.tmp
  785. else
  786. > _shar_wnt_.tmp
  787. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/config.mk' &&
  788. # This is the BSD 4.3 University of Waterloo (uw) UNIX configuration file
  789. # for DMAKE
  790. #    It simply modifies the values of LDLIBS to include libuw.a
  791. #    so that vfprintf can be found.
  792. #
  793. X
  794. LDLIBS += -luw
  795. osredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
  796. CFLAGS += -I$(osredir)
  797. X
  798. # install script for UW's /usr/software hierarchy...
  799. install:
  800. X    mkdir ../bin; strip ./dmake; mv ./dmake ../bin
  801. X    chmod a+rx ../bin/dmake ../bin
  802. X    mkdir ../lib; chmod a+rx ../lib
  803. X    cp $(STARTUPFILE) ../lib
  804. X    chmod a+r ../lib/startup.mk
  805. SHAR_EOF
  806. chmod 0640 dmake/unix/bsd43/uw/config.mk ||
  807. echo 'restore of dmake/unix/bsd43/uw/config.mk failed'
  808. Wc_c="`wc -c < 'dmake/unix/bsd43/uw/config.mk'`"
  809. test 521 -eq "$Wc_c" ||
  810.     echo 'dmake/unix/bsd43/uw/config.mk: original size 521, current size' "$Wc_c"
  811. rm -f _shar_wnt_.tmp
  812. fi
  813. # ============= dmake/unix/bsd43/uw/make.sh ==============
  814. if test -f 'dmake/unix/bsd43/uw/make.sh' -a X"$1" != X"-c"; then
  815.     echo 'x - skipping dmake/unix/bsd43/uw/make.sh (File already exists)'
  816.     rm -f _shar_wnt_.tmp
  817. else
  818. > _shar_wnt_.tmp
  819. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/make.sh' &&
  820. mkdir objects
  821. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O infer.c
  822. mv infer.o objects
  823. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O make.c
  824. mv make.o objects
  825. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O stat.c
  826. mv stat.o objects
  827. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O expand.c
  828. mv expand.o objects
  829. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmstring.c
  830. mv dmstring.o objects
  831. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O hash.c
  832. mv hash.o objects
  833. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dag.c
  834. mv dag.o objects
  835. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmake.c
  836. mv dmake.o objects
  837. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O path.c
  838. mv path.o objects
  839. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O imacs.c
  840. mv imacs.o objects
  841. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O sysintf.c
  842. mv sysintf.o objects
  843. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O parse.c
  844. mv parse.o objects
  845. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O getinp.c
  846. mv getinp.o objects
  847. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O quit.c
  848. mv quit.o objects
  849. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O state.c
  850. mv state.o objects
  851. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O basename.c
  852. mv basename.o objects
  853. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O dmdump.c
  854. mv dmdump.o objects
  855. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O macparse.c
  856. mv macparse.o objects
  857. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O rulparse.c
  858. mv rulparse.o objects
  859. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O percent.c
  860. mv percent.o objects
  861. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O function.c
  862. mv function.o objects
  863. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/arlib.c
  864. mv arlib.o objects
  865. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/dirbrk.c
  866. mv dirbrk.o objects
  867. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/rmprq.c
  868. mv rmprq.o objects
  869. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/ruletab.c
  870. mv ruletab.o objects
  871. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/runargv.c
  872. mv runargv.o objects
  873. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/putenv.c
  874. mv putenv.o objects
  875. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/tempnam.c
  876. mv tempnam.o objects
  877. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/utime.c
  878. mv utime.o objects
  879. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/uw -O unix/bsd43/setvbuf.c
  880. mv setvbuf.o objects
  881. 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 -luw 
  882. cp unix/bsd43/uw/startup.mk startup.mk
  883. SHAR_EOF
  884. chmod 0640 dmake/unix/bsd43/uw/make.sh ||
  885. echo 'restore of dmake/unix/bsd43/uw/make.sh failed'
  886. Wc_c="`wc -c < 'dmake/unix/bsd43/uw/make.sh'`"
  887. test 2977 -eq "$Wc_c" ||
  888.     echo 'dmake/unix/bsd43/uw/make.sh: original size 2977, current size' "$Wc_c"
  889. rm -f _shar_wnt_.tmp
  890. fi
  891. # ============= dmake/unix/bsd43/uw/public.h ==============
  892. if test -f 'dmake/unix/bsd43/uw/public.h' -a X"$1" != X"-c"; then
  893.     echo 'x - skipping dmake/unix/bsd43/uw/public.h (File already exists)'
  894.     rm -f _shar_wnt_.tmp
  895. else
  896. > _shar_wnt_.tmp
  897. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/public.h' &&
  898. /* RCS      -- $Header$
  899. -- WARNING  -- This file is AUTOMATICALLY GENERATED DO NOT EDIT IT
  900. --
  901. -- SYNOPSIS -- Local functions exported to be visible by others.
  902. --
  903. -- DESCRIPTION
  904. --      This file is generated by 'genpub'.  Function declarations
  905. --      that appear in this file are extracted by 'genpub' from
  906. --      source files.  Any function in the source file whose definition
  907. --      appears like:
  908. --
  909. --          PUBLIC return_type
  910. --          function( arg_list );
  911. --          type_expr1 arg1;
  912. --          ...
  913. --
  914. --      has its definition extracted and a line of the form:
  915. --
  916. --          return_type function ANSI((type_expr1,type_expr2,...));
  917. --
  918. --      entered into the output file.
  919. --
  920. -- AUTHOR
  921. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  922. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  923. --
  924. -- COPYRIGHT
  925. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  926. -- 
  927. --      This program is free software; you can redistribute it and/or
  928. --      modify it under the terms of the GNU General Public License
  929. --      (version 1), as published by the Free Software Foundation, and
  930. --      found in the file 'LICENSE' included with this distribution.
  931. -- 
  932. --      This program is distributed in the hope that it will be useful,
  933. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  934. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  935. --      GNU General Public License for more details.
  936. -- 
  937. --      You should have received a copy of the GNU General Public License
  938. --      along with this program;  if not, write to the Free Software
  939. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  940. --
  941. -- LOG
  942. --     $Log$
  943. */
  944. X
  945. #ifndef _DMAKE_PUBLIC_h
  946. #define _DMAKE_PUBLIC_h
  947. X
  948. void Infer_recipe ANSI((CELLPTR, CELLPTR));
  949. int Make_targets ANSI(());
  950. int Exec_commands ANSI((CELLPTR));
  951. void Print_cmnd ANSI((char *, int, int));
  952. void Pop_dir ANSI((int));
  953. void Append_line ANSI((char *, int, FILE *, char *, int, int));
  954. void Stat_target ANSI((CELLPTR, int));
  955. char * Expand ANSI((char *));
  956. char * Apply_edit ANSI((char *, char *, char *, int, int));
  957. void Map_esc ANSI((char *));
  958. char* Apply_modifiers ANSI((int, char *));
  959. char* Tokenize ANSI((char *, char *));
  960. char * _strjoin ANSI((char *, char *, int, int));
  961. char * _stradd ANSI((char *, char *, int));
  962. char * _strapp ANSI((char *, char *));
  963. char * _strdup ANSI((char *));
  964. char * _strdup2 ANSI((char *));
  965. char * _strpbrk ANSI((char *, char *));
  966. char * _strspn ANSI((char *, char *));
  967. char * _strstr ANSI((char *, char *));
  968. char * _substr ANSI((char *, char *));
  969. uint16 Hash ANSI((char *, uint32 *));
  970. HASHPTR Get_name ANSI((char *, HASHPTR *, int));
  971. HASHPTR Search_table ANSI((HASHPTR *, char *, uint16 *, uint32 *));
  972. HASHPTR Def_macro ANSI((char *, char *, int));
  973. CELLPTR Def_cell ANSI((char *));
  974. LINKPTR Add_prerequisite ANSI((CELLPTR, CELLPTR, int, int));
  975. void Clear_prerequisites ANSI((CELLPTR));
  976. int Test_circle ANSI((CELLPTR, int));
  977. STRINGPTR Def_recipe ANSI((char *, STRINGPTR, int, int));
  978. t_attr Rcp_attribute ANSI((char *));
  979. int main ANSI((int, char **));
  980. FILE * Openfile ANSI((char *, int, int));
  981. FILE * Closefile ANSI(());
  982. FILE * Search_file ANSI((char *, char **));
  983. char * Filename ANSI(());
  984. int Nestlevel ANSI(());
  985. void No_ram ANSI(());
  986. int Usage ANSI((int));
  987. int Version ANSI(());
  988. char * Get_suffix ANSI((char *));
  989. char * Build_path ANSI((char *, char *));
  990. void Make_rules ANSI(());
  991. void Create_macro_vars ANSI(());
  992. time_t Do_stat ANSI((char *, char *, char **));
  993. int Do_touch ANSI((char *, char *, char **));
  994. void Void_lib_cache ANSI((char *, char *));
  995. time_t Do_time ANSI(());
  996. int Do_cmnd ANSI((char *, int, int, CELLPTR, int, int, int));
  997. char ** Pack_argv ANSI((int, int, char *));
  998. char * Read_env_string ANSI((char *));
  999. int Write_env_string ANSI((char *, char *));
  1000. void ReadEnvironment ANSI(());
  1001. void Catch_signals ANSI((void (*)()));
  1002. void Clear_signals ANSI(());
  1003. void Prolog ANSI((int, char* []));
  1004. void Epilog ANSI((int));
  1005. char * Get_current_dir ANSI(());
  1006. int Set_dir ANSI((char*));
  1007. char Get_switch_char ANSI(());
  1008. FILE* Get_temp ANSI((char **, char *, int));
  1009. FILE * Start_temp ANSI((char *, CELLPTR, char **));
  1010. void Open_temp_error ANSI((char *, char *));
  1011. void Link_temp ANSI((CELLPTR, FILE *, char *));
  1012. void Close_temp ANSI((CELLPTR, FILE *));
  1013. void Unlink_temp_files ANSI((CELLPTR));
  1014. void Handle_result ANSI((int, int, int, CELLPTR));
  1015. void Update_time_stamp ANSI((CELLPTR));
  1016. int Remove_file ANSI((char *));
  1017. void Parse ANSI((FILE *));
  1018. int Get_line ANSI((char *, FILE *));
  1019. char * Do_comment ANSI((char *, char **, int));
  1020. char * Get_token ANSI((TKSTRPTR, char *, int));
  1021. void Quit ANSI(());
  1022. void Read_state ANSI(());
  1023. void Write_state ANSI(());
  1024. int Check_state ANSI((CELLPTR, STRINGPTR *, int));
  1025. char* basename ANSI((char *));
  1026. void Dump ANSI(());
  1027. void Dump_recipe ANSI((STRINGPTR));
  1028. int Parse_macro ANSI((char *, int));
  1029. int Macro_op ANSI((char *));
  1030. int Parse_rule_def ANSI((int *));
  1031. int Rule_op ANSI((char *));
  1032. void Add_recipe_to_list ANSI((char *, int, int));
  1033. void Bind_rules_to_targets ANSI((int));
  1034. int Set_group_attributes ANSI((char *));
  1035. DFALINKPTR Match_dfa ANSI((char *));
  1036. void Check_circle_dfa ANSI(());
  1037. void Add_nfa ANSI((char *));
  1038. char * Exec_function ANSI((char *));
  1039. time_t seek_arch ANSI((char *, char *));
  1040. int If_root_path ANSI((char *));
  1041. void Remove_prq ANSI((CELLPTR));
  1042. int runargv ANSI((CELLPTR, int, int, int, int, char *));
  1043. int Wait_for_child ANSI((int, int));
  1044. void Clean_up_processes ANSI(());
  1045. X
  1046. #endif
  1047. SHAR_EOF
  1048. chmod 0640 dmake/unix/bsd43/uw/public.h ||
  1049. echo 'restore of dmake/unix/bsd43/uw/public.h failed'
  1050. Wc_c="`wc -c < 'dmake/unix/bsd43/uw/public.h'`"
  1051. test 5448 -eq "$Wc_c" ||
  1052.     echo 'dmake/unix/bsd43/uw/public.h: original size 5448, current size' "$Wc_c"
  1053. rm -f _shar_wnt_.tmp
  1054. fi
  1055. # ============= dmake/unix/bsd43/uw/startup.mk ==============
  1056. if test -f 'dmake/unix/bsd43/uw/startup.mk' -a X"$1" != X"-c"; then
  1057.     echo 'x - skipping dmake/unix/bsd43/uw/startup.mk (File already exists)'
  1058.     rm -f _shar_wnt_.tmp
  1059. else
  1060. > _shar_wnt_.tmp
  1061. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/uw/startup.mk' &&
  1062. # Generic UNIX DMAKE startup file.  Customize to suit your needs.
  1063. # Should work for both SYSV, and BSD 4.3
  1064. # See the documentation for a description of internally defined macros.
  1065. #
  1066. # Disable warnings for macros redefined here that were given
  1067. # on the command line.
  1068. __.SILENT := $(.SILENT)
  1069. .SILENT   := yes
  1070. X
  1071. # Configuration parameters for DMAKE startup.mk file
  1072. # Set these to NON-NULL if you wish to turn the parameter on.
  1073. _HAVE_RCS    := yes        # yes => RCS  is installed.
  1074. _HAVE_SCCS    := yes        # yes => SCCS is installed.
  1075. X
  1076. # Applicable suffix definitions
  1077. A := .a        # Libraries
  1078. E :=        # Executables
  1079. F := .f        # Fortran
  1080. O := .o        # Objects
  1081. P := .p        # Pascal
  1082. S := .s        # Assembler sources
  1083. V := ,v        # RCS suffix
  1084. X
  1085. # Recipe execution configurations
  1086. SHELL        := /bin/sh
  1087. SHELLFLAGS    := -ce
  1088. GROUPSHELL    := $(SHELL)
  1089. GROUPFLAGS    := 
  1090. SHELLMETAS    := |();&<>?*][$$:\\#`'"
  1091. GROUPSUFFIX    :=
  1092. DIVFILE         = $(TMPFILE)
  1093. X
  1094. # Standard C-language command names and flags
  1095. X   CPP       := /lib/cpp        # C-preprocessor
  1096. X   CC      := cc        # C-compiler and flags
  1097. X   CFLAGS  +=
  1098. X
  1099. X   AS      := as        # Assembler and flags
  1100. X   ASFLAGS += 
  1101. X
  1102. X   LD       = $(CC)        # Loader and flags
  1103. X   LDFLAGS +=
  1104. X   LDLIBS   =
  1105. X
  1106. # Definition of $(MAKE) macro for recursive makes.
  1107. X   MAKE = $(MAKECMD) $(MFLAGS)
  1108. X
  1109. # Definition of Print command for this system.
  1110. X   PRINT = lpr
  1111. X
  1112. # Language and Parser generation Tools and their flags
  1113. X   YACC      := yacc        # standard yacc
  1114. X   YFLAGS +=
  1115. X   YTAB      := y.tab        # yacc output files name stem.
  1116. X
  1117. X   LEX      := lex        # standard lex
  1118. X   LFLAGS +=
  1119. X   LEXYY  := lex.yy        # lex output file
  1120. X
  1121. # Other Compilers, Tools and their flags
  1122. X   PC    := pc            # pascal compiler
  1123. X   RC    := f77            # ratfor compiler
  1124. X   FC    := f77            # fortran compiler
  1125. X
  1126. X   CO       := co        # check out for RCS
  1127. X   COFLAGS += -q
  1128. X
  1129. X   AR     := ar            # archiver
  1130. X   ARFLAGS+= ruv
  1131. X
  1132. X   RM       := /bin/rm        # remove a file command
  1133. X   RMFLAGS +=
  1134. X
  1135. # Implicit generation rules for making inferences.
  1136. # We don't provide .yr or .ye rules here.  They're obsolete.
  1137. # Rules for making *$O
  1138. X   %$O : %.c ; $(CC) -o $@ $(CFLAGS) -c $<
  1139. X   %$O : %$P ; $(PC) -o $@ $(PFLAGS) -c $<
  1140. X   %$O : %$S ; $(AS) -o $@ $(ASFLAGS) $<
  1141. X   %$O : %.cl ; class -c $<
  1142. X   %$O : %.e %.r %.F %$F
  1143. X    $(FC) $(RFLAGS) $(EFLAGS) $(FFLAGS) -c $<
  1144. X
  1145. # Executables
  1146. X   %$E : %$O ; $(LD) $(LDFLAGS) -o $@ $< $(LDLIBES)
  1147. X
  1148. # lex and yacc rules
  1149. X   %.c : %.y ; $(YACC)  $(YFLAGS) $<; mv $(YTAB).c $@
  1150. X   %.c : %.l ; $(LEX)   $(LFLAGS) $<; mv $(LEXYY).c $@
  1151. X
  1152. # This rule tells how to make *.out from it's immediate list of prerequisites
  1153. # UNIX only.
  1154. X   %.out :; $(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
  1155. X
  1156. # RCS support
  1157. .IF $(_HAVE_RCS)
  1158. X   % : %$V $$(@:d)RCS/$$(@:f)$V;- $(CO) $(COFLAGS) $@
  1159. X   .NOINFER : %$V $$(@:d)RCS/$$(@:f)$V
  1160. .END
  1161. X
  1162. # SCCS support
  1163. .IF $(_HAVE_SCCS)
  1164. X   % : s.% ; get $<
  1165. X   .NOINFER : s.%
  1166. .END
  1167. X
  1168. # Recipe to make archive files.
  1169. %$A :
  1170. [
  1171. X   $(AR) $(ARFLAGS) $@ $?
  1172. X   $(RM) $(RMFLAGS) $?
  1173. X   ranlib $@
  1174. ]
  1175. X
  1176. # DMAKE uses this recipe to remove intermediate targets
  1177. .REMOVE :; $(RM) -f $<
  1178. X
  1179. # AUGMAKE extensions for SYSV compatibility
  1180. @B = $(@:b)
  1181. @D = $(@:d)
  1182. @F = $(@:f)
  1183. "*B" = $(*:b)
  1184. "*D" = $(*:d)
  1185. "*F" = $(*:f)
  1186. <B = $(<:b)
  1187. <D = $(<:d)
  1188. <F = $(<:f)
  1189. ?B = $(?:b)
  1190. ?F = $(?:f)
  1191. ?D = $(?:d)
  1192. X
  1193. # Turn warnings back to previous setting.
  1194. .SILENT := $(__.SILENT)
  1195. X
  1196. # Local startup file if any
  1197. .INCLUDE .IGNORE: "_startup.mk"
  1198. SHAR_EOF
  1199. chmod 0640 dmake/unix/bsd43/uw/startup.mk ||
  1200. echo 'restore of dmake/unix/bsd43/uw/startup.mk failed'
  1201. Wc_c="`wc -c < 'dmake/unix/bsd43/uw/startup.mk'`"
  1202. test 3245 -eq "$Wc_c" ||
  1203.     echo 'dmake/unix/bsd43/uw/startup.mk: original size 3245, current size' "$Wc_c"
  1204. rm -f _shar_wnt_.tmp
  1205. fi
  1206. # ============= dmake/unix/bsd43/vf/config.mk ==============
  1207. if test ! -d 'dmake/unix/bsd43/vf'; then
  1208.     mkdir 'dmake/unix/bsd43/vf'
  1209. fi
  1210. if test -f 'dmake/unix/bsd43/vf/config.mk' -a X"$1" != X"-c"; then
  1211.     echo 'x - skipping dmake/unix/bsd43/vf/config.mk (File already exists)'
  1212.     rm -f _shar_wnt_.tmp
  1213. else
  1214. > _shar_wnt_.tmp
  1215. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/config.mk' &&
  1216. # This config file adds vfprintf.c and memcpy.c for those systems that
  1217. # do not have it.
  1218. #
  1219. X
  1220. osredir := $(OS)$(DIRSEPSTR)$(OSRELEASE)$(DIRSEPSTR)$(OSENVIRONMENT)
  1221. CFLAGS += -I$(osredir)
  1222. X
  1223. # The following sources are required for BSD4.3
  1224. OSDESRC := memcpy.c vfprintf.c
  1225. SRC    += $(OSDESRC)
  1226. .SETDIR=$(osredir) : $(OSDESRC)
  1227. SHAR_EOF
  1228. chmod 0640 dmake/unix/bsd43/vf/config.mk ||
  1229. echo 'restore of dmake/unix/bsd43/vf/config.mk failed'
  1230. Wc_c="`wc -c < 'dmake/unix/bsd43/vf/config.mk'`"
  1231. test 317 -eq "$Wc_c" ||
  1232.     echo 'dmake/unix/bsd43/vf/config.mk: original size 317, current size' "$Wc_c"
  1233. rm -f _shar_wnt_.tmp
  1234. fi
  1235. # ============= dmake/unix/bsd43/vf/ctype.h ==============
  1236. if test -f 'dmake/unix/bsd43/vf/ctype.h' -a X"$1" != X"-c"; then
  1237.     echo 'x - skipping dmake/unix/bsd43/vf/ctype.h (File already exists)'
  1238.     rm -f _shar_wnt_.tmp
  1239. else
  1240. > _shar_wnt_.tmp
  1241. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/ctype.h' &&
  1242. /*    ctype.h    4.2    85/09/04    */
  1243. X
  1244. #define    _U    01
  1245. #define    _L    02
  1246. #define    _N    04
  1247. #define    _S    010
  1248. #define _P    020
  1249. #define _C    040
  1250. #define _X    0100
  1251. #define    _B    0200
  1252. X
  1253. extern    char    _ctype_[];
  1254. X
  1255. #define    isalpha(c)    ((_ctype_+1)[c]&(_U|_L))
  1256. #define    isupper(c)    ((_ctype_+1)[c]&_U)
  1257. #define    islower(c)    ((_ctype_+1)[c]&_L)
  1258. #define    isdigit(c)    ((_ctype_+1)[c]&_N)
  1259. #define    isxdigit(c)    ((_ctype_+1)[c]&(_N|_X))
  1260. #define    isspace(c)    ((_ctype_+1)[c]&_S)
  1261. #define ispunct(c)    ((_ctype_+1)[c]&_P)
  1262. #define isalnum(c)    ((_ctype_+1)[c]&(_U|_L|_N))
  1263. #define isprint(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N|_B))
  1264. #define isgraph(c)    ((_ctype_+1)[c]&(_P|_U|_L|_N))
  1265. #define iscntrl(c)    ((_ctype_+1)[c]&_C)
  1266. #define isascii(c)    ((unsigned)(c)<=0177)
  1267. #define toupper(c)    ((c)-'a'+'A')
  1268. #define tolower(c)    ((c)-'A'+'a')
  1269. #define toascii(c)    ((c)&0177)
  1270. SHAR_EOF
  1271. chmod 0640 dmake/unix/bsd43/vf/ctype.h ||
  1272. echo 'restore of dmake/unix/bsd43/vf/ctype.h failed'
  1273. Wc_c="`wc -c < 'dmake/unix/bsd43/vf/ctype.h'`"
  1274. test 782 -eq "$Wc_c" ||
  1275.     echo 'dmake/unix/bsd43/vf/ctype.h: original size 782, current size' "$Wc_c"
  1276. rm -f _shar_wnt_.tmp
  1277. fi
  1278. # ============= dmake/unix/bsd43/vf/make.sh ==============
  1279. if test -f 'dmake/unix/bsd43/vf/make.sh' -a X"$1" != X"-c"; then
  1280.     echo 'x - skipping dmake/unix/bsd43/vf/make.sh (File already exists)'
  1281.     rm -f _shar_wnt_.tmp
  1282. else
  1283. > _shar_wnt_.tmp
  1284. sed 's/^X//' << 'SHAR_EOF' > 'dmake/unix/bsd43/vf/make.sh' &&
  1285. mkdir objects
  1286. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O infer.c
  1287. mv infer.o objects
  1288. cc -c -I. -Iunix -Iunix/bsd43 -Iunix/bsd43/vf -O make.c
  1289. mv make.o objects
  1290. SHAR_EOF
  1291. true || echo 'restore of dmake/unix/bsd43/vf/make.sh failed'
  1292. fi
  1293. echo 'End of part 35, continue with part 36'
  1294. echo 36 > _shar_seq_.tmp
  1295. exit 0
  1296. exit 0 # Just in case...
  1297.