/[MITgcm]/mitgcm.org/devel/buildweb/code-browser/F90Mapper/makeOutputDirectories.c
ViewVC logotype

Contents of /mitgcm.org/devel/buildweb/code-browser/F90Mapper/makeOutputDirectories.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Fri Sep 20 19:47:31 2002 UTC (22 years, 9 months ago) by adcroft
Branch: Import, MAIN
CVS Tags: baseline, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
Importing web-site building process.

1 #include <stdio.h>
2 #include <errno.h>
3 #include <string.h>
4 #include "GLOBALS.h"
5
6 int makeOutputDirectories(dName)
7 /* Create a directory for output if it soed not already exist */
8 char *dName;
9 {
10 int rc;
11 char dNamBuf[MAXPATHNAM];
12
13 if ( strlen(dName) > MAXPATHNAM - strlen(VARSUF)-2 ){
14 return(-1);
15 }
16 rc = mkdir(dName, 0755);
17 if ( rc != 0 ){ if ( errno != EEXIST ) return(-1); }
18 rootDir = strdup(dName);
19 sprintf(dNamBuf,"%s/%s",dName,VARSUF);
20 rc = mkdir(dNamBuf, 0755);
21 if ( rc != 0 ){ if ( errno != EEXIST ) return(-1); }
22 varDir = strdup(dNamBuf);
23 sprintf(dNamBuf,"%s/%s",dName,SRCSUF);
24 rc = mkdir(dNamBuf, 0755);
25 if ( rc != 0 ){ if ( errno != EEXIST ) return(-1); }
26 srcDir = strdup(dNamBuf);
27
28 return(0);
29 }

  ViewVC Help
Powered by ViewVC 1.1.22