home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3710 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.1 KB  |  40 lines

  1. Path: sparky!uunet!gatech!udel!louie!dvss!jtroy
  2. From: dvss!jtroy@udel.edu (Jay Troy)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: EMX library bug.
  5. Message-ID: <ReiBoB5w164w@dvss.UUCP>
  6. Date: Wed, 22 Jul 92 10:36:02 EDT
  7. Organization: Delaware Valley Solution Systems, Inc.
  8. Lines: 30
  9.  
  10.  
  11. I think I've discovered an EMX library bug.  The standard library function
  12. strtok causes an access violation in every combination that I've tried.  The
  13. following simple C program illustrates this problem:
  14.  
  15. ---cut here---
  16. #include <stdlib.h>
  17. #include <string.h>
  18. #include <math.h>
  19.  
  20. main()
  21. {
  22.     char temp[10];
  23.     char *ch = "3.4 4.1";
  24.  
  25.     printf("ch = %s\n",ch);
  26.     strcpy(temp, strtok(ch," "));
  27.     printf("temp = %s\n",temp);
  28. }
  29. ---cut here---
  30.  
  31. I guess I'll start to look at the library source.  If anyone already has
  32. this problem fixed or wants more info, please email me.  Thanks.
  33.  
  34.  
  35.  Jay Troy        Delaware Valley Solution Systems, Inc.
  36.                  Computing Solutions for Business and Industry
  37.                  P.O. Box 190 // Claymont, DE 19703 // (302)798-DVSS
  38.                  Internet: ...!udel.edu!dvss!jtroy (jtroy@dvss.UUCP)
  39. --
  40.