org.guifications.plugins.autoprofile_merge: 96286fd575456440f62de0f8baecab151c44b949

rekkanoryo at guifications.org rekkanoryo at guifications.org
Sun Mar 23 12:55:15 CDT 2008


-----------------------------------------------------------------
Revision: 96286fd575456440f62de0f8baecab151c44b949
Ancestor: d0fec7e91917951690e44882db93d929f8b02b6d
Author: rekkanoryo at guifications.org
Date: 2008-03-23T03:58:26
Branch: org.guifications.plugins.autoprofile_merge

Modified files:
        autoprofile/comp_countdownup.c autoprofile/comp_executable.c

ChangeLog: 

Add string.h and math.h where necessary and convert some strdup() calls to
g_strdup() calls.

-----------------------------------------------------------------
This revision's diffstat output:
 comp_countdownup.c |   20 ++++++++++++--------
 comp_executable.c  |    6 +++++-
 2 files changed, 17 insertions(+), 9 deletions(-)
-------------- next part --------------
============================================================
--- autoprofile/comp_countdownup.c	46ebaf0f9305871d403a712c26f4ff46005a4ce2
+++ autoprofile/comp_countdownup.c	724efa3237698d6cc5741e021581617c6984dbb8
@@ -21,10 +21,14 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA *
  *--------------------------------------------------------------------------*/
 
+#include "../common/pp_internal.h"
+
 #include "component.h"
 #include "gtkprefs.h"
 #include "utility.h"
 
+#include <math.h>
+
 static GtkWidget *spin_secs;
 static GtkWidget *spin_mins;
 static GtkWidget *spin_hour;
@@ -94,24 +98,24 @@ char *count_generate (struct widget *w) 
     d_secs = d_secs + (d_mins * 60);
 
   if (d_days == 1.0)
-    s_days = strdup ("day");
+    s_days = g_strdup ("day");
   else
-    s_days = strdup ("days");
+    s_days = g_strdup ("days");
 
   if (d_hours == 1.0)
-    s_hours = strdup ("hour");
+    s_hours = g_strdup ("hour");
   else
-    s_hours = strdup ("hours");
+    s_hours = g_strdup ("hours");
 
   if (d_mins == 1.0)
-    s_mins = strdup ("minute");
+    s_mins = g_strdup ("minute");
   else
-    s_mins = strdup ("minutes");
+    s_mins = g_strdup ("minutes");
 
   if (d_secs == 1.0)
-    s_secs = strdup ("second");
+    s_secs = g_strdup ("second");
   else
-    s_secs = strdup ("seconds");
+    s_secs = g_strdup ("seconds");
 
   switch (l) {
     case 3:
============================================================
--- autoprofile/comp_executable.c	c49398a63c6b16ed80e8ff223698cba94fe0fec3
+++ autoprofile/comp_executable.c	13efa79bdcb7e04c88004a5907b1c8a46dd3aadf
@@ -21,9 +21,13 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA *
  *--------------------------------------------------------------------------*/
 
+#include "../common/pp_internal.h"
+
 #include "component.h"
 #include "utility.h"
 
+#include <string.h>
+
 /*---------- EXECUTABLE: STDOUT from a program ----------*/
 static GtkWidget *file_selector;
 static GtkWidget *file_entry;
@@ -43,7 +47,7 @@ char *executable_generate (struct widget
   if (!exec) {
     /* Excution failed */
     ap_debug ("executable", "command failed to execute");
-    return strdup (_("[ERROR: command failed to execute]"));
+    return g_strdup (_("[ERROR: command failed to execute]"));
   }
 
   if (strlen (text_start) < max)


More information about the Plugins-commits mailing list