Fixed comments on #endif statements
This commit is contained in:
@@ -108,7 +108,7 @@ Expr *sp;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf("stderr, "eval_delay: type=%s\n", stype[ep->type]);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Generate 1-st part of function w/ 1-st 2 parameters */
|
||||
delay_id = (int)ep->right; /* delay id was previously assigned */
|
||||
@@ -322,7 +322,7 @@ int level; /* indentation level */
|
||||
case E_VAR:
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "E_VAR: %s\n", ep->value);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
if(reent_opt)
|
||||
{ /* Make variables point to allocated structure */
|
||||
Var *vp;
|
||||
@@ -349,7 +349,7 @@ int level; /* indentation level */
|
||||
case E_FUNC:
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "E_FUNC: %s\n", ep->value);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
if (special_func(stmt_type, ep, sp))
|
||||
break;
|
||||
printf("%s(", ep->value);
|
||||
@@ -469,7 +469,7 @@ Expr *sp; /* current State struct */
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "special_func: func_code=%d\n", func_code);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
switch (func_code)
|
||||
{
|
||||
case F_DELAY:
|
||||
@@ -620,7 +620,7 @@ char *fname; /* function name */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "gen_pv_func: var=%s\n", ep1->value);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
cp = vp->chan;
|
||||
index = cp->index;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ gen_db_blocks()
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "gen_db_blocks: index=%d, num_elem=%d\n",
|
||||
cp->index, cp->num_elem);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (cp->num_elem == 0)
|
||||
{ /* Variable assigned to single pv */
|
||||
@@ -415,7 +415,7 @@ int numEventWords;
|
||||
for (n = 0; n < numEventWords; n++)
|
||||
fprintf(stderr, " 0x%x", pEventWords[n]);
|
||||
fprintf(stderr, "\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
/* Evaluate the event mask for a given transition (when() statement).
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif TRUE
|
||||
#endif /* TRUE */
|
||||
|
||||
int debug_print_opt = 0; /* Debug level (set by source file) */
|
||||
|
||||
@@ -187,7 +187,7 @@ char *db_name; /* ptr to db name */
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "assign %s to \"%s\";\n", name, db_name);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/* Find the variable */
|
||||
vp = (Var *)findVar(name);
|
||||
if (vp == 0)
|
||||
@@ -230,7 +230,7 @@ char *db_name; /* ptr to db name */
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "assign %s[%s] to \"%s\";\n", name, subscript, db_name);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/* Find the variable */
|
||||
vp = (Var *)findVar(name);
|
||||
if (vp == 0)
|
||||
@@ -303,7 +303,7 @@ Expr *db_name_list; /* ptr to db name list */
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "assign %s to {", name);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/* Find the variable */
|
||||
vp = (Var *)findVar(name);
|
||||
if (vp == 0)
|
||||
@@ -342,7 +342,7 @@ Expr *db_name_list; /* ptr to db name list */
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "\"%s\", ", db_name_list->value);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
cp->db_name_list[elem_num] = db_name_list->value; /* DB name */
|
||||
cp->count = vp->length2;
|
||||
|
||||
@@ -350,7 +350,7 @@ Expr *db_name_list; /* ptr to db name list */
|
||||
}
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "};\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -418,7 +418,7 @@ char *subscript; /* element number or NULL */
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "monitor_stmt: name=%s[%s]\n", name, subscript);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Find the variable */
|
||||
vp = (Var *)findVar(name);
|
||||
@@ -488,7 +488,7 @@ char *ef_name;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "sync_stmt: name=%s, subNum=%s, ef_name=%s\n",
|
||||
name, subscript, ef_name);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
vp = (Var *)findVar(name);
|
||||
if (vp == 0)
|
||||
@@ -625,7 +625,7 @@ Expr *prog_list;
|
||||
ss_list = prog_list;
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "----Phase2---\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
phase2(ss_list);
|
||||
|
||||
exit(0);
|
||||
@@ -701,7 +701,7 @@ Expr *ep2; /* beginning 2-nd (append it to 1-st) */
|
||||
break;
|
||||
}
|
||||
fprintf(stderr, ")\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
return ep1;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ reconcile_variables()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "reconcile_variables: ss=%s\n", ssp->value);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
traverseExprTree(ssp, E_VAR, 0, connect_variable, 0);
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ assign_delay_ids()
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "assign_delay_ids:\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
for (ssp = ss_list; ssp != 0; ssp = ssp->next)
|
||||
{
|
||||
for (sp = ssp->left; sp != 0; sp = sp->next)
|
||||
|
||||
@@ -55,7 +55,7 @@ LOCAL VOID proc_db_events(union db_access_val *, CHAN *, int);
|
||||
#ifdef DEBUG
|
||||
#undef LOCAL
|
||||
#define LOCAL
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/*
|
||||
* seq_connect() - Connect to all database channels through channel access.
|
||||
*/
|
||||
@@ -79,7 +79,7 @@ SPROG *pSP;
|
||||
#ifdef DEBUG
|
||||
logMsg("seq_connect: connect %s to %s\n",
|
||||
pDB->pVarName, pDB->dbName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/* Connect to it */
|
||||
status = ca_build_and_connect(
|
||||
pDB->dbName, /* DB channel name */
|
||||
@@ -154,7 +154,7 @@ int complete_type;
|
||||
|
||||
#ifdef DEBUG
|
||||
logMsg("proc_db_events: var=%s, pv=%s\n", pDB->VarName, pDB->dbName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Copy value returned into user variable */
|
||||
pVal = (void *)pAccess + pDB->dbOffset; /* ptr to data in CA structure */
|
||||
@@ -220,7 +220,7 @@ SPROG *pSP;
|
||||
logMsg("seq_disconnect: disconnect %s from %s\n",
|
||||
pDB->pVarName, pDB->dbName);
|
||||
taskDelay(30);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/* Disconnect this channel */
|
||||
status = ca_clear_channel(pDB->chid);
|
||||
|
||||
@@ -274,7 +274,7 @@ struct connection_handler_args args;
|
||||
pDB->monitored = FALSE;
|
||||
#ifdef DEBUG
|
||||
logMsg("%s disconnected from %s\n", pDB->VarName, pDB->dbName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
else /* PV connected */
|
||||
{
|
||||
@@ -284,7 +284,7 @@ struct connection_handler_args args;
|
||||
pDB->monitored = TRUE;
|
||||
#ifdef DEBUG
|
||||
logMsg("%s connected to %s\n", pDB->VarName, pDB->dbName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
pDB->dbCount = ca_element_count(args.chid);
|
||||
if (pDB->dbCount > pDB->count)
|
||||
pDB->dbCount = pDB->count;
|
||||
|
||||
@@ -151,7 +151,7 @@ int pvId;
|
||||
pDB = pSP->pChan + pvId;
|
||||
#ifdef DEBUG
|
||||
logMsg("seq_pvPut: pv name=%s, pVar=0x%x\n", pDB->dbName, pDB->pVar);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (!pDB->connected)
|
||||
return ECA_DISCONN;
|
||||
@@ -167,7 +167,7 @@ int pvId;
|
||||
seq_log(pSP, " putType=%d\n", pDB->putType);
|
||||
seq_log(pSP, " size=%d, count=%d\n", pDB->size, pDB->count);
|
||||
}
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -190,7 +190,7 @@ char *pvName;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("Assign %s to \"%s\"\n", pDB->pVarName, pvName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
if (pDB->assigned)
|
||||
{ /* Disconnect this channel */
|
||||
status = ca_clear_channel(pDB->chid);
|
||||
@@ -258,7 +258,7 @@ int pvId;
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("monitor \"%s\"\n", pDB->dbName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
if (pDB->monitored || !pDB->assigned)
|
||||
return ECA_NORMAL;
|
||||
@@ -477,7 +477,7 @@ int ev_flag; /* event flag */
|
||||
#ifdef DEBUG
|
||||
logMsg("seq_efSet: pSP=0x%x, pSS=0x%x, ev_flag=0x%x\n", pSP, pSS, ev_flag);
|
||||
taskDelay(10);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Set this bit (apply resource lock) */
|
||||
semTake(pSP->caSemId, WAIT_FOREVER);
|
||||
@@ -507,7 +507,7 @@ int ev_flag; /* event flag */
|
||||
#ifdef DEBUG
|
||||
logMsg("seq_efTest: ev_flag=%d, event=0x%x, isSet=%d\n",
|
||||
ev_flag, pSP->pEvents[0], isSet);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
return isSet;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ char *pName;
|
||||
|
||||
#ifdef DEBUG
|
||||
logMsg("seqMacValGet: name=%s", pName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
for (i = 0 ; i < MAX_MACROS; i++, pMac++)
|
||||
{
|
||||
if (pMac->pName != NULL)
|
||||
@@ -128,14 +128,14 @@ char *pName;
|
||||
{
|
||||
#ifdef DEBUG
|
||||
logMsg(", value=%s\n", pMac->pValue);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
return pMac->pValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
logMsg(", no value\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
#ifdef DEBUG
|
||||
#undef LOCAL
|
||||
#define LOCAL
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* ANSI functional prototypes for local routines */
|
||||
LOCAL SPROG *seqInitTables(struct seqProgram *);
|
||||
@@ -111,7 +111,7 @@ int stack_size; /* optional stack size (bytes) */
|
||||
taskDelay(5); /* wait for task to init. ch'l access */
|
||||
#ifdef DEBUG
|
||||
logMsg("task seqAux spawned, tid=0x%x\n", seqAuxTaskId);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
|
||||
/* Specify a routine to run at task delete */
|
||||
@@ -244,7 +244,7 @@ SPROG *pSP;
|
||||
#ifdef DEBUG
|
||||
logMsg("init_sprog: num SS=%d, num Chans=%d, num Events=%d, Prog Name=%s, var Size=%d\n",
|
||||
pSP->numSS, pSP->numChans, pSP->numEvents, pSP->pProgName, pSP->varSize);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
|
||||
/* Create a semaphore for resource locking on CA events */
|
||||
pSP->caSemId = semBCreate(SEM_Q_FIFO, SEM_FULL);
|
||||
@@ -302,7 +302,7 @@ SPROG *pSP;
|
||||
#ifdef DEBUG
|
||||
logMsg("init_sscb: SS Name=%s, num States=%d, pSS=0x%x\n",
|
||||
pSS->pSSName, pSS->numStates, pSS);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
/* Create a binary semaphore for synchronizing events in a SS */
|
||||
pSS->syncSemId = semBCreate(SEM_Q_FIFO, SEM_FULL);
|
||||
if (pSS->syncSemId == NULL)
|
||||
@@ -339,13 +339,13 @@ SPROG *pSP;
|
||||
#ifdef DEBUG
|
||||
logMsg("init_sscb: State Name=%s, Event Mask=0x%x\n",
|
||||
pState->pStateName, *pState->pEventMask);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
logMsg("init_sscb: numSS=%d\n", pSP->numSS);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ SPROG *pSP;
|
||||
{
|
||||
#ifdef DEBUG
|
||||
logMsg("init_chan: pDB=0x%x\n", pDB);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
pDB->sprog = pSP;
|
||||
pDB->dbAsName = pSeqChan->dbAsName;
|
||||
pDB->pVarName = pSeqChan->pVarName;
|
||||
@@ -394,7 +394,7 @@ SPROG *pSP;
|
||||
logMsg(" size=%d, dbOffset=%d\n", pDB->size, pDB->dbOffset);
|
||||
logMsg(" efId=%d, monFlag=%d, eventNum=%d\n",
|
||||
pDB->efId, pDB->monFlag, pDB->eventNum);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ SPROG *pSP;
|
||||
#ifdef DEBUG
|
||||
logMsg("seqChanNameEval: \"%s\" evaluated to \"%s\"\n",
|
||||
pDB->dbAsName, pDB->dbName);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -111,7 +111,7 @@ int tid;
|
||||
printf(" - expired");
|
||||
printf("\n");
|
||||
}
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ SEM_ID cleanupSem; /* indicate cleanup is finished */
|
||||
/* Remove tasks' watchdog & suspend all state set tasks except self */
|
||||
#ifdef DEBUG
|
||||
logMsg(" Suspending state set tasks:\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
pSS = pSP->pSS;
|
||||
for (nss = 0; nss < pSP->numSS; nss++, pSS++)
|
||||
{
|
||||
@@ -373,7 +373,7 @@ SEM_ID cleanupSem; /* indicate cleanup is finished */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
logMsg(" suspend task: tid=%d\n", tid_ss);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
taskSuspend(tid_ss);
|
||||
}
|
||||
}
|
||||
@@ -386,7 +386,7 @@ SEM_ID cleanupSem; /* indicate cleanup is finished */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
logMsg(" Call exit function\n");
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
pSP->exitFunc( (SS_ID)pSP->pSS, pSP->pVar);
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ SEM_ID cleanupSem; /* indicate cleanup is finished */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
logMsg("Closing log fd=%d\n", pSP->logFd);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
close(pSP->logFd);
|
||||
pSP->logFd = ioGlobalStdGet(1);
|
||||
}
|
||||
@@ -421,7 +421,7 @@ SEM_ID cleanupSem; /* indicate cleanup is finished */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
logMsg(" delete ss task: tid=%d\n", tid_ss);
|
||||
#endif DEBUG
|
||||
#endif /* DEBUG */
|
||||
taskDelete(tid_ss);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif TRUE
|
||||
#endif /* TRUE */
|
||||
|
||||
extern int line_num; /* input file line no. */
|
||||
%}
|
||||
|
||||
Reference in New Issue
Block a user