(file) Return to Policy.c CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

Diff for /pegasus/src/Executor/Policy.c between version 1.4 and 1.5

version 1.4, 2007/06/08 17:56:04 version 1.5, 2007/06/12 18:19:46
Line 328 
Line 328 
 /* /*
 **============================================================================== **==============================================================================
 ** **
 ** _DumpPolicyHelper()  ** DumpPolicyHelper()
 ** **
 **     Dump the policy table given by *policyTable* and *policyTableSize*. **     Dump the policy table given by *policyTable* and *policyTableSize*.
 **     Expand any macros in the entries.  **     Expand any macros in the entries, if requested.
 ** **
 **============================================================================== **==============================================================================
 */ */
  
 static void _DumpPolicyHelper(  void DumpPolicyHelper(
       FILE* outputStream,
     const struct Policy* policyTable,     const struct Policy* policyTable,
     size_t policyTableSize,     size_t policyTableSize,
     int expandMacros)     int expandMacros)
Line 352 
Line 353 
  
         if (expandMacros)         if (expandMacros)
         {         {
               if (p->arg1)
             ExpandMacros(p->arg1, arg1);             ExpandMacros(p->arg1, arg1);
  
             if (p->arg2)             if (p->arg2)
Line 359 
Line 361 
         }         }
         else         else
         {         {
               if (p->arg1)
             Strlcpy(arg1, p->arg1, sizeof(arg1));             Strlcpy(arg1, p->arg1, sizeof(arg1));
  
             if (p->arg2)             if (p->arg2)
                 Strlcpy(arg2, p->arg2, sizeof(arg2));                 Strlcpy(arg2, p->arg2, sizeof(arg2));
         }         }
  
           fprintf(outputStream, "%s(", codeStr);
           if (p->arg1)
               fprintf(outputStream, "\"%s\"", arg1);
         if (p->arg2)         if (p->arg2)
             printf("%s(\"%s\", \"%s\")\n", codeStr, arg1, arg2);              fprintf(outputStream, ", \"%s\"", arg2);
         else          fprintf(outputStream, ")\n");
             printf("%s(\"%s\")\n", codeStr, arg1);  
     }     }
 } }
  
Line 377 
Line 382 
 ** **
 ** DumpPolicy() ** DumpPolicy()
 ** **
 **     Dump both the static and dynamic policy tables.  **     Dump the static policy table.
 ** **
 **============================================================================== **==============================================================================
 */ */
  
 void DumpPolicy(int expandMacros)  void DumpPolicy(FILE* outputStream, int expandMacros)
 { {
     printf("===== Policy:\n");      fprintf(outputStream, "===== Policy:\n");
  
     _DumpPolicyHelper(      DumpPolicyHelper(
         _staticPolicyTable, _staticPolicyTableSize, expandMacros);          outputStream, _staticPolicyTable, _staticPolicyTableSize, expandMacros);
  
     putchar('\n');      putc('\n', outputStream);
 } }


Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2