Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1664 pj 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
/* CVS :        $Id: fab_msg.h,v 1.1 2004-07-05 14:39:42 pj Exp $ */
22
 
23
/*
24
 * Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
25
 *
26
 * This program is free software; you can redistribute it and/or modify
27
 * it under the terms of the GNU General Public License as published by
28
 * the Free Software Foundation; either version 2 of the License, or
29
 * (at your option) any later version.
30
 *
31
 * This program is distributed in the hope that it will be useful,
32
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
33
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
34
 * GNU General Public License for more details.
35
 *
36
 * You should have received a copy of the GNU General Public License
37
 * along with this program; if not, write to the Free Software
38
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
39
 *
40
 */
41
 
42
/****************************************************
43
 *                                                  *
44
 *  file:        FAB_msg.h                          *
45
 *  libreria:    FAB_LIB                            *
46
 *  version:     1.0 25/08/2002                     *
47
 *  creato da:   Fabio CALABRESE                    *
48
 *                                                  *
49
 ****************************************************
50
 *                                                  *
51
 *  descrizione: libreria di funzioni per stampare  *
52
 *               messaggi circa il corretto esito   *
53
 *               dell'esecuzione delle istruzioni;  *
54
 *               stampa semplici stringhe colorate; *
55
 *               aiuta a fare il debbuging.         *
56
 *                                                  *
57
 ****************************************************/
58
 
59
#ifndef __FAB_LIB__FAB_msg_h__
60
#define __FAB_LIB__FAB_msg_h__
61
//-------------------BEGIN---------------------------
62
 
63
// *** Librerie di S.Ha.R.K. ***
64
#include <ll/i386/cons.h>
65
// *** Librerie Standard C ***
66
// *** Librerie FAB ***
67
 
68
// -----------
69
// Definizioni
70
//----------------------
71
#define FAB_EXIT_YES  1
72
#define FAB_EXIT_NO   0
73
#define FAB_EMPTY_MSG ""
74
//----------------------
75
 
76
// ---------------- 
77
// Funzioni & Macro 
78
//-------------------------------------------------
79
#define FAB_newline()       NL()
80
#define FAB_home()          HOME()
81
#define FAB_clr()           clear()
82
 
83
void    FAB_print(char * InitMsg, char * msg);
84
#define FAB_msg(TEST,INITMSG,OKMSG,ERRORMSG)         __FAB_go2((TEST),(INITMSG),(OKMSG),(ERRORMSG),FAB_EXIT_NO)
85
#define FAB_go(TEST,INITMSG,OKMSG,ERRORMSG,EXITFLAG) __FAB_go2((TEST),(INITMSG),(OKMSG),(ERRORMSG),(EXITFLAG))
86
//--------------------------------------------------
87
 
88
 
89
// Altro...
90
 
91
void __FAB_go(int test, char * OkMsg, char * ErrorMsg,int EXITflag);
92
#define __FAB_go2(TEST,INITMSG,OKMSG,ERRORMSG,EXITFLAG) {if ((INITMSG)!=NULL) cprintf("\n[%s]",(INITMSG)); __FAB_go((TEST),(OKMSG),(ERRORMSG),(EXITFLAG));}    
93
 
94
 
95
//----------------------END--------------------------
96
#endif