use G_SEARCHPATH_SEPARATOR_S
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Thu Apr 29 16:32:11 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
|
||||||
|
|
||||||
|
* plug-ins/gfig/gfig.c : OS/2 patches.
|
||||||
|
use G_SEARCHPATH_SEPARATOR_S instead of ":", add sys/types.h,,.
|
||||||
|
|
||||||
1999-04-29 Michael Natterer <mitschel@cs.tu-berlin.de>
|
1999-04-29 Michael Natterer <mitschel@cs.tu-berlin.de>
|
||||||
|
|
||||||
* app/brush_select.[ch]
|
* app/brush_select.[ch]
|
||||||
|
@ -48,10 +48,10 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -838,13 +838,13 @@ plug_in_parse_gfig_path()
|
|||||||
|
|
||||||
/* Search through all directories in the path */
|
/* Search through all directories in the path */
|
||||||
|
|
||||||
token = strtok (path_string, ":");
|
token = strtok (path_string, G_SEARCHPATH_SEPARATOR_S);
|
||||||
|
|
||||||
while (token)
|
while (token)
|
||||||
{
|
{
|
||||||
if (*token == '\0')
|
if (*token == '\0')
|
||||||
{
|
{
|
||||||
token = strtok (NULL, ":");
|
token = strtok (NULL, G_SEARCHPATH_SEPARATOR_S);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -858,6 +858,9 @@ plug_in_parse_gfig_path()
|
|||||||
path = g_malloc (strlen (token) + 2);
|
path = g_malloc (strlen (token) + 2);
|
||||||
strcpy (path, token);
|
strcpy (path, token);
|
||||||
} /* else */
|
} /* else */
|
||||||
|
#ifdef __EMX__
|
||||||
|
_fnslashify(path);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check if directory exists */
|
/* Check if directory exists */
|
||||||
err = stat (path, &filestat);
|
err = stat (path, &filestat);
|
||||||
@ -879,7 +882,7 @@ plug_in_parse_gfig_path()
|
|||||||
create_warn_dialog(buf);
|
create_warn_dialog(buf);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
token = strtok (NULL, ":");
|
token = strtok (NULL, G_SEARCHPATH_SEPARATOR_S);
|
||||||
}
|
}
|
||||||
g_free (path_string);
|
g_free (path_string);
|
||||||
}
|
}
|
||||||
@ -6229,10 +6232,18 @@ gfig_update_stat_labels()
|
|||||||
if(current_obj->filename)
|
if(current_obj->filename)
|
||||||
{
|
{
|
||||||
gint slen;
|
gint slen;
|
||||||
|
#ifndef __EMX__
|
||||||
gchar *hm = getenv("HOME");
|
gchar *hm = getenv("HOME");
|
||||||
|
#else
|
||||||
|
gchar *hm = _fnslashify(g_strdup(getenv("HOME")));
|
||||||
|
#endif
|
||||||
gchar *dfn = g_strdup(current_obj->filename);
|
gchar *dfn = g_strdup(current_obj->filename);
|
||||||
|
|
||||||
|
#ifndef __EMX__
|
||||||
if(!strncmp(dfn,hm,strlen(hm)-1))
|
if(!strncmp(dfn,hm,strlen(hm)-1))
|
||||||
|
#else
|
||||||
|
if(!strnicmp(dfn,hm,strlen(hm)-1))
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
strcpy(dfn,"~");
|
strcpy(dfn,"~");
|
||||||
strcat(dfn,&dfn[strlen(hm)]);
|
strcat(dfn,&dfn[strlen(hm)]);
|
||||||
@ -6248,6 +6259,9 @@ gfig_update_stat_labels()
|
|||||||
else
|
else
|
||||||
sprintf(str,"%.40s",dfn);
|
sprintf(str,"%.40s",dfn);
|
||||||
g_free(dfn);
|
g_free(dfn);
|
||||||
|
#ifdef __EMX__
|
||||||
|
g_free(hm);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprintf(str,"<NONE>");
|
sprintf(str,"<NONE>");
|
||||||
|
Reference in New Issue
Block a user