wjc@rayssde.UUCP (William J. Carson) (06/06/86)
We are running 4.2BSD on a 90x and are having a problem getting System V Pic going. The problem seems to be in the program troffgen.c. Instead of passing all the troff commands (ie. .ps, .vs, .anything) to troff, it is printing a "ctrl A" instead. Has anyone had any luck with Pic????? Any help would be appreciated. Bill Carson {allegra,ihnp4,linus}!rayssd!wjc
fred@BRILLIG.UMD.EDU.UUCP (06/11/86)
From: seismo!allegra!rayssd!rayssde!wjc@mimsy.umd.edu We are running 4.2BSD on a 90x and are having a problem getting System V Pic going. The problem seems to be in the program troffgen.c. Instead of passing all the troff commands (ie. .ps, .vs, .anything) to troff, it is printing a "ctrl A" instead. Has anyone had any luck with Pic????? Any help would be appreciated. Bill Carson {allegra,ihnp4,linus}!rayssd!wjc This isn't specific to ``pic'', but it sounds awful similar to a problem I had transporting a piece of software from a VAX to the Pyramid. It seems that on a VAX, there is always a null byte at address 0, while on the Pyramid there's a ^A at 0, and a null byte at address 1. This lets one get away, on the VAX, with some sloppy programming: char *splat; splat = (char *)0; printf("%s", splat); This will do ``the right thing''; that is: it will print nothing. If this sort of thing is allowed to creep into your code and you then transport it to a Pyramid, you start getting mysterious ^As popping up unexpectedly. ---- Fred Blonder (301) 454-7690 seismo!umcp-cs!fred Fred@Mimsy.umd.edu
rk@pyramid.UUCP (Rick Kamicar) (06/13/86)
I encountered this problem last friday and found the following: The problem is caused as follows: troffgen is called from picy.c (generated by yacc) as: -> yyval.o = troffgen(yypvt[-0].i); where yypvt is declared as YYSTYPE. The code for troffgen is: -> obj *troffgen(s) /* save away a string of troff commands */ -> YYSTYPE s; -> { -> savetext(CENTER, s.p); /* use the existing text mechanism */ But, picy.y sends the int element of YYSTYPE --NOT the actual structure! The simple changes below (there are 2) solve the problem... -> obj *troffgen(s) /* save away a string of troff commands */ *-> char *s; -> { *-> savetext(CENTER, s); /* use the existing text mechanism */ ------------------------ Richard Kamicar {allegra,cmcl2,decwrl,hplabs,topaz,ut-sally}!pyramid!rk Pyramid Technology Corp Mountain View, CA +1 415 965 7200
salkind@NYU-ROBESON.ARPA (Lou Salkind) (06/13/86)
The problem with the System V PIC is in the source code! The yacc actions (in pic.y) tend to pass a union argument of {int, float, etc.} to various subroutines. Unfortunately, those subroutines are not expecting a union type, but rather a simple type. On VAXen and 68000 C compilers, this presents no problem. On a Pyramid, however, different code is generated to handle passed union and structure arguments. The end result is that garbage arguments are passed to the various functions. People interested in the fixes to PIC should contact me, and I'll try to help out. Lou