diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:46:23 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-06-23 22:46:23 +0000 |
commit | f90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1 (patch) | |
tree | 66070c6e1e7a5a72c1d1af437e0e2c49a410fa7b /src/helper/jim.h | |
parent | 6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa (diff) | |
download | riscv-openocd-f90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1.zip riscv-openocd-f90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1.tar.gz riscv-openocd-f90d8fa45f2d4c9d4b7990f198b232ee55cbb4e1.tar.bz2 |
Remove whitespace that occurs after '('.
- Replace '([ \t]*' with '('.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2376 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper/jim.h')
-rw-r--r-- | src/helper/jim.h | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/src/helper/jim.h b/src/helper/jim.h index a5ae150..99362af 100644 --- a/src/helper/jim.h +++ b/src/helper/jim.h @@ -530,11 +530,11 @@ typedef struct Jim_Interp { void *cookie_stdin; /* input file pointer, 'stdin' by default */ void *cookie_stdout; /* output file pointer, 'stdout' by default */ void *cookie_stderr; /* errors file pointer, 'stderr' by default */ - size_t (*cb_fwrite )( const void *ptr, size_t size, size_t n, void *cookie ); - size_t (*cb_fread )( void *ptr, size_t size, size_t n, void *cookie ); - int (*cb_vfprintf)( void *cookie, const char *fmt, va_list ap ); - int (*cb_fflush )( void *cookie ); - char *(*cb_fgets )( char *s, int size, void *cookie ); + size_t (*cb_fwrite )(const void *ptr, size_t size, size_t n, void *cookie ); + size_t (*cb_fread )(void *ptr, size_t size, size_t n, void *cookie ); + int (*cb_vfprintf)(void *cookie, const char *fmt, va_list ap ); + int (*cb_fflush )(void *cookie ); + char *(*cb_fgets )(char *s, int size, void *cookie ); } Jim_Interp; /* Currently provided as macro that performs the increment. @@ -591,11 +591,11 @@ typedef struct Jim_Reference { * }; * * Jim_Nvp *result - * e = Jim_Nvp_name2value( interp, yn, "y", &result ); + * e = Jim_Nvp_name2value(interp, yn, "y", &result ); * returns &yn[0]; - * e = Jim_Nvp_name2value( interp, yn, "n", &result ); + * e = Jim_Nvp_name2value(interp, yn, "n", &result ); * returns &yn[1]; - * e = Jim_Nvp_name2value( interp, yn, "Blah", &result ); + * e = Jim_Nvp_name2value(interp, yn, "Blah", &result ); * returns &yn[4]; * \endcode * @@ -629,7 +629,7 @@ typedef struct { #ifdef DOXYGEN #define JIM_STATIC -#define JIM_API( X ) X +#define JIM_API(X ) X #else #ifndef __JIM_CORE__ # if defined JIM_EMBEDDED @@ -650,7 +650,7 @@ typedef struct { #endif /* DOXYGEN */ /** Set the result - printf() style */ -JIM_STATIC int JIM_API( Jim_SetResult_sprintf )( Jim_Interp *p, const char *fmt, ... ); +JIM_STATIC int JIM_API(Jim_SetResult_sprintf )(Jim_Interp *p, const char *fmt, ... ); /* Memory allocation */ JIM_STATIC void * JIM_API(Jim_Alloc) (int size); @@ -660,7 +660,7 @@ JIM_STATIC char * JIM_API(Jim_StrDup) (const char *s); /* evaluation */ JIM_STATIC int JIM_API(Jim_Eval)(Jim_Interp *interp, const char *script); /* in C code, you can do this and get better error messages */ -/* Jim_Eval_Named( interp, "some tcl commands", __FILE__, __LINE__ ); */ +/* Jim_Eval_Named(interp, "some tcl commands", __FILE__, __LINE__ ); */ JIM_STATIC int JIM_API(Jim_Eval_Named)(Jim_Interp *interp, const char *script,const char *filename, int lineno); JIM_STATIC int JIM_API(Jim_EvalGlobal)(Jim_Interp *interp, const char *script); JIM_STATIC int JIM_API(Jim_EvalFile)(Jim_Interp *interp, const char *filename); @@ -911,28 +911,28 @@ JIM_STATIC int JIM_API(Jim_InteractivePrompt) (Jim_Interp *interp); JIM_STATIC void JIM_API(Jim_Panic) (Jim_Interp *interp, const char *fmt, ...); /* Jim's STDIO */ -JIM_STATIC int JIM_API( Jim_fprintf )( Jim_Interp *interp, void *cookie, const char *fmt, ... ); -JIM_STATIC int JIM_API( Jim_vfprintf )( Jim_Interp *interp, void *cookie, const char *fmt, va_list ap ); -JIM_STATIC size_t JIM_API( Jim_fwrite )( Jim_Interp *interp, const void *ptr, size_t size, size_t nmeb, void *cookie ); -JIM_STATIC size_t JIM_API( Jim_fread )( Jim_Interp *interp, void *ptr, size_t size, size_t nmeb, void *cookie ); -JIM_STATIC int JIM_API( Jim_fflush )( Jim_Interp *interp, void *cookie ); -JIM_STATIC char * JIM_API( Jim_fgets )( Jim_Interp *interp, char *s, int size, void *cookie ); +JIM_STATIC int JIM_API(Jim_fprintf )(Jim_Interp *interp, void *cookie, const char *fmt, ... ); +JIM_STATIC int JIM_API(Jim_vfprintf )(Jim_Interp *interp, void *cookie, const char *fmt, va_list ap ); +JIM_STATIC size_t JIM_API(Jim_fwrite )(Jim_Interp *interp, const void *ptr, size_t size, size_t nmeb, void *cookie ); +JIM_STATIC size_t JIM_API(Jim_fread )(Jim_Interp *interp, void *ptr, size_t size, size_t nmeb, void *cookie ); +JIM_STATIC int JIM_API(Jim_fflush )(Jim_Interp *interp, void *cookie ); +JIM_STATIC char * JIM_API(Jim_fgets )(Jim_Interp *interp, char *s, int size, void *cookie ); /* Name Value Pairs Operations */ -JIM_STATIC Jim_Nvp *JIM_API(Jim_Nvp_name2value_simple)( const Jim_Nvp *nvp_table, const char *name ); -JIM_STATIC Jim_Nvp *JIM_API(Jim_Nvp_name2value_nocase_simple)( const Jim_Nvp *nvp_table, const char *name ); -JIM_STATIC Jim_Nvp *JIM_API(Jim_Nvp_value2name_simple)( const Jim_Nvp *nvp_table, int v ); +JIM_STATIC Jim_Nvp *JIM_API(Jim_Nvp_name2value_simple)(const Jim_Nvp *nvp_table, const char *name ); +JIM_STATIC Jim_Nvp *JIM_API(Jim_Nvp_name2value_nocase_simple)(const Jim_Nvp *nvp_table, const char *name ); +JIM_STATIC Jim_Nvp *JIM_API(Jim_Nvp_value2name_simple)(const Jim_Nvp *nvp_table, int v ); -JIM_STATIC int JIM_API(Jim_Nvp_name2value)( Jim_Interp *interp, const Jim_Nvp *nvp_table, const char *name, Jim_Nvp **result ); -JIM_STATIC int JIM_API(Jim_Nvp_name2value_nocase)( Jim_Interp *interp, const Jim_Nvp *nvp_table, const char *name, Jim_Nvp **result); -JIM_STATIC int JIM_API(Jim_Nvp_value2name)( Jim_Interp *interp, const Jim_Nvp *nvp_table, int value, Jim_Nvp **result ); +JIM_STATIC int JIM_API(Jim_Nvp_name2value)(Jim_Interp *interp, const Jim_Nvp *nvp_table, const char *name, Jim_Nvp **result ); +JIM_STATIC int JIM_API(Jim_Nvp_name2value_nocase)(Jim_Interp *interp, const Jim_Nvp *nvp_table, const char *name, Jim_Nvp **result); +JIM_STATIC int JIM_API(Jim_Nvp_value2name)(Jim_Interp *interp, const Jim_Nvp *nvp_table, int value, Jim_Nvp **result ); -JIM_STATIC int JIM_API(Jim_Nvp_name2value_obj)( Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *name_obj, Jim_Nvp **result ); -JIM_STATIC int JIM_API(Jim_Nvp_name2value_obj_nocase)( Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *name_obj, Jim_Nvp **result ); -JIM_STATIC int JIM_API(Jim_Nvp_value2name_obj)( Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *value_obj, Jim_Nvp **result ); +JIM_STATIC int JIM_API(Jim_Nvp_name2value_obj)(Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *name_obj, Jim_Nvp **result ); +JIM_STATIC int JIM_API(Jim_Nvp_name2value_obj_nocase)(Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *name_obj, Jim_Nvp **result ); +JIM_STATIC int JIM_API(Jim_Nvp_value2name_obj)(Jim_Interp *interp, const Jim_Nvp *nvp_table, Jim_Obj *value_obj, Jim_Nvp **result ); /** prints a nice 'unknown' parameter error message to the 'result' */ -JIM_STATIC void JIM_API(Jim_SetResult_NvpUnknown)( Jim_Interp *interp, +JIM_STATIC void JIM_API(Jim_SetResult_NvpUnknown)(Jim_Interp *interp, Jim_Obj *param_name, Jim_Obj *param_value, const Jim_Nvp *nvp_table ); @@ -951,11 +951,11 @@ JIM_STATIC void JIM_API(Jim_SetResult_NvpUnknown)( Jim_Interp *interp, * For example might want do this: * \code * fp = fopen("some.file.log", "a" ); - * fprintf( fp, "PARAMS are: %s\n", Jim_DebugArgvString( interp, argc, argv ) ); + * fprintf(fp, "PARAMS are: %s\n", Jim_DebugArgvString(interp, argc, argv ) ); * fclose(fp); * \endcode */ -JIM_STATIC const char *JIM_API( Jim_Debug_ArgvString )( Jim_Interp *interp, int argc, Jim_Obj *const *argv ); +JIM_STATIC const char *JIM_API(Jim_Debug_ArgvString )(Jim_Interp *interp, int argc, Jim_Obj *const *argv ); /** A TCL -ish GetOpt like code. @@ -983,33 +983,33 @@ typedef struct jim_getopt { * \code * Jim_GetOptInfo goi; * - * Jim_GetOpt_Setup( &goi, interp, argc, argv ); + * Jim_GetOpt_Setup(&goi, interp, argc, argv ); * - * while ( goi.argc ){ - * e = Jim_GetOpt_Nvp( &goi, nvp_options, &n ); - * if ( e != JIM_OK ){ - * Jim_GetOpt_NvpUnknown( &goi, nvp_options, 0 ); + * while (goi.argc ){ + * e = Jim_GetOpt_Nvp(&goi, nvp_options, &n ); + * if (e != JIM_OK ){ + * Jim_GetOpt_NvpUnknown(&goi, nvp_options, 0 ); * return e; * } * - * switch ( n->value ){ + * switch (n->value ){ * case ALIVE: * printf("Option ALIVE specified\n"); * break; * case FIRST: - * if ( goi.argc < 1 ){ + * if (goi.argc < 1 ){ * .. not enough args error .. * } - * Jim_GetOpt_String( &goi, &cp, NULL ); + * Jim_GetOpt_String(&goi, &cp, NULL ); * printf("FIRSTNAME: %s\n", cp ); * case AGE: - * Jim_GetOpt_Wide( &goi, &w ); + * Jim_GetOpt_Wide(&goi, &w ); * printf("AGE: %d\n", (int)(w) ); * break; * case POLITICS: - * e = Jim_GetOpt_Nvp( &goi, nvp_politics, &n ); - * if ( e != JIM_OK ){ - * Jim_GetOpt_NvpUnknown( &goi, nvp_politics, 1 ); + * e = Jim_GetOpt_Nvp(&goi, nvp_politics, &n ); + * if (e != JIM_OK ){ + * Jim_GetOpt_NvpUnknown(&goi, nvp_politics, 1 ); * return e; * } * } @@ -1029,11 +1029,11 @@ typedef struct jim_getopt { * \code * Jim_GetOptInfo goi; * - * Jim_GetOptSetup( &goi, interp, argc, argv ); + * Jim_GetOptSetup(&goi, interp, argc, argv ); * \endcode */ -JIM_STATIC int JIM_API( Jim_GetOpt_Setup )( Jim_GetOptInfo *goi, +JIM_STATIC int JIM_API(Jim_GetOpt_Setup )(Jim_GetOptInfo *goi, Jim_Interp *interp, int argc, Jim_Obj * const * argv ); @@ -1042,7 +1042,7 @@ JIM_STATIC int JIM_API( Jim_GetOpt_Setup )( Jim_GetOptInfo *goi, /** Debug - Dump parameters to stderr * \param goi - current parameters */ -JIM_STATIC void JIM_API( Jim_GetOpt_Debug )( Jim_GetOptInfo *goi); +JIM_STATIC void JIM_API(Jim_GetOpt_Debug )(Jim_GetOptInfo *goi); @@ -1052,7 +1052,7 @@ JIM_STATIC void JIM_API( Jim_GetOpt_Debug )( Jim_GetOptInfo *goi); * \param puthere - where param is put * */ -JIM_STATIC int JIM_API( Jim_GetOpt_Obj)( Jim_GetOptInfo *goi, Jim_Obj **puthere ); +JIM_STATIC int JIM_API(Jim_GetOpt_Obj)(Jim_GetOptInfo *goi, Jim_Obj **puthere ); /** Remove argv[0] as string. * @@ -1060,7 +1060,7 @@ JIM_STATIC int JIM_API( Jim_GetOpt_Obj)( Jim_GetOptInfo *goi, Jim_Obj **puthere * \param puthere - where param is put * \param len - return its length */ -JIM_STATIC int JIM_API( Jim_GetOpt_String )( Jim_GetOptInfo *goi, char **puthere, int *len ); +JIM_STATIC int JIM_API(Jim_GetOpt_String )(Jim_GetOptInfo *goi, char **puthere, int *len ); /** Remove argv[0] as double. * @@ -1068,14 +1068,14 @@ JIM_STATIC int JIM_API( Jim_GetOpt_String )( Jim_GetOptInfo *goi, char **puthere * \param puthere - where param is put. * */ -JIM_STATIC int JIM_API( Jim_GetOpt_Double )( Jim_GetOptInfo *goi, double *puthere ); +JIM_STATIC int JIM_API(Jim_GetOpt_Double )(Jim_GetOptInfo *goi, double *puthere ); /** Remove argv[0] as wide. * * \param goi - get opt info * \param puthere - where param is put. */ -JIM_STATIC int JIM_API( Jim_GetOpt_Wide )( Jim_GetOptInfo *goi, jim_wide *puthere ); +JIM_STATIC int JIM_API(Jim_GetOpt_Wide )(Jim_GetOptInfo *goi, jim_wide *puthere ); /** Remove argv[0] as NVP. * @@ -1084,7 +1084,7 @@ JIM_STATIC int JIM_API( Jim_GetOpt_Wide )( Jim_GetOptInfo *goi, jim_wide *puther * \param puthere - where param is put. * */ -JIM_STATIC int JIM_API( Jim_GetOpt_Nvp)( Jim_GetOptInfo *goi, const Jim_Nvp *lookup, Jim_Nvp **puthere ); +JIM_STATIC int JIM_API(Jim_GetOpt_Nvp)(Jim_GetOptInfo *goi, const Jim_Nvp *lookup, Jim_Nvp **puthere ); /** Create an appropriate error message for an NVP. * @@ -1102,22 +1102,22 @@ JIM_STATIC int JIM_API( Jim_GetOpt_Nvp)( Jim_GetOptInfo *goi, const Jim_Nvp *loo * Example: * \code * - * while ( goi.argc ){ + * while (goi.argc ){ * // Get the next option - * e = Jim_GetOpt_Nvp( &goi, cmd_options, &n ); - * if ( e != JIM_OK ){ + * e = Jim_GetOpt_Nvp(&goi, cmd_options, &n ); + * if (e != JIM_OK ){ * // option was not recognized * // pass 'hadprefix = 0' because there is no prefix - * Jim_GetOpt_NvpUnknown( &goi, cmd_options, 0 ); + * Jim_GetOpt_NvpUnknown(&goi, cmd_options, 0 ); * return e; * } * - * switch ( n->value ){ + * switch (n->value ){ * case OPT_SEX: * // handle: --sex male | female | lots | needmore - * e = Jim_GetOpt_Nvp( &goi, &nvp_sex, &n ); - * if ( e != JIM_OK ){ - * Jim_GetOpt_NvpUnknown( &ogi, nvp_sex, 1 ); + * e = Jim_GetOpt_Nvp(&goi, &nvp_sex, &n ); + * if (e != JIM_OK ){ + * Jim_GetOpt_NvpUnknown(&ogi, nvp_sex, 1 ); * return e; * } * printf("Code: (%d) is %s\n", n->value, n->name ); @@ -1129,7 +1129,7 @@ JIM_STATIC int JIM_API( Jim_GetOpt_Nvp)( Jim_GetOptInfo *goi, const Jim_Nvp *loo * \endcode * */ -JIM_STATIC void JIM_API( Jim_GetOpt_NvpUnknown)( Jim_GetOptInfo *goi, const Jim_Nvp *lookup, int hadprefix ); +JIM_STATIC void JIM_API(Jim_GetOpt_NvpUnknown)(Jim_GetOptInfo *goi, const Jim_Nvp *lookup, int hadprefix ); /** Remove argv[0] as Enum @@ -1139,7 +1139,7 @@ JIM_STATIC void JIM_API( Jim_GetOpt_NvpUnknown)( Jim_GetOptInfo *goi, const Jim_ * \param puthere - where param is put. * */ -JIM_STATIC int JIM_API( Jim_GetOpt_Enum)( Jim_GetOptInfo *goi, const char * const * lookup, int *puthere ); +JIM_STATIC int JIM_API(Jim_GetOpt_Enum)(Jim_GetOptInfo *goi, const char * const * lookup, int *puthere ); #undef JIM_STATIC |