[Info-vax] SHOW DEVICE/SEMI_FULL

VAXman- at SendSpamHere.ORG VAXman- at SendSpamHere.ORG
Mon Aug 2 18:10:39 EDT 2010


In article <rux0OqBvbwp+ at cuebid.usa.hp.com>, brooks at cuebid.usa.hp.nospam (Rob Brooks) writes:
>VAXman- @SendSpamHere.ORG writes: 
>> 
>> I wouldn't use the SHOW SHADOW with all its C kludginess/horkiness either
>> until it's fixed.
>
>Actually SET/SHOW SHADOW is written in both BLISS and C.  For those with
>access to the listings, check [SHADOWING]SETSHOSHADOW.LIS for the BLISS stuff.
>
>For the problems with sprintf and embedded CR LF, I'll plead guilty. 
>
>In my defence, I had been in the process of replacing as much c-specific stuff
>with more appropriate VMSisms (in this case, using $FAO), but that work never
>got completed. Again for those with the listings, check out
>[shadowing]setshoshadow_serversubs.lis -- my comment added on 09-Jan-2004 was
>"Replace all uses of sprintf with call to $fao."  Unfortunately, I never got
>around to fixing setshoshadow2.c :-(. 
>
>Again, sorry for the annoying output.
>
>The C stuff in shadowing was added coincident with the Host-Based Minimerge
>project. Despite Brian's views, the use of C was favoured as the language of
>choice by the more senior (and well-known) members of VMS Engineering, one of
>whom literally wrote the book on C and Alpha device drivers, and another of 
>whose name can be found on listings for VAX/VMS V1.0.

Yeah Rob, I read the listings. ;)


SHOW$WRITE_LINE in module CLIUTL expects an FAO control string.  The sprintf()
was fine but unstead of:

  sprintf(output_str,"%s%d%s","\n  HBMM Policy for device _DSA",vu_unit,":");

It should have been:

  sprintf(output_str,"%s%d%s","!/  HBMM Policy for device _DSA",vu_unit,":");

However, since the SHOW$WRITE_LINE accepts a parameter list, SHOW$WRITE_LINE
could have been called with:

"!/  HBMM Policy for device _DSA!%SL:" and passing to to SHOW$WRITE_LINE an
FAOL list with the device number.

Someone could likely and EASILY fix this mess with replacement of "\n" with
"!/".


...and whether C was favored as the language of choice or not, poor coding
is poor coding in any language.  There was an establish output routine and
convention for it was ignored.

-- 
VAXman- A Bored Certified VMS Kernel Mode Hacker    VAXman(at)TMESIS(dot)ORG

All your spirit rack abuses, come to haunt you back by day.
All your Byzantine excuses, given time, given you away.



More information about the Info-vax mailing list