Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal/epan proto.c to_str.c to_str.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 1 Aug 2001 03:27:01 -0500 (CDT)
guy         2001/08/01 03:27:01 CDT

  Modified files:
    epan                 proto.c to_str.c to_str.h 
  Log:
  Add a "time_secs_to_str_buf()" routine, which takes seconds and
  fractions-of-a-second (the units of which are either milliseconds or
  microseconds, specified by a Boolean argument), and formats it into a
  "DD days, HH hours, MM minutes, SS seconds" using a buffer supplied to
  it.  Have "time_secs_to_str()" and "time_msecs_to_str()" both use it.
  Also, have it correctly handle the case of SS being > 0 but < 1 (which
  "time_msecs_to_str()" didn't do).
  
  Rename "rel_time_to_str()" to "rel_time_to_secs_str()", and add a
  "rel_time_to_str()" routine that takes a "struct timeval" and hands its
  seconds and microseconds values to "time_secs_to_str_buf()".  Use
  "rel_time_to_secs_str()" to format FT_RELATIVE_TIME values for now; we
  might want to use "rel_time_to_str()" for them, though, or make it an
  option (either a user option, or a per-field option, using the field
  that also holds BASE_ values).
  
  Revision  Changes    Path
  1.31      +3 -3      ethereal/epan/proto.c
  1.11      +113 -66   ethereal/epan/to_str.c
  1.4       +3 -3      ethereal/epan/to_str.h