Windows NT 4.0 source code leak
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
686 B

4 years ago
  1. #include "y1.h"
  2. char *chcopy(char *, char *);
  3. extern char sarr[ISIZE];
  4. char *writem(pp) int *pp;
  5. {
  6. /* creates output string for item pointed to by pp */
  7. int i,*p;
  8. char *q;
  9. for( p=pp; *p>0 ; ++p ) ;
  10. p = prdptr[-*p];
  11. q = chcopy( sarr, nontrst[*p-NTBASE].name );
  12. q = chcopy( q, " : " );
  13. for(;;)
  14. {
  15. *q++ = ++p==pp ? '_' : ' ';
  16. *q = '\0';
  17. if((i = *p) <= 0) break;
  18. q = chcopy( q, symnam(i) );
  19. if( q> &sarr[ISIZE-30] ) error( "item too big" );
  20. }
  21. if( (i = *pp) < 0 )
  22. {
  23. /* an item calling for a reduction */
  24. q = chcopy( q, " (" );
  25. sprintf( q, "%d)", -i );
  26. }
  27. return( sarr );
  28. }