patch-src_wn_c 1.0 KB

123456789101112131415161718192021222324252627282930
  1. $OpenBSD: patch-src_wn_c,v 1.1 2008/09/01 20:02:53 sthen Exp $
  2. --- src/wn.c.orig Thu Nov 30 21:40:26 2006
  3. +++ src/wn.c Mon Sep 1 20:53:39 2008
  4. @@ -129,7 +129,7 @@ static void printusage(), printlicense(),
  5. printsearches(char *, int, unsigned long);
  6. static int error_message(char *);
  7. -main(int argc,char *argv[])
  8. +int main(int argc,char *argv[])
  9. {
  10. display_message = error_message;
  11. @@ -225,14 +225,14 @@ static int do_search(char *searchword, int pos, int se
  12. printf("\n%s of %s %s\n%s",
  13. label, partnames[pos], searchword, outbuf);
  14. - if (morphword = morphstr(searchword, pos))
  15. + if ((morphword = morphstr(searchword, pos)) != NULL)
  16. do {
  17. outbuf = findtheinfo(morphword, pos, search, whichsense);
  18. totsenses += wnresults.printcnt;
  19. if (strlen(outbuf) > 0)
  20. printf("\n%s of %s %s\n%s",
  21. label, partnames[pos], morphword, outbuf);
  22. - } while (morphword = morphstr(NULL, pos));
  23. + } while ((morphword = morphstr(NULL, pos)) != NULL);
  24. return(totsenses);
  25. }