projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Need #include <limits.h>. Thanks to "John McCabe-Dansted"
[pspp]
/
src
/
libpspp
/
message.c
diff --git
a/src/libpspp/message.c
b/src/libpspp/message.c
index 24bb8e874ba10d77dd29cf76e168af795cfaee8a..80ddef88691169f3913ef1b09202a07d47c483c1 100644
(file)
--- a/
src/libpspp/message.c
+++ b/
src/libpspp/message.c
@@
-1,6
+1,5
@@
/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@
-63,9
+62,12
@@
msg (enum msg_class class, const char *format, ...)
msg_emit (&m);
}
msg_emit (&m);
}
+static struct source_stream *s_stream;
+
void
void
-msg_init ( void (*handler) (const struct msg *) )
+msg_init (
struct source_stream *ss,
void (*handler) (const struct msg *) )
{
{
+ s_stream = ss;
msg_handler = handler;
}
msg_handler = handler;
}
@@
-99,7
+101,7
@@
msg_destroy(struct msg *m)
void
msg_emit (struct msg *m)
{
void
msg_emit (struct msg *m)
{
- get_msg_location (&m->where);
+ get_msg_location (
s_stream,
&m->where);
if (!messages_disabled)
msg_handler (m);
free (m->text);
if (!messages_disabled)
msg_handler (m);
free (m->text);