Source code of Windows XP (NT5)
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.

38 lines
744 B

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