WPCV 2BV[Z 3|d2cpi (M)LtTddd,dp@~rQ@HP LaserJet IIIDHPLASIII.PRSdp@~rQ,\,Bj@3|d2} M ZOzZ#(HP LaserJet IIIHPLASIII.PRSx  @,\,BjX@Courier 10cpiPrestige Elite 12cpi (M)Prestige Elite 12cpi Bold (D)Prestige Elite 12cpi Italic (D)Courier 10cpi (Bold)?xxx,wx6X@8;X@LtTddd,wldp@~rQ@uSddd,'dp,`QtTddd,EdphQQH?xxx,ex `B;X3}r"=dsP+sd=wvwQ Y Ȝ<tF[XPQRV3ɚ3}rO=rJFS3}[r>9=;w4QY ȃ w<t wr :4u w Q Y ^ZYXV^2euu{EqWUk  .(#4UUUUUUUUUUUUUJ&5&z(#}|2PkCLlP#test uP 8n'test  yy& yy  &  <}<} }}< < & ?U1@6[#X2PkCLlP# ch123size  TP  ch123sizeU+@9q#X2PkCLlP# str123tok TP  str123tok.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (testdd&dd e e kbk a  W~W  d &A A A A A  A  XXA  D D  D D   D W-Brc#X2PkCLlP# cmp123dddir TP  cmp123dddirW-B H #X2PkCLlP# ver123ddtag TP  ( * ver123ddtagV,A} m #X2PkCLlP# rd123ddfld TP   rd123ddfld.(#4UUUUUUUUUUUUU     J&5at'{)#}|2PkCLlP#test uP (testLL&LLLX4C#X2PkCLlP# cmp123ddlead  TP  1cmp123ddleadS)>?#X2PkCLlP# i123toa TP Phi123toa& vLv ww.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (test@@&@@ $A$ A t!>t!e   = 3!3 @l&gggg ghg 8h8g%g%%%ggT*?h#X2PkCLlP# rd123fld TP rd123fldW-Bxe##X2PkCLlP# ver123drtag TP  ver123drtagW-Bt:#X2PkCLlP# cmp123drdir TP  cmp123drdir.(#4UUUUUUUUUUUUU     J&5at'{)#}|2PkCLlP#test uP (testLL&LLLX4C#X2PkCLlP# cmp123drlead  TP  $1cmp123drleadS)>?#X2PkCLlP# i123toa TP Phi123toa& vLv ww.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& s o"ok faa&#nn#&##nn# o$ YoY$W3B#X2PkCLlP# end123ddrec  TP  Eend123ddrec& O O OO  OW-BB` #X2PkCLlP# get123level TP  4get123level^O^X"X"O^OX"OX"^^OW-B #X2PkCLlP# uld123ddrec TP  4uld123ddrec& zoz.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (test&  zz  Q& '  (  W3BJ/C#X2PkCLlP# end123file  TP   end123file&' ' ' ' W-BF  #X2PkCLlP# get123level TP  B get123level6 6 ( 0( 06 00( 6 ( 6   )  ) U+@ G  #X2PkCLlP# end123rec TP  8 end123rec' '   ' ' V,AF  #X2PkCLlP# chk123size TP  K chk123size"") )) )"))) ") " ^#) ^# /)) /)V,A$N (( #X2PkCLlP# er123ddrec TP  c$ er123ddrec& (  =&=&) .(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& l(l vsv  n#nr l sks cvv vov pw$w %ww&FmF@"@"mFm@"m@"FFmU+@x )#X2PkCLlP# uld123rec TP  "Ruld123rec& n&~$n~$w+w+n~$nw+nw+~$~$nU+@&))#X2PkCLlP# del123dim TP  R&Rdel123dim& (l(&.yy.&..yy. z/ UzU/U1@Y.#X2PkCLlP# end123rec  TP  end123rec&dmd^ ^ mdm^ m^ ddmW-B)#X2PkCLlP# get123level TP  Rget123level o o oo  oW-B*#X2PkCLlP# stc123empty TP  XSstc123emptyHq HA"A"q Hq A"q A"HHq V,A , #X2PkCLlP# free123lab TP  U free123lab q q  q q   q X.C - #X2PkCLlP# del123drvals TP  aV del123drvals.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& o o"ok faa&#nn#&##nn# o$ YoY$V2AcJ#X2PkCLlP# er123ddfld  TP  er123ddfld& K K KK  KW-B:X#X2PkCLlP# get123level TP  :get123levelTKTM"M"KTKM"KM"TTK K !!KW-B #X2PkCLlP# er123ddsfld TP  &er123ddsfld& zoz.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& m o"ok faa&#nn#&##nn# o$ YoY$V2A<R#X2PkCLlP# er123ddrec  TP  er123ddrec& K K KK  KW-B<Z#X2PkCLlP# get123level TP  /get123levelTJTN"N"JTJN"JN"TTJ K !!KV,A #X2PkCLlP# er123ddfld TP  .er123ddfld& ziz.(#4UUUUUUUUUUUUU& qvqJ,5[J'u(#}|2PkCLlP#test uP 'test& l(l { z o"ok&1{{1&11{{1 l|l1 =|=1W3B\#X2PkCLlP# er123ddsfld  TP  jer123ddsfld&fWf_ _ WfW_ W_ ffWW-B#X2PkCLlP# get123level TP  ;get123level W W WW  WV,A8#X2PkCLlP# is123intgr TP  <is123intgrUWUO"O"WUWO"WO"UUWV,A #X2PkCLlP# del123labs TP  ;del123labs$W$y+y+W$Wy+Wy+$$WU+@&)#X2PkCLlP# del123fmt TP  a&;del123fmt& (u(.(#4UUUUUUUUUUUUU     J&5at'{)#}|2PkCLlP#test uP (testLL&LLLU1@pE#X2PkCLlP# get123dim  TP  1get123dimT*??#X2PkCLlP# g123dstr TP hg123dstr& vLv ww.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (testLL&LLL __MV2Ac\#X2PkCLlP# get123dval  TP  1get123dval& vLv    ww  z x[! H!H!&V yV PPyV yPyPV V yV,A 5#X2PkCLlP# g123str TP  ^ g123str{{{{{Y/D E6#X2PkCLlP# g123bstr TP  \_ g123bstry$$yy$y$yV,AD"5#X2PkCLlP# g123dstr TP  ^ g123dstr& J.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& l o"ok faa&#nn#&##nn#U1@w'#X2PkCLlP# get123fmt  TP  get123fmt& I I II  IV,AwU#X2PkCLlP# pop123rs TP  . pop123rs^H^X"X"H^HX"HX"^^HU+@ #X2PkCLlP# push123rs TP  T-push123rs& zgz.(#4UUUUUUUUUUUUUJ&5at'{)#}|2PkCLlP#test uP (test& vLv ww&LL&LLLS/>#X2PkCLlP# g123int  TP =1g123int&     S)>?#X2PkCLlP# g123str TP Ihg123str.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& p6p l(l '}' k k v*(v _q_  & F F FF  FS)>#X2PkCLlP# g123int TP G+g123int'H' " "H'H "H "''HS)> #X2PkCLlP# g123str TP d-g123strl$Gl$f+f+Gl$Gf+Gf+l$l$GV,A%)#X2PkCLlP# is123intgr TP  O&+is123intgrxi xq q i xi q i q xxi T*?J p% #X2PkCLlP# g123fstr TP N g123fstr l l  l l   l V,Ah 3( #X2PkCLlP# cki123nfld TP  Q cki123nfldWi WP"P"i Wi P"i P"WWi U+@ p % #X2PkCLlP# str123tok TP  ?N str123tok$i $++i $i +i +$$i W-B% *% #X2PkCLlP# load123tagp TP  &N load123tagp& }k} ((&#nn#&##nn#V2AIU#X2PkCLlP# ld123ddrec  TP  ld123ddrec&rHrk k HrHk Hk rrH H   HW-Bs #X2PkCLlP# beg123ddrec TP  ,beg123ddrec&    oo  d bE! 2!2!&A A ::A ::A A V,A 2#X2PkCLlP# load123fmt TP  load123fmtW-B3#X2PkCLlP# load123lab TP  F load123lab$$$$W-B/2##X2PkCLlP# ver123ddtag TP  ver123ddtag.(#4UUUUUUUUUUUUUJ&5[J'u(#}|2PkCLlP#test uP 'test& l(l wew (r( [ } Y cvv vov pw$w %ww n#nr& O O OO  OW-B& #X2PkCLlP# g123int TP  w4 g123int^*^tX tX *^*X *X t^t^* u*  u *U+@#X2PkCLlP# beg123rec TP  @beg123rec]]&]]U1@#X2PkCLlP# ld123rec  TP   ld123rec& d d  d d   d S)> ~ #X2PkCLlP# g123str TP H g123strHd HB"B"d Hd B"d B"HHd V,A  #X2PkCLlP# load123fmt TP  +H load123fmtV5VP"P"5V5P"5P"VV5W-B #X2PkCLlP# ver123drtag TP  ver123drtag$*$t+t+*$*+*+t$t$*W-B%7*#X2PkCLlP# ret123match TP  &ret123match& rZr.(#4UUUUUUUUUUUUUCC&CCCJ,5[J'u(#}|2PkCLlP#test uP 'test&rHrk k HrHk Hk rrH ooV,Ar#X2PkCLlP# load123fld TP  (load123fldV,A6#X2PkCLlP# g123fstr TP  , g123fstr& p6p l(l '}' k k v*(v _q_  & F F FF  FV,As##X2PkCLlP# str123tok TP  + str123tok'H' " "H'H "H "''HT*? #X2PkCLlP# g123str TP 7- g123strl$Gl$f+f+Gl$Gf+Gf+l$l$GW-B%)#X2PkCLlP# ret123match TP  %+ret123matchxi xq q i xi q i q xxi  l l  l l   l V,AG %( #X2PkCLlP# get123fmt TP  Q get123fmtWi WP"P"i Wi P"i P"WWi V,A  % #X2PkCLlP# ret123fv TP  N ret123fv$i $++i $i +i +$$i U+@& *% #X2PkCLlP# ret123pdm TP  k&N ret123pdmzzzzzW-B]6#X2PkCLlP# get123dval TP  _ get123dval& }k} ((W3B_ 4@ #X2PkCLlP# ret123dv  TP  i ret123dv uT #dp@~rQwl@#p KFIPS PUB 123 Function Library Software Documentation Section Four: Routine Descriptions p 2 H tT 5/93` `  $hh*06pp<B  HxxN T 4X` hp x (#%'0*,.8135@8:0*$$  uT determine the number of times fread is to be invoked and the number of characters to be retrieved each time.(#`  tT ` ` The temporary character pointer tmpcptr is initialized to the  uT beginning of the buf_str. Function fread is invoked div_result.quot times and then one more time to retrieve the remaining characters as  uT  indicated by div_result.rem. Each time fread retrieves MAXINT  tT7 characters, the temporary character pointer tmpcptr is advanced to the end of the string in order to receive additional characters upon  uT subsequent fread calls.(#`  tT ` ` If the number of characters retrieved does not equal str_len,  uT  g123fstr() returns 'failure'; otherwise, 'success' is returned.(#`  uTm ` ` During processing, g123fstr() returns 'failure' when:(#`  uT ` `  o$C library function fread encounters an error when reading the string or the 'end of file' marker is encountered(#  tTw ` `  oX$The number of characters retrieved does not equal  tT str_len.(# ` ` This routine does not invoke any lower level routines.(#` '?0*$$  uT Aſ uT ` `  $hh*06pp<B  H g123int ąROUTINE: g123int PURPOSE: ` ` To read a character string representing an integer value and convert that string to an integer and return the value.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTa ` ` fp $hh*PTR06Ipp<FILE POINTER  tT) ` ` str_len$hh*INT06I pp<LENGTH OF STRING TO BE READ IN(#p  tT ` ` int_val$hh*INT06Opp<STRING CONVERTED TO INTEGER  tT ` ` g123int()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tTi ` ` g123str()$hh*RETRIEVES A CHARACTER STRING GLOBAL REFERENCES: ` `  ` ` NONE GLOBAL VARIABLES: ` ` NONE GLOBAL CONSTANTS: ` ` NONE PROCESSING:  uTy ` ` Routine g123int() retrieves an integer from the file specified by  uT pointer fp in the form of a character string.  Routine g123str()  tT reads str_len characters from the file. The character string is  uT! then converted to long integer int_val via C library function atol .(#` ,#@0*$$Ԍ uT ` ` During processing, g123int() returns 'failure' when g123str() returns a 'failure'.(#` !I| .(#ddGINT.GEMA<*ȱb#dp@~rQwl@#  uT  The g123int Structure Tree$(#(#(#(#'#$ 0A0*$$ '#$A0  uT Cſ uS ` `  $hh*06pp<B  H g123order ĆROUTINE: g123order PURPOSE: ` ` Return the byte order of the current machine. ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` order $hh*PTR06Opp<BYTE ORDER  tTa ` `  pp<0 - "LITTLE ENDIAN"  tT)  h6pp<LEAST SIGNIFICANT BYTE FIRST(#  tT  06pp<1 - "BIG ENDIAN"  tT  6pp<MOST SIGNIFICANT BYTE FIRST  tT  06pp<2 - "MIDDLE ENDIAN"  tTI ` ` g123order()$hh*LOGICAL 6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES: ` ` NONE GLOBAL REFERENCES: ` ` NONE GLOBAL VARIABLES: ` ` NONE GLOBAL CONSTANTS: ` ` NONE PROCESSING:  uTy ` ` Routine g123order() stores a test long integer value in memory and checks the current machine's byte ordering and returns it to the calling routine.(#` ` ` This routine does not invoke any lower level routine.(#` *#B0*$$  uT Cſ uS ` `  $hh*06pp<B  H g123str ĄROUTINE: g123str PURPOSE: ` ` To read a string into a character buffer.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` fp $hh*PTR06Ipp<FILE POINTER  tTa ` ` buf_str[]$hh*PTR06I/Opp<POINTER TO A BUFFER  tT) ` ` str_len$hh*INT06Ipp<LENGTH OF STRING TO BE READ IN(#p  tT ` ` g123str()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES: ` ` NONE GLOBAL REFERENCES: ` ` NONE GLOBAL VARIABLES: ` ` NONE GLOBAL CONSTANTS:  tTq ` ` NAME $hh*TYPE06DESCRIPTION  tT ` ` FT  $hh*CHAR06FIELD TERMINATOR  tT ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING:  uT ` ` Routine g123str() retrieves a character string one character at a  tT time from the file specified pointer fp. Characters are retrieved  tT until the total number of characters retrieved is str_len, or either an 'end of file' marker or a field terminator is encountered.(#` #C0*$$Ԍ tT ` ` As each character is retrieved it is appended to character string  tT, buf_str, if the character is neither an 'end of file' marker nor a field terminator. If an 'end of file' marker is encountered,  uT  g123str() returns 'failure'. If a field terminator is encountered, the number of characters retrieved is incremented to indicate that the correct number of characters were retrieved. However, if the  uT  number of retrieved characters is not equal to str_len, g123str() returns 'failure'.(#`  uT ` ` During processing, g123str() returns 'failure' when:(#`  tT ` `  o$An 'end of file' marker is encountered(#  tT? ` `  o$The number of characters to be retrieved as specified by  tTk str_len is not obtained.(# ` ` This routine does not invoke any lower level routines.(#` D0*$$  uT ſ uS ` `  $hh*06pp<B  H i123toa ĄROUTINE: i123toa PURPOSE: ` ` To convert an integer into a character string.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` num $hh*INT06Ipp<NUMBER TO BE CONVERTED  tTa ` ` string[]$hh*PTR06Opp<CHARACTER STRING  tT) ` ` i123toa()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES: ` ` NONE GLOBAL REFERENCES: ` ` NONE GLOBAL VARIABLES: ` ` NONE GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT9 ` ` NC $hh*CHAR06NULL CHARACTER(#  tT ` ` RADIX $hh*INT06RADIX FOR NUMBER CONVERSION PROCESSING:  uT ` ` Routine i123toa() converts long integer num to character string  tT string. To preserve the sign of the number to be converted, the  tT number is stored temporarily in sign. If num is negative, its sign is changed to positive. The character string corresponding to the  tTb" number is generated in reverse order by dividing num by 10 and  tT# appending the remainder string repeatedly until num is zero. If the#E0*$$  tT number was initially negative, a minus sign is appended to string. The order of the characters within the string is then reversed and  uTX  i123toa() returns 'success'.(#` ` ` This routine does not invoke any lower level routines.(#` F0*$$  uT  ſ uT ` `  $hh*06pp<B incre123lab ăROUTINE: incre123lab PURPOSE: ` ` To increment the pointer to the next label via recursion.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` next $hh*PTR06Ipp<NEXT ENTRY IN LP STRUCTURE  tTa ` ` first $hh*PTR06Ipp<POINTER TO ENTRY IN SL STRUCTURE THAT IS FIRST LABEL IN ITS LSET(#p  tT ` ` ptr $hh*PTR06I/Opp<POINTER TO CURRENT LABEL IN THE LSET OF THE SL STRUCTURE(#p  tTI ` ` incre123lab()hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tTi ` ` NAME $hh*DESCRIPTION  tT ` ` incre123lab() hh*RECURSIVELY INCREMENTS THE POINTER TO THE NEXT LABEL(#h GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE LABEL SUBFIELD STRUCTURE (SL) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` LABELS POINTER STRUCTURE (LP) GLOBAL VARIABLES:  tTY ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p GLOBAL CONSTANTS: ` ` NONE )#G0*$$ԌPROCESSING:  uTX ` ` Routine incre123lab() increments the current sl structure pointer in  tT the current lp structure to the next label in the sl structure list.  tT The pointer to the sl label is incremented to the next label in the  uT current label set. If the next sl label exists, incre123lab() returns 'success'.(#`  tTb ` ` However, if the next sl label is 'NULL', the pointer is reset to the  tT first label in the sl label set and the sl structure pointer in the  tT next lp structure is processed:(#`  uT ` ` X oX$If this lp structure exists, incre123lab() is invoked to  tT? increment the sl structure pointer to the first label in the next label set. The following arguments are used:  tT the pointer to the next lp structure in the list; the  tT pointer to the first label of the sl structure; the structure in the corresponding next label set; and the address of the pointer to the current label in the corresponding next label set(#  tT ` ` X oX$If this lp structure does not exist, the end of the list  tT has been reached. The current pointer in each lp structure in the list is reset to point to the first  tT# label in the corresponding sl label set.(#  uT{ ` ` During processing, incre123lab() may fail due to a corrupted pointer structure.(#` ` `  ` ` This routine does not invoke any lower level routines.(#` "H0*$$  uT  8ſ uS ` `  $hh*06pp<B  H is123intgr ćROUTINE: is123intgr PURPOSE: ` ` To determine if a string is an integer.(#` ARGUMENT LIST:  tT  ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` string[]$hh*PTR06Ipp<CHARACTER STRING  tTa ` ` is123intgr()hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES: ` ` NONE GLOBAL REFERENCES: ` ` NONE GLOBAL VARIABLES: ` ` NONE GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tTq ԓ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING:  uT ` ` Routine is123intgr() determines whether the input string is a character string of numeric digits or alphabetic characters. If  uTB string is empty, is123intgr() returns 'failure'. If string is not  tTo empty, the C library function sscanf is invoked to read the string  tT! as long integer num. If num is less than or equal to zero and  uT" string includes one or more nonnumeric characters, is123intgr() "I0*$$  tT returns 'failure'. Otherwise, string consists of only numeric  uT, digits and is123intgr() returns 'success'.(#` ` ` This routine does not invoke any lower level routines.(#` J0*$$  uT   8ſ uS ` `  $hh*06pp<B  H ld123ddrec ćROUTINE: ld123ddrec PURPOSE: ` ` To read the DDR and load the information into the data structures for reference.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTa ` ` ld123ddrec()hh*LOGICAL6O pp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tT ` ` beg123ddrec() hh*DEALLOCATES PREVIOUSLY STORED DDR(#h ` `  $hh*INFORMATION  tT ` ` cki123nfld() hh*CHECKS STRING FOR NULL FIELDS AND(#h ` `  $hh*SEPARATES DELIMITERS  tT1 ` ` g123fstr()` $Xhh*READS IN A FULL STRING(#h  tT ` ` g123int()` $Xhh*READS IN AN INTEGER(#h  tT ` ` g123str()$hh*READS IN A STRING  tT ` ` is123intgr() hh*DETERMINES IF A CHARACTER STRING IS AN(#h ` `  $hh*INTEGER  tT ` ` load123fmt() hh*LOADS FORMAT CONTROLS STRING INTO A (#h ` `  $hh*BINARY TREE STRUCTURE  tT ` ` load123lab() hh*LOADS DESCRIPTIVE LABELS INTO A STRUCTURE(#h  tTq ` ` load123tagp() hh*LOADS TAG PAIR LIST INTO A STRUCTURE(#h  tT9 ` ` str123tok()` $Xhh*RETURNS A POINTER TO A STRING TOKEN(#h  tT ` ` ver123ddtag() hh*VERIFIES THE ORDER OF DATA DESCRIPTIVE TAGS(#h GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE FILE CONTROL RECORD STRUCTURE (CR) ` ` DATA DESCRIPTIVE LEADER STRUCTURE (DL)(#` ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD)(#` ` ` FILE MANAGEMENT STRUCTURE (FM)(#` ` `  )#K0*$$ԌGLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT  ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE(#p ` `  $hh*06pp<MANAGEMENT STRUCTURE ENTRY GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT ` ` DEL_STR[3]$hh*CHAR06DELIMITER STRING(#  tT` ` ` FCDSTYPE$hh*INT0X6RELATIVE POSITION OF THE DATA TSTRUCTURE TYPE WITHIN THE FIELD CONTROL(#  tT ` ` LEAD_LEN$hh*INT06LENGTH OF LEADER  tT ` ` LVL23FCL$hh*INT0X6FIELD CONTROL LENGTH FOR FILE TINTERCHANGE LEVELS 2 AND 3(#  tT ` ` NC $hh*CHAR0h6NULL CHARACTER(#  tT ` ` SEP_STR[2]$hh*CHAR0X6CHARACTER STRING CONTAINING SEPARATOR FOR ADJACENT DELIMITERS(# PROCESSING:  uTP ` ` Routine ld123ddrec() reads the DDR from the file specified by  tT} pointer fp and loads the data into the appropriate structures.  uT Routine beg123ddrec() is invoked to clear out any previously  uT allocated DDR structures. Routine ld123ddrec() allocates and initializes the new DDR structures. Each field of the data  tT/ descriptive header is read in from the file pointed to by fp and stored in the header structure dr_hd.(#` ` ` The routine then reads and stores the DDR directory entries. A new  tT data descriptive structure dd is allocated for each entry and linked to the previous entry. A header is allocated for the first entry in the structure's linked list. As the directory is read, the field  tTc" tag, length, and position are stored in the current dd structure.(#` #L0*$$Ԍ uT ` ` After the header and directory are processed, ld123ddrec() begins processing the descriptive area. The directory entries represent a one to one correspondence to descriptive area fields. Routine  uT  ld123ddrec() reads in a field entry for each of the directory entries processed earlier.(#` ` ` The process used to read each field in the data descriptive area reflects the transfer standard. As the directory list is traversed, the routine examines the tag value. A tag value of zero represents  tT a file control field. Structure cr is allocated to store the contents of the control field. The new structure pointer is stored  tT in the fm structure. If the interchange level is 2 or 3, the file control field may contain field controls and a list of ordered tag pairs. Adjacent delimiters which separate the controls and tag  uTj pairs signal null values. Routine ld123ddrec() calls routine  uT  chki123nfld() to separate adjacent delimiters in the file control  uT field. Routine str123tok() is then called to retrieve the subfields  tT of the file control field. Each subfield is stored in the cr  uT structure. Routine load123tagp() is called to load the list of tag  tTJ pairs into the tl structure.(#` ` ` An integer tag of 0..2 represents the optional user augmented file  tT description, which has no corresponding data field in the dr. The  tT optional user file is read in the cr structure. All other tags not within the reserved 0...0 to 0...9 are processed as user data entry.(#`  uT~ ` ` If the tag value represents a user data entry, ld123ddrec() checks the interchange level. If the interchange level is 1, the elementary character data field is read into the name field of the  tT" dd structure. For level 2 and 3 files, the field control is read in next. The value of the field controls specifies the method for/#M0*$$ reading in user data fields. If the field control indicates elementary data, then the size of buffer space needed for name and format controls is computed. If the buffer length is greater than 1, the size of buffer space need for name and format control is computed. The field is then read into the buffer space. Routine  uT  cki123nfld() is called to separate adjacent delimiters. Routine  uT   str123tok() is called to divide the buffer into two strings, one containing the name field and the other containing the format controls.(#` ` ` The string buffer containing the name field is copied into the name  uT field of the dd structure. Routine load123fmt() is called with the format string as an input parameter. This routine decodes the  tT? format string and places the formats in a tree structure fc. The root pointer to this structure is then initialized. If the field control indicates vector or Cartesian data, the size of the buffer space need to hold the field is computed. Space is then allocated to the buffer and the entire field is read into the buffer. Routine  uT  cki123nfld() is called to separate adjacent delimiters.(#`  uTt ` ` Routine str123tok() is called to divide the buffer string into token strings with the first string containing the name, the second string containing the labels, and the third string containing the format controls. New space is allocated for name values which are copied  uT% to the name field of structure dd. Routine load123lab() is called if the buffer string containing the labels string is not 'NULL'.  tT~ This routine loads labels into the sl data structure. Routine  uT  load123fmt() is called if the formats string is not 'NULL' to decode  tT the format string and place the formats in the tree structure fc. The root pointer is then initialized. The process continues until"N0*$$ the corresponding descriptive field of the last entry of the directory has been read.(#`  uT ` ` Routine ver123ddtag() is invoked to validate the order of data descriptive tags.(#`  uT  ` ` During processing, routine ld123ddrec() returns an error when:(#`  tTb ` ` X oX$An invoked routine or C library function fails(#  tT ` `  o` $Trying to read past EOF.(#  O0*$$ D|K.(#ddLD_DDREC.GEMPD*f#dp@~rQwl@#  uT , The ld123ddrec Structure Tree $(#(#(#(#'#$0P0*$$'#&"P0  uT ſ uS ` `  $hh*06pp<B  H ld123rec ąROUTINE: ld123rec PURPOSE: ` ` To read the DR loading the information in the data structures for reference.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTa ` ` ld123rec()$hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES:  tT ` ` NAME $hh*DESCRIPTION  tT ` ` beg123rec()` $Xhh*INSERTS HEADER STRUCTURE FOR DDR DATA STRUCTURE AND INITIALIZES HEAD POINTERS(#h  tT ` ` g123int()` $Xhh*FUNCTION TO READ IN A INTEGER(#h  tTi ` ` g123str()` $Xhh*FUNCTION TO READ IN A STRING(#h  tT1 ` ` load123fld()hh*LOADS DR FIELD FROM FILE INTO DATA STRUCTURES(#`  tT ` ` ret123match() hh*FUNCTION RETURNS ASSOCIATED DATA DESCRIPTIVE RECORD STRUCTURE OF DR(#h  tT ` ` ver123drtag()hh*VERIFIES ORDER OF DATA RECORD TAGS(#` GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE LEADER STRUCTURE (DL) ` ` DATA RECORD LEADER STRUCTURE (RL) ` ` DATA RECORD STRUCTURE (DR) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` RECORD POINTER STRUCTURE (RP) GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTy ` ` cur_fm$hh*PTR06Ipp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p )#Q0*$$ԌGLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT  ` ` LEAD_LEN$hh*INT06DATA RECORDS LEADER LENGTH  tT ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING:   uT ` ` Routine ld123rec() is called to clear any previously stored data record and to initialize structures for a new data record. The current file pointer position is stored for read file in structure  tTI rp. If the no leader directory flag (nld) has not been set, the DR  tTu leader is read and stored in structure rl. The nld flag is set to true for a leader identifier value of 'R'.(#` ` ` The directory size is computed using the base address of the data  uT% area and the size of the DR leader. Routine ld123rec() then reads each entry in the directory. An entry contains the tag string, the field length, and the field position, and is stored in an allocated DR structure.(#`  uT ` ` Routine ver123drtag() is invoked to validate the order of the DR tags. If the record length read is zero (0), the actual record length is computed by adding the last DR field position, the length of the field, and the base address of the DR.(#` ` ` Each entry in the directory has a corresponding DR field. These fields are loaded next. Beginning with the first entry in the  uT7! directory ld123rec() invokes ret123match() to locate the associated data descriptions (field control, label, and format). Routine  uT#  load123fld() uses the labels and format subfields of the descriptive#R0*$$  tT field cur_dd to control the loading of data into appropriate data  uT, structures. Routines ret123match() and load123fld() are repeatedly invoked for each directory entry until all entries are processed.(#`  uT ` ` Routine load123fld() is invoked with the compression flag set to true, because:(#`  uT6 ` ` X oX$Routine ld123rec() retrieves data from the data descriptive file which conforms to the FIPS PUB 123 format, and (# ` ` (#`  tT ` ` X oX$Within the FIPS PUB 123 format, adjacent sufields of fixedlength binary fields are not padded with binary zeros.(#  uT ` ` During processing, ld123rec() returns an error when:(#`  tT ` ` X oX$An invoked routine or C library function fails(#  tT ` `  o` $Trying to read past EOF. (# HS0*$$ !!I|K.(#ddLD_REC.GEMT<*d#dp@~rQwl@#  uT  The ld123rec Structure Tree $(#(#(#(#!'#$ 0LT0*$$'#+"!T0  uT  3'3'Standard3'3'StandardrJet IIID1ؘ?(U   uS ` `  $hh*06pp<B  H load123fld ćROUTINE:` `  load123fld (#`  PURPOSE: ` ` To read the DR field from the indicated file and load the data into the data structures for reference.(#` ARGUMENT LIST:  tTm ` ` NAME $hh*TYPE06USEpp<DESCRIPTION(#p   tT ` ` fpX X$Xhh*PTRX0X6IXpp<FILE POINTER (#p  tT ` ` comprssd$Xhh*LOGICAL6IXpp<INDICATOR OF COMPRESSED ADJACENT FIXED-LENGTH BINARY SUBFIELDS(#p  tT ` ` load123fld()hh*LOGICAL6OXpp<SUCCESS FLAG(#p EXTERNAL FUNCTION REFERENCES:  tT= ` ` NAMEX X$Xhh*DESCRIPTION(#h   tT ` ` g123dstr()$Xhh*READS A STRING INTO A CHARACTER BUFFER BASED ON DELIMITER(#h  tT] ` ` g123fstr()$Xhh*FUNCTION TO READ IN A STRING (#h  tT% ` ` get123dim()$Xhh*INPUT AND STORE DIMENSION INFORMATION(#h  tT ` ` get123dval()hh*READS IN A DATA VALUE STRING BASED ON FORMAT CONTROL(#h  tT} ` ` get123fmt()$Xhh*RETRIEVES A SINGLE FORMAT FROM FORMAT STRUCTURE(#h  tTE ` ` ret123dv()$Xhh*RETURNS POINTER TO STRUCTURES CONTAINING ALL DATA VALUES { DELIMITED }(#h  tT ` ` ret123fv()$Xhh*RETURNS POINTER TO STRUCTURES CONTAINING ALL DATA VALUES { FORMATED }(#h  tTe ` ` ret123pdm()$Xhh*RETURNS PRIMARY DIMENSION SIZE(#h  tT- ` ` str123tok()$Xhh*RETURNS A POINTER TO A STRING TOKEN(#h GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD)(#` ` ` DATA RECORD STRUCTURE (DR)(#` ` ` DATA RECORD VALUE SUBFIELD STRUCTURE (DV)(#` ` ` FILE MANAGEMENT STRUCTURE (FM)(#` #U0*$$ԌGLOBAL VARIABLES:  tT ` ` NAMEX X$Xhh*TYPEX06USEpp<DESCRIPTION(#p   tT  ` ` cur_fm$Xhh*PTRX06Ipp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p  tT ` ` glb_str[MAXSIZ]hh*CHARX06I/Opp<GLOBAL CHARACTER STRING USED FOR PROCESSING(#p GLOBAL CONSTANTS:  tT ` ` NAMEX X$Xhh*TYPEX0X6DESCRIPTION(#   tT( ` ` DEL_STR[3]$hh*CHAR0X6CHARACTER STRING CONTAINING THE FIELD AND UNIT TERMINATORS(#  tT ` ` FCDSTYPE$Xhh*INTX0X6RELATIVE POSITION OF THE DATA STRUCTURE TYPE WITHIN THE FIELD CONTROL(#  tT ` ` FTX X$Xhh*CHARX0X6FIELD TERMINATOR (RS) 1/14(#  tT ` ` MAXSIZ$Xhh*INTX0X6MAXIMUM AMOUNT OF CONTIGUOUS MEMORY SPACE(#  tTh ` ` NCX X$Xhh*CHARX0X6NULL CHARACTER(# PROCESSING:  uT ` ` Routine load123fld() reads DR fields from a file and stores the data in data structures. A file pointer and a compression flag are  uTq passed to load123fld() by the calling routine. The compression flag indicates whether adjacent binary data fields are stored in the file in compressed or uncompressed format. (#` ` ` The routine processes the data field based on the existence of labels and formats described within the DDR.(#` ` ` The first case is when labels and formats are absent from the descriptive field. The second case is when the formats are present and the labels are not. The third case is when labels are present!V0*$$ and formats are not. The fourth case is when both labels and formats are present. (#`  uT ` ` Within each case, function ld123fld() determines the type of data element(s) that will be read. The presence of the descriptive field control subfield specifies the type of data elements. An empty field control string means that the data field is defined as an elementary data element. Otherwise, the field is a compound data element. Compound data elements may be elementary, vector, or array fields. The following provides a description of each case:(#`  tT ` ` X oX$Case one (neither labels nor formats exist)if field controls are not present, indicating an elementary field, a dummy data value header is allocated to initialize the values pointer of the current DR field structure (DR). Another data value structure is  uT allocated and routine g123fstr() reads the elementary field from the file. The retrieved DR field is stored  tT in the new dv structure and appended to the list following the dummy. If the field control string is not null, its value is evaluated next. If the field control defines the field to be vector or elementary, a buffer  uT is allocated and g123fstr() is called to read the field  uT into this buffer. Routine str123tok() is invoked to separate delimited data values. The separated values are stored in new data value structures and linked to previously read values. The buffer space is then released. If the value defines the field to be array  uT data, get123dim() is invoked to input and store  uT" dimension information. Routines g123dstr() and"W0*$$  uT  ret123dv() are called to read and store the data values in the DR structures(#  tT ` ` X oX$Case two (no labels but formats exist)if the field control value indicates vector or elementary data,  uT  ld123fld() allocates a dummy header. Header structures are inserted for data value lists with the values pointer of the DR structure set to that header.  uTb Routines get123fmt() and get123dval() are called to retrieve the format of the data value and to read the data value string, respectively. These routines are iterated until the end of field terminator has been read. If the field control indicates array data,  uT? routine get123dim() retrieves the field array dimensions  uTl from the file. Routine ret123fv() then retrieves formatted data values and returns a pointer to the structure storing these values. The pointer is assigned to the values subfield of the current data record field structure(#  uTu ` ` X oX$Case three (labels exist but no formats) ret123pdm() is called to compute and return the primary dimension based  uT on the labels subfield structure. Routine g123dstr() is called to read in the field to a buffer. Routine  uT'  ret123dv() is called to extract the data values from the buffer and store them in data value structures.(#  uT ` ` X oX$Case four (both labels and formats exist) ret123pdm() is called calculate the primary dimension of the DR  uT" field. Routine ret123fv() is called to retrieve"X0*$$ formatted data values and returns a pointer to the structures storing the values.(#  uT ` ` During processing, load123fld() returns an error when:(#`  tT ` ` X oX$An invoked routine or C library function fails(#  tT5 ` ` X oX$The field length exceeds the maximum amount of contiguous memory space (MAXSIZ)(#  tT ` `  o` $Trying to read past EOF. (#  Y0*$$ A!I|.(#ddLD_FLD.GEMZ<* c#dp@~rQwl@#  uT  The ld123fld Structure Tree$(#(#(#(#A'#$0Z0*$$'#c!AZ0  uT   uS ` `  $hh*06pp<B  H load123fmt ćE uS ` `  $hh*06pp<B  H load123fmt ćROUTINE: load123fmt PURPOSE: ` ` To create a binary tree structure containing format controls that will be used in reading and writing DRs.(#` ARGUMENT LIST:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tTa ` ` ch_ptr$hh*PTR06Ipp<FORMAT CONTROL STRING  tT) ` ` load123fmt()hh*LOGICAL6Opp<SUCCESS FLAG EXTERNAL FUNCTION REFERENCES: ` ` NONE GLOBAL REFERENCES: ` ` DATA DESCRIPTIVE RECORD STRUCTURE (DD) ` ` FILE MANAGEMENT STRUCTURE (FM) ` ` FORMAT CONTROLS STRUCTURE (FC)(#` GLOBAL VARIABLES:  tT ` ` NAME $hh*TYPE06USEpp<DESCRIPTION  tT ` ` cur_fm$hh*PTR06I/Opp<CURRENT POINTER TO FILE MANAGEMENT STRUCTURE ENTRY(#p GLOBAL CONSTANTS:  tT ` ` NAME $hh*TYPE06DESCRIPTION  tT! ` ` BLNK_SP$hh*CHAR06BLANK SPACE CHARACTER  tT ` ` NC $hh*CHAR06NULL CHARACTER PROCESSING:  uT! ` ` Routine load123fmt() is implemented using the concept of a state  uT" machine. The control flow of load123fmt() is determined by the"[0*$$ current state of processing the format control file. A format control list is made up of control elements where an element is defined as a single format control or a list of format controls. The processing of this routine is based on the control variable  tT state:(#`  tT ` `  VALUE$hh*NAME06DESCRIPTION  tT` ` `  0$hh*alpha0 6Implies returning from a state that has just processed an alphabetic character(#  tT ` `  1$hh*wod0h6Implies processing controls involving field widths or delimiters(#  tT< ` `  2$hh*slevelh6Implies processing format controls on the same level of nesting. This state is invoked when a comma has been encountered and processed in the previous state. A comma suggests another element in a list where an element may be another list(#  tTp ` `  3$hh*repetitionh6Implies processing format controls that represent repetitive data of that control type(#  tT ` `  4$hh*lp_nxtlh6Implies processing format controls on the next level of nesting. This state is invoked when repetition has been encountered and a left parenthesis was just processed by the previous state.(# !\0*$$Ԍ` ` A format control list is made up of control elements each comprising either a single format control or a list of format controls.(#` ` ` A binary tree structure is created with format controls structures. The tree is constructed for a preorder type traversal. The tree is also logically skewed to the right; modeling a list. Each left child can be considered as being either a single format control value or a list of format controls. A right child contains the next element in the current list. The tree is traversed by visiting a structure and traversing left until a structure is encountered whose repetition number is zero. A backup and a left is made and the repetition number field of this structure specifies the number of lefts to make. When the specified number of lefts is exhausted, a right direction is made to resume retrieval of the elements in the list.(#`  uT ` ` Routine load123fmt() begins processing by stripping leading blanks from the input format string. A new format control structure is allocated and assigned to the root pointer. The current state is then initialized to repetition. The input character string is parsed one character at a time. The control flow of the routine is determined by the state. After retrieving the next character in the  tT string, the variable state is examined. The processing which occurs as the result this state is described below:(#`  tTM ` `  oX$alpha (0)There are three possible values for the  tTy current character ch when the state has the value of alpha. The first value is a comma. Routine  uT  load123fmt() looks at the current position within the format tree structure. If the current structure is a format structure and does not have a right child, the*#]0*$$ current pointer is assigned to its parent structure.  tT, The second possible value of ch is a left parenthesis. In this case, the current state variable is assigned to  tT the wod state. The third possible value of ch is a  tT right parenthesis. In this case, the routine returns to the current processing level within the format control tree. This allows the software to back out of nested parentheses within the input format control string. The routine backs up until the current structure's back  tT pointer is 'NULL' or until the same level flag sl_found is set to 'true'. The flag is set to 'true' when the current structure does not have a right child and its left child's repetition number is not zero(#  tTh ` `  o` $wod (1)If the value of the current character ch is a numeric digit, it is converted to an integer and added  tT to the current width variable. A nonnumeric character other than a right parenthesis is assigned to the user  tT delimiter variables u_delim. If ch is a right parenthesis and the parent structure of the current format control structure, the current format structure is set to its back field. The state is then set to alpha(#  tTL ` `  o` $slevel (2)ch is examined to determine whether it is an  tTx alphabetic character, numeric, or a comma. If ch is  tT found to be alphabetic, the data type variable d_type is  tT set to ch; the repetition number is set to zero; and  tT! state is set to 'alpha'. If ch is numeric, the digit is converted to an integer value and added to the(#^0*$$ repetition number of the current structure times ten;  tT, state is set to repetition. If ch is a comma, the  tTX repetition number of the structure is set to 1 and state  tT is set to 'slevel'(#  tT ` `  oX$repetition (3)ch is examined to determine whether it is an alphabetic character, numeric, or a left  tT4 parenthesis. If ch is numeric it is converted to an integer value and added to the repetition number of the  tT current structure times ten. If ch is alphabetic, a new format control structure is allocated; the date type  tT field is assigned to ch and the other field of the new structure are initialized; the new structure is inserted into the tree as the left child of the current  tTh structure; and state is set to alpha. If ch is a left parenthesis, a new format control structure is allocated  tT and initialized; the data type field is set to ch; the new structure is inserted into the tree as the left  tT child of the current structure; and state is set to  tTD lp_nxtl (#  tT ` `  o` $lp_nxtl (4)ch should be either an alphabetic character, numeric, or a left parenthesis in this state.  tT If ch is alphabetic, the repetition number of the current format structure is set to one; a new format structure is allocated, initialized, and inserted as the left child of the current structure in the format tree; the data type variable of the new structure is assigned  tT ch; and state is set to 'alpha'. If ch is numeric, it is converted to an integer value and added to the repetition number of the current structure times ten;(#_0*$$  tT and state is then set to 'repetition'. If ch is a left parenthesis, the repetition number of the current format is set to one and a new format structure is allocated, initialized, and inserted as the left child of the current structure in the format tree. The variable  tT state, however, is unchanged.(# ` ` The parsing continues until the last character of the input string has been processed.(#`  uT ` ` During processing, load123fmt() returns an error when:(#`  tT ` ` X oX$The first nonblank position of the format control string is not a left parenthesis or the last character in the string is not a right parenthesis(#  tT ` ` X oX$An invoked routine or C library function fails. (# ` ` This routine does not invoke any lower level routines.(#`