diff -r -u GMT4.1.1.old/Makefile GMT4.1.1/Makefile --- GMT4.1.1.old/Makefile 2006-02-27 19:25:01.000000000 -0500 +++ GMT4.1.1/Makefile 2006-03-03 16:55:56.000000000 -0500 @@ -109,19 +109,21 @@ done mex_config: + if [ -d src/mex ]; then \ if [ ! -f src/mex/makefile ]; then \ cd src/mex; \ \rm -f config.{cache,log,status}; \ ./configure; \ + fi \ fi - xgrid_config: + if [ -d src/xgrid ]; then \ if [ ! -f src/xgrid/makefile ]; then \ cd src/xgrid; \ \rm -f config.{cache,log,status}; \ ./configure; \ + fi \ fi - gmtmacros: if [ ! -s src/makegmt.macros ]; then \ echo "src/makegmt.macros is empty - you must rerun configure in the main GMT directory"; \ diff -r -u GMT4.1.1.old/src/gmt_init.c GMT4.1.1/src/gmt_init.c --- GMT4.1.1.old/src/gmt_init.c 2006-02-22 17:52:55.000000000 -0500 +++ GMT4.1.1/src/gmt_init.c 2006-03-03 15:23:01.000000000 -0500 @@ -2351,7 +2351,7 @@ if (get == 0) { /* Must use GMT system defaults via gmt.conf */ - sprintf (line, "%s%cshare%cgmt.conf", GMTHOME, DIR_DELIM, DIR_DELIM); + sprintf (line, "%s%cshare%cgmt%cgmt.conf", GMTHOME, DIR_DELIM, DIR_DELIM,DIR_DELIM); if ((fp = fopen (line, "r")) == NULL) { fprintf (stderr, "GMT Fatal Error: Cannot open/find GMT configuration file %s\n", line); exit (EXIT_FAILURE); @@ -2372,7 +2372,7 @@ id = get; id--; /* Get 0 or 1 */ - sprintf (line, "%s%cshare%c.gmtdefaults_%s", GMTHOME, DIR_DELIM, DIR_DELIM, suffix[id]); + sprintf (line, "%s%cshare%cgmt%c.gmtdefaults_%s", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, suffix[id]); path = (char *) GMT_memory (VNULL, (size_t)(strlen (line) + 1), (size_t)1, GMT_program); @@ -2481,7 +2481,7 @@ FILE *fp; char line[BUFSIZ], path[BUFSIZ]; - sprintf (path, "%s%cshare%c%s", GMTHOME, DIR_DELIM, DIR_DELIM, name); + sprintf (path, "%s%cshare%cgmt%c%s", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, name); if (!strcmp ("Sphere", name)) { /* Special case where previous setting in .gmtdefaults4 is a custom ellipse which @@ -2560,7 +2560,7 @@ GMT_set_home (); - sprintf (line, "%s%cshare%cgmtmedia.d", GMTHOME, DIR_DELIM, DIR_DELIM); + sprintf (line, "%s%cshare%cgmt%gmtmedia.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); if ((fp = fopen (line, "r")) == NULL) return (0); n_alloc = GMT_TINY_CHUNK; @@ -2618,10 +2618,10 @@ char file[BUFSIZ], line[BUFSIZ], full[16], abbrev[16], c[16], dwu; int i, nm = 0, nw = 0, nu = 0; - sprintf (file, "%s%cshare%ctime%c%s.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, name); + sprintf (file, "%s%cshare%cgmt%ctime%c%s.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM, name); if ((fp = fopen (file, "r")) == NULL) { fprintf (stderr, "GMT Warning: Could not load %s - revert to us (English)!\n", name); - sprintf (file, "%s%cshare%ctime%cus.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); + sprintf (file, "%s%cshare%cgmt%ctime%cus.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM); if ((fp = fopen (file, "r")) == NULL) { fprintf (stderr, "GMT Error: Could not find %s!\n", file); exit (EXIT_FAILURE); @@ -4809,7 +4809,7 @@ int code = 0, pos; FILE *in; - sprintf (line, "%s%cshare%cpslib%c%s.ps", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, enc->name); + sprintf (line, "%s%cshare%cgmt%cpslib%c%s.ps", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM, enc->name); in = GMT_fopen (line, "r"); if (!in) @@ -4886,7 +4886,7 @@ /* First the standard 35 PostScript fonts from Adobe */ - sprintf (fullname, "%s%cshare%cpslib%cPS_font_info.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); + sprintf (fullname, "%s%cshare%cgmt%cpslib%cPS_font_info.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM); if ((in = fopen (fullname, "r")) == NULL) { @@ -4916,7 +4916,7 @@ /* Then any custom fonts */ - sprintf (fullname, "%s%cshare%cpslib%cCUSTOM_font_info.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); + sprintf (fullname, "%s%cshare%cgmt%cpslib%cCUSTOM_font_info.d", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM); if (!access (fullname, R_OK)) { /* Decode Custom font file */ diff -r -u GMT4.1.1.old/src/gmt_support.c GMT4.1.1/src/gmt_support.c --- GMT4.1.1.old/src/gmt_support.c 2006-02-20 20:51:21.000000000 -0500 +++ GMT4.1.1/src/gmt_support.c 2006-03-03 15:28:29.000000000 -0500 @@ -1009,9 +1009,9 @@ if (!ok) { /* No table in current dir, try /share */ if (table) - sprintf (CPT_file, "%s%cshare%ccpt%cGMT_%s.cpt", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, table); + sprintf (CPT_file, "%s%cshare%cgmt%ccpt%cGMT_%s.cpt", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM, table); else /* Default to rainbow colors */ - sprintf (CPT_file, "%s%cshare%ccpt%cGMT_rainbow.cpt", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); + sprintf (CPT_file, "%s%cshare%cgmt%ccpt%cGMT_rainbow.cpt", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM); ok = !access (CPT_file, R_OK); if (!ok) @@ -5457,7 +5457,7 @@ /* First check the $GMTHOME/share directory */ - sprintf (path, "%s%cshare%c%s", GMTHOME, DIR_DELIM, DIR_DELIM, name); + sprintf (path, "%s%cshare%cgmt%c%s", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, name); if (!access (path, R_OK)) return (TRUE); /* File exists and is readable, return with name */ /* File was not readable. Now check if it exists */ @@ -5471,7 +5471,7 @@ * It is not an error if we cannot find the named file, only if it is found * but cannot be read due to permission problems */ - sprintf (dir, "%s%cshare%ccoastline.conf", GMTHOME, DIR_DELIM, DIR_DELIM); + sprintf (dir, "%s%cshare%cgmt%ccoastline.conf", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); if (!access (dir, F_OK)) { /* File exists... */ if (access (dir, R_OK)) { /* ...but cannot be read */ fprintf (stderr, "%s: Error: GMT does not have permission to open %s!\n", GMT_program, dir); @@ -6100,7 +6100,7 @@ /* Open the list in $GMTHOME/share */ - sprintf (list, "%s%cshare%cGMT_CustomSymbols.lis", GMTHOME, DIR_DELIM, DIR_DELIM); + sprintf (list, "%s%cshare%cgmt%cGMT_CustomSymbols.lis", GMTHOME, DIR_DELIM, DIR_DELIM); if ((fp = fopen (list, "r")) == NULL) { fprintf (stderr, "%s: ERROR: Cannot open file %s\n", GMT_program, list); @@ -7876,7 +7876,7 @@ sprintf (file, "%s.def", name); if (access (file, R_OK)) { /* Not in current dir, try GMTHOME */ - sprintf (file, "%s%cshare%ccustom%c%s.def", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, name); + sprintf (file, "%s%cshare%cgmt%ccustom%c%s.def", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM, name); if (access (file, R_OK)) { /* Not there either - give up */ fprintf (stderr, "GMT ERROR: %s : Could not find custom symbol %s\n", GMT_program, name); exit (EXIT_FAILURE); diff -r -u GMT4.1.1.old/src/grd2cpt.c GMT4.1.1/src/grd2cpt.c --- GMT4.1.1.old/src/grd2cpt.c 2005-12-17 00:59:22.000000000 -0500 +++ GMT4.1.1/src/grd2cpt.c 2006-03-03 15:29:44.000000000 -0500 @@ -70,7 +70,7 @@ /* Get list of available color tables in $GMTHOME/share/cpt */ - sprintf (CPT_lis, "%s%cshare%cGMT_CPT.lis", GMTHOME, DIR_DELIM, DIR_DELIM); + sprintf (CPT_lis, "%s%cshare%cgmt%cGMT_CPT.lis", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); if ((fpc = fopen (CPT_lis, "r")) == NULL) { fprintf (stderr, "%s: ERROR: Cannot open file %s\n", GMT_program, CPT_lis); diff -r -u GMT4.1.1.old/src/makecpt.c GMT4.1.1/src/makecpt.c --- GMT4.1.1.old/src/makecpt.c 2005-12-17 00:59:22.000000000 -0500 +++ GMT4.1.1/src/makecpt.c 2006-03-03 15:30:22.000000000 -0500 @@ -48,7 +48,7 @@ /* Get list of available color tables in $GMTHOME/share/cpt */ - sprintf (CPT_lis, "%s%cshare%cGMT_CPT.lis", GMTHOME, DIR_DELIM, DIR_DELIM); + sprintf (CPT_lis, "%s%cshare%cgmt%cGMT_CPT.lis", GMTHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); if ((fpc = fopen (CPT_lis, "r")) == NULL) { fprintf (stderr, "%s: ERROR: Cannot open file %s\n", GMT_program, CPT_lis); diff -r -u GMT4.1.1.old/src/pslib.c GMT4.1.1/src/pslib.c --- GMT4.1.1.old/src/pslib.c 2006-01-22 23:41:58.000000000 -0500 +++ GMT4.1.1/src/pslib.c 2006-03-03 15:32:34.000000000 -0500 @@ -889,7 +889,7 @@ if ((image_no >= 0 && image_no < N_PATTERNS) && ps_pattern[image_no].status) return (image_no); /* Already done this */ if ((image_no >= 0 && image_no < N_PATTERNS)) /* Premade pattern yet not used */ - sprintf (file, "%s%cshare%cpattern%cps_pattern_%2.2d.ras", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, image_no); + sprintf (file, "%s%cshare%cgmt%cpattern%cps_pattern_%2.2d.ras", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM, image_no); else { /* User image, check to see if already used */ for (i = 0, found = FALSE; !found && i < ps_n_userimages; i++) found = !strcmp (ps_user_image[i], imagefile); @@ -905,7 +905,7 @@ if (!access (imagefile, R_OK)) strcpy (file, imagefile); else - sprintf (file, "%s%cshare%c%s", PSHOME, DIR_DELIM, DIR_DELIM, imagefile); + sprintf (file, "%s%cshare%cgmt%c%s", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, imagefile); } ps_user_image[ps_n_userimages] = (char *) ps_memory (VNULL, (size_t)(strlen (imagefile)+1), sizeof (char)); strcpy (ps_user_image[ps_n_userimages], imagefile); @@ -4187,7 +4187,7 @@ char buf[80]; char fullname[BUFSIZ]; - sprintf (fullname, "%s%cshare%cpslib%c%s.ps", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, fname); + sprintf (fullname, "%s%cshare%cgmt%cpslib%c%s.ps", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM, fname); in = fopen (fullname, "r"); if (in == NULL) @@ -4212,7 +4212,7 @@ /* First the standard 35 PostScript fonts from Adobe */ - sprintf (fullname, "%s%cshare%cpslib%cPS_font_info.d", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); + sprintf (fullname, "%s%cshare%cgmt%cpslib%cPS_font_info.d", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM); if ((in = fopen (fullname, "r")) == NULL) { @@ -4242,7 +4242,7 @@ /* Then any custom fonts */ - sprintf (fullname, "%s%cshare%cpslib%cCUSTOM_font_info.d", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM); + sprintf (fullname, "%s%cshare%cgmt%cpslib%cCUSTOM_font_info.d", PSHOME, DIR_DELIM, DIR_DELIM, DIR_DELIM, DIR_DELIM); if (!access (fullname, R_OK)) { /* Decode Custom font file */