Commit 2149db82 authored by Miller Puckette's avatar Miller Puckette
Browse files

bugfix for long paths

parent aaaf124a
......@@ -386,7 +386,7 @@ static char *(usagemessage[]) = {
"-open <file> -- open file(s) on startup\n",
"-lib <file> -- load object library(s)\n",
"-font-size <n> -- specify default font size in points\n",
"-font-face <name> -- specify default font (default: Bitstream Vera Sans Mono)\n",
"-font-face <name> -- specify default font\n",
"-font-weight <name>-- specify default font weight (normal or bold)\n",
"-verbose -- extra printout on startup and when searching for files\n",
"-version -- don't run Pd; just print out which version it is \n",
......@@ -747,13 +747,15 @@ int sys_argparse(int argc, char **argv)
sys_externlist = namelist_append_files(sys_externlist, argv[1]);
argc -= 2; argv += 2;
}
else if ((!strcmp(*argv, "-font-size") || !strcmp(*argv, "-font")) && argc > 1)
else if ((!strcmp(*argv, "-font-size") || !strcmp(*argv, "-font"))
&& argc > 1)
{
sys_defaultfont = sys_nearestfontsize(atoi(argv[1]));
argc -= 2;
argv += 2;
}
else if ((!strcmp(*argv, "-font-face") || !strcmp(*argv, "-typeface")) && argc > 1)
else if ((!strcmp(*argv, "-font-face") || !strcmp(*argv, "-typeface"))
&& argc > 1)
{
strncpy(sys_font,*(argv+1),sizeof(sys_font)-1);
sys_font[sizeof(sys_font)-1] = 0;
......
......@@ -523,16 +523,9 @@ void glob_start_path_dialog(t_pd *dummy)
int i;
t_namelist *nl;
sprintf(buf, "list");
for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++) {
if(nl->nl_string){
strcat(buf, " \"");
strcat(buf, nl->nl_string);
strcat(buf, "\"");
}
}
sys_vgui("pd_set pd_path [%s]\n", buf);
sys_vgui("pd_set pd_path \"\"\n");
for (nl = sys_searchpath, i = 0; nl; nl = nl->nl_next, i++)
sys_vgui("lappend pd_path \"%s\"\n", nl->nl_string);
sprintf(buf, "pdtk_path_dialog %%s %d %d\n", sys_usestdpath, sys_verbose);
gfxstub_new(&glob_pdobject, (void *)glob_start_path_dialog, buf);
}
......@@ -560,16 +553,9 @@ void glob_start_startup_dialog(t_pd *dummy)
int i;
t_namelist *nl;
sprintf(buf, "list");
for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++) {
if(nl->nl_string){
strcat(buf, " \"");
strcat(buf, nl->nl_string);
strcat(buf, "\"");
}
}
sys_vgui("pd_set pd_startup [%s]\n", buf);
sys_vgui("pd_set pd_startup \"\"\n");
for (nl = sys_externlist, i = 0; nl; nl = nl->nl_next, i++)
sys_vgui("lappend pd_startup \"%s\"\n", nl->nl_string);
sprintf(buf, "pdtk_startup_dialog %%s %d \"%s\"\n", sys_defeatrt,
sys_flags->s_name);
gfxstub_new(&glob_pdobject, (void *)glob_start_startup_dialog, buf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment