~ubuntu-branches/ubuntu/trusty/geda-gsymcheck/trusty

« back to all changes in this revision

Viewing changes to src/globals.c

  • Committer: Bazaar Package Importer
  • Author(s): Hamish Moffatt
  • Date: 2005-03-15 23:03:40 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050315230340-se821zvek59ipkz9
Tags: 20050313-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include <config.h>
 
21
 
21
22
#include <stdio.h>
22
23
 
23
24
#include <libgeda/libgeda.h>
24
25
 
 
26
#include "../include/struct.h"
25
27
#include "../include/prototype.h"
26
28
 
27
29
 
28
 
char rc_filename[256]; /* size is hack */  
 
30
char *rc_filename = NULL; 
29
31
 
30
32
/* color stuff */
31
33
GdkColormap *colormap; 
38
40
 
39
41
int logfile_fd=-1;
40
42
int do_logging=TRUE;
41
 
int logging_dest=LOG_WINDOW;
 
43
int logging_dest=STDOUT_TTY;
42
44
 
43
45
/* these are required by libgeda */
44
46
void (*arc_draw_func)() = o_arc_recalc;
45
47
void (*box_draw_func)() = o_box_recalc;
 
48
void (*picture_draw_func)() = o_picture_recalc;
46
49
void (*circle_draw_func)() = o_circle_recalc;
47
50
void (*complex_draw_func)() = o_complex_recalc;
48
51
void (*line_draw_func)() = o_line_recalc;
51
54
void (*bus_draw_func)() = o_bus_recalc;
52
55
void (*pin_draw_func)() = o_pin_recalc;
53
56
void (*select_func)() = NULL;
54
 
void (*x_log_update_func)() = NULL;
55
 
 
 
57
void (*x_log_update_func)() = s_log_update;
 
58
void (*quit_func)() = gsymcheck_quit;
 
59
/* void (*variable_set_func)() = i_vars_set; */
 
60
void (*variable_set_func)() = NULL;
56
61
 
57
62
/* command line arguments */
58
63
int verbose_mode=FALSE;
59
64
int interactive_mode=FALSE;
60
65
int quiet_mode=FALSE;
61
66
 
 
67
void s_log_update(char *buf)
 
68
{
 
69
  if (do_logging == FALSE) {
 
70
    return;
 
71
  }
 
72
 
 
73
  if (buf == NULL) {
 
74
    return;
 
75
  }
 
76
 
 
77
  switch(logging_dest) {
 
78
    case(STDOUT_TTY):
 
79
      fputs(buf, stdout);
 
80
      break;
 
81
 
 
82
    default:
 
83
      break;
 
84
  }
 
85
  
 
86
}
 
87
 
62
88
 
63
89