summaryrefslogtreecommitdiff
path: root/file/print.c
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-10-03 22:07:30 +0000
committerjbj <devnull@localhost>2002-10-03 22:07:30 +0000
commit3fec2112f7985602db97f6d156c334b84934ac2d (patch)
treec9c2abee37a3cd96389d3a59c199f899b9f7914e /file/print.c
parentbe3340d858f85c8e22260a1db0bd451c7e0e8ef4 (diff)
downloadlibrpm-tizen-3fec2112f7985602db97f6d156c334b84934ac2d.tar.gz
librpm-tizen-3fec2112f7985602db97f6d156c334b84934ac2d.tar.bz2
librpm-tizen-3fec2112f7985602db97f6d156c334b84934ac2d.zip
Drill an opaque "fmagic" control structure through the API.
Rename all functions to start with prefix "fmagic". CVS patchset: 5750 CVS date: 2002/10/03 22:07:30
Diffstat (limited to 'file/print.c')
-rw-r--r--file/print.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/file/print.c b/file/print.c
index f78745a40..0b6aafd04 100644
--- a/file/print.c
+++ b/file/print.c
@@ -31,6 +31,15 @@
FILE_RCSID("@(#)Id: print.c,v 1.38 2002/07/03 18:37:44 christos Exp ")
+/*@access fmagic @*/
+
+/*@-compmempass@*/
+/*@unchecked@*/
+static struct fmagic_s myfmagic;
+/*@unchecked@*/
+fmagic global_fmagic = &myfmagic;
+/*@=compmempass@*/
+
#define SZOF(a) (sizeof(a) / sizeof(a[0]))
#ifndef COMPILE_ONLY
@@ -168,6 +177,7 @@ error(const char *f, ...)
void
magwarn(const char *f, ...)
{
+ fmagic fm = global_fmagic;
va_list va;
va_start(va, f);
@@ -176,7 +186,7 @@ magwarn(const char *f, ...)
if (progname != NULL)
(void) fprintf(stderr, "%s: %s, %d: ",
- progname, magicfile, lineno);
+ progname, fm->magicfile, fm->lineno);
(void) vfprintf(stderr, f, va);
va_end(va);
(void) fputc('\n', stderr);