IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 16, 2006, 10:58:49 PM (20 years ago)
Author:
eugene
Message:

major updates to use gprint for buffered / threaded printing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/MacroOps.c

    r4705 r7917  
    4949
    5050  if ((macro == NULL) || (macro[0].Nlines == 0)) {
    51     fprintf (stderr, "  macro not defined\n");
     51    gprint (GP_ERR, "  macro not defined\n");
    5252    return;
    5353  }
    5454  for (i = 0; i < macro[0].Nlines; i++) {
    55     fprintf (stderr, "  %s\n", macro[0].line[i]);
     55    gprint (GP_ERR, "  %s\n", macro[0].line[i]);
    5656  }
    5757  return;
     
    6161  int i;
    6262  for (i = 0; i < Nmacros; i++) {
    63     fprintf (stderr, "%s\n", macros[i].name);
     63    gprint (GP_ERR, "%s\n", macros[i].name);
    6464  }
    6565}
     
    9191  }
    9292  if (Nm == -1) {
    93     fprintf (stderr, "programming error: macro not found\n");
     93    gprint (GP_ERR, "programming error: macro not found\n");
    9494    return (FALSE);
    9595  }
     
    114114  }
    115115  if (EXACT) {
    116     if (VERBOSE) fprintf (stderr, "no exact match to %s\n", name);
     116    if (VERBOSE) gprint (GP_ERR, "no exact match to %s\n", name);
    117117    return (NULL);
    118118  }
     
    130130  if (Nmatch > 1) {
    131131    if (VERBOSE) {
    132       fprintf (stderr, "ambiguous macro: %s ( ", name);
     132      gprint (GP_ERR, "ambiguous macro: %s ( ", name);
    133133      for (i = 0; i < Nmatch; i++) {
    134         fprintf (stderr, "%s ", macros[match[i]].name);
     134        gprint (GP_ERR, "%s ", macros[match[i]].name);
    135135      }
    136       fprintf (stderr, ")\n");
     136      gprint (GP_ERR, ")\n");
    137137    }
    138138    return (NULL);
    139139  }
    140   if (VERBOSE) fprintf (stderr, "%s: Macro not found.\n", name);
     140  if (VERBOSE) gprint (GP_ERR, "%s: Macro not found.\n", name);
    141141  return (NULL);
    142142
Note: See TracChangeset for help on using the changeset viewer.