You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/11/05 17:56:03 UTC
[1/5] git commit: Define _LARGEFILE64_SOURCE
Repository: lucy-charmonizer
Updated Branches:
refs/heads/master 55a6c5b07 -> 4e612a886
Define _LARGEFILE64_SOURCE
This makes the large file test pass on 32-bit systems.
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/ea311c6d
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/ea311c6d
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/ea311c6d
Branch: refs/heads/master
Commit: ea311c6d96a9370f963e6ed5da148d2faac7fd91
Parents: 55a6c5b
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 17:35:39 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 17:35:39 2014 +0100
----------------------------------------------------------------------
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/ea311c6d/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 0f19d68..aba491a 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@
# limitations under the License.
CC= cc
-DEFS=
+DEFS= -D_LARGEFILE64_SOURCE
CFLAGS= -I. -Isrc $(DEFS)
PROGNAME= charmonize
CHARMONY_H= charmony.h
[3/5] git commit: C89 comments
Posted by nw...@apache.org.
C89 comments
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/4c77f01a
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/4c77f01a
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/4c77f01a
Branch: refs/heads/master
Commit: 4c77f01ada8af54b60a3f39989b42ea12ec4edd6
Parents: caf6539
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 17:36:49 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 17:36:49 2014 +0100
----------------------------------------------------------------------
src/Charmonizer/Core/CLI.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/4c77f01a/src/Charmonizer/Core/CLI.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/CLI.c b/src/Charmonizer/Core/CLI.c
index 3038329..fd7e4e2 100644
--- a/src/Charmonizer/Core/CLI.c
+++ b/src/Charmonizer/Core/CLI.c
@@ -53,9 +53,9 @@ S_chaz_CLI_error(chaz_CLI *self, const char *pattern, ...) {
static void
S_chaz_CLI_rebuild_help(chaz_CLI *self) {
int i;
- size_t amount = 200; // Length of section headers.
+ size_t amount = 200; /* Length of section headers. */
- // Allocate space.
+ /* Allocate space. */
if (self->usage) {
amount += strlen(self->usage);
}
@@ -79,7 +79,7 @@ S_chaz_CLI_rebuild_help(chaz_CLI *self) {
self->help = (char*)malloc(amount);
self->help[0] = '\0';
- // Accumulate "help" string.
+ /* Accumulate "help" string. */
if (self->usage) {
strcat(self->help, self->usage);
}
@@ -180,14 +180,14 @@ chaz_CLI_register(chaz_CLI *self, const char *name, const char *help,
int arg_required = !!(flags & CHAZ_CLI_ARG_REQUIRED);
int arg_optional = !!(flags & CHAZ_CLI_ARG_OPTIONAL);
- // Validate flags
+ /* Validate flags */
if (arg_required && arg_optional) {
S_chaz_CLI_error(self, "Conflicting flags: value both optional "
"and required");
return 0;
}
- // Insert new option. Keep options sorted by name.
+ /* Insert new option. Keep options sorted by name. */
for (rank = self->num_opts; rank > 0; rank--) {
int comparison = strcmp(name, self->opts[rank - 1].name);
if (comparison == 0) {
@@ -209,7 +209,7 @@ chaz_CLI_register(chaz_CLI *self, const char *name, const char *help,
self->opts[rank].defined = 0;
self->opts[rank].value = NULL;
- // Update `help` with new option.
+ /* Update `help` with new option. */
S_chaz_CLI_rebuild_help(self);
return 1;
[2/5] git commit: Fix fprintf in charmonize.c
Posted by nw...@apache.org.
Fix fprintf in charmonize.c
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/caf6539f
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/caf6539f
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/caf6539f
Branch: refs/heads/master
Commit: caf6539f996341bb93dd17132d5bd8a14c52c835
Parents: ea311c6
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 17:36:31 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 17:36:31 2014 +0100
----------------------------------------------------------------------
charmonize.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/caf6539f/charmonize.c
----------------------------------------------------------------------
diff --git a/charmonize.c b/charmonize.c
index a602fea..3fdbb85 100644
--- a/charmonize.c
+++ b/charmonize.c
@@ -46,7 +46,7 @@ int main(int argc, const char **argv) {
chaz_CLI *cli = chaz_CLI_new(argv[0], NULL);
int result = chaz_Probe_parse_cli_args(argc, argv, cli);
if (!result) {
- fprintf(stderr, chaz_CLI_help(cli));
+ fprintf(stderr, "%s", chaz_CLI_help(cli));
exit(1);
}
chaz_Probe_init(cli);
[5/5] git commit: Add valgrind target
Posted by nw...@apache.org.
Add valgrind target
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/4e612a88
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/4e612a88
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/4e612a88
Branch: refs/heads/master
Commit: 4e612a886f76171e89489f70cff63b65d82bf0c5
Parents: db9c60c
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 17:53:36 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 17:53:36 2014 +0100
----------------------------------------------------------------------
Makefile | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/4e612a88/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index aba491a..8221cac 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,8 @@ meld:
$(CHARMONY_H): $(PROGNAME)
./$(PROGNAME) --cc=$(CC) --enable-c
+valgrind: $(PROGNAME)
+ valgrind --leak-check=full ./$(PROGNAME) --cc=$(CC) --enable-c
$(PROGNAME): $(OBJS)
$(CC) $(CFLAGS) $(OBJS) -o $(PROGNAME)
[4/5] git commit: Fix memory leaks in CLI.c
Posted by nw...@apache.org.
Fix memory leaks in CLI.c
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/db9c60cd
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/db9c60cd
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/db9c60cd
Branch: refs/heads/master
Commit: db9c60cde1e999aa4b4b72f2a0b9dca408352d11
Parents: 4c77f01
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Nov 5 17:52:06 2014 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Nov 5 17:52:06 2014 +0100
----------------------------------------------------------------------
src/Charmonizer/Core/CLI.c | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/db9c60cd/src/Charmonizer/Core/CLI.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Core/CLI.c b/src/Charmonizer/Core/CLI.c
index fd7e4e2..4901e34 100644
--- a/src/Charmonizer/Core/CLI.c
+++ b/src/Charmonizer/Core/CLI.c
@@ -159,6 +159,7 @@ chaz_CLI_destroy(chaz_CLI *self) {
free(self->opts);
free(self->usage);
free(self->help);
+ free(self);
}
void
@@ -352,6 +353,7 @@ chaz_CLI_parse(chaz_CLI *self, int argc, const char *argv[]) {
}
}
+ free(name);
return 1;
}