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/cmd.basic/sprintf.c

    r2843 r7917  
    1111
    1212  if (argc < 3) {
    13     fprintf (stderr, "USAGE: sprintf var format value value ...\n");
     13    gprint (GP_ERR, "USAGE: sprintf var format value value ...\n");
    1414    return (FALSE);
    1515  }
     
    2626    p2 = strchr (p1, '%');
    2727    if (p2 == (char *) NULL) {
    28       fprintf (stderr, "mismatch between format and values\n");
     28      gprint (GP_ERR, "mismatch between format and values\n");
    2929      return (FALSE);
    3030    }
    3131    if (strlen(q) + p2 - p1 > NCHAR) {
    32       fprintf (stderr, "line too long");
     32      gprint (GP_ERR, "line too long");
    3333      return (FALSE);
    3434    }
     
    5353        break;
    5454      default:
    55         fprintf (stderr, "syntax error in format (only e,f,s,d,c,x allowed)\n");
     55        gprint (GP_ERR, "syntax error in format (only e,f,s,d,c,x allowed)\n");
    5656        return (FALSE);
    5757    }
    5858    if (strlen(q) + strlen(tmp) > NCHAR) {
    59       fprintf (stderr, "line too long");
     59      gprint (GP_ERR, "line too long");
    6060      return (FALSE);
    6161    }
     
    6666  p2 = strchr (p1, '%');
    6767  if (p2 != (char *) NULL) {
    68     fprintf (stderr, "mismatch between format and values\n");
     68    gprint (GP_ERR, "mismatch between format and values\n");
    6969    return (FALSE);
    7070  }
     
    7272  p2 = p1 + strlen (p1);
    7373  if (strlen(q) + p2 - p1 > NCHAR) {
    74     fprintf (stderr, "line too long");
     74    gprint (GP_ERR, "line too long");
    7575    return (FALSE);
    7676  }
Note: See TracChangeset for help on using the changeset viewer.