Enlightenment CVS committal
Author : fletch3k
Project : misc
Module : enotes
Dir : misc/enotes/src
Modified Files:
main.c main.h notenum.c
Log Message:
Bugs suggested by benr and vac are fixed.
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- main.c 6 Feb 2003 17:52:30 -0000 1.5
+++ main.c 6 Feb 2003 21:33:00 -0000 1.6
@@ -68,7 +68,7 @@
tmp=malloc(str_size);
str=malloc(str_size);
- fn=malloc(str_size);
+ fn=malloc(100);
fontdir=malloc(str_size);
bgfile=malloc(str_size);
font=malloc(str_size);
@@ -83,21 +83,15 @@
strcat(fontdir, ".");
strcpy(fn, getenv("HOME"));
strcat(fn, "/.e/enotes/notes");
- strcat(bgfile, "bg.jpg");
- strcat(font, "arial");
- strcpy(configfn, getenv("HOME"));
- strcat(configfn, "/.e/enotes/config");
- strcat(xbtnfn, "x.png");
- strcpy(openwinimg, getenv("HOME"));
- strcat(openwinimg, "/.e/enotes/data/titleimg.jpg");
- strcpy(lastbtn, getenv("HOME"));
- strcpy(firstbtn, getenv("HOME"));
- strcpy(nubtn, getenv("HOME"));
- strcpy(newbtn, getenv("HOME"));
- strcat(lastbtn, "/.e/enotes/data/lastbtn.png");
- strcat(firstbtn, "/.e/enotes/data/firstbtn.png");
- strcat(nubtn, "/.e/enotes/data/nubtn.png");
- strcat(newbtn, "/.e/enotes/data/newbtn.png");
+ strcpy(bgfile, "/usr/local/share/enotes/data/bg.jpg");
+ strcpy(font, "/usr/local/share/enotes/data/arial.ttf");
+ strcpy(configfn, "/usr/local/share/enotes/data/config");
+ strcpy(xbtnfn, "/usr/local/share/enotes/data/x.png");
+ strcpy(openwinimg, "/usr/local/share/enotes/data/titleimg.jpg");
+ strcpy(lastbtn, "/usr/local/share/enotes/data/lastbtn.png");
+ strcpy(firstbtn, "/usr/local/share/enotes/data/firstbtn.png");
+ strcpy(nubtn, "/usr/local/share/enotes/data/nubtn.png");
+ strcpy(newbtn, "/usr/local/share/enotes/data/newbtn.png");
r=0; g=0; b=0;
bar_r=100; bar_g=100;
bar_b=100; w=250; h=250;
@@ -240,14 +234,22 @@
void
freethem ()
{
- free(tmp);
- free(str);
- free(fn);
- free(fontdir);
- free(bgfile);
- free(font);
- free(configfn);
- free(xbtnfn);
+ if (tmp)
+ free(tmp);
+ if (str)
+ free(str);
+ if (fn)
+ free(fn);
+ if (fontdir)
+ free(fontdir);
+ if (bgfile)
+ free(bgfile);
+ if (font)
+ free(font);
+ if (configfn)
+ free(configfn);
+ if (xbtnfn)
+ free(xbtnfn);
}
void
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/main.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- main.h 6 Feb 2003 20:53:40 -0000 1.5
+++ main.h 6 Feb 2003 21:33:01 -0000 1.6
@@ -129,28 +129,28 @@
extern Ewl_Widget *cancelbtn;
-void openwin ();
-void makebar ();
+void openwin (void);
+void makebar (void);
void fnotenum (int num);
void fileopen (char *mode);
-void displayall ();
-void dislast ();
-void clear ();
+void displayall (void);
+void dislast (void);
+void clear (void);
void newnote (int argc, char *argv[]);
-void count ();
+void count (void);
-void notengui ();
+void notengui (void);
void getncmd (char *number);
-void setconfig ();
+void setconfig (void);
void kill_main_window (Ewl_Widget * main_win, void *ev_data, void *user_data);
void fadein (int fadeloop, char *tmpstr);
void fadeout (int fadeloop);
-void freethem ();
+void freethem (void);
void slideout (int slideloop);
void slidein (int slideloop);
===================================================================
RCS file: /cvsroot/enlightenment/misc/enotes/src/notenum.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- notenum.c 6 Feb 2003 20:53:41 -0000 1.5
+++ notenum.c 6 Feb 2003 21:33:01 -0000 1.6
@@ -48,6 +48,7 @@
int loop=0;
+
fileopen("r");
while(loop!=(13*(num-1))) {
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs