[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

242.0. "Sorted MCC_VEA_DEF.H" by COOKIE::KITTELL (Richard - Architected Info Mgmt) Wed Aug 08 1990 16:25

The procedure below reduces SYS$LIBRARY:MCC_VEA_DEF.H into a readable list
of known verb and attribute codes. 

----------------------------- Cut Here --------------------------------
$! This procedure extracts the #define statements from MCC_VEA_DEF.H
$!  and sorts the result.
$
$! Open the input and output files
$ OPEN/READ HFILE SYS$LIBRARY:MCC_VEA_DEF.H
$ OPEN/WRITE SFILE MCC_VEA_DEF.H
$ LONGEST = 0
$
$READ_LOOP:
$! For each line...
$ READ/END=EOF/ERR=EOF HFILE HLINE
$
$! Pitch it if too short
$ IF F$LENGTH (HLINE) .LT 8 THEN GOTO READ_LOOP
$
$! Pitch it if it isn't a define statement
$ IF F$EXTRACT(0, 8, HLINE) .NES. "#define " THEN GOTO READ_LOOP
$
$! Find where the comment, if any, starts
$ COMMENT_COL = F$LOCATE ("/*", HLINE)
$
$! Keep track of the longest line
$ IF COMMENT_COL .GT. LONGEST THEN LONGEST = COMMENT_COL
$
$! Write the line up to the comment
$ WRITE SFILE F$EXTRACT(0, COMMENT_COL, HLINE)
$ GOTO READ_LOOP
$
$EOF:
$! Close the files
$ CLOSE HFILE
$ CLOSE SFILE
$
$! Sort the output file, creating new version of same
$ LONGEST = LONGEST - 9
$ SORT/KEY=(POS:9,SIZE:'LONGEST')/STATISTICS MCC_VEA_DEF.H MCC_VEA_DEF.H
$
$! Purge the output file
$ PUR MCC_VEA_DEF.H
$ EXIT
T.RTitleUserPersonal
Name
DateLines