1c109e398Sbeckobjects.txt syntax 2c109e398Sbeck------------------ 3c109e398Sbeck 4*b767bb2dStbTo cover all the naming hacks that were previously in objects.h, we needed some 5c109e398Sbeckkind of hacks in objects.txt. 6c109e398Sbeck 7c109e398SbeckThe basic syntax for adding an object is as follows: 8c109e398Sbeck 9c109e398Sbeck 1 2 3 4 : shortName : Long Name 10c109e398Sbeck 11c109e398Sbeck If the long name doesn't contain spaces, or no short name 12c109e398Sbeck exists, the long name is used as basis for the base name 13c109e398Sbeck in C. Otherwise, the short name is used. 14c109e398Sbeck 15c109e398Sbeck The base name (let's call it 'base') will then be used to 16c109e398Sbeck create the C macros SN_base, LN_base, NID_base and OBJ_base. 17c109e398Sbeck 18c109e398Sbeck Note that if the base name contains spaces, dashes or periods, 19*b767bb2dStb those will be converted to underscore. 20c109e398Sbeck 21c109e398SbeckThen there are some extra commands: 22c109e398Sbeck 23c109e398Sbeck !Alias foo 1 2 3 4 24c109e398Sbeck 25*b767bb2dStb This just makes a name foo for an OID. The C macro 26c109e398Sbeck OBJ_foo will be created as a result. 27c109e398Sbeck 28c109e398Sbeck !Cname foo 29c109e398Sbeck 30c109e398Sbeck This makes sure that the name foo will be used as base name 31c109e398Sbeck in C. 32c109e398Sbeck 33c109e398Sbeck !module foo 34c109e398Sbeck 1 2 3 4 : shortName : Long Name 35c109e398Sbeck !global 36c109e398Sbeck 37c109e398Sbeck The !module command was meant to define a kind of modularity. 38c109e398Sbeck What it does is to make sure the module name is prepended 39c109e398Sbeck to the base name. !global turns this off. This construction 40c109e398Sbeck is not recursive. 41c109e398Sbeck 42c109e398SbeckLines starting with # are treated as comments, as well as any line starting 43c109e398Sbeckwith ! and not matching the commands above. 44c109e398Sbeck 45