blob: db6e93ee45f56c879b9994d77fa7e3398ba4bd38 [file] [log] [blame]
Juan Cespedesac3db291998-04-25 14:31:58 +02001#include "config.h"
Juan Cespedesac3db291998-04-25 14:31:58 +02002
Juan Cespedes3268a161997-08-25 16:45:22 +02003#include <stdio.h>
Juan Cespedesd65efa32003-02-03 00:22:30 +01004#include <stdlib.h>
Juan Cespedes5e4455b1997-08-24 01:48:26 +02005#include <stdarg.h>
Juan Cespedes1cd999a2001-07-03 00:46:04 +02006#include <string.h>
Juan Cespedes5e0acdb1998-04-04 08:34:07 +02007#include <time.h>
8#include <sys/time.h>
9#include <unistd.h>
Juan Cespedes5e4455b1997-08-24 01:48:26 +020010
Juan Cespedesf7281232009-06-25 16:11:21 +020011#include "common.h"
Petr Machata366c2f42012-02-09 19:34:36 +010012#include "proc.h"
Petr Machata29add4f2012-02-18 16:38:05 +010013#include "library.h"
Juan Cespedesac3db291998-04-25 14:31:58 +020014
Juan Cespedesf7281232009-06-25 16:11:21 +020015/* TODO FIXME XXX: include in common.h: */
Juan Cespedesd65efa32003-02-03 00:22:30 +010016extern struct timeval current_time_spent;
17
Juan Cespedes8d1b92b2009-07-03 10:39:34 +020018Dict *dict_opt_c = NULL;
Juan Cespedesd65efa32003-02-03 00:22:30 +010019
Juan Cespedesa8909f72009-04-28 20:02:41 +020020static Process *current_proc = 0;
Juan Cespedes5916fda2002-02-25 00:19:21 +010021static int current_depth = 0;
Juan Cespedes5e01f651998-03-08 22:31:44 +010022static int current_column = 0;
Juan Cespedes5b3ffdf2001-07-02 00:52:45 +020023
Juan Cespedesf1350522008-12-16 18:19:58 +010024static void
Petr Machata54004752012-05-03 18:36:48 +020025output_indent(struct Process *proc)
26{
27 int d = options.indent * (proc->callstack_depth - 1);
28 current_column += fprintf(options.output, "%*s", d, "");
Juan Cespedes5b3ffdf2001-07-02 00:52:45 +020029}
Juan Cespedes5e4455b1997-08-24 01:48:26 +020030
Juan Cespedesf1350522008-12-16 18:19:58 +010031static void
Juan Cespedesa8909f72009-04-28 20:02:41 +020032begin_of_line(enum tof type, Process *proc) {
Juan Cespedes5e01f651998-03-08 22:31:44 +010033 current_column = 0;
34 if (!proc) {
35 return;
Juan Cespedes5e4455b1997-08-24 01:48:26 +020036 }
Juan Cespedesc693f022009-05-21 18:59:41 +020037 if ((options.output != stderr) && (opt_p || options.follow)) {
38 current_column += fprintf(options.output, "%u ", proc->pid);
Juan Cespedese12df4c2009-05-28 19:06:35 +020039 } else if (options.follow) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +010040 current_column += fprintf(options.output, "[pid %u] ", proc->pid);
Juan Cespedes5e01f651998-03-08 22:31:44 +010041 }
Juan Cespedesf666d191998-09-20 23:04:34 +020042 if (opt_r) {
43 struct timeval tv;
44 struct timezone tz;
Ian Wienand2d45b1a2006-02-20 22:48:07 +010045 static struct timeval old_tv = { 0, 0 };
Juan Cespedesf666d191998-09-20 23:04:34 +020046 struct timeval diff;
47
48 gettimeofday(&tv, &tz);
49
Ian Wienand2d45b1a2006-02-20 22:48:07 +010050 if (old_tv.tv_sec == 0 && old_tv.tv_usec == 0) {
51 old_tv.tv_sec = tv.tv_sec;
52 old_tv.tv_usec = tv.tv_usec;
Juan Cespedesf666d191998-09-20 23:04:34 +020053 }
54 diff.tv_sec = tv.tv_sec - old_tv.tv_sec;
55 if (tv.tv_usec >= old_tv.tv_usec) {
56 diff.tv_usec = tv.tv_usec - old_tv.tv_usec;
57 } else {
Juan Cespedes5c3fe062004-06-14 18:08:37 +020058 diff.tv_sec--;
Juan Cespedesf666d191998-09-20 23:04:34 +020059 diff.tv_usec = 1000000 + tv.tv_usec - old_tv.tv_usec;
60 }
61 old_tv.tv_sec = tv.tv_sec;
62 old_tv.tv_usec = tv.tv_usec;
Juan Cespedesb65bdc52008-12-16 19:50:16 +010063 current_column += fprintf(options.output, "%3lu.%06d ",
Ian Wienand2d45b1a2006-02-20 22:48:07 +010064 diff.tv_sec, (int)diff.tv_usec);
Juan Cespedesf666d191998-09-20 23:04:34 +020065 }
Juan Cespedes5e0acdb1998-04-04 08:34:07 +020066 if (opt_t) {
67 struct timeval tv;
68 struct timezone tz;
Juan Cespedes5e0acdb1998-04-04 08:34:07 +020069
70 gettimeofday(&tv, &tz);
Ian Wienand2d45b1a2006-02-20 22:48:07 +010071 if (opt_t > 2) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +010072 current_column += fprintf(options.output, "%lu.%06d ",
Ian Wienand2d45b1a2006-02-20 22:48:07 +010073 tv.tv_sec, (int)tv.tv_usec);
74 } else if (opt_t > 1) {
75 struct tm *tmp = localtime(&tv.tv_sec);
76 current_column +=
Juan Cespedesb65bdc52008-12-16 19:50:16 +010077 fprintf(options.output, "%02d:%02d:%02d.%06d ",
Ian Wienand2d45b1a2006-02-20 22:48:07 +010078 tmp->tm_hour, tmp->tm_min, tmp->tm_sec,
79 (int)tv.tv_usec);
Juan Cespedes5e0acdb1998-04-04 08:34:07 +020080 } else {
Ian Wienand2d45b1a2006-02-20 22:48:07 +010081 struct tm *tmp = localtime(&tv.tv_sec);
Juan Cespedesb65bdc52008-12-16 19:50:16 +010082 current_column += fprintf(options.output, "%02d:%02d:%02d ",
Ian Wienand2d45b1a2006-02-20 22:48:07 +010083 tmp->tm_hour, tmp->tm_min,
84 tmp->tm_sec);
Juan Cespedes5e0acdb1998-04-04 08:34:07 +020085 }
86 }
Juan Cespedes5e01f651998-03-08 22:31:44 +010087 if (opt_i) {
Ian Wienand2d45b1a2006-02-20 22:48:07 +010088 if (type == LT_TOF_FUNCTION || type == LT_TOF_FUNCTIONR) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +010089 current_column += fprintf(options.output, "[%p] ",
Ian Wienand2d45b1a2006-02-20 22:48:07 +010090 proc->return_addr);
Juan Cespedes5e01f651998-03-08 22:31:44 +010091 } else {
Juan Cespedesb65bdc52008-12-16 19:50:16 +010092 current_column += fprintf(options.output, "[%p] ",
Ian Wienand2d45b1a2006-02-20 22:48:07 +010093 proc->instruction_pointer);
Juan Cespedes5e01f651998-03-08 22:31:44 +010094 }
95 }
Juan Cespedesb65bdc52008-12-16 19:50:16 +010096 if (options.indent > 0 && type != LT_TOF_NONE) {
Juan Cespedes3f0b62e2001-07-09 01:02:52 +020097 output_indent(proc);
Juan Cespedes5b3ffdf2001-07-02 00:52:45 +020098 }
Juan Cespedes5e4455b1997-08-24 01:48:26 +020099}
100
Juan Cespedescde58262009-05-07 11:09:00 +0200101static Function *
Petr Machata9a7f2322011-07-08 19:00:37 +0200102name2func(char const *name) {
Juan Cespedescde58262009-05-07 11:09:00 +0200103 Function *tmp;
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100104 const char *str1, *str2;
Juan Cespedes5e01f651998-03-08 22:31:44 +0100105
106 tmp = list_of_functions;
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100107 while (tmp) {
Juan Cespedesd914a202004-11-10 00:15:33 +0100108#ifdef USE_DEMANGLE
Juan Cespedesce377d52008-12-16 19:38:10 +0100109 str1 = options.demangle ? my_demangle(tmp->name) : tmp->name;
110 str2 = options.demangle ? my_demangle(name) : name;
Juan Cespedes1b9cfd61999-08-30 19:34:50 +0200111#else
112 str1 = tmp->name;
113 str2 = name;
114#endif
115 if (!strcmp(str1, str2)) {
116
Juan Cespedes5e01f651998-03-08 22:31:44 +0100117 return tmp;
118 }
119 tmp = tmp->next;
120 }
121 return NULL;
122}
123
Juan Cespedesf1350522008-12-16 18:19:58 +0100124void
Juan Cespedesa8909f72009-04-28 20:02:41 +0200125output_line(Process *proc, char *fmt, ...) {
Juan Cespedes5e4455b1997-08-24 01:48:26 +0200126 va_list args;
127
Juan Cespedesda9b9532009-04-07 15:33:50 +0200128 if (options.summary) {
Juan Cespedesd65efa32003-02-03 00:22:30 +0100129 return;
130 }
Paul Gilliam76c61f12006-06-14 06:55:21 +0200131 if (current_proc) {
132 if (current_proc->callstack[current_depth].return_addr) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100133 fprintf(options.output, " <unfinished ...>\n");
Paul Gilliam76c61f12006-06-14 06:55:21 +0200134 } else {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100135 fprintf(options.output, " <no return ...>\n");
Paul Gilliam76c61f12006-06-14 06:55:21 +0200136 }
Juan Cespedes5e01f651998-03-08 22:31:44 +0100137 }
Paul Gilliam76c61f12006-06-14 06:55:21 +0200138 current_proc = 0;
Juan Cespedes28f60191998-04-12 00:04:39 +0200139 if (!fmt) {
140 return;
141 }
Juan Cespedes5e01f651998-03-08 22:31:44 +0100142 begin_of_line(LT_TOF_NONE, proc);
143
Juan Cespedes21c63a12001-07-07 20:56:56 +0200144 va_start(args, fmt);
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100145 vfprintf(options.output, fmt, args);
146 fprintf(options.output, "\n");
Juan Cespedes21c63a12001-07-07 20:56:56 +0200147 va_end(args);
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100148 current_column = 0;
Juan Cespedes5e01f651998-03-08 22:31:44 +0100149}
150
Juan Cespedesf1350522008-12-16 18:19:58 +0100151static void
152tabto(int col) {
Juan Cespedes5e01f651998-03-08 22:31:44 +0100153 if (current_column < col) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100154 fprintf(options.output, "%*s", col - current_column, "");
Juan Cespedes5e01f651998-03-08 22:31:44 +0100155 }
156}
157
Juan Cespedesf1350522008-12-16 18:19:58 +0100158void
Petr Machata29add4f2012-02-18 16:38:05 +0100159output_left(enum tof type, struct Process *proc,
160 struct library_symbol *libsym)
161{
162 const char *function_name = libsym->name;
Juan Cespedescde58262009-05-07 11:09:00 +0200163 Function *func;
Steve Finkb0315a02006-08-07 04:22:06 +0200164 static arg_type_info *arg_unknown = NULL;
165 if (arg_unknown == NULL)
Steve Fink65b53df2006-09-25 02:27:08 +0200166 arg_unknown = lookup_prototype(ARGTYPE_UNKNOWN);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100167
Juan Cespedesda9b9532009-04-07 15:33:50 +0200168 if (options.summary) {
Juan Cespedesd65efa32003-02-03 00:22:30 +0100169 return;
170 }
Paul Gilliam76c61f12006-06-14 06:55:21 +0200171 if (current_proc) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100172 fprintf(options.output, " <unfinished ...>\n");
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100173 current_column = 0;
Juan Cespedes5e01f651998-03-08 22:31:44 +0100174 }
Paul Gilliam76c61f12006-06-14 06:55:21 +0200175 current_proc = proc;
Juan Cespedes5916fda2002-02-25 00:19:21 +0100176 current_depth = proc->callstack_depth;
Juan Cespedes5e01f651998-03-08 22:31:44 +0100177 begin_of_line(type, proc);
Petr Machata53bc49b2012-04-25 17:23:02 +0200178 if (!options.hide_caller && libsym->lib != NULL
179 && libsym->plt_type != LS_TOPLT_NONE)
Petr Machatab89c2562012-04-03 17:00:28 +0200180 current_column += fprintf(options.output, "%s->",
181 libsym->lib->soname);
Juan Cespedesd914a202004-11-10 00:15:33 +0100182#ifdef USE_DEMANGLE
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100183 current_column +=
Petr Machata03673892012-04-03 13:51:09 +0200184 fprintf(options.output, "%s(",
Petr Machata29add4f2012-02-18 16:38:05 +0100185 (options.demangle
Petr Machataf3db07a2012-03-21 05:16:46 +0100186 ? my_demangle(function_name) : function_name));
Juan Cespedesac3db291998-04-25 14:31:58 +0200187#else
Petr Machataa43876e2012-04-17 00:40:04 +0200188 current_column += fprintf(options.output, "%s(", function_name);
Juan Cespedesac3db291998-04-25 14:31:58 +0200189#endif
Juan Cespedes5e01f651998-03-08 22:31:44 +0100190
191 func = name2func(function_name);
192 if (!func) {
193 int i;
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100194 for (i = 0; i < 4; i++) {
195 current_column +=
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200196 display_arg(type, proc, i, arg_unknown);
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100197 current_column += fprintf(options.output, ", ");
Juan Cespedes5e01f651998-03-08 22:31:44 +0100198 }
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200199 current_column += display_arg(type, proc, 4, arg_unknown);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100200 return;
201 } else {
202 int i;
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100203 for (i = 0; i < func->num_params - func->params_right - 1; i++) {
204 current_column +=
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200205 display_arg(type, proc, i, func->arg_info[i]);
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100206 current_column += fprintf(options.output, ", ");
Juan Cespedes5e01f651998-03-08 22:31:44 +0100207 }
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100208 if (func->num_params > func->params_right) {
209 current_column +=
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200210 display_arg(type, proc, i, func->arg_info[i]);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100211 if (func->params_right) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100212 current_column += fprintf(options.output, ", ");
Juan Cespedes5e01f651998-03-08 22:31:44 +0100213 }
214 }
Petr Machata1d310382011-08-08 17:38:18 +0200215 if (func->params_right
216 || func->return_info->type == ARGTYPE_STRING_N
217 || func->return_info->type == ARGTYPE_ARRAY) {
Juan Cespedes5c3fe062004-06-14 18:08:37 +0200218 save_register_args(type, proc);
219 }
Juan Cespedes5e01f651998-03-08 22:31:44 +0100220 }
221}
222
Juan Cespedesf1350522008-12-16 18:19:58 +0100223void
Petr Machata29add4f2012-02-18 16:38:05 +0100224output_right(enum tof type, struct Process *proc, struct library_symbol *libsym)
Petr Machata14184b32012-02-10 13:10:26 +0100225{
Petr Machata29add4f2012-02-18 16:38:05 +0100226 const char *function_name = libsym->name;
Juan Cespedescde58262009-05-07 11:09:00 +0200227 Function *func = name2func(function_name);
Steve Finkb0315a02006-08-07 04:22:06 +0200228 static arg_type_info *arg_unknown = NULL;
229 if (arg_unknown == NULL)
Steve Fink65b53df2006-09-25 02:27:08 +0200230 arg_unknown = lookup_prototype(ARGTYPE_UNKNOWN);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100231
Juan Cespedesda9b9532009-04-07 15:33:50 +0200232 if (options.summary) {
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100233 struct opt_c_struct *st;
Juan Cespedesd65efa32003-02-03 00:22:30 +0100234 if (!dict_opt_c) {
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100235 dict_opt_c =
236 dict_init(dict_key2hash_string,
237 dict_key_cmp_string);
Juan Cespedesd65efa32003-02-03 00:22:30 +0100238 }
239 st = dict_find_entry(dict_opt_c, function_name);
240 if (!st) {
241 char *na;
242 st = malloc(sizeof(struct opt_c_struct));
243 na = strdup(function_name);
244 if (!st || !na) {
245 perror("malloc()");
246 exit(1);
247 }
248 st->count = 0;
249 st->tv.tv_sec = st->tv.tv_usec = 0;
250 dict_enter(dict_opt_c, na, st);
251 }
252 if (st->tv.tv_usec + current_time_spent.tv_usec > 1000000) {
253 st->tv.tv_usec += current_time_spent.tv_usec - 1000000;
254 st->tv.tv_sec++;
255 } else {
256 st->tv.tv_usec += current_time_spent.tv_usec;
257 }
258 st->count++;
259 st->tv.tv_sec += current_time_spent.tv_sec;
260
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100261// fprintf(options.output, "%s <%lu.%06d>\n", function_name,
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100262// current_time_spent.tv_sec, (int)current_time_spent.tv_usec);
Juan Cespedesd65efa32003-02-03 00:22:30 +0100263 return;
264 }
Paul Gilliam76c61f12006-06-14 06:55:21 +0200265 if (current_proc && (current_proc != proc ||
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100266 current_depth != proc->callstack_depth)) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100267 fprintf(options.output, " <unfinished ...>\n");
Paul Gilliam76c61f12006-06-14 06:55:21 +0200268 current_proc = 0;
Juan Cespedes1b9cfd61999-08-30 19:34:50 +0200269 }
Paul Gilliam76c61f12006-06-14 06:55:21 +0200270 if (current_proc != proc) {
Juan Cespedes5e01f651998-03-08 22:31:44 +0100271 begin_of_line(type, proc);
Juan Cespedesd914a202004-11-10 00:15:33 +0100272#ifdef USE_DEMANGLE
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100273 current_column +=
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100274 fprintf(options.output, "<... %s resumed> ",
Juan Cespedesce377d52008-12-16 19:38:10 +0100275 options.demangle ? my_demangle(function_name) : function_name);
Juan Cespedes1b9cfd61999-08-30 19:34:50 +0200276#else
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100277 current_column +=
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100278 fprintf(options.output, "<... %s resumed> ", function_name);
Juan Cespedes1b9cfd61999-08-30 19:34:50 +0200279#endif
Juan Cespedes5e01f651998-03-08 22:31:44 +0100280 }
281
282 if (!func) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100283 current_column += fprintf(options.output, ") ");
Juan Cespedesce377d52008-12-16 19:38:10 +0100284 tabto(options.align - 1);
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100285 fprintf(options.output, "= ");
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200286 display_arg(type, proc, -1, arg_unknown);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100287 } else {
288 int i;
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100289 for (i = func->num_params - func->params_right;
290 i < func->num_params - 1; i++) {
291 current_column +=
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200292 display_arg(type, proc, i, func->arg_info[i]);
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100293 current_column += fprintf(options.output, ", ");
Juan Cespedes5e01f651998-03-08 22:31:44 +0100294 }
295 if (func->params_right) {
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100296 current_column +=
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200297 display_arg(type, proc, i, func->arg_info[i]);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100298 }
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100299 current_column += fprintf(options.output, ") ");
Juan Cespedesce377d52008-12-16 19:38:10 +0100300 tabto(options.align - 1);
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100301 fprintf(options.output, "= ");
Steve Finkb0315a02006-08-07 04:22:06 +0200302 if (func->return_info->type == ARGTYPE_VOID) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100303 fprintf(options.output, "<void>");
Juan Cespedes5e01f651998-03-08 22:31:44 +0100304 } else {
Juan Cespedesa413e5b2007-09-04 17:34:53 +0200305 display_arg(type, proc, -1, func->return_info);
Juan Cespedes5e01f651998-03-08 22:31:44 +0100306 }
Juan Cespedes5e4455b1997-08-24 01:48:26 +0200307 }
Juan Cespedesd65efa32003-02-03 00:22:30 +0100308 if (opt_T) {
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100309 fprintf(options.output, " <%lu.%06d>",
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100310 current_time_spent.tv_sec,
311 (int)current_time_spent.tv_usec);
Juan Cespedesd65efa32003-02-03 00:22:30 +0100312 }
Juan Cespedesb65bdc52008-12-16 19:50:16 +0100313 fprintf(options.output, "\n");
Joe Damatoab3b72c2010-10-31 00:21:53 -0700314
315#if defined(HAVE_LIBUNWIND)
316 if (options.bt_depth > 0) {
317 unw_cursor_t cursor;
318 unw_word_t ip, sp;
319 int unwind_depth = options.bt_depth;
320 char fn_name[100];
321
322 unw_init_remote(&cursor, proc->unwind_as, proc->unwind_priv);
323 while (unwind_depth) {
324 unw_get_reg(&cursor, UNW_REG_IP, &ip);
325 unw_get_reg(&cursor, UNW_REG_SP, &sp);
326 unw_get_proc_name(&cursor, fn_name, 100, NULL);
327 fprintf(options.output, "\t\t\t%s (ip = 0x%lx)\n", fn_name, (long) ip);
328 if (unw_step(&cursor) <= 0)
329 break;
330 unwind_depth--;
331 }
332 fprintf(options.output, "\n");
333 }
334#endif /* defined(HAVE_LIBUNWIND) */
335
Paul Gilliam76c61f12006-06-14 06:55:21 +0200336 current_proc = 0;
Ian Wienand2d45b1a2006-02-20 22:48:07 +0100337 current_column = 0;
Juan Cespedesc40e64a1997-10-26 20:34:00 +0100338}