1 /*
2  * gEDA - GNU Electronic Design Automation
3  * gerbv_stats.h -- a part of gerbv.
4  *
5  *   Copyright (C) 2007 Stuart Brorson (sdb@cloud9.net)
6  *
7  * $Id$
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA
22  */
23 
24 /** \file gerb_stats.h
25     \brief Header info for the statistics generating functions for RS274X files
26     \ingroup libgerbv
27 */
28 
29 #ifndef gerb_stats_H
30 #define gerb_stats_H
31 
32 
33 
34 /* ===================  Prototypes ================ */
35 gerbv_error_list_t *gerbv_stats_new_error_list(void);
36 void gerbv_stats_printf(gerbv_error_list_t *list, gerbv_message_type_t type,
37 			int layer, const char *text, ...)
38 					__attribute__ ((format (printf, 4, 5)));
39 void gerbv_stats_add_error(gerbv_error_list_t *error_list_in,
40                            int layer, const char *error_text,
41                            gerbv_message_type_t type);
42 #define gerbv_escape_char(c) \
43 	((char*)(int[]){gerbv_escape_char_return_int((c))})
44 int gerbv_escape_char_return_int(char c);
45 
46 gerbv_aperture_list_t *gerbv_stats_new_aperture_list(void);
47 void gerbv_stats_add_aperture(gerbv_aperture_list_t *aperture_list_in,
48 			     int layer, int number, gerbv_aperture_type_t type,
49 			     double parameter[5]);
50 void gerbv_stats_add_to_D_list(gerbv_aperture_list_t *D_list_in,
51 			      int number);
52 int gerbv_stats_increment_D_list_count(gerbv_aperture_list_t *D_list_in,
53 				       int number,
54 				       int count,
55 				       gerbv_error_list_t *error);
56 
57 #endif /* gerb_stats_H */
58