# include "bss_file.c"
#endif
-#ifndef NOPROTO
int app_init(long mesgwin);
-#else
-int app_init();
-#endif
-
#ifdef undef /* never finished - probably never will be :-) */
int args_from_file(char *file, int *argc, char **argv[])
{
out[n]='\0';
}
#else
+#ifdef VMS
+void program_name(char *in, char *out, int size)
+ {
+ char *p=in, *q;
+ char *chars=":]>";
+
+ while(*chars != '\0')
+ {
+ q=strrchr(p,*chars);
+ if (q > p)
+ p = q + 1;
+ chars++;
+ }
+
+ q=strrchr(p,'.');
+ if (q == NULL)
+ q = in+size;
+ strncpy(out,p,q-p);
+ out[q-p]='\0';
+ }
+#else
void program_name(char *in, char *out, int size)
{
char *p;
out[size-1]='\0';
}
#endif
+#endif
#ifdef WIN32
int WIN32_rename(char *from, char *to)
{
+#ifdef WINNT
int ret;
+/* Note: MoveFileEx() doesn't work under Win95, Win98 */
ret=MoveFileEx(from,to,MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED);
return(ret?0:-1);
+#else
+ unlink(to);
+ return MoveFile(from, to);
+#endif
}
#endif