/*!******************************************************************/ /* File: ig18.c */ /* ============ */ /* */ /* This file includes: */ /* */ /* lstniv(); List named levels */ /* namniv(); Name level */ /* delniv(); Delete level name */ /* */ /* This file is part of the VARKON IG Library. */ /* URL: http://www.varkon.com */ /* */ /* This library is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU Library General Public */ /* License as published by the Free Software Foundation; either */ /* version 2 of the License, or (at your option) any later */ /* version. */ /* */ /* This library is distributed in the hope that it will be */ /* useful, but WITHOUT ANY WARRANTY; without even the implied */ /* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR */ /* PURPOSE. See the GNU Library General Public License for more */ /* details. */ /* */ /* You should have received a copy of the GNU Library General */ /* Public License along with this library; if not, write to the */ /* Free Software Foundation, Inc., 675 Mass Ave, Cambridge, */ /* MA 02139, USA. */ /* */ /* (C)Microform AB 1984-1999, Johan Kjellander, johan@microform.se */ /* */ /********************************************************************/ #include "../../DB/include/DB.h" #include "../include/IG.h" #include extern tbool nivtb1[]; extern NIVNAM nivtb2[]; extern V2NAPA defnap; /*!******************************************************/ short lstniv() /* Varkonfunktion för att lista namngivna nivåer. * * In: Inget. * * Ut: Inget. * * FV: 0 = Ok. * GOMAIN = Huvudmenyn. * * (C)microform ab 22/1/85 J. Kjellander * * 13/9/85 Utskrifter, R. Svedin * 16/10/85 Aktuell nivå tänd/släckt, j: Kjellander * 10/11/85 Aktuell nivå ej def, J. Kjellander * 30/9/86 Ny nivåhantering R. Svedin * 6/10/86 GOMAIN, J. Kjellander * 18/4/87 REJECT, J. Kjellander * ******************************************************!*/ { short i,status; char linbuf[80]; iginla(iggtts(47)); for ( i=0; i NT1SIZ-1) goto error1; igrsma(); /* ***Kolla om nivån redan är namngiven. */ for ( j=0; j NT1SIZ-1) goto error1; /* ***Leta upp nivån i nivtb2. */ for ( i = 0 ; i < NT2SIZ ; ++i) { if ( nivtb2[i].num == ival ) { nivtb2[i].nam[0] = '\0'; goto end; } } /* ***Nivån finns ej ? */ end: if ( i == NT2SIZ ) goto error2; exit: igrsma(); return(status); /* ***Felutgångar */ error1: erpush("IG3212",""); goto errend; error2: erpush("IG3202",""); errend: errmes(); goto exit; } /********************************************************/