Build doom on clipv2 and clip+
[kugel-rb.git] / apps / plugins / zxbox / interf.c
blob10c3dfa363a301a26e5cc916fdbf58dba2b4062f
1 /*
2 * Copyright (C) 1996-1998 Szeredi Miklos
3 * Email: mszeredi@inf.bme.hu
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. See the file COPYING.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include "zxconfig.h"
22 #include "interf.h"
24 #include <stdio.h>
25 #include <ctype.h>
27 #define MAXMSGLEN 2048
29 char filenamebuf[MAXFILENAME];
30 char msgbuf[MAXMSGLEN];
32 char *spif_get_filename(void)
34 char *name=NULL;
35 #if 0
36 /* should be implemented when adding ability */
37 /* to open snapshots from within zxbox */
38 char *name, *s;
40 s = get_filename_line();
41 for(; *s && isspace((int) *s); s++);
42 name = s;
43 for(; *s && isgraph((int) *s); s++);
44 *s = '\0';
46 if(name == s) {
47 printf("Canceled!\n");
48 return NULL;
50 #endif
51 return name;
54 char *spif_get_tape_fileinfo(int *startp, int *nump)
56 *startp=*nump=0;
57 char *name=NULL;
58 #if 0
59 /* should be implemented when adding ability */
60 /* to tapes snapshots from within zxbox */
62 char *name, *s;
63 int res;
65 s = get_filename_line();
66 for(; *s && isspace((int) *s); s++);
67 name = s;
68 for(; *s && isgraph((int) *s); s++);
70 if(name != s) res = 1;
71 else res = 0;
73 if(*s) {
74 *s = '\0';
75 s++;
76 if(*s) {
77 int r1;
79 r1 = sscanf(s, "%d %d", startp, nump);
80 if(r1 > 0) res += r1;
84 if(res < 1) {
85 printf("Canceled!\n");
86 return NULL;
89 if(res < 2) *startp = -1;
90 if(res < 3) *nump = -1;
91 #endif
92 return name;
95 void put_msg(const char *msg)
97 #ifndef USE_GREY
98 rb->splash (HZ/2, msg );
99 #else
100 LOGF(msg);
101 (void)msg;
102 #endif
106 void put_tmp_msg(const char *msg)
108 #ifndef USE_GREY
109 rb->splash (HZ/10, msg );
110 #else
111 LOGF(msg);
112 (void)msg;
113 #endif