home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
USCX
/
YACC.ARC
/
YWRITM.1C
< prev
next >
Wrap
Text File
|
1986-03-29
|
768b
|
35 lines
#include "y1.h"
extern char sarr[ISIZE];
char *writem(pp) int *pp;
{
/* creates output string for item pointed to by pp */
int i,*p;
char *q;
for( p=pp; *p>0 ; ++p ) ;
p = prdptr[-*p];
q = chcopy( sarr, nontrst[*p-NTBASE].name );
q = chcopy( q, " : " );
for(;;)
{
*q++ = ++p==pp ? '_' : ' ';
*q = '\0';
if((i = *p) <= 0) break;
q = chcopy( q, symnam(i) );
if( q> &sarr[ISIZE-30] ) error( "item too big" );
}
if( (i = *pp) < 0 )
{
/* an item calling for a reduction */
q = chcopy( q, " (" );
sprintf( q, "%d)", -i );
}
return( sarr );
}