home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <conio.h>
- #include <key.h>
- #include <string.h>
-
- #define MAX_LINE_LEN 256
-
- unsigned char LineBuf[MAX_LINE_LEN+1];
- unsigned char PdvName[20];
-
- void Quit(void)
- {
- exit(5);
- }
-
- int Confirm(void)
- {
- int k;
-
- printf("╚╖╚╧▓Γ╩╘(Y:▓Γ╩╘▒╛╧ε, N:▓╗▓Γ╩╘▒╛╧ε, Q:╜ß╩°▓Γ╩╘╣ñ╫≈):");
- while (TRUE){
- k=toupper(getch());
- if (k == 'Y' || k == 'N' || k == 'Q') break;
- }
- printf("%c\n",k);
- switch (k){
- case 'Y':
- return TRUE;
- case 'N':
- return FALSE;
- case 'Q':
- exit(5);
- }
- }
-
- void Print(unsigned char *Name)
- {
- FILE *fin,*fou;
- char *s;
-
- if ((fin=fopen(Name,"rt"))==NULL){
- printf("%s ╬─╝■▓╗┤µ╘┌\7\n",Name);
- Quit();
- }
- fou=fopen("PRN","wt");
- while (fgets(LineBuf,MAX_LINE_LEN,fin) != NULL){
- if (kbhit() && getch()==ESC) break;
- if ((s=strstr(LineBuf,"@@")) != NULL) sprintf(s,"%s\n",PdvName);
- fprintf(fou,"%s",LineBuf);
- }
- fclose(fin);
- fclose(fou);
- }
-
- void Test1(void)
- {
- printf("\n╧┬├µ▓Γ╩╘ UCDOS 6.0 ╘ñ╢¿╥σ╫╓╨═▒φ\n");
- if (!Confirm()) return;
- Print("TEST1");
- }
-
- void Test2(void)
- {
- printf("\n╧┬├µ▓Γ╩╘ UCDOS 6.0 ╘ñ╢¿╥σ╫╓║┼▒φ\n");
- if (!Confirm()) return;
- Print("TEST2");
- }
-
- void Test3(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╟░╛░║═▒│╛░╩⌠╨╘┤≥╙í\n");
- if (!Confirm()) return;
- Print("TEST3");
- }
-
- void Test4(void)
- {
- printf("\n╧┬├µ▓Γ╩╘▒φ╕±┤≥╙í\n");
- if (!Confirm()) return;
- Print("TEST4");
- }
-
- void Test5(void)
- {
- printf("\n╧┬├µ┐╜▒┤╖▌╩²╔Φ╓├╣ª─▄, ╒δ╩╜┤≥╙í╗·╬▐╨º\n");
- if (!Confirm()) return;
- Print("TEST5");
- }
-
- void Test6(void)
- {
- printf("\n╧┬├µ▓Γ╩╘┤≥╙í╥│▒▀╜τ║═╫╘╢»╢╘╓╨╣ª─▄╡─▓Γ╩╘\n");
- if (!Confirm()) return;
- Print("TEST6");
- }
-
- void Test7(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╥││ñ╔Φ╓├╣ª─▄\n");
- if (!Confirm()) return;
- Print("TEST7");
- }
-
- void Test8(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╓╜╒┼╨²╫¬╣ª─▄, ╓╗╙╨╝ñ╣Γ┤≥╙í╗·╙╨╨º\n");
- if (!Confirm()) return;
- Print("TEST8");
- }
-
- void Test9(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╦«╞╜┤≥╙í╫°▒Ω╢¿╬╗╣ª─▄, ╒δ╩╜╗≥┼τ─½┤≥╙í╗·▓╗─▄╩╣┤≥╙í═╖║≤═╦\n");
- if (!Confirm()) return;
- Print("TEST9");
- }
-
- void Test10(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╫╓┐Γ╤í╘±\n");
- if (!Confirm()) return;
- Print("TEST10");
- }
-
- void Test11(void)
- {
- printf("\n╧┬├µ▓Γ╩╘┤≥╙í╨▐╩╬╩⌠╨╘\n");
- if (!Confirm()) return;
- Print("TEST11");
- }
-
- void Test12(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╨╨╝Σ╛α║═╫╓╝Σ╛α\n");
- if (!Confirm()) return;
- Print("TEST12");
- }
-
- void Test13(void)
- {
- printf("\n╧┬├µ▓Γ╩╘╨╨─┌┼┼░µ╣ª─▄\n");
- if (!Confirm()) return;
- Print("TEST13");
- }
-
- void Test14(void)
- {
- printf("\n┤≤╫╓┤≥╙í▓Γ╩╘, ▒╪╨δ╧╚═¿╣²PRNTSET╔Φ╓├╫ε┤≤┐╔┤≥╙í╫╓╬¬1024x1600(1/180dpi)\n");
- if (!Confirm()) return;
- Print("TEST14");
- }
-
- void main(int argc,char *argv[])
- {
- printf("UCDOS 6.0 ┤≥╙í╟²╢»│╠╨≥▓Γ╩╘│╠╨≥, ▒▒╛⌐╧ú═√╕▀╝╝╩⌡╝»═┼╣½╦╛, 1996.8\n\n");
- if (argc > 1){
- sprintf(PdvName,"(%s)",argv[1]);
- strupr(PdvName);
- }else PdvName[0]=0;
-
- Test1();
- Test2();
- Test3();
- Test4();
- Test5();
- Test6();
- Test7();
- Test8();
- Test9();
- Test10();
- Test11();
- Test12();
- Test13();
- Test14();
- }