Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Dec 6, 2011
1 parent e2426d6 commit 7683f88
Show file tree
Hide file tree
Showing 28 changed files with 852 additions and 916 deletions.
10 changes: 6 additions & 4 deletions jujufly/j_arg_d.c
Expand Up @@ -12,11 +12,13 @@ int j_arg_d_append(j_arg_d *jad, char *arg)
{
int i;
if (jad->argc == jad->size) {
char **tmpv = (char **)calloc(jad->size*2, sizeof(char *));
for (i=0; i < jad->argc; i++) {
char **tmpv = (char **)calloc(jad->size * 2, sizeof(char *));
for (i = 0; i < jad->argc; i++) {
tmpv[i] = jad->argv[i];
}
if (jad->size != J_ARG_D_STATIC_SIZE) free(jad->argv);
if (jad->size != J_ARG_D_STATIC_SIZE) {
free(jad->argv);
}
jad->argv = tmpv;
jad->size *= 2;
}
Expand All @@ -33,7 +35,7 @@ void j_arg_d_print(FILE *out, j_arg_d *jad)
{
int i;
fprintf(out, "j_arg_d: %d items %d space\n", jad->argc, jad->size);
for (i=0; i < jad->argc; i++) {
for (i = 0; i < jad->argc; i++) {
fprintf(out, "\t%d: %s\n", i, jad->argv[i]);
}
}
Expand Down
2 changes: 1 addition & 1 deletion jujufly/j_arg_d.h
Expand Up @@ -4,7 +4,7 @@
* Dynamic stack oriented array routines.
*
* Uses a static space to store arguments on the heap. Past J_ARG_D_STATIC_SIZE
* this switches to a power of two allocator using malloc. Redefine
* this switches to a power of two allocator using malloc. Redefine
* J_ARG_D_STATIC_SIZE to change the static space for your application.
*
*/
Expand Down

0 comments on commit 7683f88

Please sign in to comment.