diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-23 14:32:34 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-07-23 14:32:34 +0000 |
commit | 48751ab095bbbb23489c2e3243f57571cbfa9153 (patch) | |
tree | 7a15647c01c3acdb2d1c61142bb13616ad03a2aa /cpukit/libmisc/stringto/stringtopointer.c | |
parent | 2009-07-23 Santosh G Vattam <vattam.santosh@gmail.com> (diff) | |
download | rtems-48751ab095bbbb23489c2e3243f57571cbfa9153.tar.bz2 |
2009-07-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/main_chmod.c,
libmisc/shell/main_mdump.c, libmisc/shell/main_medit.c,
libmisc/shell/main_mfill.c, libmisc/shell/main_mmove.c,
libmisc/shell/main_msdosfmt.c, libmisc/shell/main_mwdump.c,
libmisc/shell/main_sleep.c, libmisc/shell/main_umask.c,
libmisc/shell/shell_script.c, libmisc/stringto/stringto.h,
libmisc/stringto/stringto_template.h: Convert return type from bool
to rtems_status_code and add rtems_string_to_pointer. Perform
associated clean up and changes for return type change.
* libmisc/stringto/stringtopointer.c: New file.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libmisc/stringto/stringtopointer.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cpukit/libmisc/stringto/stringtopointer.c b/cpukit/libmisc/stringto/stringtopointer.c new file mode 100644 index 0000000000..ca1e480d2d --- /dev/null +++ b/cpukit/libmisc/stringto/stringtopointer.c @@ -0,0 +1,25 @@ +/* + * COPYRIGHT (c) 2009. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +/* + * Instantiate an error checking wrapper for strtoul which is + * used to input a (void *) + * + * NOTE: This is only an appropriate implementation when unsigned long + * can represent a void * + */ +#define STRING_TO_POINTER +#define STRING_TO_TYPE void * +#define STRING_TO_INPUT_TYPE unsigned long +#define STRING_TO_NAME rtems_string_to_pointer +#define STRING_TO_METHOD strtoul +#define STRING_TO_MAX ULONG_MAX +#include "stringto_template.h" |