DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T t

⟦db8270ed7⟧ TextFile

    Length: 540 (0x21c)
    Types: TextFile
    Names: »test.c«

Derivation

└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
    └─⟦cc8755de2⟧ »./libg++-1.36.1.tar.Z« 
        └─⟦23757c458⟧ 
            └─⟦this⟧ »libg++/gperf/tests/test.c« 

TextFile

/*
   Tests the generated perfect has function.
   The -v option prints diagnostics as to whether a word is in 
   the set or not.  Without -v the program is useful for timing.
*/ 
  
#include <stdio.h>

#define MAX_LEN 80

int 
main (argc, argv) 
     int   argc;
     char *argv[];
{
  int  verbose = argc > 1 ? 1 : 0;
  char buf[MAX_LEN];

  while (gets (buf)) 
    if (in_word_set (buf, strlen (buf)) && verbose) 
      printf ("in word set %s\n", buf);
    else if (verbose) 
      printf ("NOT in word set %s\n", buf);

  return 0;
}