diff src/lspst.c @ 172:6954d315aaa8

move version-info into main configure.in, and set it properly. prefix all external symbols in the shared library with pst_ to avoid symbol clashes with other shared libraries.
author Carl Byington <carl@five-ten-sg.com>
date Sat, 04 Apr 2009 16:00:48 -0700
parents 40e9de445038
children 0a4f7ecd7452
line wrap: on
line diff
--- a/src/lspst.c	Sun Mar 29 08:51:13 2009 -0700
+++ b/src/lspst.c	Sat Apr 04 16:00:48 2009 -0700
@@ -33,8 +33,7 @@
     f->skip_count   = 0;
     f->type         = item->type;
     f->stored_count = (item->folder) ? item->folder->item_count : 0;
-    f->dname        = (char*) xmalloc(strlen(item->file_as.str)+1);
-    strcpy(f->dname, item->file_as.str);
+    f->dname        = strdup(item->file_as.str);
 }
 
 
@@ -232,8 +231,7 @@
                 temp++; // get past the "\\"
         else
             temp++; // get past the "/"
-        item->file_as.str = (char*)xmalloc(strlen(temp)+1);
-        strcpy(item->file_as.str, temp);
+        item->file_as.str = strdup(temp);
         item->file_as.is_utf8 = 1;
     }
     WARN(("item->file_as = '%s'.\n", item->file_as.str));