Skip to content

Commit

Permalink
remove several unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandervdm committed Mar 3, 2021
1 parent be6bc20 commit e58a3e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/importer.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,19 @@ const gchar* importer_generate_image (const gchar* filepath, const gchar* captio
gchar scale_str[16] = { 0 };
gchar* loc = NULL;

/* clear previous data */
// clear previous data
result[0] = 0;

// Filepath notation corrections for Windows systems:
#ifdef WIN32
gchar* path = g_strjoinv("/", g_strsplit(filepath, "\\", -1));
// filepath notation correction for win32 systems:
if (utils_subinstr (" ", filepath, FALSE)) {
editor_insert_package (g_active_editor, "grffile", "space");
}
#endif

snprintf (scale_str, 16, "%.2f", scale);

/* some locales use ',' as seperator, replace them as '.' */
// some locales use ',' as seperator, replace them as '.'
if ( (loc = strstr (scale_str, ",")))
*loc = '.';

Expand Down
3 changes: 1 addition & 2 deletions src/motion.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ void motion_resume_compile_thread (GuMotion* m) {

void motion_kill_typesetter (GuMotion* m) {
if (*m->typesetter_pid) {
gchar* command = NULL;
/* Kill children spawned by typesetter command/script, don't know
* how to do this programatically yet(glib doesn't not provides any
* function for killing a process), so use pkill for now. For
* win32 there's currently nothing we can do about it. */
#ifndef WIN32
command = g_strdup_printf("pkill -15 -P %d", *m->typesetter_pid);
gchar* command = g_strdup_printf("pkill -15 -P %d", *m->typesetter_pid);
system(command);
g_free(command);

Expand Down

0 comments on commit e58a3e2

Please sign in to comment.