Codebase list gtkwave / 457be729-5368-47f5-83d0-c4fdf3c09209/main src / tcl_support_commands.c
457be729-5368-47f5-83d0-c4fdf3c09209/main

Tree @457be729-5368-47f5-83d0-c4fdf3c09209/main (Download .tar.gz)

tcl_support_commands.c @457be729-5368-47f5-83d0-c4fdf3c09209/mainraw · history · blame

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
/*
 * Copyright (c) Yiftach Tzori 2009-2012.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 */
#include <config.h>
#include "globals.h"
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
#include <ctype.h>
#include "gtk12compat.h"
#include "analyzer.h"
#include "tree.h"
#include "symbol.h"
#include "vcd.h"
#include "lx2.h"
#include "busy.h"
#include "debug.h"
#include "hierpack.h"
#include "tcl_helper.h"
#include "tcl_support_commands.h"

/* **
 * Search for a tree node that is associated with the hierarchical path
 * return pointer to this node or NULL
 */
GtkCTreeNode *SST_find_node_by_path(GtkCTreeRow *root, char *path) {
  char *s = strdup_2(path) ;
  char *p = s ;
  char *p1 ;
  GtkCTreeRow *gctr = root ;
  GtkCTreeNode *node = gctr->parent ;
  struct tree *t ;
  int i ;
  /* in the cases of path that where generated inside a `generate-for' block
   * path name will contain '[]'. This will prompt TCL to soround PATH with
   * '{' and '}'
   */
  if (*p == '{' && (p1 = strrchr(p, '}'))) {
    p++ ;
    *p1 = '\0' ;
  }
  while (gctr)  {
    if ((p1 = strchr(p, '.')))
      *p1 = '\0' ;
    t = (struct tree *)(gctr->row.data) ;
    i = 0 ;
    while (strcmp(t->name, p)) { /* name mis-match */
      if (!(node = gctr->sibling)) { /* no more siblings */
	gctr = NULL ;
	break ;
      } else {
	gctr = GTK_CTREE_ROW(node);
	t = (struct tree *)(gctr->row.data) ;
      }
      i++ ;
    }
    if (gctr) {			/* normal exit from the above */
      if(!p1) {/* first/last in chain */
	if(i == 0)		/* first */
	  if(gctr->children)
	    node = GTK_CTREE_ROW(gctr->children)->parent ;
	break ;
      } else {			/* keep going down the hierarchy */
	if (!(node = gctr->children))
	  break ;
	else {
	  gctr = GTK_CTREE_ROW(gctr->children) ;
	  p = p1 + 1 ;
	}
      }
    }
  }
  free_2(s) ;
  return node ;
}

/* **
 * Open the hierarchy tree, starting from 'node' up to the root
 */
int SST_open_path(GtkCTree *ctree, GtkCTreeNode *node) {
  GtkCTreeRow *row ;
  for(row = GTK_CTREE_ROW(node) ; row->parent; row = GTK_CTREE_ROW(row->parent)) {
    if(row->parent)
      gtk_ctree_expand(ctree, row->parent);
    else
      break ;
  }
  return 0 ;
}

/* **
 * Main function called by gtkwavetcl_forceOpenTreeNode
 * Inputs:
 *   char *name :: hierachical path to open
 * Output:
 *   One of:
 *     SST_NODE_FOUND - if path is in the dump file
 *     SST_NODE_NOT_EXIST - is path is not in the dump
 *     SST_TREE_NOT_EXIST - is Tree widget does not exist
 * Side effects:
 *    If  path is in the dump then its tree is opened and scrolled
 *    to be it to display. Node is selected and associated signals
 *    are displayed.
 *    No change in any other case
  */

int SST_open_node(char *name) {
  int rv ;
#ifdef WAVE_USE_GTK2
   GtkCTree *ctree = GLOBALS->ctree_main;
   if (ctree) {
     GtkCTreeRow *gctr;
     GtkCTreeNode *target_node ;
     for(gctr = GTK_CTREE_ROW(GLOBALS->any_tree_node); gctr->parent;
	 gctr = GTK_CTREE_ROW(gctr->parent)) ;
     if ((target_node = SST_find_node_by_path(gctr, name))) {
       struct tree *t ;
       rv = SST_NODE_FOUND ;
       gtk_ctree_collapse_recursive(ctree, gctr->parent) ;
       SST_open_path(ctree, target_node) ;
       gtk_ctree_node_moveto(ctree, target_node, 0, 0.5, 0.5);
       gtk_ctree_select(ctree, target_node);
       gctr = GTK_CTREE_ROW(target_node) ;
       t = (struct tree *)(gctr->row.data) ;
       GLOBALS->sig_root_treesearch_gtk2_c_1 = t->child;
       fill_sig_store ();
     } else {
       rv = SST_NODE_NOT_EXIST ;
     }
   } else {
     rv = SST_TREE_NOT_EXIST ;
   }
#else
(void)name;
  rv = SST_TREE_NOT_EXIST ;
#endif

   return rv ;
}
/* ===== Double link lists */
llist_p *llist_new(llist_u v, ll_elem_type type, int arg) {
  llist_p *p = (llist_p *)malloc_2(sizeof(llist_p)) ;
  p->next = p->prev = NULL ;
  switch(type) {
  case LL_INT: p->u.i = v.i ; break ;
  case LL_UINT: p->u.u = v.u ; break ;
  case LL_TIMETYPE: p->u.tt = v.tt ; break ;
  case LL_CHAR: p->u.c = v.c ; break ;
  case LL_SHORT: p->u.s = v.s ; break ;
  case LL_STR:
    if(arg == -1)
      p->u.str = strdup_2(v.str) ;
    else {
      p->u.str = (char *)malloc_2(arg) ;
      strncpy(p->u.str, v.str, arg) ;
      p->u.str[arg] = '\0' ;
    }
    break ;
  case LL_VOID_P: p->u.p = v.p ; break ;
  default:
	fprintf(stderr, "Internal error in llist_new(), type: %d\n", type);
	exit(255);
  }
  return p ;
}

/*
* append llist_p element ELEM to the of the list whose first member is HEAD amd
* last is TAIL. and return the head of the list.
* if HEAD is NULL ELEM is returned.
* if TAIL is defined then ELEM is chained to it and TAIL is set to point to
* ELEM
*/

llist_p *llist_append(llist_p *head, llist_p *elem, llist_p **tail) {
  llist_p *p ;
  if (*tail) {
    p = tail[0] ;
    p->next = elem ;
    elem->prev = p ;
    tail[0] = elem ;
  } else {
    if (head) {
      for(p = head ; p->next; p = p->next) ;
      p->next = elem ;
      elem ->prev = p ;
    } else {
      head = elem ;
    }
  }
  return head ;
}
/*
* Remove the last element from list whose first member is HEAD
* if TYPE is LL_STR the memory allocated for this string is freed.
* if the TYPE is LL_VOID_P that the caller supplied function pointer F() is
*  is executed (if not NULL)
* HEAD and TAIL are updated.
 */

llist_p *llist_remove_last(llist_p *head, llist_p **tail, ll_elem_type type, void *f(void *) ) {
  if (head) {
    llist_p *p = tail[0] ;
    switch(type) {
    case LL_STR: free_2(p->u.str) ; break ;
    case LL_VOID_P:
      if (f)
	f(p->u.p) ;
      break ;
    default:
      fprintf(stderr, "Internal error in llist_remove_last(), type: %d\n", type);
      exit(255);
    }
    if (p->prev) {
      tail[0] = p->prev ;
    } else {
      head = tail[0] = NULL ;
    }
    free_2(p) ;
  }
  return head ;
}

/* Destroy the list whose first member is HEAD
* function pointer F() is called in type is LL_VOID_P
* if TYPE is LL_STR then string is freed
*/
void llist_free(llist_p *head, ll_elem_type type, void *f(void *)) {
  llist_p *p = head, *p1 ;
  while(p) {
    p1 = p->next ;
    switch(type) {
    case LL_STR: free_2(p->u.str) ; break ;
    case LL_VOID_P:
      if (f)
	f(p->u.p) ;
      break ;
    default:
      fprintf(stderr, "Internal error in llist_free(), type: %d\n", type);
      exit(255);
    }
    free_2(p) ;
    p = p1 ;
  }
}
/* ===================================================== */
/* Create a Trptr structure that contains the bit-vector VEC
* This is based on the function AddVector()
 */
Trptr BitVector_to_Trptr(bvptr vec) {
  Trptr  t;
  int    n;

  GLOBALS->signalwindow_width_dirty=1;

  n = vec->nbits;
  t = (Trptr) calloc_2(1, sizeof( TraceEnt ) );
  if( t == NULL ) {
    fprintf( stderr, "Out of memory, can't add %s to analyzer\n",
	     vec->bvname );
    return( 0 );
  }

  t->name = vec->bvname;

  if(GLOBALS->hier_max_level)
    t->name = hier_extract(t->name, GLOBALS->hier_max_level);

  t->flags = ( n > 3 ) ? TR_HEX|TR_RJUSTIFY : TR_BIN|TR_RJUSTIFY;
  t->vector = TRUE;
  t->n.vec = vec;
  /* AddTrace( t ); */
  return( t );
}

Trptr find_first_highlighted_trace(void) {
  Trptr t=GLOBALS->traces.first;
  while(t) {
    if(t->flags&TR_HIGHLIGHT) {
      if(!(t->flags&(TR_BLANK|TR_ANALOG_BLANK_STRETCH))) {
	break;
      }
    }
    t=t->t_next;
  }
  return(t);
}

/* Find is signal named NAME is on display and return is Trptr value
* or NULL
* NAME is a full hierarchical name, but may not in include range '[..:..]'
*  information.
 */
Trptr is_signal_displayed(char *name) {
  Trptr t=GLOBALS->traces.first ;
  char *p = strchr(name, '['), *p1 ;
  unsigned int len, len1 ;
  if(p)
    *p = '\0' ;
  len = strlen(name) ;
  while(t) {
    int was_packed = HIER_DEPACK_ALLOC;
    int cc;
    if(t->vector)
	{
	p = t->n.vec->bvname;
	}
	else
	{
	if(t->n.vec)
		{
		p = hier_decompress_flagged(t->n.nd->nname, &was_packed);
		}
		else
		{
		p = NULL;
		}
	}

    if(p) {
      p1 = strchr(p,'[') ;
      len1 = (p1) ? (unsigned int)(p1 - p) : strlen(p) ;
      cc = ((len == len1) && !strncmp(name, p, len));
      if(was_packed) free_2(p);
      if(cc)
	break ;
    }
    t = t->t_next ;
  }
  return t ;
}

/* Create a Trptr structure for ND and return its value
* This is based on the function AddNodeTraceReturn()
*/
Trptr Node_to_Trptr(nptr nd)
{
  Trptr  t = NULL;
  hptr histpnt;
  hptr *harray;
  int histcount;
  int i;

  if(nd->mv.mvlfac) import_trace(nd);

  GLOBALS->signalwindow_width_dirty=1;

  if( (t = (Trptr) calloc_2( 1, sizeof( TraceEnt ))) == NULL ) {
    fprintf( stderr, "Out of memory, can't add to analyzer\n" );
    return( 0 );
  }

  if(!nd->harray) { /* make quick array lookup for aet display */
    histpnt=&(nd->head);
    histcount=0;

    while(histpnt) {
      histcount++;
      histpnt=histpnt->next;
    }

    nd->numhist=histcount;

    if(!(nd->harray=harray=(hptr *)malloc_2(histcount*sizeof(hptr)))) {
      fprintf( stderr, "Out of memory, can't add to analyzer\n" );
      free_2(t);
      return(0);
    }

    histpnt=&(nd->head);
    for(i=0;i<histcount;i++) {
      *harray=histpnt;
      harray++;
      histpnt=histpnt->next;
    }
  }

  if(!GLOBALS->hier_max_level) {
    int flagged = HIER_DEPACK_ALLOC;

    t->name = hier_decompress_flagged(nd->nname, &flagged);
    t->is_depacked = (flagged != 0);
  }
  else {
    int flagged = HIER_DEPACK_ALLOC;
    char *tbuff = hier_decompress_flagged(nd->nname, &flagged);
    if(!flagged) {
      t->name = hier_extract(nd->nname, GLOBALS->hier_max_level);
    }
    else {
      t->name = strdup_2(hier_extract(tbuff, GLOBALS->hier_max_level));
      free_2(tbuff);
      t->is_depacked = 1;
    }
  }

  if(nd->extvals) { /* expansion vectors */
    int n;

    n = nd->msi - nd->lsi;
    if(n<0)n=-n;
    n++;

    t->flags = (( n > 3 )||( n < -3 )) ? TR_HEX|TR_RJUSTIFY :
      TR_BIN|TR_RJUSTIFY;
  }
  else {
    t->flags |= TR_BIN;	/* binary */
  }
  t->vector = FALSE;
  t->n.nd = nd;
  /* if(tret) *tret = t;		... for expand */
  return t ;
}
/*
* Search for the signal named (full path) NAME in the signal data base and
* create a Trptr structure for it
* NAME is a full hierarchy name, but may not include range information.
* Return the structure created or NULL
*/
Trptr sig_name_to_Trptr(char *name) {
  Trptr t = NULL ;
  int was_packed = HIER_DEPACK_ALLOC;
  int i, name_len;
  char *hfacname = NULL;
  struct symbol *s = NULL, *s2 ;
  int len = 0 ;
  bvptr v = NULL;
  bptr b = NULL;
  int pre_import = 0;

  if(name)
	{
	name_len = strlen(name);
	for(i=0;i<GLOBALS->numfacs;i++)
		{
		hfacname = hier_decompress_flagged(GLOBALS->facs[i]->name,  &was_packed);
		if(!strcmp(name, hfacname) || ((!strncmp(name, hfacname, name_len) && hfacname[name_len] == '[')))
			{
			s = GLOBALS->facs[i];
			if((s2 = s->vec_root))
				{
				s = s2;
				}
				else
				{
				s2 = s;
				}

			if(GLOBALS->is_lx2)
				{
				while(s2)
					{
	                                if(s2->n->mv.mvlfac)	/* the node doesn't exist yet! */
	                                        {
	                                        lx2_set_fac_process_mask(s2->n);
	                                        pre_import++;
	                                        }

					s2 = s2->vec_chain;
					len++;
					}
				}
				else
				{
				while(s2)
					{
					s2 = s2->vec_chain;
					len++;
					}
				}

			if(was_packed) { free_2(hfacname); }
			break;
			}
		if(was_packed) { free_2(hfacname); }
		s = NULL;
		}

	if(s)
		{
	        if(pre_import)
        	        {
        	        lx2_import_masked();		/* import any missing nodes */
        	        }

		if(len > 1)
			{
			if ((b = makevec_chain(NULL, s, len)))
				{
				if((v=bits2vector(b)))
					{
					t = BitVector_to_Trptr(v) ;
					}
			                else
			                {
			                free_2(b->name);
			                if(b->attribs) free_2(b->attribs);
			                free_2(b);
			                }
				}
			}
			else
			{
			nptr node = s->n ;
			t = Node_to_Trptr(node) ;
			}
		}

	}

  return t ;
}

/* Return the base prefix for the signal value */
char *signal_value_prefix(TraceFlagsType flags) {
  if(flags & TR_BIN) return "0b" ;
  if(flags & TR_HEX) return "0x" ;
  if(flags & TR_OCT) return "0" ;
  return "" ;
}

/* ===================================================== */

llist_p *signal_change_list(char *sig_name, int dir, TimeType start_time,
		       TimeType end_time, int max_elements) {
  llist_p *l0_head = NULL, *l0_tail = NULL, *l1_head = NULL,*l_elem, *lp ;
  llist_p *l1_tail = NULL ;
  char *s, s1[1024] ;
  hptr h_ptr ;
  Trptr t = NULL ;
  Trptr t_created = NULL;
  if(!sig_name) {
    t = (Trptr)find_first_highlighted_trace();
  } else {
    /* case of sig name, find the representing Trptr structure */
    if (!(t = is_signal_displayed(sig_name)))
      t = t_created = sig_name_to_Trptr(sig_name) ;
  }
  if (t) {			/* we have a signal */
    /* create a list of value change structs (hptrs or vptrs */
    int nelem = 0 /* , bw = -1 */ ; /* scan-build */
    TimeType tstart = (dir == STRACE_FORWARD) ? start_time : end_time ;
    TimeType tend = (dir == STRACE_FORWARD) ? end_time : start_time ;
    if ((dir == STRACE_BACKWARD) && (max_elements == 1))
	{
	max_elements++;
	}
    if (!t->vector) {
      hptr h, h1;
      int len = 0  ;
      /* scan-build :
      if(t->n.nd->extvals) {
	bw = abs(t->n.nd->msi - t->n.nd->lsi) + 1 ;
      }
      */
      h = bsearch_node(t->n.nd, tstart - t->shift) ;
      for(h1 = h; h1; h1 = h1->next) {
	if (h1->time <= tend) {
	  if (len++ < max_elements) {
	    llist_u llp; llp.p = h1;
	    l_elem = llist_new(llp, LL_VOID_P, -1) ;
	    l0_head = llist_append(l0_head, l_elem, &l0_tail) ;
	    if(!l0_tail) l0_tail = l0_head ;
	  } else {
	    if(dir == STRACE_FORWARD)
	      break ;
	    else {
	      if(!l0_head) /* null pointer deref found by scan-build */
			{
		        llist_u llp; llp.p = h1;
		        l_elem = llist_new(llp, LL_VOID_P, -1) ;
		        l0_head = llist_append(l0_head, l_elem, &l0_tail) ;
		        if(!l0_tail) l0_tail = l0_head ;
			}
	      l_elem = l0_head ;
	      l0_head = l0_head->next ; /* what scan-build flagged as null */
	      l0_head->prev = NULL ;
	      l_elem->u.p = (void *)h1 ;
	      l_elem->next = NULL ;
	      l_elem->prev = l0_tail ;
	      l0_tail->next = l_elem ;
	      l0_tail = l_elem ;
	    }
	  }
	}
      }
    } else {
      vptr v, v1;
      v = bsearch_vector(t->n.vec, tstart - t->shift) ;
      for(v1 = v; v1; v1 = v1->next) {
	if (v1->time <= tend) {
	  llist_u llp; llp.p = v1;
	  l_elem = llist_new(llp, LL_VOID_P, -1) ;
	  l0_head = llist_append(l0_head, l_elem, &l0_tail) ;
	  if(!l0_tail) l0_tail = l0_head ;
	}
      }
    }
    lp = (start_time < end_time) ? l0_head : l0_tail ;
    /* now create a linked list of time,value.. */
    while (lp && (nelem++ < max_elements)) {
      llist_u llp; llp.tt = ((t->vector) ? ((vptr)lp->u.p)->time: ((hptr)lp->u.p)->time);
      l_elem = llist_new(llp, LL_TIMETYPE, -1) ;
      l1_head = llist_append(l1_head, l_elem, &l1_tail) ;
      if(!l1_tail) l1_tail = l1_head ;
      if(t->vector == 0) {
	if(!t->n.nd->extvals) {	/* really single bit */
	  switch(((hptr)lp->u.p)->v.h_val) {
	  case '0':
	  case AN_0: llp.str = "0"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case '1':
	  case AN_1: llp.str = "1"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case 'x':
	  case 'X':
	  case AN_X: llp.str = "x"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case 'z':
	  case 'Z':
	  case AN_Z: llp.str = "z"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case 'h':
	  case 'H':
	  case AN_H: llp.str = "h"; l_elem = llist_new(llp, LL_STR, -1) ; break ; /* added for GHW... */

	  case 'u':
	  case 'U':
	  case AN_U: llp.str = "u"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case 'w':
	  case 'W':
	  case AN_W: llp.str = "w"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case 'l':
	  case 'L':
	  case AN_L: llp.str = "l"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  case '-':
	  case AN_DASH: llp.str = "-"; l_elem = llist_new(llp, LL_STR, -1) ; break ;

	  default:      llp.str = "?"; l_elem = llist_new(llp, LL_STR, -1) ; break ; /* ...added for GHW */
	  }
	} else {		/* this is still an array */
	  h_ptr = (hptr)lp->u.p ;
	  if(h_ptr->flags&HIST_REAL) {
	    if(!(h_ptr->flags&HIST_STRING)) {
#ifdef WAVE_HAS_H_DOUBLE
	      s=convert_ascii_real(t, &h_ptr->v.h_double);
#else
	      s=convert_ascii_real(t, (double *)h_ptr->v.h_vector);
#endif
	    } else {
	      s=convert_ascii_string((char *)h_ptr->v.h_vector);
	    }
	  } else {
	    s=convert_ascii_vec(t,h_ptr->v.h_vector);
	  }
	  if(s) {
	    sprintf(s1,"%s%s", signal_value_prefix(t->flags), s) ;
	    llp.str = s1;
	    l_elem = llist_new(llp, LL_STR, -1) ;
	  } else {
	    l1_head = llist_remove_last(l1_head, &l1_tail, LL_INT, NULL) ;
	  }
	}
      } else {
        sprintf(s1, "%s%s", signal_value_prefix(t->flags),
		convert_ascii(t, (vptr)lp->u.p)) ;
        llp.str = s1 ;
	l_elem = llist_new(llp, LL_STR, -1) ;
      }
      l1_head = llist_append(l1_head, l_elem, &l1_tail) ;
      lp = (start_time < end_time) ? lp->next : lp->prev ;
    }
    llist_free(l0_head, LL_VOID_P, NULL) ;
  }

  if(t_created)
	{
	FreeTrace(t_created);
	}

  return l1_head ;
}