/************************************************************************/ /* */ /* IL_CALL */ /* */ /* Autor : Christoph Bartholme */ /* Compiler : Turbo C V2.03 (Tabsize: 4) */ /* */ /* Kleines Beispiel zur šbergabe von Dateien an */ /* die in IdeaList (ab V3.3) eingebaute Drucker-Warteschlage */ /* */ /* Besonderheiten: */ /* - l„uft als PRG oder ACC */ /* - voll CALCLOCK-konform. */ /* - In der Quelle k”nnen beliebig viele CALCLOCK-f„hige */ /* Programme angegeben werden, die nacheinander gesucht werden. */ /* */ /* Die Routinen dieses Programms k”nnen und drfen Sie in */ /* eigene Projekte einbauen. Bitte geben Sie IL_CALL und die */ /* Quellen stets zusammen und unver„ndert weiter. */ /* */ /************************************************************************/ /* -------------------------------------------------------------------- */ /* include - Files: */ #include #include #include #include #include /* -------------------------------------------------------------------- */ /* Typendefinition: */ typedef enum {FALSE, TRUE} boolean; typedef unsigned int word; /* -------------------------------------------------------------------- */ /* Globale Variablen: */ int gl_apid; int menu_id; char path[80] = "A:"; char pathandname[80]; /* RSC-Daten fr das Men: */ #define NUM_OBS 19 #define M_INFO 7 #define M_DOIT 16 #define M_QUIT 18 static OBJECT menu[] = { -1, 1, 5, G_IBOX , /* Object 0 */ NONE, NORMAL, (long)0x00000000L, 0x0000, 0x0000, 0x0050, 0x0019, 5, 2, 2, G_BOX , /* Object 1 */ NONE, NORMAL, (long)0x00001100L, 0x0000, 0x0000, 0x0050, 0x0201, 1, 3, 4, G_IBOX , /* Object 2 */ NONE, NORMAL, (long)0x00000000L, 0x0002, 0x0000, 0x0010, 0x0301, 4, -1, -1, G_TITLE , /* Object 3 */ NONE, NORMAL, (long)" IL_CALL", 0x0000, 0x0000, 0x0009, 0x0301, 2, -1, -1, G_TITLE , /* Object 4 */ NONE, NORMAL, (long)" Datei", 0x0009, 0x0000, 0x0007, 0x0301, 0, 6, 15, G_IBOX , /* Object 5 */ NONE, NORMAL, (long)0x00000000L, 0x0000, 0x0301, 0x0050, 0x0017, 15, 7, 14, G_BOX , /* Object 6 */ NONE, NORMAL, (long)0x00FF1100L, 0x0002, 0x0000, 0x0013, 0x0008, 8, -1, -1, G_STRING , /* Object 7 */ NONE, NORMAL, (long)" Programminfo... ", 0x0000, 0x0000, 0x0013, 0x0001, 9, -1, -1, G_STRING , /* Object 8 */ NONE, DISABLED, (long)"-------------------", 0x0000, 0x0001, 0x0013, 0x0001, 10, -1, -1, G_STRING , /* Object 9 */ NONE, NORMAL, (long)" Desk Accessory 1 ", 0x0000, 0x0002, 0x0013, 0x0001, 11, -1, -1, G_STRING , /* Object 10 */ NONE, NORMAL, (long)" Desk Accessory 2 ", 0x0000, 0x0003, 0x0013, 0x0001, 12, -1, -1, G_STRING , /* Object 11 */ NONE, NORMAL, (long)" Desk Accessory 3 ", 0x0000, 0x0004, 0x0013, 0x0001, 13, -1, -1, G_STRING , /* Object 12 */ NONE, NORMAL, (long)" Desk Accessory 4 ", 0x0000, 0x0005, 0x0013, 0x0001, 14, -1, -1, G_STRING , /* Object 13 */ NONE, NORMAL, (long)" Desk Accessory 5 ", 0x0000, 0x0006, 0x0013, 0x0001, 6, -1, -1, G_STRING , /* Object 14 */ NONE, NORMAL, (long)" Desk Accessory 6 ", 0x0000, 0x0007, 0x0013, 0x0001, 5, 16, 18, G_BOX , /* Object 15 */ NONE, NORMAL, (long)0x00FF1100L, 0x000B, 0x0000, 0x000F, 0x0003, 17, -1, -1, G_STRING , /* Object 16 */ NONE, NORMAL, (long)" Mitteilen... ", 0x0000, 0x0000, 0x000F, 0x0001, 18, -1, -1, G_STRING , /* Object 17 */ NONE, DISABLED, (long)"---------------", 0x0000, 0x0001, 0x000F, 0x0001, 15, -1, -1, G_STRING , /* Object 18 */ LASTOB, NORMAL, (long)" Ende ", 0x0000, 0x0002, 0x000F, 0x0001 }; /* -------------------------------------------------------------------- */ /* Extern definierte globale Variablen: */ extern int _app; /* -------------------------------------------------------------------- */ /* Funktionsprototypen: */ void do_it(void); void event_loop(void); /* -------------------------------------------------------------------- */ void main(void) { int i=0; gl_apid = appl_init(); if (gl_apid >= 0) { path[0] = Dgetdrv() +'A'; /* Zugriffs-Laufwerk, ... */ Dgetpath(path+2,0); /* ... -Pfad und ... */ strcat(path,"\\*.*"); /* ... -Maske initialisieren */ if (!_app) /* Als Accessory gestartet... */ menu_id = menu_register( gl_apid, " Rufe Warteschlange"); else /* Als PRG gestartet... */ { while (i> 16); mbuf[5] = (word)((long)pathandname & 0xffff); mbuf[6] = 1; /* Anzahl der Kopien */ mbuf[7] = 0; /* 0 = nach Drucken nicht l”schen; */ /* 1 = nach Drucken l”schen */ appl_write(calclockId, 16, &mbuf); event = evnt_multi( MU_MESAG|MU_TIMER, /* Und auf die Antwort... */ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, mess, 2000, 0, /* ... 2000 ms warten! */ &dum, &dum, &dum, &dum, &dum, &dum); if (((event & MU_TIMER) != 0) && (mess[0] != 0x65)) { strcat(atext21,identifier); strcat(atext21,atext22); form_alert(1, atext21); } } } } } /* ---------------------------------- EOF ---------------------------- */