~ubuntu-branches/debian/squeeze/alpine/squeeze

« back to all changes in this revision

Viewing changes to pith/status.c

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if !defined(lint) && !defined(DOS)
 
2
static char rcsid[] = "$Id: status.c 140 2006-09-26 19:30:49Z hubert@u.washington.edu $";
 
3
#endif
 
4
 
 
5
/*
 
6
 * ========================================================================
 
7
 * Copyright 2006 University of Washington
 
8
 *
 
9
 * Licensed under the Apache License, Version 2.0 (the "License");
 
10
 * you may not use this file except in compliance with the License.
 
11
 * You may obtain a copy of the License at
 
12
 *
 
13
 *     http://www.apache.org/licenses/LICENSE-2.0
 
14
 *
 
15
 * ========================================================================
 
16
 */
 
17
 
 
18
#include "../pith/headers.h"
 
19
#include "../pith/status.h"
 
20
#include "../pith/state.h"
 
21
 
 
22
 
 
23
/*----------------------------------------------------------------------
 
24
        Put a message with 1 printf argument on queue for status line
 
25
 
 
26
    Args: min_t -- minimum time to display message for
 
27
          max_t -- minimum time to display message for
 
28
          s -- printf style control string
 
29
          a -- argument for printf
 
30
 
 
31
   Result: message queued
 
32
  ----*/
 
33
 
 
34
/*VARARGS1*/
 
35
void
 
36
q_status_message1(int flags, int min_t, int max_t, char *s, void *a)
 
37
{
 
38
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a);
 
39
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
40
}
 
41
 
 
42
 
 
43
 
 
44
/*----------------------------------------------------------------------
 
45
        Put a message with 2 printf argument on queue for status line
 
46
 
 
47
    Args: min_t  -- minimum time to display message for
 
48
          max_t  -- maximum time to display message for
 
49
          s  -- printf style control string
 
50
          a1 -- argument for printf
 
51
          a2 -- argument for printf
 
52
 
 
53
  Result: message queued
 
54
  ---*/
 
55
 
 
56
/*VARARGS1*/
 
57
void
 
58
q_status_message2(int flags, int min_t, int max_t, char *s, void *a1, void *a2)
 
59
{
 
60
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2);
 
61
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
62
}
 
63
 
 
64
 
 
65
 
 
66
/*----------------------------------------------------------------------
 
67
        Put a message with 3 printf argument on queue for status line
 
68
 
 
69
    Args: min_t  -- minimum time to display message for
 
70
          max_t  -- maximum time to display message for
 
71
          s  -- printf style control string
 
72
          a1 -- argument for printf
 
73
          a2 -- argument for printf
 
74
          a3 -- argument for printf
 
75
 
 
76
  Result: message queued
 
77
  ---*/
 
78
 
 
79
/*VARARGS1*/
 
80
void
 
81
q_status_message3(int flags, int min_t, int max_t, char *s, void *a1, void *a2, void *a3)
 
82
{
 
83
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2, a3);
 
84
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
85
}
 
86
 
 
87
 
 
88
 
 
89
/*----------------------------------------------------------------------
 
90
        Put a message with 4 printf argument on queue for status line
 
91
 
 
92
 
 
93
    Args: min_t  -- minimum time to display message for
 
94
          max_t  -- maximum time to display message for
 
95
          s  -- printf style control string
 
96
          a1 -- argument for printf
 
97
          a2 -- argument for printf
 
98
          a3 -- argument for printf
 
99
          a4 -- argument for printf
 
100
 
 
101
  Result: message queued
 
102
  ----------------------------------------------------------------------*/
 
103
/*VARARGS1*/
 
104
void
 
105
q_status_message4(int flags, int min_t, int max_t, char *s, void *a1, void *a2, void *a3, void *a4)
 
106
{
 
107
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2, a3, a4);
 
108
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
109
}
 
110
 
 
111
 
 
112
/*VARARGS1*/
 
113
void
 
114
q_status_message5(int flags, int min_t, int max_t, char *s, void *a1, void *a2, void *a3, void *a4, void *a5)
 
115
{
 
116
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2, a3, a4, a5);
 
117
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
118
}
 
119
 
 
120
 
 
121
/*VARARGS1*/
 
122
void
 
123
q_status_message6(int flags, int min_t, int max_t, char *s, void *a1, void *a2, void *a3, void *a4, void *a5, void *a6)
 
124
{
 
125
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2, a3, a4, a5, a6);
 
126
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
127
}
 
128
 
 
129
 
 
130
/*----------------------------------------------------------------------
 
131
        Put a message with 7 printf argument on queue for status line
 
132
 
 
133
 
 
134
    Args: min_t  -- minimum time to display message for
 
135
          max_t  -- maximum time to display message for
 
136
          s  -- printf style control string
 
137
          a1 -- argument for printf
 
138
          a2 -- argument for printf
 
139
          a3 -- argument for printf
 
140
          a4 -- argument for printf
 
141
          a5 -- argument for printf
 
142
          a6 -- argument for printf
 
143
          a7 -- argument for printf
 
144
 
 
145
 
 
146
  Result: message queued
 
147
  ----------------------------------------------------------------------*/
 
148
/*VARARGS1*/
 
149
void
 
150
q_status_message7(int flags, int min_t, int max_t, char *s, void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7)
 
151
{
 
152
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2, a3, a4, a5, a6, a7);
 
153
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
154
}
 
155
 
 
156
 
 
157
/*VARARGS1*/
 
158
void
 
159
q_status_message8(int flags, int min_t, int max_t, char *s, void *a1, void *a2, void *a3, void *a4, void *a5, void *a6, void *a7, void *a8)
 
160
{
 
161
    snprintf(tmp_20k_buf, SIZEOF_20KBUF, s, a1, a2, a3, a4, a5, a6, a7, a8);
 
162
    q_status_message(flags, min_t, max_t, tmp_20k_buf);
 
163
}