aboutsummaryrefslogtreecommitdiff
path: root/include/wordsplit.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2019-05-14 19:59:07 +0300
committerSergey Poznyakoff <gray@gnu.org>2019-05-14 19:59:07 +0300
commit39beda10e855d265b5af74ea53a5d7a89a91296a (patch)
tree86f671ebea706d691d1667304522c260f56924bd /include/wordsplit.h
parentf6586d810d8430d6d9f833119af39726a60e4a6c (diff)
downloadgrecs-39beda10e855d265b5af74ea53a5d7a89a91296a.tar.gz
grecs-39beda10e855d265b5af74ea53a5d7a89a91296a.tar.bz2
wordsplit: whitespace cleanup
Diffstat (limited to 'include/wordsplit.h')
-rw-r--r--include/wordsplit.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/include/wordsplit.h b/include/wordsplit.h
index d7eb26f..d4975b3 100644
--- a/include/wordsplit.h
+++ b/include/wordsplit.h
@@ -31,8 +31,8 @@ typedef struct wordsplit wordsplit_t;
WRDSF_) or ws_options (if starting with WRDSO_) to initialize or use the
given member.
-
+
If not redefined explicitly, most of them are set to some reasonable
default value upon entry to wordsplit(). */
-struct wordsplit
+struct wordsplit
{
size_t ws_wordc; /* [Output] Number of words in ws_wordv. */
@@ -40,5 +40,5 @@ struct wordsplit
size_t ws_offs; /* [Input] (WRDSF_DOOFFS) Number of initial
elements in ws_wordv to fill with NULLs. */
- size_t ws_wordn; /* Number of elements ws_wordv can accomodate. */
+ size_t ws_wordn; /* Number of elements ws_wordv can accomodate. */
int ws_flags; /* [Input] Flags passed to wordsplit. */
int ws_options; /* [Input] (WRDSF_OPTIONS)
@@ -54,13 +54,13 @@ struct wordsplit
with backslash. */
void (*ws_alloc_die) (wordsplit_t *wsp);
- /* [Input] (WRDSF_ALLOC_DIE) Function called when
+ /* [Input] (WRDSF_ALLOC_DIE) Function called when
out of memory. Must not return. */
void (*ws_error) (const char *, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
- /* [Input] (WRDSF_ERROR) Function used for error
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+ /* [Input] (WRDSF_ERROR) Function used for error
reporting */
void (*ws_debug) (const char *, ...)
- __attribute__ ((__format__ (__printf__, 1, 2)));
- /* [Input] (WRDSF_DEBUG) Function used for debug
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+ /* [Input] (WRDSF_DEBUG) Function used for debug
output. */
const char **ws_env; /* [Input] (WRDSF_ENV, !WRDSF_NOVAR) Array of
@@ -81,12 +81,12 @@ struct wordsplit
size_t ws_paramc; /* Number of positional parameters */
- /* Temporary storage for parameters. Works similarly to ws_enbuf.
+ /* Temporary storage for parameters. Works similarly to ws_enbuf.
*/
char **ws_parambuf;
size_t ws_paramidx;
size_t ws_paramsiz;
-
+
int (*ws_getvar) (char **ret, const char *var, size_t len, void *clos);
- /* [Input] (WRDSF_GETVAR, !WRDSF_NOVAR) Looks up
+ /* [Input] (WRDSF_GETVAR, !WRDSF_NOVAR) Looks up
the name VAR (LEN bytes long) in the table of
variables and if found returns in memory
@@ -97,11 +97,11 @@ struct wordsplit
by storing the error diagnostic string in RET
and returning WRDSE_USERERR.
- Whatever is stored in RET, it must be allocated
+ Whatever is stored in RET, it must be allocated
using malloc(3). */
void *ws_closure; /* [Input] (WRDSF_CLOSURE) Passed as the CLOS
argument to ws_getvar and ws_command. */
int (*ws_command) (char **ret, const char *cmd, size_t len, char **argv,
- void *clos);
- /* [Input] (!WRDSF_NOCMD) Returns in the memory
+ void *clos);
+ /* [Input] (!WRDSF_NOCMD) Returns in the memory
location pointed to by RET the expansion of
the command CMD (LEN bytes long). On input,
@@ -111,5 +111,5 @@ struct wordsplit
return values. */
- const char *ws_input; /* Input string (the S argument to wordsplit. */
+ const char *ws_input; /* Input string (the S argument to wordsplit. */
size_t ws_len; /* Length of ws_input. */
size_t ws_endp; /* Points past the last processed byte in
@@ -120,5 +120,5 @@ struct wordsplit
be allocated with malloc(3). */
struct wordsplit_node *ws_head, *ws_tail;
- /* Doubly-linked list of parsed out nodes. */
+ /* Doubly-linked list of parsed out nodes. */
int ws_lvl; /* Invocation nesting level. */
};
@@ -243,7 +243,7 @@ struct wordsplit
#define WRDSO_PARAM_NEGIDX 0x00008000
-#define WRDSO_BSKEEP WRDSO_BSKEEP_WORD
-#define WRDSO_OESC WRDSO_OESC_WORD
-#define WRDSO_XESC WRDSO_XESC_WORD
+#define WRDSO_BSKEEP WRDSO_BSKEEP_WORD
+#define WRDSO_OESC WRDSO_OESC_WORD
+#define WRDSO_XESC WRDSO_XESC_WORD
/* Indices into ws_escape */

Return to:

Send suggestions and report system problems to the System administrator.