Skip to content

Commit

Permalink
Bumping to 0.9.3 (#144)
Browse files Browse the repository at this point in the history
* Cut branch for v0.9.3

* Fixed some memory issues

* Prepping 0.9.3

* Fixed memory leak
  • Loading branch information
roberthawdon authored Nov 23, 2021
1 parent 6a77284 commit 9420281
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([dfshow], [0.9.2], [https://github.com/roberthawdon/dfshow/issues])
AC_INIT([dfshow], [0.9.3], [https://github.com/roberthawdon/dfshow/issues])
AC_GNU_SOURCE
AM_INIT_AUTOMAKE([subdir-objects])
AC_PROG_CC
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = '0.9'
# The full version, including alpha/beta/rc tags
release = '0.9.2-beta'
release = '0.9.3-beta'


# -- General configuration ---------------------------------------------------
Expand Down
24 changes: 12 additions & 12 deletions src/showfunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,29 +357,29 @@ char *getRelativePath(char *file, char *target)
if (c == 0){
sprintf(result, "%s/", "..");
} else {
sprintf(result, "%s%s/", result, "..");
sprintf(result + strlen(result), "%s/", "..");
}
c++;
}
for(i=(fileLen - fileUp); i < fileLen; i++){
j = strlen(fileStruct[i].directories);
result = realloc(result, sizeof(char) * (strlen(result) + j + 1));
result = realloc(result, sizeof(char) * (strlen(result) + j + 2));
if (i == fileLen - 1){
sprintf(result, "%s%s", result, fileStruct[i].directories);
sprintf(result + strlen(result), "%s%c", fileStruct[i].directories, '\0');
} else {
sprintf(result, "%s%s/", result, fileStruct[i].directories);
sprintf(result + strlen(result), "%s/%c", fileStruct[i].directories, '\0');
}
}
} else if ((targetUp < 1) && (fileUp > 1)){
for(i=commonPath; i < fileLen; i++){
j = strlen(fileStruct[i].directories);
result = realloc(result, sizeof(char) * (strlen(result) + j + 1));
result = realloc(result, sizeof(char) * (strlen(result) + j + 2));
if (c == 0){
sprintf(result, "%s/", fileStruct[i].directories);
sprintf(result, "%s/%c", fileStruct[i].directories, '\0');
} else if (i == fileLen - 1){
sprintf(result, "%s%s", result, fileStruct[i].directories);
sprintf(result + strlen(result), "%s%c", fileStruct[i].directories, '\0');
} else {
sprintf(result, "%s%s/", result, fileStruct[i].directories);
sprintf(result + strlen(result), "%s/%c", fileStruct[i].directories, '\0');
}
c++;
}
Expand Down Expand Up @@ -1582,10 +1582,10 @@ int SendToPager(char* object)
sprintf(fullObject, "'%s'", escObject);
for (i = 1; i < noOfArgs; i++){
fullCommand = realloc(fullCommand, (strlen(fullCommand) + strlen(launchCommand[i]) + 2));
sprintf(fullCommand, "%s %s", fullCommand, launchCommand[i]);
sprintf(fullCommand + strlen(fullCommand), " %s", launchCommand[i]);
}
fullCommand = realloc(fullCommand, (strlen(fullCommand) + strlen(fullObject) + 2));
sprintf(fullCommand, "%s %s", fullCommand, fullObject);
sprintf(fullCommand + strlen(fullCommand), " %s", fullObject);
free(fullObject);
char *args[countArguments(fullCommand)];
buildCommandArguments(fullCommand, args, countArguments(fullCommand));
Expand Down Expand Up @@ -1645,10 +1645,10 @@ int SendToEditor(char* object)
sprintf(fullObject, "'%s'", escObject);
for (i = 1; i < noOfArgs; i++){
fullCommand = realloc(fullCommand, (strlen(fullCommand) + strlen(launchCommand[i]) + 2));
sprintf(fullCommand, "%s %s", fullCommand, launchCommand[i]);
sprintf(fullCommand + strlen(fullCommand), " %s", launchCommand[i]);
}
fullCommand = realloc(fullCommand, (strlen(fullCommand) + strlen(fullObject) + 2));
sprintf(fullCommand, "%s %s", fullCommand, fullObject);
sprintf(fullCommand + strlen(fullCommand), " %s", fullObject);
free(fullObject);
char *args[countArguments(fullCommand)];
buildCommandArguments(fullCommand, args, countArguments(fullCommand));
Expand Down

0 comments on commit 9420281

Please sign in to comment.