/************************************************* -*- mode: C -*- * $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_create_dir.c,v 1.4 2006/03/10 05:50:23 edhill Exp $ * $Name: $ */ /* Here, we get the definition of the FC_NAMEMANGLE() macro. */ #include "FC_NAMEMANGLE.h" #include #include #include #include #include #include #include #include #include void FC_NAMEMANGLE(mnccdir) ( int *nienc, int *ienc, int *idate ) { char name[512], dname[512]; struct tm * tmp; time_t tt; int i, j, n, ntot, iyyyymmdd; mode_t mode = 0x0; char * cenc = {"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.,+-=/~\0"}; int ncenc = 70; n = ((*nienc) > 500) ? 500 : (*nienc); tt = time(&tt); tmp = localtime(&tt); iyyyymmdd = tmp->tm_mday + 100*(tmp->tm_mon + 1 + 100*(1900+tmp->tm_year)); for (i=0; i