Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
951 B

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #include "y2.h"
  3. int
  4. skipcom( void )
  5. {
  6. /* skip over comments */
  7. register c, i; /* i is the number of lines skipped */
  8. i=0; /*01*/
  9. /* skipcom is called after reading a / */
  10. c = unix_getc(finput);
  11. if (c == '/') {
  12. while ((c = unix_getc(finput)) != '\n')
  13. ;
  14. return ++i;
  15. } else {
  16. if( c != '*' )
  17. error( "illegal comment" );
  18. c = unix_getc(finput);
  19. while( c != EOF )
  20. {
  21. if (c == '*') {
  22. if ((c = unix_getc(finput)) != '/') {
  23. continue;
  24. } else {
  25. return i;
  26. }
  27. }
  28. if (c == '\n') {
  29. i++;
  30. }
  31. c = unix_getc(finput);
  32. }
  33. error( "EOF inside comment" );
  34. return i; /* NOTREACHED */
  35. }
  36. }