#include <gpk_std.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "mylib.h"
#ifdef __cplusplus
# include <osfcn.h>
#else
# include <io.h>
#endif

char *makename(C char *s)
{
 char *tmp;
 int i;

 if(!(tmp = (char *)malloc(strlen(s)+12)))
	return tmp;

 for(i=0;;i++)	{
	 sprintf(tmp, "%s%1d", s, i);
	 if(access(tmp, 0) == (-1))
	 	break;
	}

 return tmp;
}
