aboutsummaryrefslogtreecommitdiff
path: root/include/search.h
diff options
context:
space:
mode:
authorAlexander Holler2014-07-14 17:49:55 +0200
committerTom Rini2014-07-22 07:44:26 -0400
commitecd1446fe1df00d7f7b9de286dba309d93b51870 (patch)
tree4379b5361d1ac07d36b56a6fadf4cae1cb6b3d64 /include/search.h
parent8973601c38c63726e344fd1eb416f05ae18aec91 (diff)
Add option -r to env import to allow import of text files with CRLF as line endings
When this option is enabled, CRLF is treated like LF when importing environments from text files, which means CRs ('\r') in front of LFs ('\n') are just ignored. Drawback of enabling this option is that (maybe exported) variables which have a trailing CR in their content will get imported without that CR. But this drawback is very unlikely and the big advantage of letting Windows user create a *working* uEnv.txt too is likely more welcome. Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Diffstat (limited to 'include/search.h')
-rw-r--r--include/search.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/search.h b/include/search.h
index ae3efc43ca0..9701efb2dfe 100644
--- a/include/search.h
+++ b/include/search.h
@@ -102,7 +102,8 @@ extern ssize_t hexport_r(struct hsearch_data *__htab,
*/
extern int himport_r(struct hsearch_data *__htab,
const char *__env, size_t __size, const char __sep,
- int __flag, int nvars, char * const vars[]);
+ int __flag, int __crlf_is_lf, int nvars,
+ char * const vars[]);
/* Walk the whole table calling the callback on each element */
extern int hwalk_r(struct hsearch_data *__htab, int (*callback)(ENTRY *));