Ethereal-cvs: [Ethereal-cvs] cvs commit: ethereal packet-eth.c packet-tr.c

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: Sun, 12 Nov 2000 23:11:17 -0600 (CST)
guy         2000/11/12 23:11:17 CST

  Modified files:
    .                    packet-eth.c packet-tr.c 
  Log:
  "It's pronounced 'volatile pointer to tvbuff_t' but it's spelled
  'tvbuff_t *volatile'."  Makes "Throat-Warbler Mangrove" vs.
  "Luxury-Yacht" sound almost normal....
  
  Type-qualified pointers to non-type-qualified objects are a barrel of
  fun in C.  The way you declare a volatile pointer named "bar" to a
  *non-volatile* "foo" is
  
  	foo *volatile bar;
  
  as opposed to a non-volatile pointer "bar" to a volatile "foo", which is
  
  	volatile foo *bar;
  
  GCC's complaint about variables being clobbered by longjmp refers to the
  fact that "longjmp()" isn't guaranteed to restore variables stored in
  registers to the values they had at the time of the "longjmp()" (if
  "setjmp()" stuffs the current register values in the "jmp_buf", and
  "longjmp()" just reloads them rather than walking the stack to restore
  all register values pushed onto the stack, the values at the time of the
  "setjmp()" will be restored, clobbering any updates done after the
  "setjmp()"); the workaround provided in ANSI C is to declare the
  variables in question "volatile", which will keep them out of registers
  (or any other place that "setjmp()"/"longjmp()" can't handle).
  
  Revision  Changes    Path
  1.45      +7 -12     ethereal/packet-eth.c
  1.48      +2 -6      ethereal/packet-tr.c