ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û ÛÛ ÛÛ ÛÛ Û\r
ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û Û \r
ÛÛ ÛÛÛÛÛ ÛÛ ÛÛÛÛ ÛÛ ÛÛ Û Û \r
-ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛ Û ÛÛ A \r
+ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛ Û ÛÛ B \r
ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û ÛÛ ÛÛ\r
ÛÛÛÛ ÛÛÛÛ ÛÛÛÛ ÛÛÛÛÛÛÛ ÛÛÛÛÛ Balthasar Szczepaäski\r
\r
- CPIED 1.3a - the CPI editor\r
+ CPIED 1.3b - the CPI editor\r
\r
============================================================\r
\r
MS-DOS 7.1 - no problems\r
FreeDOS 1.0 - no problems\r
FreeDOS 1.1 - no problems\r
- PTS-DOS 6.8 - a small display error in dialog boxes\r
+ PTS-DOS 6.8 - no problems, but in "safe mode" there is a\r
+ small display bug and cpx2cpi crashes the\r
+ system\r
\r
***The program should run without problems on any DOS-based\r
version of Windows. It was tested on following systems:\r
were no problems. The previous version of the program (1.0)\r
does not run on DOSBox 0.63. No other emulators were tested.\r
\r
-cpx2cpi was not tested on those systems yet!\r
+The program is not tested on all of the systemsafter every\r
+update!\r
+\r
============================================================\r
\r
3. Features and limitations\r
*4 a CPI file is saved and used as a parameter to the DOS\r
"mode" command which loads a codepage into the video card\r
memory:\r
- \r
- mode con:cp prep=((number) path)\r
- mode con:cp sel=number\r
- \r
+\r
+ mode con:cp prep=((number) path)\r
+ mode con:cp sel=number\r
+ \r
This will not work if mode.com or display.sys are\r
not installed on the system. It will also not work on\r
Windows XP or newer or DOS 3.3. DOS will not be able to\r
\r
*The function of arrow keys is changed with Tab.\r
\r
+Dialog boxes:\r
+ Some actions require user input. Type your answer and \r
+ press Enter. To cancel press Esc or leave an empty string.\r
+ When asked for a number everything that is not a number\r
+ will become 0.\r
+\r
Command line:\r
\r
cpied [cpifile] - edir cpi or cpx files\r
\r
cpx2cpi cpxfile cpifile [q] - convert cpx to cpi\r
cpxfile - input file, cpx\r
- cpxfile - output file, cpi\r
- q - no console output\r
+ cpxfile - output file, cpi\r
+ q - no console output\r
\r
============================================================\r
\r
- Added a list of codepages which is also clickable\r
- Removed dependancy on Borland's EGAVGA driver:\r
Code ported to Open Watcom, Borland's graphic functions\r
- replaced with Open Watcom's equivalents\r
- \r
+ replaced with Open Watcom's equivalents\r
+1.3b\r
+ - Dialog boxes can now cancelled with Esc or empty string\r
+ - Added warnings before deleting a font, a codepage or\r
+ closing the program when a file is open\r
+ \r
============================================================\r
\r
6. Planned features\r
\r
- - Saving FONT.NT files \r
+ - Saving CPX files\r
- Exporting codepages to CP files\r
- Importing codepages from CP flies\r
- Exporting fonts to bitmaps\r
- Importing fonts from bitmaps\r
- - Warnings\r
\r
============================================================\r
\r
7. Known bugs\r
\r
-Dialog boxes need improving.\r
+Filename is not checked for reserved symbols\r
+\r
+Coordinates of a deleted font are sometimes displayed.\r
\r
============================================================\r
\r
\r
Requirements:\r
cpx2cpi:\r
- NASM\r
- Turbo C\r
+ ASM\r
+ Turbo C\r
cpied:\r
- Open Watcom\r
+ Open Watcom\r
\r
The makefile should be processed by a make program.\r
I used Borland's make, the real-mode version, makeR. Open\r
- //CPIED version 1.3a\r
+ //CPIED version 1.3b\r
// Balthasar Szczepaäski Copyright 2013\r
//\r
// This file is part of CPIED\r
void cpwys (int mode=0);\r
void redraw();\r
\r
-void displayDialog(int color, char *text, int type=0);\r
-int message (char *text, char *value, int type=1);\r
-void question (char *text, char *result);\r
-unsigned question (char *text);\r
+void displayDialog(int color, char *text, int type=0);\r
+int message (char *text, char *value, int type=1);\r
+unsigned question (char *text, char *result);\r
+unsigned question (char *text, unsigned *result);\r
\r
void ramka8 ();\r
void ramka14();\r
void prevCP();\r
\r
int delCP ();\r
+int delCP2();\r
void delCP3();\r
\r
int newF ();\r
void nextF();\r
\r
int delF ();\r
-void delF3();\r
+int delF2 ();\r
+void delF3 ();\r
int delF8 (short h);\r
int delF14(short h);\r
int delF16(short h);\r
_clearscreen(_GCLEARSCREEN);\r
_setcolor(C_SEL);\r
_moveto(0,0);\r
- _outgtext("CPIED 1.3a±");\r
+ _outgtext("CPIED 1.3b±");\r
_moveto(0,8);\r
_outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±");\r
}\r
_outgtext("± ±");\r
_moveto(152,200);\r
_outgtext("± ±");\r
+ _moveto(152,208);\r
switch(type)\r
{\r
+ case 3:\r
+ _outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±y/n±");\r
+ break;\r
case 2:\r
- _moveto(152,208);_outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±again?(y/n)±");\r
+ _outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±again?(y/n)±");\r
break;\r
case 1:\r
- _moveto(152,208);_outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±anykey±");\r
+ _outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±anykey±");\r
break;\r
case 0:\r
default:\r
- _moveto(152,208);_outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±");\r
+ _outgtext("±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±");\r
break;\r
}\r
}\r
int message(char *text, char *value, int type)\r
{\r
- if (type!=2)\r
+ if (type<2)\r
{\r
displayDialog(C_SET,text,1);\r
printf("%s",value);\r
}\r
else\r
{\r
- displayDialog(C_SET,text,2);\r
+ displayDialog(C_SET,text,type);\r
printf("%s",value);\r
unsigned short a;\r
for(;;)\r
{\r
a=_bios_keybrd(_KEYBRD_READ);\r
- if((a&0xFF)==0x59||(a&0xFF)==0x79)\r
+ if((a&0xFF)==0x59||(a&0xFF)==0x79)//y\r
return 0;\r
- if((a&0xFF)==0x4e||(a&0xff)==0x6e)\r
+ if((a&0xFF)==0x4e||(a&0xff)==0x6e)//n\r
return 1;\r
}\r
}\r
}\r
-inline void question(char *text, char *result)\r
+unsigned question(char *text, char *result)\r
{\r
+ unsigned short p=0;\r
displayDialog(C_SEL,text);\r
- scanf("%s",result);\r
+ for(;;)\r
+ {\r
+ key=_bios_keybrd(_KEYBRD_READ);\r
+ switch(key&0xFF00)\r
+ {\r
+ case 0x0100: //esc\r
+ return 1;\r
+ case 0x1c00: //enter\r
+ if(!p)\r
+ return 1;\r
+ result[p]=0;\r
+ return 0;\r
+ case 0x0e00: //backspace\r
+ if(p)\r
+ {\r
+ putch(8);\r
+ putch(32);\r
+ putch(8);\r
+ --p;\r
+ }\r
+ break;\r
+ default:\r
+ if(key&=0x00FF)\r
+ {\r
+ result[p++]=key;\r
+ putch(key);\r
+ }\r
+ }\r
+ }\r
}\r
-inline unsigned question(char *text)\r
+unsigned question(char *text, unsigned short *result)\r
{\r
char temp[256];\r
- question(text,temp);\r
- return atoi(temp);\r
+ unsigned st;\r
+ st=question(text,temp);\r
+ if(!st)\r
+ *result=atoi(temp);\r
+ return st;\r
}\r
\r
void ramka8()\r
\r
int otw()\r
{\r
- question("Filename",nazwap);\r
+ if(question("Filename",nazwap)==1)\r
+ return 1;\r
+ //deleteCPI();\r
return otw2();\r
}\r
int otw2()\r
sprintf(err,"100:No valid file at this path\n");\r
return 100;\r
}\r
- else\r
- sprintf(err,"OK");\r
-\r
+ deleteCPI();\r
FFH=new FontFileHeader;\r
if(!FFH)\r
{\r
fread(FFH,0x19,1,CPI);\r
if(FFH->id0!=0xff)\r
{\r
- if(FFH->id0==0x81&&FFH->id[0]==0xfc)//maybe it's a CPX?\r
+ if(FFH->id0==0x81&&FFH->id[0]==0xfc)//Looks like a CPX\r
{\r
fclose(CPI);\r
deleteCPI(0);\r
}\r
if(CPEH[a]->device_type!=1)\r
{\r
- sprintf(err,"107:Wrong device type(%u) in CPEH[%u]\n",CPEH[a]->device_type,a);\r
+ sprintf(err,"107:Wrong device type(%u) in cp%03u\n",CPEH[a]->device_type,CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
{\r
if(CPEH[a]->codepage==CPEH[i]->codepage)\r
{\r
- sprintf(err,"114:cp%03u (%u) already in CPEH[%u]\n",CPEH[a]->codepage,a,i);\r
+ sprintf(err,"114:cp%03u duplicated in this CPI\n",CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
}\r
if(CPIH[a]->num_fonts>3)\r
{\r
- sprintf(err,"109:Too many fonts in CPIH[%u] (%u)\n",a,CPIH[a]->num_fonts);\r
+ sprintf(err,"109:Too many fonts in cp%03u (%u)\n",CPEH[a]->codepage,CPIH[a]->num_fonts);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
}\r
if(CPIH[a]->num_fonts==0)\r
{\r
- sprintf(err,"115:No fonts in CPIH[%u])\n",a);\r
+ sprintf(err,"115:No fonts in cp%03u\n",CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
{\r
if (byo8[a]!=0)\r
{\r
- sprintf(err,"113:Height 8 already in cp%03u (%u;%u)\n",CPEH[a]->codepage,a,b);\r
+ sprintf(err,"113:Height 8 duplicated in cp%03u\n",CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
{\r
if (byo14[a]!=0)\r
{\r
- sprintf(err,"113:Height 14 already in cp%03u (%u;%u)\n",CPEH[a]->codepage,a,b);\r
+ sprintf(err,"113:Height 14 duplicated in cp%03u\n",CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
{\r
if (byo16[a]!=0)\r
{\r
- sprintf(err,"113:Height 16 already in cp%03u (%u;%u)\n",CPEH[a]->codepage,a,b);\r
+ sprintf(err,"113:Height 16 duplicated in cp%03u\n",CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
}\r
if(SFH[a][b]->height!=8&&SFH[a][b]->height!=14&&SFH[a][b]->height!=16)\r
{\r
- sprintf(err,"110:Wrong height (%u) in SFH[%u][%u]\n",(short)(SFH[a][b]->height&0xff),a,b);\r
+ sprintf(err,"110:Wrong height (%u) in cp%03u\n",(short)(SFH[a][b]->height&0xff),CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
}\r
if(SFH[a][b]->width!=8)\r
{\r
- sprintf(err,"111:Wrong width (%u) in SFH[%u][%u]\n",(short)(SFH[a][b]->width&0xff),a,b);\r
+ sprintf(err,"111:Wrong width (%u) in cp%03u\n",(short)(SFH[a][b]->width&0xff),CPEH[a]->codepage);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
}\r
if(SFH[a][b]->num_chars!=256)\r
{\r
- sprintf(err,"112:Wrong no.of chars(%u)in SFH[%u][%u]\n",SFH[a][b]->num_chars,a,b);\r
+ sprintf(err,"112:Wrong no.of chars(%u)in cp%03ux%02u\n",SFH[a][b]->num_chars,CPEH[a]->codepage,SFH[a][b]->height);\r
fclose(CPI);\r
if(CPX)\r
remove("tempcpi");\r
_setcolor(C_NON);\r
_moveto(136,472);\r
_outgtext("load");\r
- deleteCPI();\r
status=otw();\r
- while(status!=0)\r
+ switch(status)\r
{\r
- if (message("CPI file not loaded",err,2)==0)\r
- status=otw();\r
- else\r
- break;\r
+ case 100: //not loaded but nothing is lost\r
+ message("CPI file not loaded",err);\r
+ case 1: //cancelled\r
+ redraw();\r
+ return;\r
+ case 0: //success\r
+ any=1;\r
+ cp=0;\r
+ if(byo8[0])\r
+ wys=8;\r
+ else if(byo16[0])\r
+ wys=16;\r
+ else if(byo14[0])\r
+ wys=14;\r
+ redraw();\r
+ return;\r
+ default: //fail\r
+ message("CPI file not loaded",err);\r
+ any=0;\r
+ redraw();\r
+ return;\r
}\r
- any=!status;\r
- cp=0;\r
- if(byo8[0])\r
- wys=8;\r
- else if(byo16[0])\r
- wys=16;\r
- else if(byo14[0])\r
- wys=14;\r
- redraw();\r
}\r
\r
int zap()\r
{\r
- question("Filename",nazwap);\r
+ if(question("Filename",nazwap)==1)\r
+ return 1;\r
return zap2();\r
}\r
int zap2()\r
}\r
}\r
\r
- fprintf(CPI,"\r\nThis file was created with the CPI editor version 1.3a",0x1a);\r
+ fprintf(CPI,"\r\nThis file was created with the CPI editor version 1.3b",0x1a);\r
fclose(CPI);\r
return 0;\r
}\r
_moveto(72,472);\r
_outgtext("save");\r
status=zap();\r
- while(status!=0)\r
- {\r
- if (message("CPI file not saved",err,2)==0)\r
- status=zap();\r
- else\r
- break;\r
- }\r
+ if(status>1)\r
+ message("CPI file not saved",err);\r
redraw();\r
return;\r
}\r
\r
-void use3()///\r
+void use3()///needs to be improved\r
{\r
_setcolor(C_NON);\r
_moveto(72,472);\r
_outgtext("save use");\r
status=zap();\r
- while(status!=0)\r
- {\r
- if (message("CPI file not saved",err,2)==0)\r
- status=zap();\r
- else\r
- break;\r
- }\r
+ if(status>1)\r
+ message("CPI file not saved",err);\r
if(status==0)\r
{\r
+ _setvideomode(_DEFAULTMODE);\r
sprintf(err,"mode con:cp prep=((%u) %s)",CPEH[cp]->codepage,nazwap);\r
puts(err);\r
system(err);\r
sprintf(err,"mode con:cp sel=%u",CPEH[cp]->codepage);\r
puts(err);\r
system(err);\r
- delay(5000);\r
+ //delay(5000);\r
//closegraph();\r
//initgraph(&kart16,&tryb16,"");\r
_setvideomode(_VRES16COLOR);\r
\r
int zmn()\r
{\r
- short CP;\r
- CP=question("Codepage number");\r
+ unsigned short CP;\r
+ if(question("Codepage number",&CP)==1)\r
+ return 1;\r
for(short i=0;i<FIH->num_codepages;++i)\r
{\r
if(CP==CPEH[i]->codepage&&i!=cp)\r
{\r
- sprintf(err,"314:cp%03u already in CPEH[%u]\n",CP,i);\r
+ sprintf(err,"314:cp%03u already in this CPI\n",CP);\r
return 314;\r
}\r
}\r
_moveto(256,472);\r
_outgtext("number");\r
status=zmn();\r
- if(status!=0)\r
+ if(status>1)\r
message("Number not changed",err);\r
redraw();\r
}\r
\r
int newCPI()\r
{\r
- short CP,h;\r
+ unsigned short CP,h;\r
//char temp[51];\r
- CP=question("First codepage number:");\r
- h=question("Initial font height(8,14,16,all)");\r
+ if(question("First codepage number:",&CP)==1)\r
+ return 1;\r
+ if(question("Initial font height(8,14,16,all)",&h)==1)\r
+ return 1;\r
if(h!=0&&h!=8&&h!=14&&h!=16)\r
{\r
sprintf(err,"310:Wrong height (%u)\n",h);\r
int newCPI2(short CP, short h)\r
{\r
int t;\r
+ deleteCPI();\r
FFH=new FontFileHeader;\r
if(!FFH)\r
{\r
_setcolor(C_NON);\r
_moveto(16,472);\r
_outgtext("new");\r
- deleteCPI();\r
status=newCPI();\r
- while(status!=0)\r
- {\r
- if (message("CPI not created",err,2)==0)\r
- status=newCPI();\r
- else\r
- break;\r
- }\r
- any=!status;\r
- if(any)\r
+ switch(status)\r
{\r
+ case 310: //not created but nothing is lost\r
+ message("CPI not created",err);\r
+ case 1: //cancelled\r
+ redraw();\r
+ return;\r
+ case 0: //success\r
+ any=1;\r
strcpy(nazwap,"new CPI");\r
cp=0;\r
if(byo8[0])\r
else if(byo14[0])\r
wys=14;\r
cury&=7;\r
+ redraw();\r
+ return;\r
+ default: //fail\r
+ message("CPI not created",err);\r
+ any=0;\r
+ redraw();\r
+ return;\r
}\r
- redraw();\r
}\r
\r
void deleteCPI(short st,short a,short b)\r
\r
int newCP()\r
{\r
- short CP,h;\r
+ unsigned short CP,h;\r
//char temp[51];\r
if(FIH->num_codepages>=16)\r
{\r
- sprintf(err,"305:Already 16 codepages in CPI\n");\r
+ sprintf(err,"305:Already 16 codepages in this CPI\n");\r
return 305;\r
}\r
- CP=question("Codepage number:");\r
+ if(question("Codepage number:",&CP)==1)\r
+ return 1;\r
for(short i=0;i<FIH->num_codepages;++i)\r
{\r
if(CP==CPEH[i]->codepage)\r
{\r
- sprintf(err,"314:cp%03u already in CPEH[%u]\n",CP,i);\r
+ sprintf(err,"314:cp%03u already in this CPI\n",CP);\r
return 314;\r
}\r
}\r
- h=question("Initial font height(8,14,16,all)");\r
+ if(question("Initial font height(8,14,16,all)",&h)==1)\r
+ return 1;\r
if(h!=0&&h!=8&&h!=14&&h!=16)\r
{\r
sprintf(err,"310:Wrong height (%u)\n",h);\r
_moveto(400,472);\r
_outgtext("newCP");\r
status=newCP();\r
- if(status!=0)\r
+ switch(status)\r
+ {\r
+ case 305:\r
+ case 310:\r
+ case 314:\r
message("Codepage not created",err);\r
- else\r
+ case 1:\r
+ redraw();\r
+ return;\r
+ case 0:\r
cp=FIH->num_codepages-1;\r
- offset();\r
- new8();\r
- menu8();\r
- \r
- normCP();\r
- return;\r
+ offset();\r
+ new8();\r
+ menu8();\r
+ normCP();\r
+ return;\r
+ default:\r
+ message("Codepage not created",err);\r
+ offset();\r
+ redraw();\r
+ return; \r
+ }\r
}\r
\r
void normCP()//\r
return;\r
}\r
\r
-int delCP()\r
+int delCP()\r
{\r
- short i;\r
+ char temp[41];\r
if(FIH->num_codepages<=1)\r
{\r
sprintf(err,"317:Last codepage\n");\r
return 317;\r
}\r
+ sprintf(temp,"Delete cp%03u?\n",CPEH[cp]->codepage);\r
+ if(message("WARNING",temp,3)==1)\r
+ return 1;\r
+ return delCP2();\r
+}\r
+int delCP2()\r
+{\r
+ short i;\r
for(i=0;i<CPIH[cp]->num_fonts;++i)\r
{\r
switch(SFH[cp][i]->height)\r
_moveto(536,472);\r
_outgtext("delCP");\r
status=delCP();\r
- if(status!=0)\r
- message("Codepage not deleted",err);\r
+ if(status)\r
+ {\r
+ if(status>1)\r
+ message("Codepage not deleted",err);\r
+ redraw();\r
+ return;\r
+ } \r
offset();\r
cp%=FIH->num_codepages;\r
new8();\r
\r
int newF()\r
{\r
- short h;\r
+ unsigned short h;\r
if(CPIH[cp]->num_fonts>=3)\r
{\r
- sprintf(err,"309:Already 3 fonts in CPIH[%u]\n",cp);\r
+ sprintf(err,"309:Already 3 fonts in cp%03u\n",CPEH[cp]->codepage);\r
return 309;\r
}\r
- h=question("Font height(8,14,16)");\r
+ if(question("Font height(8,14,16)",&h)==1)\r
+ return 1;\r
return newF2(h);\r
}\r
int newF2(short h)\r
{\r
switch(h)\r
{\r
- case 8:\r
+ case 8: \r
return newF8(cp);\r
case 14:\r
return newF14(cp);\r
_moveto(336,472);\r
_outgtext("newF");\r
status=newF();\r
- if(status!=0)\r
+ switch(status)\r
+ {\r
+ case 309:\r
+ case 310:\r
+ case 313:\r
message("Font not created",err);\r
- offset();\r
- redraw();\r
- return;\r
+ case 1:\r
+ redraw();\r
+ return;\r
+ case 0:\r
+ offset();\r
+ redraw();\r
+ return;\r
+ default:\r
+ message("Font not created",err);\r
+ offset();\r
+ redraw();\r
+ return;\r
+ }\r
}\r
int newF8(short CP)\r
{\r
\r
int delF()\r
{\r
- short h;\r
+ char temp[41];\r
if(CPIH[cp]->num_fonts<=1)\r
{\r
- sprintf(err,"315:Last font in CPIH[%u]\n",cp);\r
+ sprintf(err,"315:Last font in cp%03u\n",CPEH[cp]->codepage);\r
return 315;\r
}\r
+ sprintf(temp,"Delete 8x%02u in cp%03u?\n",wys,CPEH[cp]->codepage);\r
+ if(message("WARNING",temp,3)==1)\r
+ return 1;\r
+ return delF2();\r
+}\r
+int delF2()\r
+{\r
+ short h;\r
+ \r
for(short i=0;i<CPIH[cp]->num_fonts;++i)\r
{\r
if(SFH[cp][i]->height==wys)\r
_moveto(472,472);\r
_outgtext("delF");\r
status=delF();\r
- if(status!=0)\r
- message("Font not deleted",err);\r
+ if(status)\r
+ {\r
+ if(status>1)\r
+ message("Font not deleted",err);\r
+ redraw();\r
+ return;\r
+ }\r
offset();\r
new8();\r
menu8();\r
_setcolor(C_NON);\r
_moveto(616,472);\r
_outgtext("end");\r
- if(maus)\r
- resetMaus();\r
- break;\r
+ if(!any)\r
+ {\r
+ if(maus)\r
+ resetMaus();\r
+ break;\r
+ }\r
+ else if(!message("WARNING","A CPI is open; continue anyway?\n",3))\r
+ {\r
+ if(maus)\r
+ resetMaus();\r
+ break;\r
+ }\r
+ else\r
+ redraw();\r
}\r
while(kbhit())\r
{\r
_setcolor(C_NON);\r
_moveto(616,472);\r
_outgtext("end");\r
- resetMaus();\r
- break;\r
+ if(!any)\r
+ {\r
+ resetMaus();\r
+ break;\r
+ }\r
+ else if(!message("WARNING","A CPI is open; continue anyway?\n",3))\r
+ {\r
+ resetMaus();\r
+ break;\r
+ }\r
+ else\r
+ redraw();\r
}\r
\r
else\r