diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-03-30 03:34:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-03-30 03:34:44 +0000 |
commit | a7ea20473a18f5a88028c7245e8e4eaad5982a5a (patch) | |
tree | 6f9de3fa0f9d8e0e8976dee84a98c3d51ddd2ae9 | |
parent | 7d2532ba8b0f271931b180e84f8e962af37df415 (diff) | |
download | libmicrohttpd-a7ea20473a18f5a88028c7245e8e4eaad5982a5a.tar.gz libmicrohttpd-a7ea20473a18f5a88028c7245e8e4eaad5982a5a.zip |
Karl Berry wrote:
Also, a trivial point, you use en-dashes for hyphenated phrases, such as
"thread-safe" and "key-value". In normal English typesetting these are
just hyphens, so "thread-safe" rather than "thread--safe".
-rw-r--r-- | doc/microhttpd.texi | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi index e21dcc37..8d061179 100644 --- a/doc/microhttpd.texi +++ b/doc/microhttpd.texi | |||
@@ -118,7 +118,7 @@ define their own extensions of the @http{} standard and use those with | |||
118 | @mhd{}. | 118 | @mhd{}. |
119 | 119 | ||
120 | All functions are guaranteed to be completely reentrant and | 120 | All functions are guaranteed to be completely reentrant and |
121 | thread--safe. | 121 | thread-safe. |
122 | 122 | ||
123 | 123 | ||
124 | 124 | ||
@@ -196,7 +196,7 @@ timeout). | |||
196 | 196 | ||
197 | @item MHD_OPTION_NOTIFY_COMPLETED | 197 | @item MHD_OPTION_NOTIFY_COMPLETED |
198 | Register a function that should be called whenever a request has been | 198 | Register a function that should be called whenever a request has been |
199 | completed (this can be used for application--specific clean up). | 199 | completed (this can be used for application-specific clean up). |
200 | Requests that have never been presented to the application (via | 200 | Requests that have never been presented to the application (via |
201 | @cfunction{MHD_AccessHandlerCallback}) will not result in | 201 | @cfunction{MHD_AccessHandlerCallback}) will not result in |
202 | notifications. | 202 | notifications. |
@@ -210,7 +210,7 @@ callback. The second pointer maybe @null{}. | |||
210 | 210 | ||
211 | 211 | ||
212 | @deftp {Enumeration} MHD_ValueKind | 212 | @deftp {Enumeration} MHD_ValueKind |
213 | The @code{MHD_ValueKind} specifies the source of the key--value pairs in | 213 | The @code{MHD_ValueKind} specifies the source of the key-value pairs in |
214 | the @http{} protocol. | 214 | the @http{} protocol. |
215 | 215 | ||
216 | @table @code | 216 | @table @code |
@@ -366,7 +366,7 @@ calls for this request; | |||
366 | 366 | ||
367 | since the access handler may be called many times (i.e., for a | 367 | since the access handler may be called many times (i.e., for a |
368 | @code{PUT}/@code{POST} operation with plenty of upload data) this allows | 368 | @code{PUT}/@code{POST} operation with plenty of upload data) this allows |
369 | the application to easily associate some request--specific state; | 369 | the application to easily associate some request-specific state; |
370 | 370 | ||
371 | if necessary, this state can be cleaned up in the global | 371 | if necessary, this state can be cleaned up in the global |
372 | @code{MHD_RequestCompletedCallback} (which can be set with the | 372 | @code{MHD_RequestCompletedCallback} (which can be set with the |
@@ -397,8 +397,8 @@ reason for request termination see @code{MHD_OPTION_NOTIFY_COMPLETED}. | |||
397 | 397 | ||
398 | 398 | ||
399 | @deftypefn {Function Pointer} int {*MHD_KeyValueIterator} (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) | 399 | @deftypefn {Function Pointer} int {*MHD_KeyValueIterator} (void *cls, enum MHD_ValueKind kind, const char *key, const char *value) |
400 | Iterator over key--value pairs. This iterator can be used to iterate | 400 | Iterator over key-value pairs. This iterator can be used to iterate |
401 | over all of the cookies, headers, or @code{POST}--data fields of a | 401 | over all of the cookies, headers, or @code{POST}-data fields of a |
402 | request, and also to iterate over the headers that have been added to a | 402 | request, and also to iterate over the headers that have been added to a |
403 | response. | 403 | response. |
404 | 404 | ||
@@ -413,7 +413,7 @@ copy at most @var{max} bytes of content into @var{buf}. The total | |||
413 | number of bytes that has been placed into @var{buf} should be returned. | 413 | number of bytes that has been placed into @var{buf} should be returned. |
414 | 414 | ||
415 | Note that returning zero will cause @mhd{} to try again, either | 415 | Note that returning zero will cause @mhd{} to try again, either |
416 | ``immediately'' if in multi--threaded mode (in which case the callback | 416 | ``immediately'' if in multi-threaded mode (in which case the callback |
417 | may want to do blocking operations) or in the next round if MHD_run is | 417 | may want to do blocking operations) or in the next round if MHD_run is |
418 | used. Returning zero for a daemon that runs in internal | 418 | used. Returning zero for a daemon that runs in internal |
419 | @cfunction{select} mode is an error (since it would result in busy | 419 | @cfunction{select} mode is an error (since it would result in busy |
@@ -425,10 +425,10 @@ custom value selected at callback registration time; | |||
425 | 425 | ||
426 | @item pos | 426 | @item pos |
427 | position in the datastream to access; note that if an | 427 | position in the datastream to access; note that if an |
428 | @code{MHD_Response} object is re--used, it is possible for the same | 428 | @code{MHD_Response} object is re-used, it is possible for the same |
429 | content reader to be queried multiple times for the same data; however, | 429 | content reader to be queried multiple times for the same data; however, |
430 | if an @code{MHD_Response} is not re--used, @mhd{} guarantees that | 430 | if an @code{MHD_Response} is not re-used, @mhd{} guarantees that |
431 | @var{pos} will be the sum of all non--negative return values obtained | 431 | @var{pos} will be the sum of all non-negative return values obtained |
432 | from the content reader so far. | 432 | from the content reader so far. |
433 | @end table | 433 | @end table |
434 | 434 | ||
@@ -444,8 +444,8 @@ It should be used to free resources associated with the content reader. | |||
444 | 444 | ||
445 | 445 | ||
446 | @deftypefn {Function Pointer} int {*MHD_PostDataIterator} (void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, size_t off, size_t size) | 446 | @deftypefn {Function Pointer} int {*MHD_PostDataIterator} (void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, size_t off, size_t size) |
447 | Iterator over key--value pairs where the value maybe made available in | 447 | Iterator over key-value pairs where the value maybe made available in |
448 | increments and/or may not be zero--terminated. Used for processing | 448 | increments and/or may not be zero-terminated. Used for processing |
449 | @code{POST} data. | 449 | @code{POST} data. |
450 | 450 | ||
451 | @table @var | 451 | @table @var |
@@ -456,13 +456,13 @@ custom value selected at callback registration time; | |||
456 | type of the value; | 456 | type of the value; |
457 | 457 | ||
458 | @item key | 458 | @item key |
459 | zero--terminated key for the value; | 459 | zero-terminated key for the value; |
460 | 460 | ||
461 | @item filename | 461 | @item filename |
462 | name of the uploaded file, @null{} if not known; | 462 | name of the uploaded file, @null{} if not known; |
463 | 463 | ||
464 | @item content_type | 464 | @item content_type |
465 | mime--type of the data, @null{} if not known; | 465 | mime-type of the data, @null{} if not known; |
466 | 466 | ||
467 | @item transfer_encoding | 467 | @item transfer_encoding |
468 | encoding of the data, @null{} if not known; | 468 | encoding of the data, @null{} if not known; |
@@ -494,7 +494,7 @@ Start a webserver on the given port. | |||
494 | 494 | ||
495 | @table @var | 495 | @table @var |
496 | @item flags | 496 | @item flags |
497 | OR--ed combination of @code{MHD_FLAG} values; | 497 | OR-ed combination of @code{MHD_FLAG} values; |
498 | 498 | ||
499 | @item port | 499 | @item port |
500 | port to bind to; | 500 | port to bind to; |
@@ -514,7 +514,7 @@ default handler for all @uri{}s; | |||
514 | extra argument to @var{dh}. | 514 | extra argument to @var{dh}. |
515 | @end table | 515 | @end table |
516 | 516 | ||
517 | Additional arguments are a list of options (type--value pairs, | 517 | Additional arguments are a list of options (type-value pairs, |
518 | terminated with @code{MHD_OPTION_END}). It is mandatory to use | 518 | terminated with @code{MHD_OPTION_END}). It is mandatory to use |
519 | @code{MHD_OPTION_END} as last argument, even when there are no | 519 | @code{MHD_OPTION_END} as last argument, even when there are no |
520 | additional arguments. | 520 | additional arguments. |
@@ -531,7 +531,7 @@ Shutdown an @http{} daemon. | |||
531 | @deftypefun int MHD_run (struct MHD_Daemon *daemon) | 531 | @deftypefun int MHD_run (struct MHD_Daemon *daemon) |
532 | Run webserver operations (without blocking unless in client callbacks). | 532 | Run webserver operations (without blocking unless in client callbacks). |
533 | This method should be called by clients in combination with | 533 | This method should be called by clients in combination with |
534 | @cfunction{MHD_get_fdset} if the client--controlled @cfunction{select} | 534 | @cfunction{MHD_get_fdset} if the client-controlled @cfunction{select} |
535 | method is used. | 535 | method is used. |
536 | 536 | ||
537 | Return @code{MHD_YES} on success, @code{MHD_NO} if this daemon was not | 537 | Return @code{MHD_YES} on success, @code{MHD_NO} if this daemon was not |
@@ -541,7 +541,7 @@ started with the right options for this call. | |||
541 | 541 | ||
542 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 542 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
543 | 543 | ||
544 | @c ------------------------------------------------------------ | 544 | @c ----------------------------------------------------------- |
545 | @node microhttpd inspect | 545 | @node microhttpd inspect |
546 | @appendixsec Inspection | 546 | @appendixsec Inspection |
547 | 547 | ||
@@ -584,7 +584,7 @@ right now). | |||
584 | 584 | ||
585 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 585 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
586 | 586 | ||
587 | @c ------------------------------------------------------------ | 587 | @c ----------------------------------------------------------- |
588 | @node microhttpd requests | 588 | @node microhttpd requests |
589 | @appendixsec Handling requests | 589 | @appendixsec Handling requests |
590 | 590 | ||
@@ -628,7 +628,7 @@ and @cfunction{free}). Prefixes are compared with @cfunction{strcmp}. | |||
628 | 628 | ||
629 | @deftypefun int MHD_register_handler (struct MHD_Daemon *daemon, const char *uri_prefix, MHD_AccessHandlerCallback dh, void *dh_cls) | 629 | @deftypefun int MHD_register_handler (struct MHD_Daemon *daemon, const char *uri_prefix, MHD_AccessHandlerCallback dh, void *dh_cls) |
630 | Register an access handler for all @uri{}s beginning with | 630 | Register an access handler for all @uri{}s beginning with |
631 | @var{uri_prefix}, a zero--terminated @ascii{}--coded string. | 631 | @var{uri_prefix}, a zero-terminated @ascii{}-coded string. |
632 | 632 | ||
633 | Return @code{MRI_NO} if: the arguments are invalid (example: @null{} | 633 | Return @code{MRI_NO} if: the arguments are invalid (example: @null{} |
634 | pointers); a handler for this exact prefix already exists; an error | 634 | pointers); a handler for this exact prefix already exists; an error |
@@ -668,7 +668,7 @@ and returns the number of headers. | |||
668 | @deftypefun {const char *} MHD_lookup_connection_value (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key) | 668 | @deftypefun {const char *} MHD_lookup_connection_value (struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key) |
669 | Get a particular header value. If multiple values match the @var{kind}, | 669 | Get a particular header value. If multiple values match the @var{kind}, |
670 | return one of them (the ``first'', whatever that means). @var{key} must | 670 | return one of them (the ``first'', whatever that means). @var{key} must |
671 | reference a zero--terminated @ascii{}--coded string representing the | 671 | reference a zero-terminated @ascii{}-coded string representing the |
672 | header to look for: it is compared against the headers using | 672 | header to look for: it is compared against the headers using |
673 | @cfunction{strcasecmp}, so case is ignored. Return @null{} if no such | 673 | @cfunction{strcasecmp}, so case is ignored. Return @null{} if no such |
674 | item was found. | 674 | item was found. |
@@ -866,7 +866,7 @@ MHD_destroy_response(response); | |||
866 | 866 | ||
867 | @deftypefun int MHD_add_response_header (struct MHD_Response *response, const char *header, const char *content) | 867 | @deftypefun int MHD_add_response_header (struct MHD_Response *response, const char *header, const char *content) |
868 | Add a header line to the response. The strings referenced by | 868 | Add a header line to the response. The strings referenced by |
869 | @var{header} and @var{content} must be zero--terminated and they are | 869 | @var{header} and @var{content} must be zero-terminated and they are |
870 | duplicated into memory blocks embedded in @var{response}. | 870 | duplicated into memory blocks embedded in @var{response}. |
871 | 871 | ||
872 | Notice that the strings must not hold newlines, carriage returns or tab | 872 | Notice that the strings must not hold newlines, carriage returns or tab |
@@ -905,7 +905,7 @@ we know what we are doing. | |||
905 | 905 | ||
906 | @deftypefun {const char *} MHD_get_response_header (struct MHD_Response *response, const char *key) | 906 | @deftypefun {const char *} MHD_get_response_header (struct MHD_Response *response, const char *key) |
907 | Find and return a pointer to the value of a particular header from the | 907 | Find and return a pointer to the value of a particular header from the |
908 | response. @var{key} must reference a zero--terminated string | 908 | response. @var{key} must reference a zero-terminated string |
909 | representing the header to look for. The search is case sensitive. | 909 | representing the header to look for. The search is case sensitive. |
910 | Return @null{} if header does not exist or @var{key} is @null{}. | 910 | Return @null{} if header does not exist or @var{key} is @null{}. |
911 | 911 | ||
@@ -1185,7 +1185,7 @@ length of @var{post_data}. | |||
1185 | @end table | 1185 | @end table |
1186 | 1186 | ||
1187 | Return @code{MHD_YES} on success, @code{MHD_NO} on error | 1187 | Return @code{MHD_YES} on success, @code{MHD_NO} on error |
1188 | (out--of--memory, iterator aborted, parse error). | 1188 | (out-of-memory, iterator aborted, parse error). |
1189 | @end deftypefun | 1189 | @end deftypefun |
1190 | 1190 | ||
1191 | 1191 | ||