move prototypes for useful cmd helpers from internal cmd.h to public cmd.h

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1918 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 14 years ago
parent 021ba71553
commit 0604c8bd7d

@ -1,3 +1,9 @@
2011-06-27 Mike Frysinger <vapier@gentoo.org>
* include/urjtag/cmd.h, src/cmd/cmd.h, src/cmd/cmd_cmd.c: Move prototypes
for some useful command related functions to the public cmd.h header.
In the process, constify the array passed into urj_cmd_params.
2011-06-25 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_initbus.c: Drop useless double const keywords.

@ -56,4 +56,30 @@ int urj_cmd_run (urj_chain_t *chain, char *params[]);
*/
char **urj_cmd_complete (urj_chain_t *chain, const char *line, int point);
/**
* Tests if chain has a cable pointer
*
* @return URJ_STATUS_OK if success; URJ_STATUS_FAIL on error or failure
*/
int urj_cmd_test_cable (urj_chain_t *chain);
/**
* Count the number of parameters in this NULL-terminated list
*
* @param params pointer to array of null-terminated strings
*
* @return number of parameter strings; 0 for none.
*/
int urj_cmd_params (char * const params[]);
/**
* Parse parameter as a long unsigned
*
* @param s string containing textual representation of a number
* @param i pointer to variable in which to store the resulting number
*
* @return URJ_STATUS_OK on success, URJ_STATUS_FAIL on error
*/
int urj_cmd_get_number (const char *s, long unsigned *i);
#endif /* URJ_CMD_H */

@ -56,23 +56,6 @@ typedef struct
extern const urj_cmd_t * const urj_cmds[];
/**
* Tests if chain has a cable pointer
*
* @return URJ_STATUS_OK if success; URJ_STATUS_FAIL on error or failure
*/
int urj_cmd_test_cable (urj_chain_t *chain);
/**
* Count the number of parameters in this NULL-terminated list
*/
int urj_cmd_params (char *params[]);
/**
* Parse parameter as a long unsigned
* @return URJ_STATUS_OK on success, URJ_STATUS_FAIL on error
*/
int urj_cmd_get_number (const char *s, long unsigned *i);
/**
* Show a list of structures with name/desc
*/

@ -234,7 +234,7 @@ urj_cmd_run (urj_chain_t *chain, char *params[])
}
int
urj_cmd_params (char *params[])
urj_cmd_params (char * const params[])
{
int i = 0;

Loading…
Cancel
Save