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.

36 lines
782 B

  1. // Copyright (c) 1993-1999 Microsoft Corporation
  2. #include "y2.h"
  3. #include <ctype.h>
  4. void
  5. defout( void )
  6. {
  7. /* write out the defines (at the end of the declaration section) */
  8. register int i, c;
  9. register char *cp;
  10. for( i=ndefout; i<=ntokens; ++i )
  11. {
  12. cp = tokset[i].name;
  13. if( *cp == ' ' ) ++cp; /* literals */
  14. for( ; (c= *cp)!='\0'; ++cp )
  15. {
  16. if( islower(c) || isupper(c) || isdigit(c) || c=='_' ); /* VOID */
  17. else goto nodef;
  18. }
  19. fprintf( ftable, "# define %s %d\n", tokset[i].name, tokset[i].value );
  20. if( fdefine != NULL ) fprintf( fdefine, "# define %s %d\n", tokset[i].name, tokset[i].value );
  21. nodef:
  22. ;
  23. }
  24. ndefout = ntokens+1;
  25. }