comparison mplayer.c @ 9318:51a9af80d874

PATH_MAX should be more portable, and we even include limits.h to be sure
author arpi
date Fri, 07 Feb 2003 19:44:12 +0000
parents c7f5df43b937
children 2e8204f9da6d
comparison
equal deleted inserted replaced
9317:c7f5df43b937 9318:51a9af80d874
13 #include <sys/stat.h> 13 #include <sys/stat.h>
14 14
15 #include <signal.h> 15 #include <signal.h>
16 #include <time.h> 16 #include <time.h>
17 #include <fcntl.h> 17 #include <fcntl.h>
18 #include <limits.h>
18 19
19 #include <errno.h> 20 #include <errno.h>
20 21
21 #include "version.h" 22 #include "version.h"
22 #include "config.h" 23 #include "config.h"
764 char cwd[MAXPATHLEN+2]; 765 char cwd[MAXPATHLEN+2];
765 // Remove Playtree and Playtree-Iter from memory as its not used by gui 766 // Remove Playtree and Playtree-Iter from memory as its not used by gui
766 play_tree_iter_free(playtree_iter); 767 play_tree_iter_free(playtree_iter);
767 playtree_iter=NULL; 768 playtree_iter=NULL;
768 769
769 if (getcwd(cwd, MAXPATHLEN) != (char *)NULL) 770 if (getcwd(cwd, PATH_MAX) != (char *)NULL)
770 { 771 {
771 strcat(cwd, "/"); 772 strcat(cwd, "/");
772 // Prefix relative paths with current working directory 773 // Prefix relative paths with current working directory
773 play_tree_add_bpf(playtree, cwd); 774 play_tree_add_bpf(playtree, cwd);
774 } 775 }