gnetlist

s_misc.c

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * gnetlist - gEDA Netlist
00003  * Copyright (C) 1998-2010 Ales Hvezda
00004  * Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details)
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019  */
00020 
00021 #include <config.h>
00022 
00023 #include <stdio.h>
00024 #include <math.h>
00025 #ifdef HAVE_STRING_H
00026 #include <string.h>
00027 #endif
00028 
00029 #include <libgeda/libgeda.h>
00030 
00031 #include "../include/globals.h"
00032 #include "../include/prototype.h"
00033 
00034 #ifdef HAVE_LIBDMALLOC
00035 #include <dmalloc.h>
00036 #endif
00037 
00038 
00039 static int char_index = 0;
00040 
00041 void verbose_print(char *string)
00042 {
00043     if (verbose_mode) {
00044     printf("%s", string);
00045     char_index++;
00046     if ((char_index + 1) >= 78) {
00047         printf("\n");
00048         char_index = 0;
00049     }
00050     }
00051 }
00052 
00053 void verbose_done(void)
00054 {
00055     if (verbose_mode) {
00056     if (char_index >= 70) {
00057         printf("\nDONE\n");
00058     } else {
00059         printf(" DONE\n");
00060     }
00061 
00062     char_index = 0;
00063     }
00064 }
00065 
00066 void verbose_reset_index(void)
00067 {
00068     char_index = 0;
00069 }
 All Data Structures Files Functions Variables Defines