Skip to content

Commit 936f247

Browse files
committed
Save work on documentation.
1 parent e5094fc commit 936f247

4 files changed

Lines changed: 200 additions & 27 deletions

File tree

cups/ipp-file.c

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,13 @@ ippFileGetVar(ipp_file_t *file, // I - IPP data file
310310

311311

312312
//
313-
// 'ippFileNew()' - Create a new IPP data file object for reading or writing.
313+
// 'ippFileNew()' - Create a new IPP data file object in preparation for reading or writing.
314314
//
315-
// This function opens an IPP data file for reading (mode="r") or writing
316-
// (mode="w"). If the "parent" argument is not `NULL`, all variables from the
317-
// parent data file are copied to the new file.
315+
// This function creates a new IPP data file object. If the "parent" argument
316+
// is not `NULL`, all variables from the parent data file are copied to the new
317+
// object.
318+
//
319+
// Call the @link ippFileOpen@ function to open the IPP data file.
318320
//
319321

320322
ipp_file_t * // O - IPP data file
@@ -343,9 +345,8 @@ ippFileNew(ipp_file_t *parent, // I - Parent data file or `NULL` for none
343345
//
344346
// 'ippFileOpen()' - Open an IPP data file for reading or writing.
345347
//
346-
// This function opens an IPP data file for reading (mode="r") or writing
347-
// (mode="w"). If the "parent" argument is not `NULL`, all variables from the
348-
// parent data file are copied to the new file.
348+
// This function opens the IPP data file specified by the "filename" argument
349+
// for reading ("mode" is "r") or writing ("mode" is "w").
349350
//
350351

351352
bool // O - `true` on success, `false` on error
@@ -389,6 +390,14 @@ ippFileOpen(ipp_file_t *file, // I - IPP data file
389390
//
390391
// 'ippFileRead()' - Read an IPP data file.
391392
//
393+
// This function reads tokens from an IPP data file, processes standard
394+
// directives that define attributes and values, and passes on unknown tokens
395+
// to the token callback "token_cb" for processing.
396+
//
397+
// If the "with_groups" argument is `true` then the "GROUP" directive will be
398+
// supported for specifying the attribute group(s) associated with any
399+
// defined attributes.
400+
//
392401

393402
bool // O - `true` on success, `false` on error
394403
ippFileRead(ipp_file_t *file, // I - IPP data file

cups/language.c

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ static int cups_message_compare(_cups_message_t *m1, _cups_message_t *m2);
7575
//
7676
// 'cupsLangAddStrings()' - Add strings for the specified language.
7777
//
78+
// This function adds strings for the specified language. It is equivalent to
79+
// calling @link cupsLangFind@ followed by @link cupsLangLoadStrings@.
80+
//
7881

7982
bool // O - `true` on success, `false` on failure
8083
cupsLangAddStrings(
@@ -94,9 +97,12 @@ cupsLangAddStrings(
9497
//
9598
// 'cupsLangFind()' - Find a language localization.
9699
//
100+
// This function finds the localization information for the specified language
101+
// or locale name.
102+
//
97103

98104
cups_lang_t * // O - Language data
99-
cupsLangFind(const char *language) // I - Language or locale name
105+
cupsLangFind(const char *language) // I - Language or locale name, `NULL` for the current locale
100106
{
101107
char langname[16]; // Requested language name
102108
cups_lang_t *lang; // Current language...
@@ -134,6 +140,9 @@ cupsLangFind(const char *language) // I - Language or locale name
134140
//
135141
// 'cupsLangFormatString()' - Create a localized formatted string.
136142
//
143+
// This function formats a string using the localized version of the "format"
144+
// string argument, which supports all of the `printf` format specifiers.
145+
//
137146

138147
const char * // O - Formatted string
139148
cupsLangFormatString(
@@ -223,11 +232,21 @@ cupsLangIsRTL(cups_lang_t *lang) // I - Language
223232
//
224233
// 'cupsLangLoadStrings()' - Load a message catalog for a language.
225234
//
235+
// This function loads a message catalog for a language. The catalog must be in
236+
// the Apple .strings format. For example, the following translates the strings
237+
// "Yes", "No", and "Welcome, %s." to French:
238+
//
239+
// ```
240+
// "Yes" = "Oui";
241+
// "No" = "Non";
242+
// "Welcome, %s." = "Bievenue, %s.";
243+
// ```
244+
//
226245

227246
bool // O - `true` on success, `false` on failure
228247
cupsLangLoadStrings(
229248
cups_lang_t *lang, // I - Language data
230-
const char *filename, // I - Filename of `NULL` for none
249+
const char *filename, // I - Filename or `NULL` for none
231250
const char *strings) // I - Strings or `NULL` for none
232251
{
233252
bool ret = true; // Return value
@@ -560,7 +579,11 @@ cupsLangLoadStrings(
560579

561580

562581
//
563-
// 'cupsLangSetDirectory()' - Set a directory containing localizations.
582+
// 'cupsLangSetDirectory()' - Set the directory containing localizations.
583+
//
584+
// This function sets the directory where .strings files can be found. The
585+
// files are named "LOCALE.string" where "LOCALE" is the locale name, for
586+
// example "fr" for generic French and "fr-CA" for Canadian French.
564587
//
565588

566589
void

doc/cupspm.epub

1.24 KB
Binary file not shown.

0 commit comments

Comments
 (0)