home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-29 | 39.9 KB | 1,397 lines |
- Newsgroups: comp.sources.misc
- From: dvadura@plg.waterloo.edu (Dennis Vadura)
- Subject: v27i110: dmake - dmake Version 3.8, Part09/41
- Message-ID: <1992Jan28.031437.7292@sparky.imd.sterling.com>
- X-Md4-Signature: d5d694b8295ed87a300e28b128e87dbf
- Date: Tue, 28 Jan 1992 03:14:37 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
- Posting-number: Volume 27, Issue 110
- Archive-name: dmake/part09
- 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.09 (part 9 of a multipart archive)
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file dmake/expand.c continued
- #
- if test ! -r _shar_seq_.tmp; then
- echo 'Please unpack part 1 first!'
- exit 1
- fi
- (read Scheck
- if test "$Scheck" != 9; 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/expand.c' &&
- X if (brky-cy > 0) strncat( buf, cy, brky-cy );
- X buf[i+(brky-cy)] = '\0';
- X strcat( buf, " " );
- X res = _strjoin( res, buf, -1, TRUE );
- X cy = _strspn( brky, " \t\n" );
- X }
- X cx = _strspn( brkx, " \t\n" );
- X }
- X
- X FREE( x );
- X res[ strlen(res)-1 ] = '\0';
- X }
- X else
- X res = _strjoin( x, y, -1, TRUE );
- X
- X FREE( y );
- X return( res );
- }
- SHAR_EOF
- chmod 0640 dmake/expand.c ||
- echo 'restore of dmake/expand.c failed'
- Wc_c="`wc -c < 'dmake/expand.c'`"
- test 25463 -eq "$Wc_c" ||
- echo 'dmake/expand.c: original size 25463, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/extern.h ==============
- if test -f 'dmake/extern.h' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/extern.h (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/extern.h' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/extern.h,v 1.1 1992/01/24 03:26:52 dvadura Exp $
- -- SYNOPSIS -- external declarations for dmake functions.
- --
- -- DESCRIPTION
- -- ANSI is a macro that allows the proper handling of ANSI style
- -- function declarations.
- --
- -- 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: extern.h,v $
- X * Revision 1.1 1992/01/24 03:26:52 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #ifndef EXTERN_h
- #define EXTERN_h
- X
- /* Define this for the RS/6000 if it breaks something then we have to put a
- X * #ifdef around it. */
- #if defined(rs6000)
- #define _POSIX_SOURCE
- #endif
- X
- #include <limits.h>
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #if defined (_MPW)
- # include <types.h>
- # include <time.h>
- #else
- # include <sys/types.h>
- # include <sys/stat.h>
- #endif
- #include <signal.h>
- #include "itypes.h"
- #include "stdmacs.h"
- #include "alloc.h"
- #include "db.h"
- #include "dmake.h"
- #include "struct.h"
- #include "vextern.h"
- #include "public.h"
- X
- /* Include this last as it invalidates some functions that are defined
- X * externally above and turns them into no-ops. Have to do this after
- X * the extern declarations however. */
- #include "config.h"
- #include "namemax.h"
- X
- #endif
- X
- SHAR_EOF
- chmod 0640 dmake/extern.h ||
- echo 'restore of dmake/extern.h failed'
- Wc_c="`wc -c < 'dmake/extern.h'`"
- test 2216 -eq "$Wc_c" ||
- echo 'dmake/extern.h: original size 2216, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/function.c ==============
- if test -f 'dmake/function.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/function.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/function.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/function.c,v 1.1 1992/01/24 03:27:00 dvadura Exp $
- -- SYNOPSIS -- GNU style functions for dmake.
- --
- -- DESCRIPTION
- -- All GNU stule functions understood by dmake are implemented in this
- -- file. Currently the only such function is $(mktmp ...) which is
- -- not part of GNU-make is an extension provided by dmake.
- --
- -- 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: function.c,v $
- X * Revision 1.1 1992/01/24 03:27:00 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- static char *_exec_mktmp ANSI((char *, char *, char *));
- static char *_exec_subst ANSI((char *, char *, char *));
- static char *_exec_iseq ANSI((char *, char *, char *, int));
- static char *_exec_sort ANSI((char *));
- static char *_exec_shell ANSI((char *));
- static int _mystrcmp ANSI((CONST PVOID, CONST PVOID));
- X
- X
- PUBLIC char *
- Exec_function(buf)/*
- ====================
- X Execute the function given by the value of args.
- X
- X So far mktmp is the only valid function, anything else elicits and error
- X message. It is my hope to support the GNU style functions in this portion
- X of the code at some time in the future. */
- char *buf;
- {
- X char *fname;
- X char *args;
- X char *mod1;
- X char *mod2 = NIL(char);
- X char *res = NIL(char);
- X
- X /* This must succeed since the presence of ' ', \t or \n is what
- X * determines if this functions is called in the first place. */
- X fname = _substr(buf, args=_strpbrk(buf," \t\n"));
- X
- X if( (mod1 = strchr(fname,',')) != NIL(char) ){
- X *mod1 = '\0';
- X mod1++;
- X
- X if( (mod2 = strchr(mod1,',')) != NIL(char) ){
- X *mod2 = '\0';
- X mod2++;
- X }
- X }
- X
- X switch( *fname ) {
- X case 'e':
- X if(strncmp(fname,"eq",2) == 0) res = _exec_iseq(mod1,mod2,args,TRUE);
- X break;
- X
- X case 'm':
- X if( strncmp(fname,"mktmp", 5) == 0 ) res = _exec_mktmp(mod1,mod2,args);
- X break;
- X
- X case 'n':
- X if( strncmp(fname,"null", 4) == 0 )
- X res = _exec_iseq(mod1,NIL(char),args,TRUE);
- X break;
- X
- X case '!':
- X if(strncmp(fname,"!null",5) == 0)
- X res = _exec_iseq(mod1,NIL(char),args,FALSE);
- X if(strncmp(fname,"!eq",3) == 0) res = _exec_iseq(mod1,mod2,args,FALSE);
- X break;
- X
- X case 's':
- X if(strncmp(fname,"sort",4) == 0) res = _exec_sort(args);
- X else if(strncmp(fname,"shell",5)==0) res = _exec_shell(args);
- X else if(strncmp(fname,"strip",5)==0) res = Tokenize(Expand(args)," ");
- X else if(strncmp(fname,"subst",5)==0) res = _exec_subst(mod1,mod2,args);
- X break;
- X
- X default:
- X Warning( "Function '%s' not implemented at this time", fname );
- X }
- X
- X if( res == NIL(char) ) res = _strdup("");
- X
- X FREE(fname);
- X return(res);
- }
- X
- X
- static char *
- _exec_mktmp( file, text, data )
- char *file;
- char *text;
- char *data;
- {
- X register char *p;
- X char *tmpname;
- X char *name;
- X FILE *tmpfile = NIL(FILE);
- X
- X /* This is only a test of the recipe line so prevent the tempfile side
- X * effects. */
- X if( Suppress_temp_file ) return(NIL(char));
- X
- X name = Current_target ? Current_target->CE_NAME:"makefile text";
- X
- X if( file && *file ) {
- X char *newtmp;
- X
- X /* This call to Get_temp sets TMPFILE for subsequent expansion of file.
- X * DO NOT DELETE IT! */
- X Get_temp( &newtmp, "", FALSE ); FREE(newtmp);
- X tmpname = Expand(file);
- X
- X if( *tmpname ) {
- X if( (tmpfile = fopen(tmpname, "w")) == NIL(FILE) )
- X Open_temp_error( tmpname, name );
- X
- X Def_macro("TMPFILE", tmpname, M_EXPANDED|M_MULTI);
- X Link_temp( Current_target, tmpfile, tmpname );
- X }
- X else
- X FREE(tmpname);
- X }
- X
- X if( !tmpfile )
- X tmpfile = Start_temp( "", Current_target, &tmpname );
- X
- X if( !text || !*text ) text = tmpname;
- X data = Expand(_strspn(data, " \t\n"));
- X
- X for(p=strchr(data,'\n'); p; p=strchr(p,'\n')) {
- X char *q = _strspn(++p," \t");
- X strcpy(p,q);
- X }
- X
- X Append_line( data, FALSE, tmpfile, name, FALSE, TRUE );
- X Close_temp( Current_target, tmpfile );
- X FREE(data);
- X
- X return( Expand(text) );
- }
- X
- X
- static char *
- _exec_iseq( lhs, rhs, data, eq )
- char *lhs;
- char *rhs;
- char *data;
- int eq;
- {
- X char *l = Expand(lhs);
- X char *r = Expand(rhs);
- X char *i = _strspn(data, " \t\n");
- X char *e = strchr(i, ' ');
- X char *res = NIL(char);
- X int val = strcmp(l,r);
- X
- X if( (!val && eq) || (val && !eq) ) {
- X if( e != NIL(char) ) *e = '\0';
- X res = Expand(i);
- X }
- X else if( e != NIL(char) ) {
- X e = _strspn(e," \t\n");
- X if( *e ) res = Expand(e);
- X }
- X
- X FREE(l);
- X FREE(r);
- X return(res);
- }
- X
- X
- static char *
- _exec_sort( args )
- char *args;
- {
- X char *res = NIL(char);
- X char *data = Expand(args);
- X char **tokens = NIL(char *);
- X char *p;
- X char *white = " \t\n";
- X int j;
- X int i = 0;
- X
- X for( i=0,p=_strspn(data,white); *p; p=_strspn(_strpbrk(p,white),white),i++);
- X
- X if( i != 0 ) {
- X TALLOC(tokens, i, char *);
- X
- X for( i=0,p=_strspn(data,white); *p; p=_strspn(p,white),i++){
- X tokens[i] = p;
- X p = _strpbrk(p,white);
- X if( *p ) *p++ = '\0';
- X }
- X
- X qsort( tokens, i, sizeof(char *), _mystrcmp );
- X
- X for( j=0; j<i; j++ ) res = _strapp(res, tokens[j]);
- X FREE(data);
- X FREE(tokens);
- X }
- X
- X return(res);
- }
- X
- X
- static int
- _mystrcmp( p, q )
- CONST PVOID p;
- CONST PVOID q;
- {
- X return(strcmp(*((CONST char **)p),*((CONST char **)q)));
- }
- X
- X
- static char *
- _exec_subst( pat, subst, data )
- char *pat;
- char *subst;
- char *data;
- {
- X char *res;
- X
- X pat = Expand(pat);
- X subst = Expand(subst);
- X res = Apply_edit( Expand(data), pat, subst, TRUE, FALSE );
- X FREE(pat);
- X FREE(subst);
- X
- X return(res);
- }
- X
- X
- static char *
- _exec_shell( data )
- char *data;
- {
- X extern char *tempnam();
- X static int nestlevel = 0;
- X static int org_out;
- X static int bsize;
- X static char *buffer;
- X static char *tmpnm;
- X static FILE *tmp;
- X
- X int wait = Wait_for_completion;
- X uint16 vflag = Verbose;
- X int tflag = Trace;
- X char *res = NIL(char);
- X CELL cell;
- X STRING rcp;
- X HASH cname;
- X
- X if( Suppress_temp_file ) return(NIL(char));
- X
- X /* Set the temp CELL used for building prerequisite candidates to
- X * all zero so that we don't have to keep initializing all the
- X * fields. */
- X {
- X register char *s = (char *) &cell;
- X register int n = sizeof(CELL);
- X while( n ) { *s++ = '\0'; n--; }
- X }
- X rcp.st_string = _strspn(data, " \t+-%@");
- X rcp.st_attr = Rcp_attribute( data );
- X rcp.st_next = NIL(STRING);
- X cname.ht_name = "Shell escape";
- X cell.ce_name = &cname;
- X cell.ce_fname = cname.ht_name;
- X cell.ce_recipe = &rcp;
- X cell.ce_flag = F_TARGET|F_RULES;
- X cell.ce_attr = A_PHONY|A_SILENT;
- X
- X if( nestlevel == 0 ) {
- X tmpnm = tempnam(NIL(char),"mk");
- X org_out = dup(1);
- X
- X if( (tmp = fopen(tmpnm, "w+")) == NIL(FILE) )
- X Open_temp_error( tmpnm, cname.ht_name );
- X
- X close(1);
- X dup( fileno(tmp) );
- X
- X bsize = (Buffer_size < BUFSIZ)?BUFSIZ:Buffer_size;
- X buffer = MALLOC(bsize,char);
- X }
- X
- X Wait_for_completion = TRUE;
- X Verbose = V_NONE;
- X Trace = FALSE;
- X nestlevel++;
- X Exec_commands( &cell );
- X nestlevel--;
- X Trace = tflag;
- X Verbose = vflag;
- X Wait_for_completion = wait;
- X
- X /* Now we have to read the temporary file, get the tokens and return them
- X * as a string. */
- X rewind(tmp);
- X while( fgets(buffer, bsize, tmp) ) {
- X char *p = strchr(buffer, '\n');
- X
- X if( p == NIL(char) )
- X res = _strjoin(res,buffer,-1,TRUE);
- X else {
- X *p = '\0';
- X res = _strapp(res,buffer);
- X }
- X }
- X
- X fclose(tmp);
- X if( nestlevel == 0 ) {
- X Remove_file(tmpnm);
- X close(1);
- X dup(org_out);
- X close(org_out);
- X FREE(tmpnm);
- X FREE(buffer);
- X }
- X else {
- X if( (tmp = fopen(tmpnm, "w+")) == NIL(FILE) )
- X Open_temp_error( tmpnm, cname.ht_name );
- X
- X close(1);
- X dup( fileno(tmp) );
- X }
- X
- X return(res);
- }
- SHAR_EOF
- chmod 0640 dmake/function.c ||
- echo 'restore of dmake/function.c failed'
- Wc_c="`wc -c < 'dmake/function.c'`"
- test 8705 -eq "$Wc_c" ||
- echo 'dmake/function.c: original size 8705, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/getinp.c ==============
- if test -f 'dmake/getinp.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/getinp.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/getinp.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/getinp.c,v 1.1 1992/01/24 03:27:56 dvadura Exp $
- -- SYNOPSIS -- handle reading of input.
- --
- -- DESCRIPTION
- -- The code in this file reads the input from the specified stream
- -- into the provided buffer of size Buffer_size. In doing so it deletes
- -- comments. Comments are delimited by the #, and
- -- <nl> character sequences. An exception is \# which
- -- is replaced by # in the input. Line continuations are signalled
- -- at the end of a line and are recognized inside comments.
- -- The line continuation is always <\><nl>.
- --
- -- If the file to read is NIL(FILE) then the Get_line routine returns the
- -- next rule from the builtin rule table if there is one.
- --
- -- 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: getinp.c,v $
- X * Revision 1.1 1992/01/24 03:27:56 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- #define IS_WHITE(A) ((A == ' ') || (A == '\t') || (A == '\n') || (A == '\r'))
- #define SCAN_WHITE(A) \
- X while( IS_WHITE(*A) ) A++;
- X
- static int _is_conditional ANSI((char*));
- static int _handle_conditional ANSI((int, TKSTRPTR));
- X
- static int rule_ind = 0; /* index of rule when reading Rule_tab */
- static int skip = FALSE; /* if true the skip input */
- X
- X
- PUBLIC int
- Get_line( buf, fil )/*
- ======================
- X Read a line of input from the file stripping
- X off comments. The routine returns TRUE if EOF */
- char *buf;
- FILE *fil;
- {
- X extern char **Rule_tab;
- X register char *p;
- X register char *c;
- X char *q;
- X char *buf_org;
- X static int ignore = FALSE;
- X int cont = FALSE;
- X int pos = 0;
- X int res;
- X
- X DB_ENTER( "Get_line" );
- X
- X if( fil == NIL(FILE) ) {
- X /* Reading the internal rule table. Set the rule_index to zero.
- X * This way ReadEnvironment works as expected every time. */
- X
- X while( (p = Rule_tab[ rule_ind++ ]) != NIL(char) )
- X /* The last test in this if '*p != '~', handles the environment
- X * passing conventions used by MKS to pass arguments. We want to
- X * skip those environment entries. */
- X if( !Readenv || (Readenv && (strchr(p,'=') != NIL(char)) && *p!='~')){
- X strcpy( buf, p );
- X
- X DB_PRINT( "io", ("Returning [%s]", buf) );
- X DB_RETURN( FALSE );
- X }
- X
- X rule_ind = 0;
- X
- X DB_PRINT( "io", ("Done Ruletab") );
- X DB_RETURN( TRUE );
- X }
- X
- X buf_org = buf;
- X
- do_again:
- X do {
- X p = buf+pos;
- X if(feof( fil ) || (fgets( p, Buffer_size-pos, fil ) == NIL(char)))
- X DB_RETURN( TRUE );
- X
- X Line_number++;
- X
- X /* ignore input if ignore flag set and line ends in a continuation
- X character. */
- X
- X q = p+strlen(p)-2;
- X /* ignore each RETURN at the end of a line before any further
- X * processing */
- X if( q[0] == '\r' && q[1] == '\n' ) {
- X q[0] = '\n';
- X q[1] = '\0';
- X q--;
- X }
- X /* you also have to deal with END_OF_FILE chars to process raw
- X * DOS-Files. Normally they are the last chars in file, but after
- X * working on these file with vi, there is an additional NEWLINE
- X * after the last END_OF_FILE. So if the second last char in the
- X * actual line is END_OF_FILE, you can skip the last char. Then
- X * you can search the line back until you find no more END_OF_FILE
- X * and nuke each you found by string termination. */
- X if( q[0] == '\032' )
- X q--;
- X while( q[1] == '\032' ) {
- X q[1] = '\0';
- X q--;
- X }
- X
- X if( ignore ) {
- X if( q[0] != CONTINUATION_CHAR || q[1] != '\n' ) ignore = FALSE;
- X *p = '\0';
- X continue;
- X }
- X
- X c = Do_comment(p, &q, Group || (*buf == '\t'));
- X
- X /* Does the end of the line end in a continuation sequence? */
- X
- X if( (q[0] == CONTINUATION_CHAR) && (q[1] == '\n')) {
- X /* If the continuation was at the end of a comment then ignore the
- X * next input line, (or lines until we get one ending in just <nl>)
- X * else it's a continuation, so build the input line from several
- X * text lines on input. The maximum size of this is governened by
- X * Buffer_size */
- X if( q != p && q[-1] == CONTINUATION_CHAR ) {
- X strcpy( q, q+1 );
- X q--;
- X cont = FALSE;
- X }
- X else if( c != NIL(char) )
- X ignore = TRUE;
- X else
- X cont = TRUE;
- X }
- X else {
- X cont = FALSE;
- X }
- X
- X q = ( c == NIL(char) ) ? q+2 : c;
- X pos += q-p;
- X }
- X while( (cont || !*buf) && (pos <= Buffer_size) );
- X
- X if( buf[ pos-1 ] == '\n' )
- X buf[ --pos ] = '\0';
- X else
- X if( pos == Buffer_size-1 )
- X Fatal( "Input line too long, increase MAXLINELENGTH" );
- X
- X
- X /* Now that we have the next line of input to make, we should check to
- X * see if it is a conditional expression. If it is then process it,
- X * otherwise pass it on to the parser. */
- X
- X if( *(p = _strspn(buf, " \t\r\n")) == CONDSTART ) {
- X TKSTR token;
- X
- X SET_TOKEN( &token, p );
- X
- X p = Get_token( &token, "", FALSE );
- X
- X if( (res = _is_conditional( p )) ) /* ignore non control special */
- X { /* targets */
- X res = _handle_conditional( res, &token );
- X skip = TRUE;
- X }
- X else {
- X CLEAR_TOKEN( &token );
- X res = TRUE;
- X }
- X }
- X
- X if( skip ) {
- X buf = buf_org; /* ignore line just read in */
- X pos = 0;
- X skip = res;
- X goto do_again;
- X }
- X
- X DB_PRINT( "io", ("Returning [%s]", buf) );
- X DB_RETURN( FALSE );
- }
- X
- X
- PUBLIC char *
- Do_comment(str, pend, keep)/*
- =============================
- X Search the input string looking for comment chars. If it contains
- X comment chars then NUKE the remainder of the line, if the comment
- X char is preceeded by \ then shift the remainder of the line left
- X by one char. */
- char *str;
- char **pend;
- int keep;
- {
- X char *c = str;
- X
- X while( (c = strchr(c, COMMENT_CHAR)) != NIL(char) ) {
- X if( Comment || State == NORMAL_SCAN )
- X if( c != str && c[-1] == ESCAPE_CHAR ) {
- X strcpy( c-1, c ); /* copy it left, due to \# */
- X if( pend ) (*pend)--; /* shift tail pointer left */
- X }
- X else {
- X if( c == str
- X && c[1] == '!'
- X && Line_number == 1
- X && Nestlevel() == 1 ) {
- X int res;
- X char *cmnd;
- X
- X cmnd = Expand(c+2);
- X cmnd[strlen(cmnd)-1] = '\0'; /* strip last newline */
- X Current_target = Root;
- X Swap_on_exec = TRUE;
- X Wait_for_completion = TRUE;
- X Do_cmnd(cmnd, FALSE, TRUE, Current_target, FALSE, FALSE, TRUE);
- X }
- X
- X *c = '\0'; /* a true comment so break */
- X break;
- X }
- X else {
- X if( keep )
- X c = NIL(char);
- X else
- X *c = '\0';
- X
- X break;
- X }
- X }
- X
- X return(c);
- }
- X
- X
- PUBLIC char *
- Get_token( string, brk, anchor )/*
- ==================================
- X Return the next token in string.
- X Returns empty string when no more tokens in string.
- X brk is a list of chars that also cause breaks in addition to space and
- X tab, but are themselves returned as tokens. if brk is NULL then the
- X remainder of the line is returned as a single token.
- X
- X anchor if 1, says break on chars in the brk list, but only if
- X the entire token begins with the first char of the brk list, if
- X 0 then any char of brk will cause a break to occurr.
- X
- X If anchor is 2, then break only seeing the first char in the break
- X list allowing only chars in the break list to form the prefix. */
- X
- TKSTRPTR string;
- char *brk;
- int anchor;
- {
- X register char *s;
- X register char *curp;
- X register char *t;
- X int done = FALSE;
- X char space[10];
- X
- X DB_ENTER( "Get_token" );
- X
- X s = string->tk_str; /* Get string parameters */
- X *s = string->tk_cchar; /* ... and strip leading w/s */
- X
- X SCAN_WHITE( s );
- X
- X DB_PRINT( "tok", ("What's left [%s]", s) );
- X
- X if( !*s ) {
- X DB_PRINT( "tok", ("Returning NULL token") );
- X DB_RETURN( "" );
- X }
- X
- X
- X /* Build the space list. space contains all those chars that may possibly
- X * cause breaks. This includes the brk list as well as white space. */
- X
- X if( brk != NIL(char) ) {
- X strcpy( space, " \t\r\n" );
- X strcat( space, brk );
- X }
- X else {
- X space[0] = 0xff; /* a char we know will not show up */
- X space[1] = 0;
- X }
- X
- X
- X /* Handle processing of quoted tokens. Note that this is disabled if
- X * brk is equal to NIL */
- X
- X while( *s == '\"' && ((brk != NIL(char)) || !string->tk_quote) ) {
- X s++;
- X if( string->tk_quote ) {
- X curp = s-1;
- X do { curp = strchr( curp+1, '\"' ); }
- X while( (curp != NIL(char)) && (*(curp+1) == '\"'));
- X
- X if( curp == NIL(char) ) Fatal( "Unmatched quote in token" );
- X string->tk_quote = !string->tk_quote;
- X
- X /* Check for "" case, and if found ignore it */
- X if( curp == s ) continue;
- X goto found_token;
- X }
- X else
- X SCAN_WHITE( s );
- X
- X string->tk_quote = !string->tk_quote;
- X }
- X
- X
- X /* Check for a token break character at the beginning of the token.
- X * If found return the next set of break chars as a token. */
- X
- X if( anchor == 2 && brk != NIL(char) ) {
- X curp = s;
- X while( *curp && (strchr(brk,*curp)!=NIL(char)) && (*curp!=*brk) ) curp++;
- X done = (*brk == *curp++);
- X }
- X else if( (brk != NIL(char)) && (strchr( brk, *s ) != NIL(char)) ) {
- X curp = _strspn( s, brk );
- X done = (anchor == 0) ? TRUE :
- X ((anchor == 1)?(*s == *brk) : (*brk == curp[-1]));
- X }
- X
- X
- X /* Scan for the next token in the list and return it less the break char
- X * that was used to terminate the token. It will possibly be returned in
- X * the next call to Get_token */
- X
- X if( !done ) {
- X SCAN_WHITE( s );
- X
- X t = s;
- X do {
- X done = TRUE;
- X curp = _strpbrk(t, space);
- X
- X if( anchor && *curp && !IS_WHITE( *curp ) )
- X if( ((anchor == 1)?*curp:_strspn(curp,brk)[-1]) != *brk ) {
- X t++;
- X done = FALSE;
- X }
- X }
- X while( !done );
- X
- X if( (curp == s) && (strchr(brk, *curp) != NIL(char)) ) curp++;
- X }
- X
- found_token:
- X string->tk_str = curp;
- X string->tk_cchar = *curp;
- X *curp = '\0';
- X
- X DB_PRINT( "tok", ("Returning [%s]", s) );
- X DB_RETURN( s );
- }
- X
- X
- static int
- _is_conditional( tg )/*
- =======================
- X Look at tg and return it's value if it is a conditional identifier
- X otherwise return 0. */
- char *tg;
- {
- X DB_ENTER( "_is_conditional" );
- X
- X tg++;
- X switch( *tg ) {
- X case 'I': if( !strcmp( tg, "IF" )) DB_RETURN( ST_IF ); break;
- X
- X case 'E':
- X if( !strcmp( tg, "END" )) DB_RETURN( ST_END );
- X else if( !strcmp( tg, "ENDIF")) DB_RETURN( ST_END );
- X else if( !strcmp( tg, "ELSE" )) DB_RETURN( ST_ELSE );
- X else if( !strcmp( tg, "ELIF" )) DB_RETURN( ST_ELIF );
- X break;
- X }
- X
- X DB_RETURN( 0 );
- }
- X
- X
- X
- #define SEEN_END 0x00
- #define SEEN_IF 0x01
- #define SEEN_ELSE 0x02
- #define SEEN_ELIF 0x04
- X
- #define ACCEPT_IF 0x10
- #define ACCEPT_ELIF 0x20
- X
- static int
- _handle_conditional( opcode, tg )/*
- ===================================
- X Perform the necessary processing for .IF conditinal targets.
- X Someday this should be modified to do bracketted expressions ala
- X CPP... sigh */
- int opcode;
- TKSTRPTR tg;
- {
- X static short action[MAX_COND_DEPTH];
- X static char ifcntl[MAX_COND_DEPTH];
- X char *tok, *lhs, *rhs, *op, *expr;
- X int result;
- X
- X DB_ENTER( "_handle_conditional" );
- X
- X switch( opcode ) {
- X case ST_ELIF:
- X if( !(ifcntl[Nest_level] & SEEN_IF) || (ifcntl[Nest_level]&SEEN_ELSE) )
- X Fatal(".ELIF without a preceeding .IF" );
- X /* FALLTHROUGH */
- X
- X case ST_IF:
- X if( opcode == ST_IF && (Nest_level+1) == MAX_COND_DEPTH )
- X Fatal( ".IF .ELSE ... .END nesting too deep" );
- X
- X If_expand = TRUE;
- X expr = Expand( Get_token( tg, NIL(char), FALSE ));
- X If_expand = FALSE;
- X lhs = _strspn( expr, " \t" );
- X if( !*lhs ) lhs = NIL(char);
- X
- X if( (op = _strstr( lhs, "==" )) == NIL(char) )
- X op = _strstr( lhs, "!=" );
- X
- X if( op == NIL(char) )
- X result = (lhs != NIL(char));
- X else {
- X op[1] = op[0];
- X if( lhs != op ) {
- X for( tok = op-1; (tok != lhs) && ((*tok == ' ')||(*tok == '\t'));
- X tok-- );
- X tok[1] = '\0';
- X }
- X else
- X lhs = NIL(char);
- X
- X op++;
- X rhs = _strspn( op+1, " \t" );
- X if( !*rhs ) rhs = NIL(char);
- X
- X if( (rhs == NIL(char)) || (lhs == NIL(char)) )
- X result = (rhs == lhs) ? TRUE : FALSE;
- X else {
- X tok = rhs + strlen( rhs );
- X for( tok=tok-1; (tok != lhs) && ((*tok == ' ')||(*tok == '\t'));
- X tok--);
- X tok[1] = '\0';
- X
- X result = (strcmp( lhs, rhs ) == 0) ? TRUE : FALSE;
- X }
- X
- X if( *op == '!' ) result = !result;
- X }
- X
- X if( expr != NIL(char) ) FREE( expr );
- X
- X if( opcode == ST_IF ) {
- X Nest_level++;
- X action[Nest_level] = 1;
- X }
- X ifcntl[Nest_level] |= (opcode==ST_IF)?SEEN_IF:SEEN_ELIF;
- X
- X if( result ) {
- X if( !(ifcntl[Nest_level] & (ACCEPT_IF|ACCEPT_ELIF)) ) {
- X action[ Nest_level ] = action[ Nest_level-1 ];
- X ifcntl[Nest_level] |= (opcode==ST_IF)?ACCEPT_IF:ACCEPT_ELIF;
- X }
- X else
- X action[Nest_level] = 1;
- X }
- X else
- X action[Nest_level] = 1;
- X break;
- X
- X case ST_ELSE:
- X if( Nest_level <= 0 ) Fatal( ".ELSE without .IF" );
- X if( ifcntl[Nest_level] & SEEN_ELSE )
- X Fatal( "Missing .IF or .ELIF before .ELSE" );
- X
- X if( ifcntl[Nest_level] & (ACCEPT_IF|ACCEPT_ELIF) )
- X action[Nest_level] = 1;
- X else if( action[ Nest_level-1 ] != 1 )
- X action[ Nest_level ] ^= 0x1; /* flip between 0 and 1 */
- X
- X ifcntl[Nest_level] |= SEEN_ELSE;
- X break;
- X
- X case ST_END:
- X ifcntl[Nest_level] = SEEN_END;
- X Nest_level--;
- X if( Nest_level < 0 ) Fatal( "Unmatched .END[IF]" );
- X break;
- X }
- X
- X DB_RETURN( action[ Nest_level ] );
- }
- SHAR_EOF
- chmod 0640 dmake/getinp.c ||
- echo 'restore of dmake/getinp.c failed'
- Wc_c="`wc -c < 'dmake/getinp.c'`"
- test 14416 -eq "$Wc_c" ||
- echo 'dmake/getinp.c: original size 14416, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/hash.c ==============
- if test -f 'dmake/hash.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/hash.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/hash.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/hash.c,v 1.1 1992/01/24 03:27:06 dvadura Exp $
- -- SYNOPSIS -- hashing function for hash tables.
- --
- -- DESCRIPTION
- -- Hash an identifier. The hashing function works by computing the sum
- -- of each char and the previous hash value multiplied by 129. Finally the
- -- length of the identifier is added in. This way the hash depends on the
- -- chars as well as the length, and appears to be sufficiently unique,
- -- and is FAST to COMPUTE, unlike the previous hash function...
- --
- -- 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: hash.c,v $
- X * Revision 1.1 1992/01/24 03:27:06 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- PUBLIC uint16
- Hash( id, phv )/*
- =================
- X This function computes the identifier's hash value and returns the hash
- X value modulo the key size as well as the full hash value. The reason
- X for returning both is so that hash table searches can be sped up. You
- X compare hash keys instead and compare strings only for those whose 32-bit
- X hash keys match. (not many) */
- X
- char *id;
- uint32 *phv;
- {
- X register char *p = id;
- X register uint32 hash = (uint32) 0;
- X
- X while( *p ) hash = (hash << 7) + hash + (uint32) (*p++);
- X *phv = hash = hash + (uint32) (p-id);
- X
- X return( (uint16) (hash % HASH_TABLE_SIZE) );
- }
- X
- SHAR_EOF
- chmod 0640 dmake/hash.c ||
- echo 'restore of dmake/hash.c failed'
- Wc_c="`wc -c < 'dmake/hash.c'`"
- test 2337 -eq "$Wc_c" ||
- echo 'dmake/hash.c: original size 2337, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/imacs.c ==============
- if test -f 'dmake/imacs.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/imacs.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/imacs.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/imacs.c,v 1.1 1992/01/24 03:29:55 dvadura Exp $
- -- SYNOPSIS -- define default internal macros.
- --
- -- DESCRIPTION
- -- This file adds to the internal macro tables the set of default
- -- internal macros, and for those that are accessible internally via
- -- variables creates these variables, and initializes them to point
- -- at the default values of these macros.
- --
- -- 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: imacs.c,v $
- X * Revision 1.1 1992/01/24 03:29:55 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- static void _set_int_var ANSI((char *, char *, int, int *));
- static void _set_string_var ANSI((char *, char *, int, char **));
- static void _set_bit_var ANSI((char *, char *, int));
- X
- /*
- ** Arrange to parse the strings stored in Rules[]
- */
- PUBLIC void
- Make_rules()
- {
- X Parse(NIL(FILE));
- }
- X
- X
- #define M_FLAG M_DEFAULT | M_EXPANDED
- X
- /*
- ** Add to the macro table all of the internal macro variables plus
- ** create secondary variables which will give access to their values
- ** easily, both when needed and when the macro value is modified.
- ** The latter is accomplished by providing a flag in the macro and a field
- ** which gives a pointer to the value if it is a char or string macro value
- ** and a mask representing the bit of the global flag register that is affected
- ** by this macro's value.
- */
- PUBLIC void
- Create_macro_vars()
- {
- X static char* switchar;
- X char swchar[2];
- X
- X swchar[0] = Get_switch_char(), swchar[1] = '\0';
- X _set_string_var("SWITCHAR", swchar, M_PRECIOUS, &switchar);
- X _set_string_var("DIRSEPSTR", (*swchar=='/')?"\\":"/",M_PRECIOUS,&DirSepStr);
- X _set_string_var("DIRBRKSTR", DirBrkStr, M_PRECIOUS, &DirBrkStr);
- X swchar[0] = DEF_ESCAPE_CHAR, swchar[1] = '\0';
- X _set_string_var(".ESCAPE_PREFIX", swchar, M_FLAG, &Escape_char);
- X
- X _set_bit_var(".SILENT", "", A_SILENT );
- X _set_bit_var(".IGNORE", "", A_IGNORE );
- X _set_bit_var(".PRECIOUS", "", A_PRECIOUS);
- X _set_bit_var(".EPILOG", "", A_EPILOG );
- X _set_bit_var(".PROLOG", "", A_PROLOG );
- X _set_bit_var(".NOINFER", "", A_NOINFER );
- X _set_bit_var(".SEQUENTIAL","",A_SEQ );
- X _set_bit_var(".USESHELL", "", A_SHELL );
- X _set_bit_var(".SWAP", "", A_SWAP );
- X _set_bit_var(".MKSARGS", "", A_MKSARGS );
- X
- X Glob_attr = A_DEFAULT; /* set all flags to NULL */
- X
- X _set_string_var("SHELL", "", M_DEFAULT, &Shell );
- X _set_string_var("SHELLFLAGS", " ", M_DEFAULT, &Shell_flags );
- X _set_string_var("GROUPSHELL", "", M_DEFAULT, &GShell );
- X _set_string_var("GROUPFLAGS", " ", M_DEFAULT, &GShell_flags);
- X _set_string_var("SHELLMETAS", "", M_DEFAULT, &Shell_metas );
- X _set_string_var("GROUPSUFFIX", "", M_DEFAULT, &Grp_suff );
- X _set_string_var("PREP", "0", M_DEFAULT, &Prep );
- X _set_string_var("AUGMAKE",NIL(char), M_DEFAULT, &Augmake );
- X _set_string_var(".KEEP_STATE", "", M_DEFAULT, &Keep_state );
- X _set_string_var(".NOTABS", "", M_MULTI, &Notabs );
- X
- X _set_string_var(".SETDIR", "", M_DEFAULT|M_NOEXPORT, &Start_dir );
- X _set_string_var("MAKEDIR",Get_current_dir(),M_PRECIOUS|M_NOEXPORT,&Makedir);
- X _set_string_var("PWD", Makedir, M_DEFAULT|M_NOEXPORT, &Pwd);
- X _set_string_var("TMD", "", M_DEFAULT|M_NOEXPORT, &Tmd);
- X
- X Def_macro("NULL", "", M_PRECIOUS|M_NOEXPORT|M_FLAG);
- X
- X _set_int_var( "MAXLINELENGTH", "0", M_DEFAULT|M_NOEXPORT, &Buffer_size );
- X (void) Def_macro("MAXLINELENGTH", "0", M_FLAG | M_DEFAULT);
- X
- X /* set MAXPROCESSLIMIT high initially so that it allows MAXPROCESS to
- X * change from command line. */
- X _set_int_var( "MAXPROCESSLIMIT", "100", M_DEFAULT|M_NOEXPORT, &Max_proclmt );
- X _set_int_var( "MAXPROCESS", "1", M_DEFAULT|M_NOEXPORT, &Max_proc );
- }
- X
- X
- /*
- ** Define an integer variable value, and set up the macro.
- */
- static void
- _set_int_var(name, val, flag, var)
- char *name;
- char *val;
- int flag;
- int *var;
- {
- X HASHPTR hp;
- X
- X hp = Def_macro(name, val, M_FLAG | flag);
- X hp->ht_flag |= M_VAR_INT | M_MULTI;
- X hp->MV_IVAR = var;
- X *var = atoi(val);
- }
- X
- X
- /*
- ** Define a string variables value, and set up the macro.
- */
- static void
- _set_string_var(name, val, flag, var)
- char *name;
- char *val;
- int flag;
- char **var;
- {
- X HASHPTR hp;
- X
- X hp = Def_macro(name, val, M_FLAG | flag);
- X hp->ht_flag |= M_VAR_STRING | M_MULTI;
- X hp->MV_SVAR = var;
- X *var = hp->ht_value;
- }
- X
- X
- /*
- ** Define a bit variable value, and set up the macro.
- */
- static void
- _set_bit_var(name, val, mask)
- char *name;
- char *val;
- int mask;
- {
- X HASHPTR hp;
- X
- X hp = Def_macro(name, val, M_FLAG);
- X hp->ht_flag |= M_VAR_BIT | M_MULTI;
- X hp->MV_MASK = mask;
- X hp->MV_BVAR = &Glob_attr;
- }
- SHAR_EOF
- chmod 0640 dmake/imacs.c ||
- echo 'restore of dmake/imacs.c failed'
- Wc_c="`wc -c < 'dmake/imacs.c'`"
- test 5686 -eq "$Wc_c" ||
- echo 'dmake/imacs.c: original size 5686, current size' "$Wc_c"
- rm -f _shar_wnt_.tmp
- fi
- # ============= dmake/infer.c ==============
- if test -f 'dmake/infer.c' -a X"$1" != X"-c"; then
- echo 'x - skipping dmake/infer.c (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- sed 's/^X//' << 'SHAR_EOF' > 'dmake/infer.c' &&
- /* RCS -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/infer.c,v 1.1 1992/01/24 03:27:21 dvadura Exp $
- -- SYNOPSIS -- infer how to make a target.
- --
- -- DESCRIPTION
- -- This file contains the code to infer a recipe, and possibly some new
- -- prerequisites for a target which dmake does not know how to make, or
- -- has no explicit recipe.
- --
- -- The inference fails if no path through the inference graph can be
- -- found by which we can make the target.
- --
- -- 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: infer.c,v $
- X * Revision 1.1 1992/01/24 03:27:21 dvadura
- X * dmake Version 3.8, Initial revision
- X *
- */
- X
- #include "extern.h"
- X
- /* attributes that get transfered from the % start cell to the inferred
- X * cells. */
- X
- #define A_TRANSFER (A_EPILOG | A_PRECIOUS | A_SILENT | A_SHELL | A_SETDIR |\
- X A_SEQ | A_LIBRARY | A_IGNORE | A_PROLOG | A_SWAP |\
- X A_NOSTATE )
- X
- X
- /* Define local static functions */
- static DFALINKPTR _dfa_subset ANSI((DFALINKPTR, DFASETPTR));
- static void _free_dfas ANSI((DFALINKPTR));
- static int _count_dots ANSI((char *));
- static char * _build_name ANSI((char *, char *, char *));
- static void _free_icells ANSI(());
- static ICELLPTR _union_iset ANSI((ICELLPTR, ICELLPTR));
- static ICELLPTR _add_iset ANSI((ICELLPTR,ICELLPTR,CELLPTR,DFALINKPTR,
- SHAR_EOF
- true || echo 'restore of dmake/infer.c failed'
- fi
- echo 'End of part 9, continue with part 10'
- echo 10 > _shar_seq_.tmp
- exit 0
- exit 0 # Just in case...
-