/* CLOGDEFS (STD) -- Check Logical Library Definitions */ /* CLOGDEFS (STD) -- Logische Bibliotheksdefinitionen pruefen */ /* // Copyright (c) 1993-2012 Oliver Bartels F+E, Muenchen // Author: Manfred Baumeister // Changes History: // rl (120427) RELEASED FOR BAE V7.8. // rl (101019) RELEASED FOR BAE V7.6. // rl (091020) RELEASED FOR BAE V7.4. // rl (081014) RELEASED FOR BAE V7.2. // rl (071213) ENHANCEMENT: // Added library folder selection. // Added complete library folder check option. // rl (071029) RELEASED FOR BAE V7.0. // rl (060829) RELEASED FOR BAE V6.8. // rl (050906) RELEASED FOR BAE V6.6. // rl (040811) RELEASED FOR BAE V6.4. // rl (030904) RELEASED FOR BAE V6.2. // rl (021209) RELEASED FOR BAE V6.0. // rl (020618) RELEASED FOR BAE V5.4. // rl (010625) RELEASED FOR BAE V5.0. // rl (000508) RELEASED FOR BAE V4.6. // rl (990625) RELEASED FOR BAE V4.4. // rl (980910) RELEASED FOR BAE V4.2. // mb (980710) ENHANCEMENT: // Dynamic multi-language support introduced. // rl (970929) RELEASED FOR BAE V4.0. // mb (970715) CHANGE: // Applied new function ddbclassscan. // mb (970611) CHANGE: // Applied new UL system function ddbcheck wherever // appropriate. // mb (960919) RELEASED FOR BAE V3.4. // mb (951012) CHANGE: // Report output to popup (with Dump option) // instead of log file. // mb (95) RELEASED FOR BAE V3.2. // mb (94) RELEASED FOR BAE V3.0. // mb (93) RELEASED FOR BAE V2.6. // mb (93) RELEASED FOR BAE V2.4. // mb (93) ORIGINAL CODING. // // DESCRIPTION // // The clogdefs User Language program examines the SCM symbol // names of selectable library files of the current directory // and checks whether corresponding logical library entries // are existing within a freely selectable layout library. // The resulting library check report is displayed in a popup // menu with file output option. */ // Includes #include "mnu.ulh" // User Language menu utilities // Disable undo state request #pragma ULCALLERNOUNDO // Messages string REPCHKSCM = M("Pruefen SCM-Bibliothek '%s'...", "Checking SCM Library File '%s'..."); string REPHEAD0 = M("Pruefen Logischer Bibliotheks-Definitionen", "Check Logical Library Definitions"); string REPHEAD1 = M("Layout-Bibliothek ......................: '%s'", "Layout Library .........................: '%s'"); string REPRESULT = M("Anzahl fehlender Loglib-Definitionen ...: %d", "Missing Loglib definitions count .......: %d"); string REPMISLOG = M(" Loglib-Definition '%s' fehlt!", " Loglib definition '%s' is missing !"); string UPRSDIR = M("Definitionsverzeichnis ? ", "Definition File Directory ? "); string UPRLAYLIB = M("Layout-Bibliothek ? ","Layout Library ? "); string UPRCHKALIB = M("Alle %d Symbolbibliotheken in '%s' pruefen ? ", "Check all %d symbol libraries in '%s' ? "); string UPRCHKLIB = M("SCM-Bibliothek '%s' pruefen ? ", "Check SCM Library '%s' ? "); string ERRNODDB = M("Keine SCM-Bibliothek in Verzeichnis '%s'!", "No SCM library file found in directory '%s'!"); string ERRLLIBACC = M("Fehler beim Zugriff auf Layout-Bibliothek '%s'!", "Error accessing layout library '%s'!"); string ERRLLIBNLL = M("Keine Loglib-Definitionen in '%s'!", "No Loglib definitions found in '%s'!"); // Globals string LAYLIB /* Layout library file name */; STRINGS ddbfilel /* DDB file name list */; int ddbfilen = 0 /* DDB file name count */; STRINGS el /* Popup entry list */; int en = 0 /* Popup entry count */; int errcnt = 0 /* Error count */; // Main program void main() { string libdir = CURDIR /* Library directory file name */; string fname /* Current file name */; string prompt /* Prompt string */; int alllib = 0 /* Complete library check flag */; int len /* Directory name length */; int i /* Loop control variable */; // Select source directory libdir=UINPOPABORT; if (bae_askdirname(libdir,getcwd(),UPRSDIR)!=0 || libdir==UINPOPABORT) error_abort(); // Dismiss directory seperator len=strlen(libdir)-1; if (libdir[len]=='/' || libdir[len]=='\\') libdir[len]='\0'; // Build the SCM library file name list filelist(ddbfilel,ddbfilen,libdir,DDBEXT,"",DDBCLSSYM,0,1,0,1,0); // Abort if no SCM library file found in library directory if (ddbfilen==0) errormsg(ERRNODDB,libdir); // Ask for layout library file name if ((LAYLIB=askddbfile(UPRLAYLIB,DDBCLLLIB))=="") error_abort(); // Test for valid layout library contents switch (ddbcheck(LAYLIB,DDBCLLLIB,"")) { case 0 : break; case (-1) : errormsg(ERRLLIBACC,LAYLIB); default : errormsg(ERRLLIBNLL,LAYLIB); } // Test if compelte library folder check sprintf(prompt,UPRCHKALIB,ddbfilen,libdir); if (verify(prompt,1)) alllib=1; // Build the report header el[0]=REPHEAD0; el[1]=""; sprintf(el[2],REPHEAD1,LAYLIB); en=4; // Loop thru all DDB files for (i=0;i