Skip to content

Commit

Permalink
MKN: "signed char" to "char cleanup". Silences gcc warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
knobi1 committed Oct 4, 2005
1 parent e43688a commit fad266d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions monitor-core/lib/dotconf.c
Expand Up @@ -86,18 +86,18 @@ static configoption_t dotconf_options[] =
LAST_CONTEXT_OPTION
};

static void skip_whitespace(signed char **cp, int n, char term)
static void skip_whitespace(char **cp, int n, char term)
{
signed char *cp1 = *cp;
char *cp1 = *cp;
while(isspace((int)*cp1) && *cp1 != term && n--)
cp1++;
*cp = cp1;
}

static void copy_word(signed char **dest, signed char **src, int max, char term)
static void copy_word(char **dest, char **src, int max, char term)
{
signed char *cp1 = *src;
signed char *cp2 = *dest;
char *cp1 = *src;
char *cp2 = *dest;
while(max-- && !isspace((int)*cp1) && *cp1 != term)
*cp2++ = *cp1++;
*cp2 = 0;
Expand Down Expand Up @@ -367,11 +367,11 @@ const char *dotconf_invoke_command(configfile_t *configfile, command_t *cmd)
return error;
}

char *dotconf_read_arg(configfile_t *configfile, signed char **line)
char *dotconf_read_arg(configfile_t *configfile, char **line)
{
int sq = 0, dq = 0; /* single quote, double quote */
int done;
signed char *cp1 = *line;
char *cp1 = *line;
char *cp2, *eos;
char buf[CFG_MAX_VALUE];

Expand Down Expand Up @@ -483,9 +483,9 @@ configoption_t *dotconf_find_command(configfile_t *configfile, const char *comma
return option;
}

void dotconf_set_command(configfile_t *configfile, const configoption_t *option, signed char *args, command_t *cmd)
void dotconf_set_command(configfile_t *configfile, const configoption_t *option, char *args, command_t *cmd)
{
signed char *eob = 0;
char *eob = 0;

eob = args + strlen(args);

Expand All @@ -503,7 +503,7 @@ void dotconf_set_command(configfile_t *configfile, const configoption_t *option,
cmd->data.str = strdup(args);
}
else if (option->type == ARG_STR) {
signed char *cp = args;
char *cp = args;

/* check if it's a here-document and act accordingly */
skip_whitespace(&cp, (long)eob - (long)cp, 0);
Expand Down Expand Up @@ -587,10 +587,10 @@ void dotconf_free_command(command_t *command)

const char *dotconf_handle_command(configfile_t *configfile, char *buffer)
{
signed char *cp1;
signed char *cp2;
char *cp1;
char *cp2;
/* generic char pointer */
signed char *eob; /* end of buffer; end of string */
char *eob; /* end of buffer; end of string */
const char *error; /* error message we'll return */
const char *context_error; /* error message returned by contextchecker */
command_t command; /* command structure */
Expand Down
2 changes: 1 addition & 1 deletion monitor-core/lib/dotconf.h
Expand Up @@ -208,7 +208,7 @@ configoption_t *dotconf_find_command(configfile_t *configfile, const char *comma
side effects: the char* returned by dotconf_read_arg is malloc() before, hence that pointer
will have to be free()ed later.
*/
char *dotconf_read_arg(configfile_t *configfile, signed char **line);
char *dotconf_read_arg(configfile_t *configfile, char **line);

/* ------ dotconf_handle_command() - parse, substitute, find, invoke the command found in buffer */
const char *dotconf_handle_command(configfile_t *configfile, char *buffer);
Expand Down

0 comments on commit fad266d

Please sign in to comment.