Changeset 3741 for zzuf


Ignore:
Timestamp:
Oct 28, 2009, 12:08:16 AM (10 years ago)
Author:
Sam Hocevar
Message:

Add a getc_unlocked() variant to zzcat.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/test/zzcat.c

    r3734 r3741  
    114114        break;
    115115#if defined HAVE_GETLINE
    116     case 23: /* getline() calls */
     116    case 23: /* getline() and getc() calls */
     117    case 24: /* getline() and getc_unlocked() calls */
    117118        stream = fopen(name, "r");
    118119        if(!stream)
    119120            return EXIT_FAILURE;
    120121        i = 0;
    121         while ((c = getc(stream)) != EOF)
     122        while ((c = (atoi(argv[1]) == 23) ? getc(stream)
     123                                          : getc_unlocked(stream)) != EOF)
    122124        {
    123125            char *line;
Note: See TracChangeset for help on using the changeset viewer.