home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oxcc1433.zip / DOC / CFAR.TXT < prev    next >
Text File  |  1995-11-01  |  6KB  |  125 lines

  1. CFAR.TXT Version 2
  2.  
  3. A .cff archive is maintained with `cfar' which works in a similar manner
  4. to ar. The notable difference about .cff archives is their ability to hold
  5. multiple libraries and multiply defined symbols. The user can store up to
  6. 4096 libraries for each of 16 library types. A library contains .o files
  7. in a.out or coff format. Symbols may not be multiply defined within one library.
  8. Since .cff filesystems have database characteristics, the entries are
  9. automatically cross indexed in various ways and provide very fast access
  10. to a particular module or symbol. Nothing precludes the user from combining
  11. archival and other data within the same .cff file. .o files are stored
  12. as data chunks within libraries, they have a sibling .x chunk which is a packet
  13. of globally defined symbols in the .o chunk and a sibling .t chunk which
  14. contains the external filetime and origin path. Chunks have very low overhead,
  15. they are allocated in 32 byte increments.
  16.  
  17. Ordinary files may be entered into the archive by using the -F switch. These
  18. files can be stored as normal files or as chunks. Chunks are fixed size and
  19. thus cannot be written past the stored EOF. The archiver records the source
  20. path for each ordinary file so that the -M switch can print commands which
  21. would recreate the archive. Files entered with the -F switch are known as
  22. FILEMODE files.
  23.  
  24. The executable code for `cfar.o' is normally stored in oxlib.cff.
  25.  
  26. Read CFF.TXT to learn more about .cff filesystems.
  27.  
  28. Standard (reserved) symbols in the root directory of a .cff archive.
  29.  
  30.     ArVeR       version number of archive
  31.     SN0         a serial number supplier
  32.     SN1         ditto
  33.     SN2         ditto
  34.  
  35. Standard (reserved) subdirectories within .cff archives:
  36.  
  37.     `/msyms'     cross indexed symbols
  38.     `/ipaths'    cross indexed paths to .o files in libraries
  39.     `/qipaths'   quick access path info
  40.     `/origins'   paths to outside origns of the archived .o files
  41.     `/qorigins'  quick access origin info
  42.     `/fipaths'   internal paths to FILEMODE files    
  43.     `/ltype0'    library types 0
  44.         `/ltype0/lib0'      library 0 type 0
  45.         `/ltype0/lib1'      library 1 type 0
  46.         ...
  47.         `/ltype0/lib4095'   library 4095 type 0
  48.     ...
  49.     `/ltype15'   library types 15
  50.         `/ltype15/lib0'      library 0 type 15
  51.          ...
  52.         `/ltype15/lib4095'   library 4095 type 15
  53.   
  54. Currently, the following library types are in use:
  55.  Type
  56.   0    random collections of modules such as libc.a libm.a etc.
  57.   1    class libraries    (a single class occupies a single .o file)
  58.   2    subsystem libraries (a single subsystem occupies a single .o file)
  59.   3-7  to be defined
  60.   4    source code for the random modules
  61.   5    source code for classes
  62.   6    source code for subsystems
  63.   7-15 to be defined
  64.  
  65.  
  66. Usage: cfar [-acdflmrstvxCFMNS] cfpath [file...]
  67.     Switch -- Meaning
  68.     a         Add file, do not overwrite
  69.     c         Check input files against library for clashes
  70.     d         Delete file
  71.     f         Freshen the archive (replace outdated files)
  72.     l#        Place file in libnum #, min:0 max:4095
  73.     m         Print archive map to stdout
  74.     r         Replace/Add file
  75.     s         `file' is a symbol name not a file name (for extract/delete)
  76.     t#        Set libtype # 0=module, 1=class, 2=subsystem, max:15
  77.     v         Verbose
  78.     x         Extract file
  79.     M         Print to stdout, commands which would recreate the archive
  80.     S         Shrink archive (eliminate unused space)
  81.     F         FILEMODE, symbols not saved or checked
  82.     C         If FILEMODE, put file in a chunk
  83.     N         If FILEMODE, give input file a new name (last part of cfpath)
  84.  
  85. Examples:
  86.  
  87.     cfar -rt1l6 oxlib.cff *.o      // enter a bunch of .o files into
  88.                                    // library 6 type 1 (classes)
  89.  
  90.     cfar -dl2S oxlib.cff func.o    // delete func.o from library 2
  91.                                    // type 0 and shrink the archive
  92.     
  93.     cfar -mv oxlib.cff > oxlib.map // print a verbose map of the contents
  94.                                    // oxlib.cff and store it in oxlib.map
  95.  
  96.     cfar -xt2l5s oxlib.cff _main   // extract the module in library 5
  97.                                    // type 2 which defines the symbol
  98.                                    // _main
  99.  
  100.     cfar -al4 oxlib.cff libc.a     // add libc.a to library 4 type 0
  101.  
  102.     cfar -cl4 oxlib.cff libc.a     // check libc.a against the contents
  103.                                    // of library 4 type 0 and print any 
  104.                                    // symbol clashes
  105.  
  106.     cfar -rv oxlib.cff libm.a      // add/replace the contents of libm.a
  107.                                    // to library 0 type 0, verbosely
  108.  
  109.     cfar -FCa oxlib.cff/lang c.grm // add the ordinary file c.grm to the
  110.                                    // subdirectory /lang and store it as a
  111.                                    // chunk (the subdir will be created if
  112.                                    // it does not exist)
  113.  
  114.     cfar -FNa oxlib.cff/new.c xx.c // add the ordinary file xx.c to the root
  115.                                    // directory and give it a new name, new.c
  116.  
  117.     cfar -Fd oxlib.cff/lang/c.grm  // delete the ordinary file /lang/c.grm
  118.  
  119.     cfar -Fx oxlib.cff/new.c       // extract the ordinary file /new.c
  120.  
  121.     cfar -f oxlib.cff              // freshen all the entries
  122.     
  123.     cfar -M oxlib.cff > oxlib.bat  // print a .bat file which would 
  124.                                    // recreate the archive
  125.