#define<space> -> #define<tab>
This commit is contained in:
parent
a336071222
commit
64620c0f76
@ -118,7 +118,7 @@ static void ArchFree(void *);
|
||||
static struct ar_hdr *ArchStatMember(char *, char *, Boolean);
|
||||
static FILE *ArchFindMember(char *, char *, struct ar_hdr *, char *);
|
||||
#if defined(__svr4__) || defined(__SVR4) || defined(__ELF__)
|
||||
#define SVR4ARCHIVES
|
||||
#define SVR4ARCHIVES
|
||||
static int ArchSVR4Entry(Arch *, char *, size_t, FILE *);
|
||||
#endif
|
||||
|
||||
@ -467,7 +467,7 @@ ArchStatMember (archive, member, hash)
|
||||
Boolean hash; /* TRUE if archive should be hashed if not
|
||||
* already so. */
|
||||
{
|
||||
#define AR_MAX_NAME_LEN (sizeof(arh.ar_name)-1)
|
||||
#define AR_MAX_NAME_LEN (sizeof(arh.ar_name)-1)
|
||||
FILE * arch; /* Stream to archive */
|
||||
int size; /* Size of archive member */
|
||||
char *cp; /* Useful character pointer */
|
||||
@ -687,8 +687,8 @@ ArchSVR4Entry(ar, name, size, arch)
|
||||
size_t size;
|
||||
FILE *arch;
|
||||
{
|
||||
#define ARLONGNAMES1 "//"
|
||||
#define ARLONGNAMES2 "/ARFILENAMES"
|
||||
#define ARLONGNAMES1 "//"
|
||||
#define ARLONGNAMES2 "/ARFILENAMES"
|
||||
size_t entry;
|
||||
char *ptr, *eptr;
|
||||
|
||||
|
@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include "buf.h"
|
||||
|
||||
#ifndef max
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
|
||||
* Makes sure there's room for an extra NULL byte at the end of the
|
||||
* buffer in case it holds a string.
|
||||
*/
|
||||
#define BufExpand(bp,nb) \
|
||||
#define BufExpand(bp,nb) \
|
||||
if (bp->left < (nb)+1) {\
|
||||
int newSize = (bp)->size + max((nb)+1,BUF_ADD_INC); \
|
||||
Byte *newBuf = (Byte *) erealloc((bp)->buffer, newSize); \
|
||||
@ -74,9 +74,9 @@ __FBSDID("$FreeBSD$");
|
||||
(bp)->left = newSize - ((bp)->inPtr - (bp)->buffer);\
|
||||
}
|
||||
|
||||
#define BUF_DEF_SIZE 256 /* Default buffer size */
|
||||
#define BUF_ADD_INC 256 /* Expansion increment when Adding */
|
||||
#define BUF_UNGET_INC 16 /* Expansion increment when Ungetting */
|
||||
#define BUF_DEF_SIZE 256 /* Default buffer size */
|
||||
#define BUF_ADD_INC 256 /* Expansion increment when Adding */
|
||||
#define BUF_UNGET_INC 16 /* Expansion increment when Ungetting */
|
||||
|
||||
/*-
|
||||
*-----------------------------------------------------------------------
|
||||
|
@ -46,7 +46,7 @@
|
||||
*/
|
||||
|
||||
#ifndef _BUF_H
|
||||
#define _BUF_H
|
||||
#define _BUF_H
|
||||
|
||||
#include "sprite.h"
|
||||
|
||||
@ -65,7 +65,7 @@ typedef struct Buffer {
|
||||
(void) (--(bp)->left <= 0 ? Buf_OvAddByte(bp, byte), 1 : \
|
||||
(*(bp)->inPtr++ = (byte), *(bp)->inPtr = 0), 1)
|
||||
|
||||
#define BUF_ERROR 256
|
||||
#define BUF_ERROR 256
|
||||
|
||||
void Buf_OvAddByte(Buffer, int);
|
||||
void Buf_AddBytes(Buffer, int, const Byte *);
|
||||
|
@ -49,8 +49,8 @@
|
||||
* created on the local machine at once. Note that if you set this
|
||||
* to 0, nothing will ever happen...
|
||||
*/
|
||||
#define DEFMAXJOBS 4
|
||||
#define DEFMAXLOCAL 1
|
||||
#define DEFMAXJOBS 4
|
||||
#define DEFMAXLOCAL 1
|
||||
|
||||
/*
|
||||
* INCLUDES
|
||||
@ -61,8 +61,8 @@
|
||||
* .INCLUDES dependency lines. Similarly for LIBRARIES and .LIBS
|
||||
* See suff.c for more details.
|
||||
*/
|
||||
#define INCLUDES
|
||||
#define LIBRARIES
|
||||
#define INCLUDES
|
||||
#define LIBRARIES
|
||||
|
||||
/*
|
||||
* LIBSUFF
|
||||
@ -89,7 +89,7 @@
|
||||
* environment.
|
||||
* - Allow empty command lines if starting with tab.
|
||||
*/
|
||||
#define POSIX
|
||||
#define POSIX
|
||||
|
||||
/*
|
||||
* SYSVINCLUDE
|
||||
@ -97,8 +97,8 @@
|
||||
* SYSVVARSUB
|
||||
* Recognize system V like ${VAR:x=y} variable substitutions
|
||||
*/
|
||||
#define SYSVINCLUDE
|
||||
#define SYSVVARSUB
|
||||
#define SYSVINCLUDE
|
||||
#define SYSVVARSUB
|
||||
|
||||
/*
|
||||
* SUNSHCMD
|
||||
@ -107,7 +107,7 @@
|
||||
* ${VAR:sh} # Return the command substitution of the value
|
||||
* # of ${VAR}
|
||||
*/
|
||||
#define SUNSHCMD
|
||||
#define SUNSHCMD
|
||||
|
||||
#if !defined(__svr4__) && !defined(__SVR4) && !defined(__ELF__)
|
||||
# ifndef RANLIBMAG
|
||||
|
@ -1074,7 +1074,7 @@ Dir_AddDir (path, name)
|
||||
Hash_InitTable (&p->files, -1);
|
||||
|
||||
while ((dp = readdir (d)) != (struct dirent *) NULL) {
|
||||
#if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */
|
||||
#if defined(sun) && defined(d_ino) /* d_ino is a sunos4 #define for d_fileno */
|
||||
/*
|
||||
* The sun directory library doesn't check for a 0 inode
|
||||
* (0-inode slots just take up space), so we have to do
|
||||
|
@ -175,7 +175,7 @@ For_Eval (line)
|
||||
buf = Buf_Init(0);
|
||||
sub = Var_Subst(NULL, ptr, VAR_GLOBAL, FALSE);
|
||||
|
||||
#define ADDWORD() \
|
||||
#define ADDWORD() \
|
||||
Buf_AddBytes(buf, ptr - wrd, (Byte *) wrd), \
|
||||
Buf_AddByte(buf, (Byte) '\0'), \
|
||||
Lst_AtFront(forLst, (void *) Buf_GetAll(buf, &varlen)), \
|
||||
|
@ -66,7 +66,7 @@ static void RebuildTable(Hash_Table *);
|
||||
* at which we rebuild the table to make it larger.
|
||||
*/
|
||||
|
||||
#define rebuildLimit 8
|
||||
#define rebuildLimit 8
|
||||
|
||||
/*
|
||||
*---------------------------------------------------------
|
||||
|
@ -91,7 +91,7 @@ typedef struct Hash_Search {
|
||||
* Hash_Entry *h;
|
||||
*/
|
||||
|
||||
#define Hash_GetValue(h) ((h)->clientData)
|
||||
#define Hash_GetValue(h) ((h)->clientData)
|
||||
|
||||
/*
|
||||
* Hash_SetValue(h, val);
|
||||
@ -99,7 +99,7 @@ typedef struct Hash_Search {
|
||||
* char *val;
|
||||
*/
|
||||
|
||||
#define Hash_SetValue(h, val) ((h)->clientData = (void *) (val))
|
||||
#define Hash_SetValue(h, val) ((h)->clientData = (void *) (val))
|
||||
|
||||
/*
|
||||
* Hash_Size(n) returns the number of words in an object of n bytes
|
||||
|
@ -43,7 +43,7 @@
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#ifndef OLD_JOKE
|
||||
#define OLD_JOKE 0
|
||||
#define OLD_JOKE 0
|
||||
#endif /* OLD_JOKE */
|
||||
|
||||
/*-
|
||||
@ -132,15 +132,15 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
static int errors = 0; /* number of errors reported */
|
||||
static int aborting = 0; /* why is the make aborting? */
|
||||
#define ABORT_ERROR 1 /* Because of an error */
|
||||
#define ABORT_INTERRUPT 2 /* Because it was interrupted */
|
||||
#define ABORT_WAIT 3 /* Waiting for jobs to finish */
|
||||
#define ABORT_ERROR 1 /* Because of an error */
|
||||
#define ABORT_INTERRUPT 2 /* Because it was interrupted */
|
||||
#define ABORT_WAIT 3 /* Waiting for jobs to finish */
|
||||
|
||||
/*
|
||||
* XXX: Avoid SunOS bug... FILENO() is fp->_file, and file
|
||||
* is a char! So when we go above 127 we turn negative!
|
||||
*/
|
||||
#define FILENO(a) ((unsigned) fileno(a))
|
||||
#define FILENO(a) ((unsigned) fileno(a))
|
||||
|
||||
/*
|
||||
* post-make command processing. The node postCommands is really just the
|
||||
@ -156,10 +156,10 @@ static int numCommands; /* The number of commands actually printed
|
||||
/*
|
||||
* Return values from JobStart.
|
||||
*/
|
||||
#define JOB_RUNNING 0 /* Job is running */
|
||||
#define JOB_ERROR 1 /* Error in starting the job */
|
||||
#define JOB_FINISHED 2 /* The job is already finished */
|
||||
#define JOB_STOPPED 3 /* The job is stopped */
|
||||
#define JOB_RUNNING 0 /* Job is running */
|
||||
#define JOB_ERROR 1 /* Error in starting the job */
|
||||
#define JOB_FINISHED 2 /* The job is already finished */
|
||||
#define JOB_STOPPED 3 /* The job is stopped */
|
||||
|
||||
/*
|
||||
* tfile is used to build temp file names to store shell commands to
|
||||
@ -284,7 +284,7 @@ STATIC Lst stoppedJobs; /* Lst of Job structures describing
|
||||
* stuff much more. So, we devise our own macros... This is
|
||||
* really ugly, use dramamine sparingly. You have been warned.
|
||||
*/
|
||||
#define W_SETMASKED(st, val, fun) \
|
||||
#define W_SETMASKED(st, val, fun) \
|
||||
{ \
|
||||
int sh = (int) ~0; \
|
||||
int mask = fun(sh); \
|
||||
@ -294,8 +294,8 @@ STATIC Lst stoppedJobs; /* Lst of Job structures describing
|
||||
*(st) = (*(st) & ~mask) | ((val) << sh); \
|
||||
}
|
||||
|
||||
#define W_SETTERMSIG(st, val) W_SETMASKED(st, val, WTERMSIG)
|
||||
#define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS)
|
||||
#define W_SETTERMSIG(st, val) W_SETMASKED(st, val, WTERMSIG)
|
||||
#define W_SETEXITSTATUS(st, val) W_SETMASKED(st, val, WEXITSTATUS)
|
||||
|
||||
|
||||
static int JobCondPassSig(void *, void *);
|
||||
@ -547,7 +547,7 @@ JobPrintCommand(cmdp, jobp)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define DBPRINTF(fmt, arg) if (DEBUG(JOB)) { \
|
||||
#define DBPRINTF(fmt, arg) if (DEBUG(JOB)) { \
|
||||
(void) fprintf(stdout, fmt, arg); \
|
||||
(void) fflush(stdout); \
|
||||
} \
|
||||
|
@ -46,17 +46,17 @@
|
||||
* Exported from job.c for the use of remote-execution modules.
|
||||
*/
|
||||
#ifndef _JOB_H_
|
||||
#define _JOB_H_
|
||||
#define _JOB_H_
|
||||
|
||||
#define TMPPAT "/tmp/makeXXXXXXXXXX"
|
||||
#define TMPPAT "/tmp/makeXXXXXXXXXX"
|
||||
|
||||
/*
|
||||
* The SEL_ constants determine the maximum amount of time spent in select
|
||||
* before coming out to see if a child has finished. SEL_SEC is the number of
|
||||
* seconds and SEL_USEC is the number of micro-seconds
|
||||
*/
|
||||
#define SEL_SEC 0
|
||||
#define SEL_USEC 100000
|
||||
#define SEL_SEC 0
|
||||
#define SEL_USEC 100000
|
||||
|
||||
|
||||
/*-
|
||||
@ -91,7 +91,7 @@
|
||||
* parents of the node which was just remade. This takes care of the upward
|
||||
* traversal of the dependency graph.
|
||||
*/
|
||||
#define JOB_BUFSIZE 1024
|
||||
#define JOB_BUFSIZE 1024
|
||||
typedef struct Job {
|
||||
int pid; /* The child's process ID */
|
||||
char tfile[sizeof(TMPPAT)];
|
||||
@ -105,17 +105,17 @@ typedef struct Job {
|
||||
short flags; /* Flags to control treatment of job */
|
||||
#define JOB_IGNERR 0x001 /* Ignore non-zero exits */
|
||||
#define JOB_SILENT 0x002 /* no output */
|
||||
#define JOB_SPECIAL 0x004 /* Target is a special one. i.e. run it locally
|
||||
#define JOB_SPECIAL 0x004 /* Target is a special one. i.e. run it locally
|
||||
* if we can't export it and maxLocal is 0 */
|
||||
#define JOB_IGNDOTS 0x008 /* Ignore "..." lines when processing
|
||||
#define JOB_IGNDOTS 0x008 /* Ignore "..." lines when processing
|
||||
* commands */
|
||||
#define JOB_REMOTE 0x010 /* Job is running remotely */
|
||||
#define JOB_FIRST 0x020 /* Job is first job for the node */
|
||||
#define JOB_REMIGRATE 0x040 /* Job needs to be remigrated */
|
||||
#define JOB_RESTART 0x080 /* Job needs to be completely restarted */
|
||||
#define JOB_RESUME 0x100 /* Job needs to be resumed b/c it stopped,
|
||||
#define JOB_REMOTE 0x010 /* Job is running remotely */
|
||||
#define JOB_FIRST 0x020 /* Job is first job for the node */
|
||||
#define JOB_REMIGRATE 0x040 /* Job needs to be remigrated */
|
||||
#define JOB_RESTART 0x080 /* Job needs to be completely restarted */
|
||||
#define JOB_RESUME 0x100 /* Job needs to be resumed b/c it stopped,
|
||||
* for some reason */
|
||||
#define JOB_CONTINUING 0x200 /* We are in the process of resuming this job.
|
||||
#define JOB_CONTINUING 0x200 /* We are in the process of resuming this job.
|
||||
* Used to avoid infinite recursion between
|
||||
* JobFinish and JobRestart */
|
||||
union {
|
||||
@ -144,12 +144,12 @@ typedef struct Job {
|
||||
} output; /* Data for tracking a shell's output */
|
||||
} Job;
|
||||
|
||||
#define outPipe output.o_pipe.op_outPipe
|
||||
#define inPipe output.o_pipe.op_inPipe
|
||||
#define outBuf output.o_pipe.op_outBuf
|
||||
#define curPos output.o_pipe.op_curPos
|
||||
#define outFile output.o_file.of_outFile
|
||||
#define outFd output.o_file.of_outFd
|
||||
#define outPipe output.o_pipe.op_outPipe
|
||||
#define inPipe output.o_pipe.op_inPipe
|
||||
#define outBuf output.o_pipe.op_outBuf
|
||||
#define curPos output.o_pipe.op_curPos
|
||||
#define outFile output.o_file.of_outFile
|
||||
#define outFd output.o_file.of_outFd
|
||||
|
||||
|
||||
/*-
|
||||
|
@ -47,7 +47,7 @@
|
||||
*/
|
||||
|
||||
#ifndef _LIST
|
||||
#define _LIST
|
||||
#define _LIST
|
||||
|
||||
#ifndef _SPRITE
|
||||
#include "sprite.h"
|
||||
@ -128,7 +128,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
#define List_InitElement(elementPtr) \
|
||||
#define List_InitElement(elementPtr) \
|
||||
(elementPtr)->prevPtr = (List_Links *) NULL; \
|
||||
(elementPtr)->nextPtr = (List_Links *) NULL;
|
||||
|
||||
@ -160,7 +160,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define LIST_FORALL(headerPtr, itemPtr) \
|
||||
#define LIST_FORALL(headerPtr, itemPtr) \
|
||||
for (itemPtr = List_First(headerPtr); \
|
||||
!List_IsAtEnd((headerPtr),itemPtr); \
|
||||
itemPtr = List_Next(itemPtr))
|
||||
@ -178,7 +178,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define List_IsEmpty(headerPtr) \
|
||||
#define List_IsEmpty(headerPtr) \
|
||||
((headerPtr) == (headerPtr)->nextPtr)
|
||||
|
||||
/*
|
||||
@ -195,7 +195,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
*/
|
||||
|
||||
|
||||
#define List_IsAtEnd(headerPtr, itemPtr) \
|
||||
#define List_IsAtEnd(headerPtr, itemPtr) \
|
||||
((itemPtr) == (headerPtr))
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define List_First(headerPtr) ((headerPtr)->nextPtr)
|
||||
#define List_First(headerPtr) ((headerPtr)->nextPtr)
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@ -227,7 +227,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define List_Last(headerPtr) ((headerPtr)->prevPtr)
|
||||
#define List_Last(headerPtr) ((headerPtr)->prevPtr)
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@ -243,7 +243,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define List_Prev(itemPtr) ((itemPtr)->prevPtr)
|
||||
#define List_Prev(itemPtr) ((itemPtr)->prevPtr)
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
@ -259,7 +259,7 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define List_Next(itemPtr) ((itemPtr)->nextPtr)
|
||||
#define List_Next(itemPtr) ((itemPtr)->nextPtr)
|
||||
|
||||
|
||||
/*
|
||||
@ -289,12 +289,12 @@ void List_Move(); /* move an element elsewhere in a list */
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#define LIST_AFTER(itemPtr) ((List_Links *) itemPtr)
|
||||
#define LIST_AFTER(itemPtr) ((List_Links *) itemPtr)
|
||||
|
||||
#define LIST_BEFORE(itemPtr) (((List_Links *) itemPtr)->prevPtr)
|
||||
#define LIST_BEFORE(itemPtr) (((List_Links *) itemPtr)->prevPtr)
|
||||
|
||||
#define LIST_ATFRONT(headerPtr) ((List_Links *) headerPtr)
|
||||
#define LIST_ATFRONT(headerPtr) ((List_Links *) headerPtr)
|
||||
|
||||
#define LIST_ATREAR(headerPtr) (((List_Links *) headerPtr)->prevPtr)
|
||||
#define LIST_ATREAR(headerPtr) (((List_Links *) headerPtr)->prevPtr)
|
||||
|
||||
#endif /* _LIST */
|
||||
|
@ -45,7 +45,7 @@
|
||||
* Header for using the list library
|
||||
*/
|
||||
#ifndef _LST_H_
|
||||
#define _LST_H_
|
||||
#define _LST_H_
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <stdlib.h>
|
||||
@ -63,11 +63,11 @@ typedef struct LstNode *LstNode;
|
||||
* not to be freed.
|
||||
* NOCOPY performs similarly when given as the copyProc to Lst_Duplicate.
|
||||
*/
|
||||
#define NOFREE ((void (*)(void *)) 0)
|
||||
#define NOCOPY ((void * (*)(void *)) 0)
|
||||
#define NOFREE ((void (*)(void *)) 0)
|
||||
#define NOCOPY ((void * (*)(void *)) 0)
|
||||
|
||||
#define LST_CONCNEW 0 /* create new LstNode's when using Lst_Concat */
|
||||
#define LST_CONCLINK 1 /* relink LstNode's when using Lst_Concat */
|
||||
#define LST_CONCNEW 0 /* create new LstNode's when using Lst_Concat */
|
||||
#define LST_CONCLINK 1 /* relink LstNode's when using Lst_Concat */
|
||||
|
||||
/*
|
||||
* Creation/destruction functions
|
||||
|
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#ifndef _MAKE_H_
|
||||
#define _MAKE_H_
|
||||
#define _MAKE_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
@ -150,52 +150,52 @@ typedef struct GNode {
|
||||
* the lefthand side of an operator, though it may have been on the
|
||||
* righthand side...
|
||||
*/
|
||||
#define OP_DEPENDS 0x00000001 /* Execution of commands depends on
|
||||
#define OP_DEPENDS 0x00000001 /* Execution of commands depends on
|
||||
* kids (:) */
|
||||
#define OP_FORCE 0x00000002 /* Always execute commands (!) */
|
||||
#define OP_DOUBLEDEP 0x00000004 /* Execution of commands depends on kids
|
||||
#define OP_FORCE 0x00000002 /* Always execute commands (!) */
|
||||
#define OP_DOUBLEDEP 0x00000004 /* Execution of commands depends on kids
|
||||
* per line (::) */
|
||||
#define OP_OPMASK (OP_DEPENDS|OP_FORCE|OP_DOUBLEDEP)
|
||||
#define OP_OPMASK (OP_DEPENDS|OP_FORCE|OP_DOUBLEDEP)
|
||||
|
||||
#define OP_OPTIONAL 0x00000008 /* Don't care if the target doesn't
|
||||
#define OP_OPTIONAL 0x00000008 /* Don't care if the target doesn't
|
||||
* exist and can't be created */
|
||||
#define OP_USE 0x00000010 /* Use associated commands for parents */
|
||||
#define OP_EXEC 0x00000020 /* Target is never out of date, but always
|
||||
#define OP_USE 0x00000010 /* Use associated commands for parents */
|
||||
#define OP_EXEC 0x00000020 /* Target is never out of date, but always
|
||||
* execute commands anyway. Its time
|
||||
* doesn't matter, so it has none...sort
|
||||
* of */
|
||||
#define OP_IGNORE 0x00000040 /* Ignore errors when creating the node */
|
||||
#define OP_PRECIOUS 0x00000080 /* Don't remove the target when
|
||||
#define OP_IGNORE 0x00000040 /* Ignore errors when creating the node */
|
||||
#define OP_PRECIOUS 0x00000080 /* Don't remove the target when
|
||||
* interrupted */
|
||||
#define OP_SILENT 0x00000100 /* Don't echo commands when executed */
|
||||
#define OP_MAKE 0x00000200 /* Target is a recurrsive make so its
|
||||
#define OP_SILENT 0x00000100 /* Don't echo commands when executed */
|
||||
#define OP_MAKE 0x00000200 /* Target is a recurrsive make so its
|
||||
* commands should always be executed when
|
||||
* it is out of date, regardless of the
|
||||
* state of the -n or -t flags */
|
||||
#define OP_JOIN 0x00000400 /* Target is out-of-date only if any of its
|
||||
#define OP_JOIN 0x00000400 /* Target is out-of-date only if any of its
|
||||
* children was out-of-date */
|
||||
#define OP_INVISIBLE 0x00004000 /* The node is invisible to its parents.
|
||||
#define OP_INVISIBLE 0x00004000 /* The node is invisible to its parents.
|
||||
* I.e. it doesn't show up in the parents's
|
||||
* local variables. */
|
||||
#define OP_NOTMAIN 0x00008000 /* The node is exempt from normal 'main
|
||||
#define OP_NOTMAIN 0x00008000 /* The node is exempt from normal 'main
|
||||
* target' processing in parse.c */
|
||||
#define OP_PHONY 0x00010000 /* Not a file target; run always */
|
||||
#define OP_PHONY 0x00010000 /* Not a file target; run always */
|
||||
/* Attributes applied by PMake */
|
||||
#define OP_TRANSFORM 0x80000000 /* The node is a transformation rule */
|
||||
#define OP_MEMBER 0x40000000 /* Target is a member of an archive */
|
||||
#define OP_LIB 0x20000000 /* Target is a library */
|
||||
#define OP_ARCHV 0x10000000 /* Target is an archive construct */
|
||||
#define OP_HAS_COMMANDS 0x08000000 /* Target has all the commands it should.
|
||||
#define OP_TRANSFORM 0x80000000 /* The node is a transformation rule */
|
||||
#define OP_MEMBER 0x40000000 /* Target is a member of an archive */
|
||||
#define OP_LIB 0x20000000 /* Target is a library */
|
||||
#define OP_ARCHV 0x10000000 /* Target is an archive construct */
|
||||
#define OP_HAS_COMMANDS 0x08000000 /* Target has all the commands it should.
|
||||
* Used when parsing to catch multiple
|
||||
* commands for a target */
|
||||
#define OP_SAVE_CMDS 0x04000000 /* Saving commands on .END (Compat) */
|
||||
#define OP_DEPS_FOUND 0x02000000 /* Already processed by Suff_FindDeps */
|
||||
#define OP_SAVE_CMDS 0x04000000 /* Saving commands on .END (Compat) */
|
||||
#define OP_DEPS_FOUND 0x02000000 /* Already processed by Suff_FindDeps */
|
||||
|
||||
/*
|
||||
* OP_NOP will return TRUE if the node with the given type was not the
|
||||
* object of a dependency operator
|
||||
*/
|
||||
#define OP_NOP(t) (((t) & OP_OPMASK) == 0x00000000)
|
||||
#define OP_NOP(t) (((t) & OP_OPMASK) == 0x00000000)
|
||||
|
||||
/*
|
||||
* The TARG_ constants are used when calling the Targ_FindNode and
|
||||
@ -205,8 +205,8 @@ typedef struct GNode {
|
||||
* table of all targets and its address returned. If TARG_NOCREATE is given,
|
||||
* a NULL pointer will be returned.
|
||||
*/
|
||||
#define TARG_CREATE 0x01 /* create node if not found */
|
||||
#define TARG_NOCREATE 0x00 /* don't create it */
|
||||
#define TARG_CREATE 0x01 /* create node if not found */
|
||||
#define TARG_NOCREATE 0x00 /* don't create it */
|
||||
|
||||
/*
|
||||
* There are several places where expandable buffers are used (parse.c and
|
||||
@ -217,7 +217,7 @@ typedef struct GNode {
|
||||
* case, it ought to be a power of two simply because most storage allocation
|
||||
* schemes allocate in powers of two.
|
||||
*/
|
||||
#define MAKE_BSIZE 256 /* starting size for expandable buffers */
|
||||
#define MAKE_BSIZE 256 /* starting size for expandable buffers */
|
||||
|
||||
/*
|
||||
* These constants are all used by the Str_Concat function to decide how the
|
||||
@ -228,42 +228,42 @@ typedef struct GNode {
|
||||
* STR_DOFREE bit is set, the two input strings will be freed before
|
||||
* Str_Concat returns.
|
||||
*/
|
||||
#define STR_ADDSPACE 0x01 /* add a space when Str_Concat'ing */
|
||||
#define STR_DOFREE 0x02 /* free source strings after concatenation */
|
||||
#define STR_ADDSLASH 0x04 /* add a slash when Str_Concat'ing */
|
||||
#define STR_ADDSPACE 0x01 /* add a space when Str_Concat'ing */
|
||||
#define STR_DOFREE 0x02 /* free source strings after concatenation */
|
||||
#define STR_ADDSLASH 0x04 /* add a slash when Str_Concat'ing */
|
||||
|
||||
/*
|
||||
* Error levels for parsing. PARSE_FATAL means the process cannot continue
|
||||
* once the makefile has been parsed. PARSE_WARNING means it can. Passed
|
||||
* as the first argument to Parse_Error.
|
||||
*/
|
||||
#define PARSE_WARNING 2
|
||||
#define PARSE_FATAL 1
|
||||
#define PARSE_WARNING 2
|
||||
#define PARSE_FATAL 1
|
||||
|
||||
/*
|
||||
* Values returned by Cond_Eval.
|
||||
*/
|
||||
#define COND_PARSE 0 /* Parse the next lines */
|
||||
#define COND_SKIP 1 /* Skip the next lines */
|
||||
#define COND_INVALID 2 /* Not a conditional statement */
|
||||
#define COND_PARSE 0 /* Parse the next lines */
|
||||
#define COND_SKIP 1 /* Skip the next lines */
|
||||
#define COND_INVALID 2 /* Not a conditional statement */
|
||||
|
||||
/*
|
||||
* Definitions for the "local" variables. Used only for clarity.
|
||||
*/
|
||||
#define TARGET "@" /* Target of dependency */
|
||||
#define OODATE "?" /* All out-of-date sources */
|
||||
#define ALLSRC ">" /* All sources */
|
||||
#define IMPSRC "<" /* Source implied by transformation */
|
||||
#define PREFIX "*" /* Common prefix */
|
||||
#define ARCHIVE "!" /* Archive in "archive(member)" syntax */
|
||||
#define MEMBER "%" /* Member in "archive(member)" syntax */
|
||||
#define TARGET "@" /* Target of dependency */
|
||||
#define OODATE "?" /* All out-of-date sources */
|
||||
#define ALLSRC ">" /* All sources */
|
||||
#define IMPSRC "<" /* Source implied by transformation */
|
||||
#define PREFIX "*" /* Common prefix */
|
||||
#define ARCHIVE "!" /* Archive in "archive(member)" syntax */
|
||||
#define MEMBER "%" /* Member in "archive(member)" syntax */
|
||||
|
||||
#define FTARGET "@F" /* file part of TARGET */
|
||||
#define DTARGET "@D" /* directory part of TARGET */
|
||||
#define FIMPSRC "<F" /* file part of IMPSRC */
|
||||
#define DIMPSRC "<D" /* directory part of IMPSRC */
|
||||
#define FPREFIX "*F" /* file part of PREFIX */
|
||||
#define DPREFIX "*D" /* directory part of PREFIX */
|
||||
#define FTARGET "@F" /* file part of TARGET */
|
||||
#define DTARGET "@D" /* directory part of TARGET */
|
||||
#define FIMPSRC "<F" /* file part of IMPSRC */
|
||||
#define DIMPSRC "<D" /* directory part of IMPSRC */
|
||||
#define FPREFIX "*F" /* file part of PREFIX */
|
||||
#define DPREFIX "*D" /* directory part of PREFIX */
|
||||
|
||||
/*
|
||||
* Global Variables
|
||||
@ -332,14 +332,14 @@ extern int debug;
|
||||
#define DEBUG_SUFF 0x0080
|
||||
#define DEBUG_TARG 0x0100
|
||||
#define DEBUG_VAR 0x0200
|
||||
#define DEBUG_FOR 0x0400
|
||||
#define DEBUG_LOUD 0x0800
|
||||
#define DEBUG_FOR 0x0400
|
||||
#define DEBUG_LOUD 0x0800
|
||||
|
||||
#define CONCAT(a,b) a##b
|
||||
#define CONCAT(a,b) a##b
|
||||
|
||||
#define DEBUG(module) (debug & CONCAT(DEBUG_,module))
|
||||
#define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/')))
|
||||
#define ISDOTDOT(c) ((c)[0] == '.' && ISDOT(&((c)[1])))
|
||||
#define ISDOT(c) ((c)[0] == '.' && (((c)[1] == '\0') || ((c)[1] == '/')))
|
||||
#define ISDOTDOT(c) ((c)[0] == '.' && ISDOT(&((c)[1])))
|
||||
|
||||
/*
|
||||
* Since there are so many, all functions that return non-integer values are
|
||||
|
@ -74,7 +74,7 @@ char *estrdup(const char *);
|
||||
void *emalloc(size_t);
|
||||
/* efree(x) works when x==NULL. STDC behavior, may need some different
|
||||
* definition for cross-builds on deficient systems */
|
||||
#define efree free
|
||||
#define efree free
|
||||
void *erealloc(void *, size_t);
|
||||
void enomem(void);
|
||||
int eunlink(const char *);
|
||||
|
@ -1259,7 +1259,7 @@ Parse_IsVar (line)
|
||||
Boolean wasSpace = FALSE; /* set TRUE if found a space */
|
||||
Boolean haveName = FALSE; /* Set TRUE if have a variable name */
|
||||
int level = 0;
|
||||
#define ISEQOPERATOR(c) \
|
||||
#define ISEQOPERATOR(c) \
|
||||
(((c) == '+') || ((c) == ':') || ((c) == '?') || ((c) == '!'))
|
||||
|
||||
/*
|
||||
|
@ -46,7 +46,7 @@
|
||||
*/
|
||||
|
||||
#ifndef _SPRITE
|
||||
#define _SPRITE
|
||||
#define _SPRITE
|
||||
|
||||
/*
|
||||
* A boolean type is defined as an integer, not an enum. This allows a
|
||||
@ -55,15 +55,15 @@
|
||||
|
||||
typedef int Boolean;
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define TRUE 1
|
||||
#endif /* TRUE */
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#define FALSE 0
|
||||
#endif /* FALSE */
|
||||
|
||||
typedef int ReturnStatus;
|
||||
|
||||
#define SUCCESS 0
|
||||
#define FAILURE 1
|
||||
#define SUCCESS 0
|
||||
#define FAILURE 1
|
||||
|
||||
#endif /* _SPRITE */
|
||||
|
@ -111,9 +111,9 @@ typedef struct _Suff {
|
||||
char *name; /* The suffix itself */
|
||||
int nameLen; /* Length of the suffix */
|
||||
short flags; /* Type of suffix */
|
||||
#define SUFF_INCLUDE 0x01 /* One which is #include'd */
|
||||
#define SUFF_LIBRARY 0x02 /* One which contains a library */
|
||||
#define SUFF_NULL 0x04 /* The empty suffix */
|
||||
#define SUFF_INCLUDE 0x01 /* One which is #include'd */
|
||||
#define SUFF_LIBRARY 0x02 /* One which contains a library */
|
||||
#define SUFF_NULL 0x04 /* The empty suffix */
|
||||
Lst searchPath; /* The path along which files of this suffix
|
||||
* may be found */
|
||||
int sNum; /* The suffix number */
|
||||
|
@ -92,7 +92,7 @@ static Lst allTargets; /* the list of all targets found so far */
|
||||
static Lst allGNs; /* List of all the GNodes */
|
||||
static Hash_Table targets; /* a hash table of same */
|
||||
|
||||
#define HTSIZE 191 /* initial size of hash table */
|
||||
#define HTSIZE 191 /* initial size of hash table */
|
||||
|
||||
static int TargPrintOnlySrc(void *, void *);
|
||||
static int TargPrintName(void *, void *);
|
||||
@ -487,8 +487,8 @@ Targ_PrintType (type)
|
||||
{
|
||||
int tbit;
|
||||
|
||||
#define PRINTBIT(attr) case CONCAT(OP_,attr): printf("." #attr " "); break
|
||||
#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf("." #attr " "); break
|
||||
#define PRINTBIT(attr) case CONCAT(OP_,attr): printf("." #attr " "); break
|
||||
#define PRINTDBIT(attr) case CONCAT(OP_,attr): if (DEBUG(TARG)) printf("." #attr " "); break
|
||||
|
||||
type &= ~OP_OPMASK;
|
||||
|
||||
|
@ -125,30 +125,30 @@ GNode *VAR_CMD; /* variables defined on the command-line */
|
||||
|
||||
static Lst allVars; /* List of all variables */
|
||||
|
||||
#define FIND_CMD 0x1 /* look in VAR_CMD when searching */
|
||||
#define FIND_GLOBAL 0x2 /* look in VAR_GLOBAL as well */
|
||||
#define FIND_ENV 0x4 /* look in the environment also */
|
||||
#define FIND_CMD 0x1 /* look in VAR_CMD when searching */
|
||||
#define FIND_GLOBAL 0x2 /* look in VAR_GLOBAL as well */
|
||||
#define FIND_ENV 0x4 /* look in the environment also */
|
||||
|
||||
typedef struct Var {
|
||||
char *name; /* the variable's name */
|
||||
Buffer val; /* its value */
|
||||
int flags; /* miscellaneous status flags */
|
||||
#define VAR_IN_USE 1 /* Variable's value currently being used.
|
||||
#define VAR_IN_USE 1 /* Variable's value currently being used.
|
||||
* Used to avoid recursion */
|
||||
#define VAR_FROM_ENV 2 /* Variable comes from the environment */
|
||||
#define VAR_JUNK 4 /* Variable is a junk variable that
|
||||
#define VAR_FROM_ENV 2 /* Variable comes from the environment */
|
||||
#define VAR_JUNK 4 /* Variable is a junk variable that
|
||||
* should be destroyed when done with
|
||||
* it. Used by Var_Parse for undefined,
|
||||
* modified variables */
|
||||
} Var;
|
||||
|
||||
/* Var*Pattern flags */
|
||||
#define VAR_SUB_GLOBAL 0x01 /* Apply substitution globally */
|
||||
#define VAR_SUB_ONE 0x02 /* Apply substitution to one word */
|
||||
#define VAR_SUB_MATCHED 0x04 /* There was a match */
|
||||
#define VAR_MATCH_START 0x08 /* Match at start of word */
|
||||
#define VAR_MATCH_END 0x10 /* Match at end of word */
|
||||
#define VAR_NOSUBST 0x20 /* don't expand vars in VarGetPattern */
|
||||
#define VAR_SUB_GLOBAL 0x01 /* Apply substitution globally */
|
||||
#define VAR_SUB_ONE 0x02 /* Apply substitution to one word */
|
||||
#define VAR_SUB_MATCHED 0x04 /* There was a match */
|
||||
#define VAR_MATCH_START 0x08 /* Match at start of word */
|
||||
#define VAR_MATCH_END 0x10 /* Match at end of word */
|
||||
#define VAR_NOSUBST 0x20 /* don't expand vars in VarGetPattern */
|
||||
|
||||
typedef struct {
|
||||
char *lhs; /* String to match */
|
||||
@ -1150,7 +1150,7 @@ VarRESubstitute(word, addSpace, buf, patternp)
|
||||
int added;
|
||||
int flags = 0;
|
||||
|
||||
#define MAYBE_ADD_SPACE() \
|
||||
#define MAYBE_ADD_SPACE() \
|
||||
if (addSpace && !added) \
|
||||
Buf_AddByte(buf, ' '); \
|
||||
added = 1
|
||||
@ -1334,7 +1334,7 @@ VarGetPattern(ctxt, err, tstr, delim, flags, length, pattern)
|
||||
if (length == NULL)
|
||||
length = &junk;
|
||||
|
||||
#define IS_A_MATCH(cp, delim) \
|
||||
#define IS_A_MATCH(cp, delim) \
|
||||
((cp[0] == '\\') && ((cp[1] == delim) || \
|
||||
(cp[1] == '\\') || (cp[1] == '$') || (pattern && (cp[1] == '&'))))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user