|
From: | Gavin Smith |
Subject: | Re: Column widths in <table> |
Date: | Thu, 30 Dec 2021 11:50:42 +0000 |
User-agent: | Mutt/1.9.4 (2018-02-28) |
On Thu, Dec 30, 2021 at 10:23:04AM +0000, Gavin Smith wrote: > However, you can imagine that you might have two similarly formatted, > semantically linked tables with intervening text when aligning > the columns of the two tables would be felicitous. Here's another couple. From agdoc.texi, part of manual for GNU AutoGen version 5.18, updated August 2015. (Generated using --html --no-split --force options.) One problem is that the default formatting is to make the columns very close to each other, with little padding. (This was previously discussed here - https://lists.gnu.org/archive/html/bug-texinfo/2014-11/msg00058.html) - including an image of the lack of padding.) So if we did stop outputting width attributes I think we should supply some padding. Otherwise the output could look a lot worse. In the agdoc-widths.html output file, you can see that the table in section 1.2 "configFileLoad" is much more widely spaced than that in 1.3 "optionFileLoad". I don't know why this is but would guess that the percentage values in the width attributes are not always relative to the same base - perhaps relative to the width of the table, which can change depending on the contents. One thought is that since Texinfo requires one of the two types of column width specification (either prototypes or @columnfractions), with automatically generated output the @columnfractions is the easiest to provide. The author didn't necessarily want the column widths to be exactly the same in all of the tables. Some experiments follow. I checked the inconsistent columns with the following: <table> <tr><td width="20%">aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa </td><td width="20%">bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb </td><td width="60%">ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc </td></tr> </table> <table> <tr><td width="20%">aaa</td><td width="20%">bbb</td><td width="60%">ccc</td></tr> </table> where the two columns won't be aligned. So it aligning columns of different tables may not be a good argument for obeying @columnfractions in HTML. (I actually find it hard to find proper documentation of what exactly the width attribute in a <td> is supposed to do.) I tried with <colgroup> but it made no difference: <table> <colgroup><col width="20%"><col width="20%"><col width="60%"></colgroup> <tr><td>aaa</td><td>bbb</td><td>ccc</td> </tr> </table> <table> <colgroup><col width="20%"><col width="20%"><col width="60%"></colgroup> <tr><td>aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa </td><td>bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb </td><td>ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc </td> </tr> </table> However, it does line up if you give width="100%" to the table: <table width="100%"> <colgroup><col width="20%"><col width="20%"><col width="60%"></colgroup> <tr><td>aaa</td><td>bbb</td><td>ccc</td> </tr> </table> <table width="100%"> <colgroup><col width="20%"><col width="20%"><col width="60%"></colgroup> <tr><td>aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa aaa </td><td>bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb bbb </td><td>ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc ccc </td> </tr> </table> <colgroup> did not exist in HTML 3.2, though. width="100%" also made a difference without <colgroup>: <table width="100%"> <tr><td width="20%">aaa</td><td width="20%">bbb</td><td width="60%">ccc</td> </tr> </table> I haven't checked this in terminal browsers like lynx.
tmp.texi
Description: TeXInfo document
1 libopts External ProceduresThese are the routines that libopts users may call directly from their code. There are several other routines that can be called by code generated by the libopts option templates, but they are not to be called from any other user code. The options.h header is fairly clear about this, too. This subsection was automatically generated by AutoGen using extracted information and the aginfo3.tpl template.
Next: configFileLoad, Up: libopts External Procedures 1.1 ao_string_tokenizetokenize an input string Usage: token_list_t * res = ao_string_tokenize( string ); Where the arguments are:
This function will convert one input string into a list of strings. The list of strings is derived by separating the input based on white space separation. However, if the input contains either single or double quote characters, then the text after that character up to a matching quote will become the string in the list. The returned pointer should be deallocated with The structure pointed to will contain at least these two fields:
There are two types of quoted strings: single quoted (
Double quote strings are formed according to the rules of string constants in ANSI-C programs. NULL is returned and
Next: optionFileLoad, Previous: ao_string_tokenize, Up: libopts External Procedures 1.2 configFileLoadparse a configuration file Usage: const tOptionValue * res = configFileLoad( fname ); Where the arguments are:
This routine will load a named configuration file and parse the
text as a hierarchically valued option. The option descriptor
created from an option definition file is not used via this interface.
The returned value is "named" with the input file name and is of
type " If the file cannot be loaded or processed,
Next: optionFindNextValue, Previous: configFileLoad, Up: libopts External Procedures 1.3 optionFileLoadLoad the locatable config files, in order Usage: int res = optionFileLoad( opts, prog ); Where the arguments are:
This function looks in all the specified directories for a configuration file ("rc" file or "ini" file) and processes any found twice. The first time through, they are processed in reverse order (last file first). At that time, only "immediate action" configurables are processed. For example, if the last named file specifies not processing any more configuration files, then no more configuration files will be processed. Such an option in the first named directory will have no effect. Once the immediate action configurables have been handled, then the directories are handled in normal, forward order. In that way, later config files can override the settings of earlier config files. See the AutoOpts documentation for a thorough discussion of the config file format. Configuration files not found or not decipherable are simply ignored. Returns the value, "-1" if the program options descriptor is out of date or indecipherable. Otherwise, the value "0" will always be returned. Next: optionFindValue, Previous: optionFileLoad, Up: libopts External Procedures 1.4 optionFindNextValuefind a hierarcicaly valued option instance Usage: const tOptionValue * res = optionFindNextValue( odesc, pPrevVal, name, value ); Where the arguments are:
This routine will find the next entry in a nested value option or configurable. It will search through the list and return the next entry that matches the criteria. The returned result is NULL and errno is set:
Next: optionFree, Previous: optionFindNextValue, Up: libopts External Procedures 1.5 optionFindValuefind a hierarcicaly valued option instance Usage: const tOptionValue * res = optionFindValue( odesc, name, val ); Where the arguments are:
This routine will find an entry in a nested value option or configurable. It will search through the list and return a matching entry. The returned result is NULL and errno is set:
Next: optionGetValue, Previous: optionFindValue, Up: libopts External Procedures 1.6 optionFreefree allocated option processing memory Usage: optionFree( pOpts ); Where the arguments are:
AutoOpts sometimes allocates memory and puts pointers to it in the option state structures. This routine deallocates all such memory. As long as memory has not been corrupted, this routine is always successful. Next: optionLoadLine, Previous: optionFree, Up: libopts External Procedures 1.7 optionGetValueget a specific value from a hierarcical list Usage: const tOptionValue * res = optionGetValue( pOptValue, valueName ); Where the arguments are:
This routine will find an entry in a nested value option or configurable. If "valueName" is NULL, then the first entry is returned. Otherwise, the first entry with a name that exactly matches the argument will be returned. If there is no matching value, NULL is returned and errno is set to ENOENT. If the provided option value is not a hierarchical value, NULL is also returned and errno is set to EINVAL. The returned result is NULL and errno is set:
Next: optionMemberList, Previous: optionGetValue, Up: libopts External Procedures 1.8 optionLoadLineprocess a string for an option name and value Usage: optionLoadLine( opts, line ); Where the arguments are:
This is a client program callable routine for setting options from, for example, the contents of a file that they read in. Only one option may appear in the text. It will be treated as a normal (non-preset) option. When passed a pointer to the option struct and a string, it will find the option named by the first token on the string and set the option argument to the remainder of the string. The caller must NUL terminate the string. The caller need not skip over any introductory hyphens. Any embedded new lines will be included in the option argument. If the input looks like one or more quoted strings, then the input will be "cooked". The "cooking" is identical to the string formation used in AutoGen definition files (see ‘basic _expression_’), except that you may not use backquotes. Invalid options are silently ignored. Invalid option arguments will cause a warning to print, but the function should return. Next: optionNextValue, Previous: optionLoadLine, Up: libopts External Procedures 1.9 optionMemberListGet the list of members of a bit mask set Usage: char * res = optionMemberList( od ); Where the arguments are:
This converts the OPT_VALUE_name mask value to a allocated string. It is the caller’s responsibility to free the string. Next: optionOnlyUsage, Previous: optionMemberList, Up: libopts External Procedures 1.10 optionNextValueget the next value from a hierarchical list Usage: const tOptionValue * res = optionNextValue( pOptValue, pOldValue ); Where the arguments are:
This routine will return the next entry after the entry passed in. At the
end of the list, NULL will be returned. If the entry is not found on the
list, NULL will be returned and "errno" will be set to EINVAL.
The "pOldValue" must have been gotten from a prior call to this
routine or to " The returned result is NULL and errno is set:
Next: optionPrintVersion, Previous: optionNextValue, Up: libopts External Procedures 1.11 optionOnlyUsagePrint usage text for just the options Usage: optionOnlyUsage( pOpts, ex_code ); Where the arguments are:
This routine will print only the usage for each option. This function may be used when the emitted usage must incorporate information not available to AutoOpts. Next: optionPrintVersionAndReturn, Previous: optionOnlyUsage, Up: libopts External Procedures 1.12 optionPrintVersionPrint the program version Usage: optionPrintVersion( opts, od ); Where the arguments are:
This routine will print the version to stdout. Next: optionProcess, Previous: optionPrintVersion, Up: libopts External Procedures 1.13 optionPrintVersionAndReturnPrint the program version Usage: optionPrintVersionAndReturn( opts, od ); Where the arguments are:
This routine will print the version to stdout and return
instead of exiting. Please see the source for the
Next: optionRestore, Previous: optionPrintVersionAndReturn, Up: libopts External Procedures 1.14 optionProcessthis is the main option processing routine Usage: int res = optionProcess( opts, a_ct, a_v ); Where the arguments are:
This is the main entry point for processing options. It is intended that this procedure be called once at the beginning of the execution of a program. Depending on options selected earlier, it is sometimes necessary to stop and restart option processing, or to select completely different sets of options. This can be done easily, but you generally do not want to do this. The number of arguments processed always includes the program name. If one of the arguments is "–", then it is counted and the processing stops. If an error was encountered and errors are to be tolerated, then the returned value is the index of the argument causing the error. A hyphen by itself ("-") will also cause processing to stop and will not be counted among the processed arguments. A hyphen by itself is treated as an operand. Encountering an operand stops option processing. Errors will cause diagnostics to be printed. Next: optionSaveFile, Previous: optionProcess, Up: libopts External Procedures 1.15 optionRestorerestore option state from memory copy Usage: optionRestore( pOpts ); Where the arguments are:
Copy back the option state from saved memory. The allocated memory is left intact, so this routine can be called repeatedly without having to call optionSaveState again. If you are restoring a state that was saved before the first call to optionProcess(3AO), then you may change the contents of the argc/argv parameters to optionProcess. If you have not called Next: optionSaveState, Previous: optionRestore, Up: libopts External Procedures 1.16 optionSaveFilesaves the option state to a file Usage: optionSaveFile( opts ); Where the arguments are:
This routine will save the state of option processing to a file. The name
of that file can be specified with the argument to the The recommend usage is as follows: optionProcess(&progOptions, argc, argv); if (i_want_a_non_standard_place_for_this) SET_OPT_SAVE_OPTS("myfilename"); optionSaveFile(&progOptions); If no Next: optionUnloadNested, Previous: optionSaveFile, Up: libopts External Procedures 1.17 optionSaveStatesaves the option state to memory Usage: optionSaveState( pOpts ); Where the arguments are:
This routine will allocate enough memory to save the current option processing state. If this routine has been called before, that memory will be reused. You may only save one copy of the option state. This routine may be called before optionProcess(3AO). If you do call it before the first call to optionProcess, then you may also change the contents of argc/argv after you call optionRestore(3AO) In fact, more strongly put: it is safest to only use this function before having processed any options. In particular, the saving and restoring of stacked string arguments and hierarchical values is disabled. The values are not saved. If it fails to allocate the memory, it will print a message to stderr and exit. Otherwise, it will always succeed. Next: optionVersion, Previous: optionSaveState, Up: libopts External Procedures 1.18 optionUnloadNestedDeallocate the memory for a nested value Usage: optionUnloadNested( pOptVal ); Where the arguments are:
A nested value needs to be deallocated. The pointer passed in should
have been gotten from a call to Next: strequate, Previous: optionUnloadNested, Up: libopts External Procedures 1.19 optionVersionreturn the compiled AutoOpts version number Usage: char const * res = optionVersion(); Where the arguments are:
Returns the full version string compiled into the library. The returned string cannot be modified. Next: streqvcmp, Previous: optionVersion, Up: libopts External Procedures 1.20 strequatemap a list of characters to the same value Usage: strequate( ch_list ); Where the arguments are:
Each character in the input string get mapped to the first character in the string. This function name is mapped to option_strequate so as to not conflict with the POSIX name space. none. Next: streqvmap, Previous: strequate, Up: libopts External Procedures 1.21 streqvcmpcompare two strings with an equivalence mapping Usage: int res = streqvcmp( str1, str2 ); Where the arguments are:
Using a character mapping, two strings are compared for "equivalence". Each input character is mapped to a comparison character and the mapped-to characters are compared for the two NUL terminated input strings. This function name is mapped to option_streqvcmp so as to not conflict with the POSIX name space. none checked. Caller responsible for seg faults. Next: strneqvcmp, Previous: streqvcmp, Up: libopts External Procedures 1.22 streqvmapSet the character mappings for the streqv functions Usage: streqvmap( from, to, ct ); Where the arguments are:
Set the character mapping. If the count ( streqvmap('a', 'A', 26); will alter the mapping so that all English lower case letters will map to upper case. This function name is mapped to option_streqvmap so as to not conflict with the POSIX name space. none. Next: strtransform, Previous: streqvmap, Up: libopts External Procedures 1.23 strneqvcmpcompare two strings with an equivalence mapping Usage: int res = strneqvcmp( str1, str2, ct ); Where the arguments are:
Using a character mapping, two strings are compared for "equivalence".
Each input character is mapped to a comparison character and the
mapped-to characters are compared for the two NUL terminated input strings.
The comparison is limited to none checked. Caller responsible for seg faults. Previous: strneqvcmp, Up: libopts External Procedures 1.24 strtransformconvert a string into its mapped-to value Usage: strtransform( dest, src ); Where the arguments are:
Each character in the input string is mapped and the mapped-to character is put into the output. This function name is mapped to option_strtransform so as to not conflict with the POSIX name space. The source and destination may be the same. none. bye |
1 libopts External ProceduresThese are the routines that libopts users may call directly from their code. There are several other routines that can be called by code generated by the libopts option templates, but they are not to be called from any other user code. The options.h header is fairly clear about this, too. This subsection was automatically generated by AutoGen using extracted information and the aginfo3.tpl template.
Next: configFileLoad, Up: libopts External Procedures 1.1 ao_string_tokenizetokenize an input string Usage: token_list_t * res = ao_string_tokenize( string ); Where the arguments are:
This function will convert one input string into a list of strings. The list of strings is derived by separating the input based on white space separation. However, if the input contains either single or double quote characters, then the text after that character up to a matching quote will become the string in the list. The returned pointer should be deallocated with The structure pointed to will contain at least these two fields:
There are two types of quoted strings: single quoted (
Double quote strings are formed according to the rules of string constants in ANSI-C programs. NULL is returned and
Next: optionFileLoad, Previous: ao_string_tokenize, Up: libopts External Procedures 1.2 configFileLoadparse a configuration file Usage: const tOptionValue * res = configFileLoad( fname ); Where the arguments are:
This routine will load a named configuration file and parse the
text as a hierarchically valued option. The option descriptor
created from an option definition file is not used via this interface.
The returned value is "named" with the input file name and is of
type " If the file cannot be loaded or processed,
Next: optionFindNextValue, Previous: configFileLoad, Up: libopts External Procedures 1.3 optionFileLoadLoad the locatable config files, in order Usage: int res = optionFileLoad( opts, prog ); Where the arguments are:
This function looks in all the specified directories for a configuration file ("rc" file or "ini" file) and processes any found twice. The first time through, they are processed in reverse order (last file first). At that time, only "immediate action" configurables are processed. For example, if the last named file specifies not processing any more configuration files, then no more configuration files will be processed. Such an option in the first named directory will have no effect. Once the immediate action configurables have been handled, then the directories are handled in normal, forward order. In that way, later config files can override the settings of earlier config files. See the AutoOpts documentation for a thorough discussion of the config file format. Configuration files not found or not decipherable are simply ignored. Returns the value, "-1" if the program options descriptor is out of date or indecipherable. Otherwise, the value "0" will always be returned. Next: optionFindValue, Previous: optionFileLoad, Up: libopts External Procedures 1.4 optionFindNextValuefind a hierarcicaly valued option instance Usage: const tOptionValue * res = optionFindNextValue( odesc, pPrevVal, name, value ); Where the arguments are:
This routine will find the next entry in a nested value option or configurable. It will search through the list and return the next entry that matches the criteria. The returned result is NULL and errno is set:
Next: optionFree, Previous: optionFindNextValue, Up: libopts External Procedures 1.5 optionFindValuefind a hierarcicaly valued option instance Usage: const tOptionValue * res = optionFindValue( odesc, name, val ); Where the arguments are:
This routine will find an entry in a nested value option or configurable. It will search through the list and return a matching entry. The returned result is NULL and errno is set:
Next: optionGetValue, Previous: optionFindValue, Up: libopts External Procedures 1.6 optionFreefree allocated option processing memory Usage: optionFree( pOpts ); Where the arguments are:
AutoOpts sometimes allocates memory and puts pointers to it in the option state structures. This routine deallocates all such memory. As long as memory has not been corrupted, this routine is always successful. Next: optionLoadLine, Previous: optionFree, Up: libopts External Procedures 1.7 optionGetValueget a specific value from a hierarcical list Usage: const tOptionValue * res = optionGetValue( pOptValue, valueName ); Where the arguments are:
This routine will find an entry in a nested value option or configurable. If "valueName" is NULL, then the first entry is returned. Otherwise, the first entry with a name that exactly matches the argument will be returned. If there is no matching value, NULL is returned and errno is set to ENOENT. If the provided option value is not a hierarchical value, NULL is also returned and errno is set to EINVAL. The returned result is NULL and errno is set:
Next: optionMemberList, Previous: optionGetValue, Up: libopts External Procedures 1.8 optionLoadLineprocess a string for an option name and value Usage: optionLoadLine( opts, line ); Where the arguments are:
This is a client program callable routine for setting options from, for example, the contents of a file that they read in. Only one option may appear in the text. It will be treated as a normal (non-preset) option. When passed a pointer to the option struct and a string, it will find the option named by the first token on the string and set the option argument to the remainder of the string. The caller must NUL terminate the string. The caller need not skip over any introductory hyphens. Any embedded new lines will be included in the option argument. If the input looks like one or more quoted strings, then the input will be "cooked". The "cooking" is identical to the string formation used in AutoGen definition files (see ‘basic _expression_’), except that you may not use backquotes. Invalid options are silently ignored. Invalid option arguments will cause a warning to print, but the function should return. Next: optionNextValue, Previous: optionLoadLine, Up: libopts External Procedures 1.9 optionMemberListGet the list of members of a bit mask set Usage: char * res = optionMemberList( od ); Where the arguments are:
This converts the OPT_VALUE_name mask value to a allocated string. It is the caller’s responsibility to free the string. Next: optionOnlyUsage, Previous: optionMemberList, Up: libopts External Procedures 1.10 optionNextValueget the next value from a hierarchical list Usage: const tOptionValue * res = optionNextValue( pOptValue, pOldValue ); Where the arguments are:
This routine will return the next entry after the entry passed in. At the
end of the list, NULL will be returned. If the entry is not found on the
list, NULL will be returned and "errno" will be set to EINVAL.
The "pOldValue" must have been gotten from a prior call to this
routine or to " The returned result is NULL and errno is set:
Next: optionPrintVersion, Previous: optionNextValue, Up: libopts External Procedures 1.11 optionOnlyUsagePrint usage text for just the options Usage: optionOnlyUsage( pOpts, ex_code ); Where the arguments are:
This routine will print only the usage for each option. This function may be used when the emitted usage must incorporate information not available to AutoOpts. Next: optionPrintVersionAndReturn, Previous: optionOnlyUsage, Up: libopts External Procedures 1.12 optionPrintVersionPrint the program version Usage: optionPrintVersion( opts, od ); Where the arguments are:
This routine will print the version to stdout. Next: optionProcess, Previous: optionPrintVersion, Up: libopts External Procedures 1.13 optionPrintVersionAndReturnPrint the program version Usage: optionPrintVersionAndReturn( opts, od ); Where the arguments are:
This routine will print the version to stdout and return
instead of exiting. Please see the source for the
Next: optionRestore, Previous: optionPrintVersionAndReturn, Up: libopts External Procedures 1.14 optionProcessthis is the main option processing routine Usage: int res = optionProcess( opts, a_ct, a_v ); Where the arguments are:
This is the main entry point for processing options. It is intended that this procedure be called once at the beginning of the execution of a program. Depending on options selected earlier, it is sometimes necessary to stop and restart option processing, or to select completely different sets of options. This can be done easily, but you generally do not want to do this. The number of arguments processed always includes the program name. If one of the arguments is "–", then it is counted and the processing stops. If an error was encountered and errors are to be tolerated, then the returned value is the index of the argument causing the error. A hyphen by itself ("-") will also cause processing to stop and will not be counted among the processed arguments. A hyphen by itself is treated as an operand. Encountering an operand stops option processing. Errors will cause diagnostics to be printed. Next: optionSaveFile, Previous: optionProcess, Up: libopts External Procedures 1.15 optionRestorerestore option state from memory copy Usage: optionRestore( pOpts ); Where the arguments are:
Copy back the option state from saved memory. The allocated memory is left intact, so this routine can be called repeatedly without having to call optionSaveState again. If you are restoring a state that was saved before the first call to optionProcess(3AO), then you may change the contents of the argc/argv parameters to optionProcess. If you have not called Next: optionSaveState, Previous: optionRestore, Up: libopts External Procedures 1.16 optionSaveFilesaves the option state to a file Usage: optionSaveFile( opts ); Where the arguments are:
This routine will save the state of option processing to a file. The name
of that file can be specified with the argument to the The recommend usage is as follows: optionProcess(&progOptions, argc, argv); if (i_want_a_non_standard_place_for_this) SET_OPT_SAVE_OPTS("myfilename"); optionSaveFile(&progOptions); If no Next: optionUnloadNested, Previous: optionSaveFile, Up: libopts External Procedures 1.17 optionSaveStatesaves the option state to memory Usage: optionSaveState( pOpts ); Where the arguments are:
This routine will allocate enough memory to save the current option processing state. If this routine has been called before, that memory will be reused. You may only save one copy of the option state. This routine may be called before optionProcess(3AO). If you do call it before the first call to optionProcess, then you may also change the contents of argc/argv after you call optionRestore(3AO) In fact, more strongly put: it is safest to only use this function before having processed any options. In particular, the saving and restoring of stacked string arguments and hierarchical values is disabled. The values are not saved. If it fails to allocate the memory, it will print a message to stderr and exit. Otherwise, it will always succeed. Next: optionVersion, Previous: optionSaveState, Up: libopts External Procedures 1.18 optionUnloadNestedDeallocate the memory for a nested value Usage: optionUnloadNested( pOptVal ); Where the arguments are:
A nested value needs to be deallocated. The pointer passed in should
have been gotten from a call to Next: strequate, Previous: optionUnloadNested, Up: libopts External Procedures 1.19 optionVersionreturn the compiled AutoOpts version number Usage: char const * res = optionVersion(); Where the arguments are:
Returns the full version string compiled into the library. The returned string cannot be modified. Next: streqvcmp, Previous: optionVersion, Up: libopts External Procedures 1.20 strequatemap a list of characters to the same value Usage: strequate( ch_list ); Where the arguments are:
Each character in the input string get mapped to the first character in the string. This function name is mapped to option_strequate so as to not conflict with the POSIX name space. none. Next: streqvmap, Previous: strequate, Up: libopts External Procedures 1.21 streqvcmpcompare two strings with an equivalence mapping Usage: int res = streqvcmp( str1, str2 ); Where the arguments are:
Using a character mapping, two strings are compared for "equivalence". Each input character is mapped to a comparison character and the mapped-to characters are compared for the two NUL terminated input strings. This function name is mapped to option_streqvcmp so as to not conflict with the POSIX name space. none checked. Caller responsible for seg faults. Next: strneqvcmp, Previous: streqvcmp, Up: libopts External Procedures 1.22 streqvmapSet the character mappings for the streqv functions Usage: streqvmap( from, to, ct ); Where the arguments are:
Set the character mapping. If the count ( streqvmap('a', 'A', 26); will alter the mapping so that all English lower case letters will map to upper case. This function name is mapped to option_streqvmap so as to not conflict with the POSIX name space. none. Next: strtransform, Previous: streqvmap, Up: libopts External Procedures 1.23 strneqvcmpcompare two strings with an equivalence mapping Usage: int res = strneqvcmp( str1, str2, ct ); Where the arguments are:
Using a character mapping, two strings are compared for "equivalence".
Each input character is mapped to a comparison character and the
mapped-to characters are compared for the two NUL terminated input strings.
The comparison is limited to none checked. Caller responsible for seg faults. Previous: strneqvcmp, Up: libopts External Procedures 1.24 strtransformconvert a string into its mapped-to value Usage: strtransform( dest, src ); Where the arguments are:
Each character in the input string is mapped and the mapped-to character is put into the output. This function name is mapped to option_strtransform so as to not conflict with the POSIX name space. The source and destination may be the same. none. bye |
[Prev in Thread] | Current Thread | [Next in Thread] |