/* CHKSMAC (CAP) -- List undefined SCM Macro References */ /* CHKSMAC (CAP) -- Nicht definierte SCM-Makro-Referenzen auflisten */ /* // 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 (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 (980711) ENHANCEMENT: // Dynamic multi-language support introduced. // rl (970929) RELEASED FOR BAE V4.0. // mb (960919) RELEASED FOR BAE V3.4. // mb (95) RELEASED FOR BAE V3.2. // mb (94) RELEASED FOR BAE V3.0. // mb (94) CHANGE: // Introduced MACRO.COMP macro completion check. // mb (93) RELEASED FOR BAE V2.6. // mb (93) ORIGINAL CODING. // // DESCRIPTION // // The chksmac User Language program lists the names of all // undefined macros (library elements) referenced from the // currently loaded SCM element to a popup menu with file // output option. */ // Includes #include "pop.ulh" // User Language popup utilities // Disable undo state request #pragma ULCALLERNOUNDO // Messages string REPNOMACMIS = M("Alle referenzierten Makros sind definiert.", "All referenced macros are defined."); string REPHEADER = M("Datei '%s' / %s '%s' :", "File '%s' / %s '%s' :"); string REPMISSYMHD = M("Undefinierte Symbol-Makros :", "Undefined Symbol Macros :"); string REPMISLABHD = M("Undefinierte Label-Makros :", "Undefined Label Macros :"); string REPMISMRKHD = M("Undefinierte Marker-Makros :", "Undefined Marker Macros :"); string ERRMISSMAC = M("Einzelne Teile fehlen im Bild (sind nicht ladbar)!", "Cannot load all elements (display not complete)!"); #define REPENTRY "> '%s'" // Main program void main() { index C_MACRO mac /* Macro index */; STRINGS symlist /* Symbol macro list */; STRINGS lablist /* Label macro list */; STRINGS mrklist /* Marker macro list */; int symn = 0 /* Symbol macro count */; int labn = 0 /* Label macro count */; int mrkn = 0 /* Marker macro count */; STRINGS hl,el /* Header and entry list */; int en = 0 /* Entry count */; int popcols = 45 /* Popup columns count */; int i /* Loop control variables */; // Abort if invalid plan class if (bae_planddbclass()==DDBCLUNDEF) error_class(); // Build the missing macro lists forall (mac where !(mac.COMP & 0x01) || ddbcheck(bae_planfname(),mac.CLASS,mac.NAME)) // Store the missing macro switch (mac.CLASS) { // Symbol case DDBCLSSYM : symlist[symn++]=mac.NAME; break; // Label case DDBCLSLAB : lablist[labn++]=mac.NAME; break; // Marker case DDBCLSMRK : mrklist[mrkn++]=mac.NAME; break; } // Abort if all macros defined if (symn+labn+mrkn==0) { bae_prtdialog(REPNOMACMIS); exit(0); } // Report the checking results sprintf(hl[0],REPHEADER,bae_planfname(), ddbclassname(bae_planddbclass()),bae_planename()); popcols=maxint(popcols,strlen(hl[0])+1); if (bae_swconfig(3)==0) calcpopwidth(popcols); if (symn) { sprintf(el[en+1],REPMISSYMHD); for (en+=2,i=0;i