home *** CD-ROM | disk | FTP | other *** search
- /*--------------------------------------------------------------------
- * The GMT-system: @(#)gmt_shore.c 3.9 26 Jun 1995
- *
- * Copyright (c) 1991-1995 by P. Wessel and W. H. F. Smith
- * See README file for copying and redistribution conditions.
- *--------------------------------------------------------------------*/
-
- /* int find_resolutions (fh) */
- #include "gmt_os2.h"
- #include <stdlib.h>
- #include <stdio.h>
- #include <unistd.h>
- void main ()
- {
- /* Checks if full and high resolution coastline files are available */
-
- char file[80];
- int fh[2];
- /*----------------------------------------------------------------------
- * Modifications made to permit the use of an environmental variable
- * (defined in the header file gmt_os2.h) to be used to specify the
- * data path for the GMT data files required.
- *----------------------------------------------------------------------*/
- char *gmt_data_path;
- gmt_data_path = getenv (GMTDATAPATH);
- sprintf (file, "%s/binned_shore_l.cdf\0", gmt_data_path);
- printf ("\nGMTDATAPATH is : %s\n",gmt_data_path);
- printf ("\nLooking for file named %s\n",&file[0]);
- fh[0] = access (file, R_OK);
- sprintf (file, "%s/binned_shore_i.cdf\0", gmt_data_path);
- fh[1] = access (file, R_OK);
- printf ("\nAccess codes are %d %d\n",fh[0],fh[1]);
- exit (0);
- }
-