Removed trailing whitespaces from .h and .c files using the

winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
This commit is contained in:
Jörg Mayer 2002-08-28 21:04:11 +00:00
parent 48be4e530d
commit 7c4176d868
501 changed files with 17517 additions and 17517 deletions

View File

@ -1,22 +1,22 @@
/* acconfig.h
* #ifdefs to be controlled by "configure"
*
* $Id: acconfig.h,v 1.24 2002/04/08 01:34:38 guy Exp $
* $Id: acconfig.h,v 1.25 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.org>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

6
afn.c
View File

@ -1,7 +1,7 @@
/* afn.c
* RFC 1700 address family numbers
*
* $Id: afn.c,v 1.3 2002/08/24 10:22:29 guy Exp $
* $Id: afn.c,v 1.4 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -11,12 +11,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

6
afn.h
View File

@ -1,7 +1,7 @@
/* afn.h
* RFC 1700 address family numbers
*
* $Id: afn.h,v 1.2 2002/08/24 10:22:29 guy Exp $
* $Id: afn.h,v 1.3 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -11,12 +11,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,24 +1,24 @@
/* aftypes.h
* AF_ values on various flavors of BSD
*
* $Id: aftypes.h,v 1.2 2002/07/30 07:25:29 guy Exp $
* $Id: aftypes.h,v 1.3 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
*
* This file created and by Mike Hall <mlh@io.com>
* Copyright 1998
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,15 +1,15 @@
/*
* alignment.h, Copyright, 1998, Richard Sharpe, All Rights Reserved
*
* $Id: alignment.h,v 1.3 1999/09/23 05:26:18 guy Exp $
* $Id: alignment.h,v 1.4 2002/08/28 21:00:05 jmayer Exp $
*
* Please see the file COPYING in the top level for details of copying
* this software. Use of this software is approved only under certain
* this software. Use of this software is approved only under certain
* conditions.
*
*
* This file implements the alignment macros for the Threaded SMB Server
*
* For the moment we assume Intel style architecture, but can support
* For the moment we assume Intel style architecture, but can support
* others.
*
* Modification History

12
asn1.c
View File

@ -1,7 +1,7 @@
/* asn1.c
* Routines for ASN.1 BER dissection
*
* $Id: asn1.c,v 1.16 2002/08/02 23:35:45 jmayer Exp $
* $Id: asn1.c,v 1.17 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -29,7 +29,7 @@
/*
* MODULE INFORMATION
* ------------------
* ------------------
* FILE NAME: g_asn1.c
* SYSTEM NAME: ASN1 Basic Encoding
* ORIGINAL AUTHOR(S): Dirk Wisse
@ -48,7 +48,7 @@
* asn1_int_decode (asn1, end_of_int, &integer);
* asn1_eoc_decode (asn1, end_of_seq);
* asn1_close (asn1, &offset);
*
*
* For indefinite encoding end_of_seq and &end_of_seq in the
* example above should be replaced by NULL.
* For indefinite decoding nothing has to be changed.
@ -113,7 +113,7 @@ asn1_open(ASN1_SCK *asn1, tvbuff_t *tvb, int offset)
* RETURNS: void
*/
void
void
asn1_close(ASN1_SCK *asn1, int *offset)
{
*offset = asn1->offset;
@ -332,7 +332,7 @@ asn1_eoc_decode (ASN1_SCK *asn1, int eoc)
{
int ret;
guchar ch;
if (eoc == -1) {
ret = asn1_octet_decode (asn1, &ch);
if (ret != ASN1_ERR_NOERROR)
@ -829,7 +829,7 @@ asn1_oid_value_decode ( ASN1_SCK *asn1, int enc_len, subid_t **oid, guint *len)
size = enc_len + 1;
*oid = g_malloc(size * sizeof(gulong));
optr = *oid;
ret = asn1_subid_decode (asn1, &subid);
if (ret != ASN1_ERR_NOERROR) {
g_free(*oid);

4
asn1.h
View File

@ -1,7 +1,7 @@
/* asn1.h
* Definitions for ASN.1 BER dissection
*
* $Id: asn1.h,v 1.9 2002/08/02 23:35:46 jmayer Exp $
* $Id: asn1.h,v 1.10 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -127,7 +127,7 @@ int asn1_int32_value_decode (ASN1_SCK *asn1, int enc_len, gint32 *integer);
int asn1_int32_decode (ASN1_SCK *asn1, gint32 *integer, guint *nbytes);
int asn1_uint32_value_decode (ASN1_SCK *asn1, int enc_len, guint *integer);
int asn1_uint32_decode (ASN1_SCK *asn1, guint32 *integer, guint *nbytes);
int asn1_bits_decode (ASN1_SCK *asn1, int eoc, guchar **bits,
int asn1_bits_decode (ASN1_SCK *asn1, int eoc, guchar **bits,
guint *len, guchar *unused);
int asn1_string_value_decode (ASN1_SCK *asn1, int enc_len,
guchar **octets);

View File

@ -2,23 +2,23 @@
* Definitions of protocol IDs for the 00-80-C2 OUI, used for
* bridging various networks over ATM (RFC 2684) or Frame Relay (RFC 2427).
*
* $Id: bridged_pids.h,v 1.1 2001/01/10 09:07:35 guy Exp $
* $Id: bridged_pids.h,v 1.2 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 - 2000 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,23 +1,23 @@
/* capture-wpcap.c
* Try to load WinPcap DLL at run-time.
*
* $Id: capture-wpcap.c,v 1.2 2002/08/02 23:35:46 jmayer Exp $
* $Id: capture-wpcap.c,v 1.3 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* capture-wpcap.h
*
* $Id: capture-wpcap.h,v 1.1 2001/04/03 05:26:26 gram Exp $
* $Id: capture-wpcap.h,v 1.2 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* capture.c
* Routines for packet capture windows
*
* $Id: capture.c,v 1.188 2002/08/13 18:12:11 guy Exp $
* $Id: capture.c,v 1.189 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -735,7 +735,7 @@ cap_timer_cb(gpointer data)
/* There's stuff to read from the sync pipe, meaning the child has sent
us a message, or the sync pipe has closed, meaning the child has
closed it (perhaps because it exited). */
static void
static void
cap_file_input_cb(gpointer data, gint source _U_,
GdkInputCondition condition _U_)
{
@ -756,7 +756,7 @@ cap_file_input_cb(gpointer data, gint source _U_,
capturing any more packets. Pick up its exit status, and
complain if it did anything other than exit with status 0. */
wait_for_child(FALSE);
/* Read what remains of the capture file, and finish the capture.
XXX - do something if this fails? */
switch (finish_tail_cap_file(cf, &err)) {
@ -835,7 +835,7 @@ cap_file_input_cb(gpointer data, gint source _U_,
q++;
nread--;
break;
}
}
}
/* Read from the capture file the number of records the child told us
@ -970,7 +970,7 @@ signame(int sig)
sigmsg = "Segmentation violation";
break;
/* http://metalab.unc.edu/pub/Linux/docs/HOWTO/GCC-HOWTO
/* http://metalab.unc.edu/pub/Linux/docs/HOWTO/GCC-HOWTO
Linux is POSIX compliant. These are not POSIX-defined signals ---
ISO/IEC 9945-1:1990 (IEEE Std 1003.1-1990), paragraph B.3.3.1.1 sez:
@ -1052,7 +1052,7 @@ adjust_header(loop_data *ld, struct pcap_hdr *hdr, struct pcaprec_hdr *rechdr)
}
}
/* Mimic pcap_open_live() for pipe captures
/* Mimic pcap_open_live() for pipe captures
* We check if "pipename" is "-" (stdin) or a FIFO, open it, and read the
* header.
* N.B. : we can't read the libpcap formats used in RedHat 6.1 or SuSE 6.3
@ -1306,9 +1306,9 @@ pipe_dispatch(int fd, loop_data *ld, struct pcap_hdr *hdr,
phdr.ts.tv_usec = rechdr->hdr.ts_usec;
phdr.caplen = rechdr->hdr.incl_len;
phdr.len = rechdr->hdr.orig_len;
capture_pcap_cb((guchar *)ld, &phdr, data);
ld->pipe_state = STATE_EXPECT_REC_HDR;
return 1;
@ -1380,9 +1380,9 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
#define N_COUNTS (sizeof counts / sizeof counts[0])
#ifdef _WIN32
WORD wVersionRequested;
WSADATA wsaData;
#ifdef _WIN32
WORD wVersionRequested;
WSADATA wsaData;
#else
static const char ppamsg[] = "can't find PPA for ";
char *libpcap_warn;
@ -1400,18 +1400,18 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
signed/unsigned 64-bit int */
#define DECISIZE 20
/* Initialize Windows Socket if we are in a WIN32 OS
/* Initialize Windows Socket if we are in a WIN32 OS
This needs to be done before querying the interface for network/netmask */
#ifdef _WIN32
wVersionRequested = MAKEWORD( 1, 1 );
err = WSAStartup( wVersionRequested, &wsaData );
if (err!=0) {
snprintf(errmsg, sizeof errmsg,
"Couldn't initialize Windows Sockets.");
pch=NULL;
goto error;
}
#endif
#ifdef _WIN32
wVersionRequested = MAKEWORD( 1, 1 );
err = WSAStartup( wVersionRequested, &wsaData );
if (err!=0) {
snprintf(errmsg, sizeof errmsg,
"Couldn't initialize Windows Sockets.");
pch=NULL;
goto error;
}
#endif
ld.go = TRUE;
ld.counts.total = 0;
@ -1574,7 +1574,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
goto error;
}
if (capture_opts.ringbuffer_on) {
ld.pdh = ringbuf_init_wtap_dump_fdopen(WTAP_FILE_PCAP, ld.linktype,
ld.pdh = ringbuf_init_wtap_dump_fdopen(WTAP_FILE_PCAP, ld.linktype,
file_snaplen, &err);
} else {
ld.pdh = wtap_dump_fdopen(cfile.save_file_fd, WTAP_FILE_PCAP,
@ -1705,12 +1705,12 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
if (capture_child)
signal(SIGUSR1, stop_capture);
#endif
/* initialize capture stop conditions */
/* initialize capture stop conditions */
init_capture_stop_conditions();
/* create stop conditions */
if (capture_opts.has_autostop_filesize)
cnd_stop_capturesize =
cnd_new(CND_CLASS_CAPTURESIZE,(long)capture_opts.autostop_filesize * 1000);
cnd_new(CND_CLASS_CAPTURESIZE,(long)capture_opts.autostop_filesize * 1000);
if (capture_opts.has_autostop_duration)
cnd_stop_timeout =
cnd_new(CND_CLASS_TIMEOUT,(gint32)capture_opts.autostop_duration);
@ -1811,7 +1811,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
if (inpkts > 0) {
ld.sync_packets += inpkts;
/* check capture stop conditons */
if (cnd_stop_capturesize != NULL && cnd_eval(cnd_stop_capturesize,
if (cnd_stop_capturesize != NULL && cnd_eval(cnd_stop_capturesize,
(guint32)wtap_get_bytes_dumped(ld.pdh))){
/* Capture file reached its maximum size. */
if (capture_opts.ringbuffer_on) {
@ -1841,12 +1841,12 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
for (i = 0; i < N_COUNTS; i++) {
snprintf(label_str, sizeof(label_str), "%d",
*counts[i].value_ptr);
gtk_label_set(GTK_LABEL(counts[i].value), label_str);
snprintf(label_str, sizeof(label_str), "(%.1f%%)",
pct(*counts[i].value_ptr, ld.counts.total));
gtk_label_set(GTK_LABEL(counts[i].percent), label_str);
}
@ -1872,7 +1872,7 @@ capture(gboolean *stats_known, struct pcap_stat *stats)
}
}
} /* while (ld.go) */
/* delete stop conditions */
if (cnd_stop_capturesize != NULL)
cnd_delete(cnd_stop_capturesize);
@ -2096,7 +2096,7 @@ capture_delete_cb(GtkWidget *w _U_, GdkEvent *event _U_, gpointer data) {
static void
capture_stop_cb(GtkWidget *w _U_, gpointer data) {
loop_data *ld = (loop_data *) data;
ld->go = FALSE;
}
@ -2133,7 +2133,7 @@ capture_pcap_cb(guchar *user, const struct pcap_pkthdr *phdr,
loop_data *ld = (loop_data *) user;
int err;
if ((++ld->counts.total >= ld->max) && (ld->max > 0))
if ((++ld->counts.total >= ld->max) && (ld->max > 0))
{
ld->go = FALSE;
}

View File

@ -1,23 +1,23 @@
/* capture.h
* Definitions for packet capture windows
*
* $Id: capture.h,v 1.31 2002/02/24 09:25:34 guy Exp $
* $Id: capture.h,v 1.32 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* capture_stop_conditions.c
* Implementation for 'stop condition handler'.
*
* $Id: capture_stop_conditions.c,v 1.3 2002/05/04 09:20:28 guy Exp $
* $Id: capture_stop_conditions.c,v 1.4 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -25,12 +25,12 @@
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/stat.h>
#include <stdarg.h>
#include "conditions.h"
#include "capture_stop_conditions.h"
/* predefined classes function prototypes */
/* predefined classes function prototypes */
static condition* _cnd_constr_timeout(condition*, va_list);
static void _cnd_destr_timeout(condition*);
static gboolean _cnd_eval_timeout(condition*, va_list);
@ -52,12 +52,12 @@ void init_capture_stop_conditions(void){
_cnd_destr_capturesize,
_cnd_eval_capturesize,
_cnd_reset_capturesize);
} /* END init_capture_stop_conditions() */
} /* END init_capture_stop_conditions() */
void cleanup_capture_stop_conditions(void){
cnd_unregister_class(CND_CLASS_TIMEOUT);
cnd_unregister_class(CND_CLASS_CAPTURESIZE);
} /* END cleanup_capture_stop_conditions() */
} /* END cleanup_capture_stop_conditions() */
/*****************************************************************************/
/* Predefined condition 'timeout'. */
@ -65,7 +65,7 @@ void cleanup_capture_stop_conditions(void){
/* class id */
const char* CND_CLASS_TIMEOUT = "cnd_class_timeout";
/* structure that contains user supplied data for this condition */
/* structure that contains user supplied data for this condition */
typedef struct _cnd_timeout_dat{
time_t start_time;
gint32 timeout_s;
@ -76,8 +76,8 @@ typedef struct _cnd_timeout_dat{
* 'cnd_new()' in order to perform class specific initialization.
*
* parameter: cnd - Pointer to condition passed by 'cnd_new()'.
* ap - Pointer to user supplied arguments list for this
* constructor.
* ap - Pointer to user supplied arguments list for this
* constructor.
* returns: Pointer to condition - Construction was successful.
* NULL - Construction failed.
*/
@ -109,8 +109,8 @@ static void _cnd_destr_timeout(condition* cnd){
* 'cnd_eval()' in order to perform class specific condition checks.
*
* parameter: cnd - The inititalized timeout condition.
* ap - Pointer to user supplied arguments list for this
* handler.
* ap - Pointer to user supplied arguments list for this
* handler.
* returns: TRUE - Condition is true.
* FALSE - Condition is false.
*/
@ -118,7 +118,7 @@ static gboolean _cnd_eval_timeout(condition* cnd, va_list ap _U_){
cnd_timeout_dat* data = (cnd_timeout_dat*)cnd_get_user_data(cnd);
gint32 elapsed_time;
/* check timeout here */
if(data->timeout_s == 0) return FALSE; /* 0 == infinite */
if(data->timeout_s == 0) return FALSE; /* 0 == infinite */
elapsed_time = time(NULL) - data->start_time;
if(elapsed_time > data->timeout_s) return TRUE;
return FALSE;
@ -132,16 +132,16 @@ static gboolean _cnd_eval_timeout(condition* cnd, va_list ap _U_){
*/
static void _cnd_reset_timeout(condition *cnd){
((cnd_timeout_dat*)cnd_get_user_data(cnd))->start_time = time(NULL);
} /* END _cnd_reset_timeout() */
} /* END _cnd_reset_timeout() */
/*****************************************************************************/
/* Predefined condition 'max. capturesize'. */
/* class id */
/* class id */
const char* CND_CLASS_CAPTURESIZE = "cnd_class_capturesize";
/* structure that contains user supplied data for this condition */
/* structure that contains user supplied data for this condition */
typedef struct _cnd_capturesize_dat{
long max_capture_size;
}cnd_capturesize_dat;
@ -151,8 +151,8 @@ typedef struct _cnd_capturesize_dat{
* 'cnd_new()' in order to perform class specific initialization.
*
* parameter: cnd - Pointer to condition passed by 'cnd_new()'.
* ap - Pointer to user supplied arguments list for this
* constructor.
* ap - Pointer to user supplied arguments list for this
* constructor.
* returns: Pointer to condition - Construction was successful.
* NULL - Construction failed.
*/
@ -183,15 +183,15 @@ static void _cnd_destr_capturesize(condition* cnd){
* 'cnd_eval()' in order to perform class specific condition checks.
*
* parameter: cnd - The inititalized capturesize condition.
* ap - Pointer to user supplied arguments list for this
* handler.
* ap - Pointer to user supplied arguments list for this
* handler.
* returns: TRUE - Condition is true.
* FALSE - Condition is false.
*/
static gboolean _cnd_eval_capturesize(condition* cnd, va_list ap){
cnd_capturesize_dat* data = (cnd_capturesize_dat*)cnd_get_user_data(cnd);
/* check capturesize here */
if(data->max_capture_size == 0) return FALSE; /* 0 == infinite */
if(data->max_capture_size == 0) return FALSE; /* 0 == infinite */
if(va_arg(ap, long) >= data->max_capture_size){
return TRUE;
}
@ -205,4 +205,4 @@ static gboolean _cnd_eval_capturesize(condition* cnd, va_list ap){
* parameter: cnd - Pointer to an initialized condition.
*/
static void _cnd_reset_capturesize(condition *cnd _U_){
} /* END _cnd_reset_capturesize() */
} /* END _cnd_reset_capturesize() */

View File

@ -1,22 +1,22 @@
/* capture_stop_conditions.h
* Implementation for 'stop condition handler'.
*
* $Id: capture_stop_conditions.h,v 1.1 2001/12/04 07:32:00 guy Exp $
* $Id: capture_stop_conditions.h,v 1.2 2002/08/28 21:00:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,23 +1,23 @@
/* color.h
* Definitions for "toolkit-independent" colors
*
* $Id: color.h,v 1.1 2000/11/21 23:54:08 guy Exp $
* $Id: color.h,v 1.2 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* column.c
* Routines for handling column preferences
*
* $Id: column.c,v 1.36 2002/08/02 23:35:46 jmayer Exp $
* $Id: column.c,v 1.37 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -53,10 +53,10 @@ col_format_to_string(gint fmt) {
"%rd", "%ud", "%hd", "%rhd", "%uhd", "%nd", "%rnd",
"%und", "%S", "%rS", "%uS", "%D", "%rD", "%uD", "%p",
"%i", "%L" };
if (fmt < 0 || fmt > NUM_COL_FMTS)
return NULL;
return(slist[fmt]);
}
@ -80,10 +80,10 @@ col_format_desc(gint fmt) {
"Src port (unresolved)", "Destination port",
"Dest port (resolved)", "Dest port (unresolved)",
"Protocol", "Information", "Packet length (bytes)" };
if (fmt < 0 || fmt > NUM_COL_FMTS)
return NULL;
return(dlist[fmt]);
}
@ -303,9 +303,9 @@ gint
get_column_format(gint col) {
GList *clp = g_list_nth(prefs.col_list, col);
fmt_data *cfmt;
cfmt = (fmt_data *) clp->data;
return(get_column_format_from_str(cfmt->fmt));
}
@ -378,8 +378,8 @@ gchar *
get_column_title(gint col) {
GList *clp = g_list_nth(prefs.col_list, col);
fmt_data *cfmt;
cfmt = (fmt_data *) clp->data;
return(cfmt->title);
return(cfmt->title);
}

View File

@ -1,23 +1,23 @@
/* column.h
* Definitions for column handling routines
*
* $Id: column.h,v 1.8 2001/07/22 21:56:25 guy Exp $
* $Id: column.h,v 1.9 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* conditions.c
* Implementation for condition handler.
*
* $Id: conditions.c,v 1.2 2002/05/04 09:19:09 guy Exp $
* $Id: conditions.c,v 1.3 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -27,7 +27,7 @@
#include <stdarg.h>
#include "conditions.h"
/* container for condition classes */
/* container for condition classes */
static GHashTable* classes = NULL;
/* condition data structure declaration */
@ -35,7 +35,7 @@ struct condition{
char* class_id;
void* user_data;
_cnd_eval eval_func;
_cnd_reset reset_func;
_cnd_reset reset_func;
};
/* structure used to store class functions in GHashTable */
@ -51,21 +51,21 @@ static void _cnd_init();
static void _cnd_find_hash_key_for_class_id(gpointer, gpointer, gpointer);
condition* cnd_new(const char* class_id, ...){
va_list ap;
va_list ap;
condition *cnd = NULL, *cnd_ref = NULL;
_cnd_class *cls = NULL;
char* id = NULL;
/* check if hash table is already initialized */
/* check if hash table is already initialized */
_cnd_init();
/* get class structure for this id */
/* get class structure for this id */
if((cls = (_cnd_class*)g_hash_table_lookup(classes, class_id)) == NULL)
return NULL;
/* initialize the basic structure */
/* initialize the basic structure */
if((cnd_ref = (condition*)malloc(sizeof(condition))) == NULL) return NULL;
cnd_ref->user_data = NULL;
cnd_ref->eval_func = cls->eval_func;
cnd_ref->reset_func = cls->reset_func;
/* copy the class id */
/* copy the class id */
if((id = (char*)malloc(strlen(class_id)+1)) == NULL){
free(cnd_ref);
return NULL;
@ -89,11 +89,11 @@ void cnd_delete(condition *cnd){
const char* class_id = cnd->class_id;
/* check for valid pointer */
if(cnd == NULL) return;
/* check if hash table is already initialized */
/* check if hash table is already initialized */
_cnd_init();
/* get the condition class */
/* get the condition class */
cls = (_cnd_class*)g_hash_table_lookup(classes, class_id);
/* call class specific destructor */
/* call class specific destructor */
if(cls != NULL) (cls->destr_func)(cnd);
/* free memory */
free(cnd->class_id);
@ -102,11 +102,11 @@ void cnd_delete(condition *cnd){
} /* END cnd_delete() */
gboolean cnd_eval(condition *cnd, ...){
va_list ap;
va_list ap;
gboolean ret_val = FALSE;
/* validate cnd */
if(cnd == NULL) return FALSE;
/* call specific handler */
/* call specific handler */
va_start(ap, cnd);
ret_val = (cnd->eval_func)(cnd, ap);
va_end(ap);
@ -119,11 +119,11 @@ void cnd_reset(condition *cnd){
void* cnd_get_user_data(condition *cnd){
return cnd->user_data;
} /* END cnd_get_user_data() */
} /* END cnd_get_user_data() */
void cnd_set_user_data(condition *cnd, void* user_data){
cnd->user_data = user_data;
} /* END cnd_set_user_data() */
} /* END cnd_set_user_data() */
gboolean cnd_register_class(const char* class_id,
_cnd_constr constr_func,
@ -133,19 +133,19 @@ gboolean cnd_register_class(const char* class_id,
char* key = NULL;
_cnd_class *cls = NULL;
/* check for valid parameters */
if((constr_func == NULL) || (destr_func == NULL) ||
if((constr_func == NULL) || (destr_func == NULL) ||
(eval_func == NULL) || (reset_func == NULL) || (class_id == NULL))
return FALSE;
/* check if hash table is already initialized */
/* check if hash table is already initialized */
_cnd_init();
/* check for unique class id */
/* check for unique class id */
if((cls = (_cnd_class*)g_hash_table_lookup(classes, class_id)) != NULL)
return FALSE;
/* GHashTable keys need to be persistent for the lifetime of the hash
table. Allocate memory and copy the class id which we use as key. */
if((key = (char*)malloc(strlen(class_id)+1)) == NULL) return FALSE;
strcpy(key, class_id);
/* initialize class structure */
/* initialize class structure */
if((cls = (_cnd_class*)malloc(sizeof(_cnd_class))) == NULL){
free(key);
return FALSE;
@ -163,20 +163,20 @@ static char* pkey = NULL;
void cnd_unregister_class(const char* class_id){
char *key = (char*)class_id;
_cnd_class *cls = NULL;
/* check if hash table is already initialized */
/* check if hash table is already initialized */
_cnd_init();
/* find the key for this class id and store it in 'pkey' */
/* find the key for this class id and store it in 'pkey' */
g_hash_table_foreach(classes,
_cnd_find_hash_key_for_class_id,
key);
/* find the class structure for this class id */
cls = (_cnd_class*)g_hash_table_lookup(classes, class_id);
/* remove constructor from hash table */
g_hash_table_remove(classes, class_id);
/* free the key */
g_hash_table_remove(classes, class_id);
/* free the key */
free(pkey);
pkey = NULL;
/* free the value */
/* free the value */
free(cls);
} /* END cnd_unregister_class() */
@ -185,13 +185,13 @@ void cnd_unregister_class(const char* class_id){
*/
static void _cnd_init(){
if(classes != NULL) return;
/* create hash table, we use strings as keys */
/* create hash table, we use strings as keys */
classes = g_hash_table_new(g_str_hash, g_str_equal);
} /* END _cnd_init() */
/*
* Callback for function 'g_hash_table_foreach()'.
* We don't keep references to hash table keys. Keys have memory allocated
* We don't keep references to hash table keys. Keys have memory allocated
* which must be freed when they are not used anymore. This function finds
* the reference to a key corresponding to a particular class id. The reference
* to the key is stored in a global variable.
@ -200,6 +200,6 @@ void _cnd_find_hash_key_for_class_id(gpointer key,
gpointer value _U_,
gpointer user_data){
char* class_id = (char*)user_data;
char* key_value = (char*)key;
char* key_value = (char*)key;
if(strcmp(class_id, key_value) == 0) pkey = key;
} /* END _cnd_find_hash_key_for_class_id() */
} /* END _cnd_find_hash_key_for_class_id() */

View File

@ -1,22 +1,22 @@
/* conditions.h
* Header for condition handler.
*
* $Id: conditions.h,v 1.1 2001/12/04 07:32:00 guy Exp $
* $Id: conditions.h,v 1.2 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -29,19 +29,19 @@
#include <glib.h>
/* forward declaration for type 'condition' */
/* forward declaration for type 'condition' */
typedef struct condition condition;
/* condition evaluation handler type */
/* condition evaluation handler type */
typedef gboolean (*_cnd_eval)(condition*, va_list);
/* condition reset handler type */
/* condition reset handler type */
typedef void (*_cnd_reset)(condition*);
/* condition class constructor type */
/* condition class constructor type */
typedef condition* (*_cnd_constr)(condition*, va_list);
/* condition class destructor type */
/* condition class destructor type */
typedef void (*_cnd_destr)(condition*);
/*
@ -50,7 +50,7 @@ typedef void (*_cnd_destr)(condition*);
*
* parameter: const char* - Identification of a registered condition class.
* ... - Any number of class specific initial values.
* returns: Pointer to a initialized condition of the particular class on
* returns: Pointer to a initialized condition of the particular class on
* success or NULL on failure.
*/
condition* cnd_new(const char*, ...);
@ -129,6 +129,6 @@ void* cnd_get_user_data(condition*);
* void* - Pointer to user specified data structure.
* returns: -
*/
void cnd_set_user_data(condition*, void*);
void cnd_set_user_data(condition*, void*);
#endif /* CONDITIONS_H */

View File

@ -1,6 +1,6 @@
/* dftest.c.c
*
* $Id: dftest.c,v 1.4 2002/07/17 00:42:39 guy Exp $
* $Id: dftest.c,v 1.5 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -12,12 +12,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -108,7 +108,7 @@ main(int argc, char **argv)
text = get_args_as_string(argc, argv, 1);
printf("Filter: \"%s\"\n", text);
/* Compile it */
if (!dfilter_compile(text, &df)) {
fprintf(stderr, "dftest: %s\n", dfilter_error_msg);

View File

@ -1,7 +1,7 @@
/* Edit capture files. We can delete records, adjust timestamps, or
* simply convert from one format to another format.
*
* $Id: editcap.c,v 1.25 2002/08/02 23:35:46 jmayer Exp $
* $Id: editcap.c,v 1.26 2002/08/28 21:00:06 jmayer Exp $
*
* Originally written by Richard Sharpe.
* Improved by Guy Harris.
@ -61,7 +61,7 @@ static struct time_adjustment time_adj = {{0, 0}, 0}; /* no adjustment */
/* Add a selection item, a simple parser for now */
static void add_selection(char *sel)
static void add_selection(char *sel)
{
char *locn;
char *next;
@ -134,7 +134,7 @@ typedef struct {
static void
edit_callback(guchar *user, const struct wtap_pkthdr *phdr, long offset _U_,
union wtap_pseudo_header *pseudo_header, const guchar *buf)
union wtap_pseudo_header *pseudo_header, const guchar *buf)
{
callback_arg *argp = (callback_arg *)user;
int err;
@ -187,7 +187,7 @@ edit_callback(guchar *user, const struct wtap_pkthdr *phdr, long offset _U_,
}
phdr = &snap_phdr;
}
if (!wtap_dump(argp->pdh, phdr, pseudo_header, buf, &err)) {
fprintf(stderr, "editcap: Error writing to %s: %s\n", argp->filename,
@ -328,7 +328,7 @@ int main(int argc, char *argv[])
exit(1);
}
break;
case 'F':
out_file_type = wtap_short_string_to_file_type(optarg);
if (out_file_type < 0) {
@ -443,4 +443,4 @@ int main(int argc, char *argv[])
return 0;
}

View File

@ -1,22 +1,22 @@
/* etypes.h
* Defines ethernet packet types, similar to tcpdump's ethertype.h
*
* $Id: etypes.h,v 1.25 2002/06/13 07:18:47 guy Exp $
* $Id: etypes.h,v 1.26 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

34
file.c
View File

@ -1,22 +1,22 @@
/* file.c
* File I/O routines
*
* $Id: file.c,v 1.286 2002/08/28 10:07:26 guy Exp $
* $Id: file.c,v 1.287 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -178,7 +178,7 @@ open_cap_file(char *fname, gboolean is_tempfile, capture_file *cf)
cf->progbar_nextstep = 0;
firstsec = 0, firstusec = 0;
prevsec = 0, prevusec = 0;
cf->plist_chunk = g_mem_chunk_new("frame_data_chunk",
sizeof(frame_data),
FRAME_DATA_CHUNK_SIZE * sizeof(frame_data),
@ -377,7 +377,7 @@ read_cap_file(capture_file *cf, int *err)
g_free(load_msg);
}
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
g_snprintf(status_str, sizeof(status_str),
"%luKB of %luKB", file_pos / 1024, cf->f_len / 1024);
update_progress_dlg(progbar, prog_val, status_str);
}
@ -532,7 +532,7 @@ continue_tail_cap_file(capture_file *cf, int to_read, int *err)
/* XXX - this cheats and looks inside the packet list to find the final
row number. */
if (auto_scroll_live && cf->plist_end != NULL)
gtk_clist_moveto(GTK_CLIST(packet_list),
gtk_clist_moveto(GTK_CLIST(packet_list),
GTK_CLIST(packet_list)->rows - 1, -1, 1.0, 1.0);
if (cf->state == FILE_READ_ABORTED) {
@ -581,7 +581,7 @@ finish_tail_cap_file(capture_file *cf, int *err)
if (auto_scroll_live && cf->plist_end != NULL)
/* XXX - this cheats and looks inside the packet list to find the final
row number. */
gtk_clist_moveto(GTK_CLIST(packet_list),
gtk_clist_moveto(GTK_CLIST(packet_list),
GTK_CLIST(packet_list)->rows - 1, -1, 1.0, 1.0);
/* We're done reading sequentially through the file. */
@ -740,7 +740,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
cf->esec = fdata->rel_secs;
cf->eusec = fdata->rel_usecs;
}
/* Get the time elapsed between the previous displayed packet and
this packet. */
compute_timestamp_diff(&fdata->del_secs, &fdata->del_usecs,
@ -827,7 +827,7 @@ read_packet(capture_file *cf, long offset)
epan_dissect_run(edt, pseudo_header, buf, fdata, NULL);
passed = dfilter_apply_edt(cf->rfcode, edt);
epan_dissect_free(edt);
}
}
if (passed) {
plist_end = cf->plist_end;
fdata->prev = plist_end;
@ -1057,7 +1057,7 @@ rescan_packets(capture_file *cf, const char *action, const char *action_item,
if (fdata == selected_frame)
selected_row = row;
}
if (redissect) {
/* Clear out what remains of the visited flags and per-frame data
pointers.
@ -1227,7 +1227,7 @@ print_packets(capture_file *cf, print_args_t *print_args)
}
count++;
/* Check to see if we are suppressing unmarked packets, if so,
/* Check to see if we are suppressing unmarked packets, if so,
* suppress them and then proceed to check for visibility.
*/
if (((print_args->suppress_unmarked && fdata->flags.marked ) ||
@ -1306,7 +1306,7 @@ print_packets(capture_file *cf, print_args_t *print_args)
print_finale(cf->print_fh, print_args->format);
close_print_dest(print_args->to_file, cf->print_fh);
cf->print_fh = NULL;
return TRUE;
@ -1489,7 +1489,7 @@ find_packet(capture_file *cf, dfilter_t *sfcode)
if (progbar == NULL)
progbar = delayed_create_progress_dlg("Searching", cf->sfilter, "Cancel",
&stop_flag, &start_time, prog_val);
if (progbar != NULL) {
g_snprintf(status_str, sizeof(status_str),
"%4u of %u frames", count, cf->count);
@ -1794,8 +1794,8 @@ save_cap_file(char *fname, capture_file *cf, gboolean save_filtered,
statusbar_push_file_msg(save_msg);
g_free(save_msg);
/*
* Check that the from file is not the same as to file
/*
* Check that the from file is not the same as to file
* We do it here so we catch all cases ...
* Unfortunately, the file requester gives us an absolute file
* name and the read file name may be relative (if supplied on
@ -1806,7 +1806,7 @@ save_cap_file(char *fname, capture_file *cf, gboolean save_filtered,
stat(cf->filename, &infile);
stat(fname, &outfile);
if (infile.st_ino == outfile.st_ino) {
simple_dialog(ESD_TYPE_CRIT, NULL,
simple_dialog(ESD_TYPE_CRIT, NULL,
"Can't save over current capture file: %s!",
cf->filename);
goto fail;

12
file.h
View File

@ -1,22 +1,22 @@
/* file.h
* Definitions for file structures and routines
*
* $Id: file.h,v 1.96 2002/08/02 23:35:46 jmayer Exp $
* $Id: file.h,v 1.97 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -63,9 +63,9 @@ typedef struct _capture_file {
gchar *save_file; /* File that user saved capture to */
int save_file_fd; /* File descriptor for saved file */
wtap *wth; /* Wiretap session */
dfilter_t *rfcode; /* Compiled read filter program */
dfilter_t *rfcode; /* Compiled read filter program */
gchar *dfilter; /* Display filter string */
dfilter_t *dfcode; /* Compiled display filter program */
dfilter_t *dfcode; /* Compiled display filter program */
#ifdef HAVE_LIBPCAP
gchar *cfilter; /* Capture filter string */
#endif

View File

@ -1,22 +1,22 @@
/* filters.c
* Code for reading and writing the filters file.
*
* $Id: filters.c,v 1.14 2002/01/21 07:36:31 guy Exp $
* $Id: filters.c,v 1.15 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -247,7 +247,7 @@ read_filter_list(filter_list_type_t list, char **pref_path_return,
line);
continue;
}
/* Skip over separating white space, if any. */
while ((c = getc(ff)) != EOF && isspace(c)) {
if (c == '\n')
@ -354,7 +354,7 @@ GList *
get_filter_list_first(filter_list_type_t list)
{
GList **flp;
flp = get_filter_list(list);
return g_list_first(*flp);
}
@ -368,7 +368,7 @@ add_to_filter_list(filter_list_type_t list, char *name, char *expression)
{
GList **flp;
filter_def *filt;
flp = get_filter_list(list);
filt = (filter_def *) g_malloc(sizeof(filter_def));
filt->name = g_strdup(name);
@ -385,7 +385,7 @@ remove_from_filter_list(filter_list_type_t list, GList *fl_entry)
{
GList **flp;
filter_def *filt;
flp = get_filter_list(list);
filt = (filter_def *) fl_entry->data;
g_free(filt->name);
@ -412,7 +412,7 @@ save_filter_list(filter_list_type_t list, char **pref_path_return,
filter_def *filt;
FILE *ff;
guchar *p, c;
*pref_path_return = NULL; /* assume no error */
switch (list) {

View File

@ -1,23 +1,23 @@
/* filters.c
* Declarations of routines for reading and writing the filters file.
*
* $Id: filters.h,v 1.2 2001/01/28 09:13:07 guy Exp $
* $Id: filters.h,v 1.3 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,23 +1,23 @@
/* follow.c
*
* $Id: follow.c,v 1.30 2002/08/02 23:35:46 jmayer Exp $
* $Id: follow.c,v 1.31 2002/08/28 21:00:06 jmayer Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -64,21 +64,21 @@ follow_tcp_stats(follow_tcp_stats_t* stats)
}
}
/* this will build libpcap filter text that will only
pass the packets related to the stream. There is a
chance that two streams could intersect, but not a
/* this will build libpcap filter text that will only
pass the packets related to the stream. There is a
chance that two streams could intersect, but not a
very good one */
char*
char*
build_follow_filter( packet_info *pi ) {
char* buf = g_malloc(1024);
int len;
if( pi->net_src.type == AT_IPv4 && pi->net_dst.type == AT_IPv4
&& pi->ipproto == 6 ) {
/* TCP over IPv4 */
sprintf( buf,
sprintf( buf,
"(ip.addr eq %s and ip.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)",
ip_to_str( pi->net_src.data),
ip_to_str( pi->net_dst.data),
ip_to_str( pi->net_src.data),
ip_to_str( pi->net_dst.data),
pi->srcport, pi->destport );
len = 4;
is_ipv6 = FALSE;
@ -86,15 +86,15 @@ build_follow_filter( packet_info *pi ) {
else if( pi->net_src.type == AT_IPv6 && pi->net_dst.type == AT_IPv6
&& pi->ipproto == 6 ) {
/* TCP over IPv6 */
sprintf( buf,
sprintf( buf,
"(ipv6.addr eq %s and ipv6.addr eq %s) and (tcp.port eq %d and tcp.port eq %d)",
ip6_to_str((struct e_in6_addr *)pi->net_src.data),
ip6_to_str((struct e_in6_addr *)pi->net_dst.data),
ip6_to_str((struct e_in6_addr *)pi->net_src.data),
ip6_to_str((struct e_in6_addr *)pi->net_dst.data),
pi->srcport, pi->destport );
len = 16;
is_ipv6 = TRUE;
}
else {
else {
g_free( buf );
return NULL;
}
@ -106,7 +106,7 @@ build_follow_filter( packet_info *pi ) {
}
/* here we are going to try and reconstruct the data portion of a TCP
session. We will try and handle duplicates, TCP fragments, and out
session. We will try and handle duplicates, TCP fragments, and out
of order packets in a smart way. */
static tcp_frag *frags[2] = { 0, 0 };
@ -114,7 +114,7 @@ static gulong seq[2];
static guint8 src_addr[2][MAX_IPADDR_LEN];
static guint src_port[2] = { 0, 0 };
void
void
reassemble_tcp( gulong sequence, gulong length, const char* data,
gulong data_length, int synflag, address *net_src,
address *net_dst, guint srcport, guint dstport) {
@ -123,9 +123,9 @@ reassemble_tcp( gulong sequence, gulong length, const char* data,
gulong newseq;
tcp_frag *tmp_frag;
tcp_stream_chunk sc;
src_index = -1;
/* First, check if this packet should be processed. */
if ((net_src->type != AT_IPv4 && net_src->type != AT_IPv6) ||
@ -140,7 +140,7 @@ reassemble_tcp( gulong sequence, gulong length, const char* data,
/* Now check if the packet is for this connection. */
memcpy(srcx, net_src->data, len);
memcpy(dstx, net_dst->data, len);
if ((memcmp(srcx, ip_address[0], len) != 0 &&
if ((memcmp(srcx, ip_address[0], len) != 0 &&
memcmp(srcx, ip_address[1], len) != 0) ||
(memcmp(dstx, ip_address[0], len) != 0 &&
memcmp(dstx, ip_address[1], len) != 0) ||
@ -183,7 +183,7 @@ reassemble_tcp( gulong sequence, gulong length, const char* data,
incomplete_tcp_stream = TRUE;
}
/* now that we have filed away the srcs, lets get the sequence number stuff
/* now that we have filed away the srcs, lets get the sequence number stuff
figured out */
if( first ) {
/* this is the first time we have seen this src's sequence number */
@ -198,14 +198,14 @@ reassemble_tcp( gulong sequence, gulong length, const char* data,
/* if we are here, we have already seen this src, let's
try and figure out if this packet is in the right place */
if( sequence < seq[src_index] ) {
/* this sequence number seems dated, but
/* this sequence number seems dated, but
check the end to make sure it has no more
info than we have already seen */
newseq = sequence + length;
if( newseq > seq[src_index] ) {
gulong new_len;
/* this one has more than we have seen. let's get the
/* this one has more than we have seen. let's get the
payload that we have not seen. */
new_len = seq[src_index] - sequence;
@ -221,7 +221,7 @@ reassemble_tcp( gulong sequence, gulong length, const char* data,
sc.dlen = data_length;
sequence = seq[src_index];
length = newseq - seq[src_index];
/* this will now appear to be right on time :) */
}
}
@ -257,7 +257,7 @@ reassemble_tcp( gulong sequence, gulong length, const char* data,
/* here we search through all the frag we have collected to see if
one fits */
static int
static int
check_fragments( int index, tcp_stream_chunk *sc ) {
tcp_frag *prev = NULL;
tcp_frag *current;
@ -286,7 +286,7 @@ check_fragments( int index, tcp_stream_chunk *sc ) {
}
/* this should always be called before we start to reassemble a stream */
void
void
reset_tcp_reassembly() {
tcp_frag *current, *next;
int i;
@ -301,7 +301,7 @@ reset_tcp_reassembly() {
current = frags[i];
while( current ) {
next = current->next;
free( current->data );
free( current->data );
free( current );
current = next;
}
@ -309,7 +309,7 @@ reset_tcp_reassembly() {
}
}
static void
static void
write_packet_data( int index, tcp_stream_chunk *sc, const char *data )
{
fwrite( sc, 1, sizeof(tcp_stream_chunk), data_out_file );

View File

@ -1,23 +1,23 @@
/* follow.h
*
* $Id: follow.h,v 1.12 2002/08/02 23:35:46 jmayer Exp $
* $Id: follow.h,v 1.13 2002/08/28 21:00:06 jmayer Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -48,7 +48,7 @@ typedef struct _tcp_stream_chunk {
} tcp_stream_chunk;
char* build_follow_filter( packet_info * );
void reassemble_tcp( gulong, gulong, const char*, gulong, int,
void reassemble_tcp( gulong, gulong, const char*, gulong, int,
address *, address *, guint, guint );
void reset_tcp_reassembly( void );

View File

@ -1,22 +1,22 @@
/* format-oid.h
* Declare routine for formatting OIDs
*
* $Id: format-oid.h,v 1.1 2002/03/11 01:48:08 guy Exp $
* $Id: format-oid.h,v 1.2 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Didier Jorand
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,6 +1,6 @@
/* Getopt for GNU.
$Id: getopt.c,v 1.3 2000/11/08 19:57:39 guy Exp $
$Id: getopt.c,v 1.4 2002/08/28 21:00:06 jmayer Exp $
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
@ -159,7 +159,7 @@ static enum
{
REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
} ordering;
#ifdef __GNU_LIBRARY__
/* We want to avoid inclusion of string.h with non-GNU libraries
because there are many ways it can cause trouble.
@ -202,7 +202,7 @@ extern size_t strlen (const char *);
#endif
#endif /* GNU C library. */
/* Handle permutation of arguments. */
/* Describe the part of ARGV that contains non-options that have
@ -276,7 +276,7 @@ exchange (argv)
first_nonopt += (optind - last_nonopt);
last_nonopt = optind;
}
/* Scan elements of ARGV (whose length is ARGC) for option characters
given in OPTSTRING.
@ -680,7 +680,7 @@ getopt (argc, argv, optstring)
}
#endif /* _LIBC or not __GNU_LIBRARY__. */
#ifdef TEST
/* Compile with -DTEST to make an executable for use in testing

View File

@ -1,22 +1,22 @@
/* globals.h
* Global defines, etc.
*
* $Id: globals.h,v 1.28 2002/01/21 07:36:31 guy Exp $
* $Id: globals.h,v 1.29 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -10,22 +10,22 @@
* definition for them; when this file is empty, get rid of all includes
* of it, and get rid of it.
*
* $Id: greproto.h,v 1.2 2002/01/21 07:36:31 guy Exp $
* $Id: greproto.h,v 1.3 2002/08/28 21:00:06 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* capture_dlg.c
* Routines for packet capture windows
*
* $Id: capture_dlg.c,v 1.70 2002/07/17 00:42:56 guy Exp $
* $Id: capture_dlg.c,v 1.71 2002/08/28 21:03:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -185,7 +185,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
simple_dialog(ESD_TYPE_WARN, NULL, "Can't get list of interfaces: %s",
err_str);
}
cap_open_w = dlg_window_new("Ethereal: Capture Options");
gtk_signal_connect(GTK_OBJECT(cap_open_w), "destroy",
GTK_SIGNAL_FUNC(capture_prep_destroy_cb), NULL);
@ -195,12 +195,12 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
Ctrl+<key> is an accelerator). */
accel_group = gtk_accel_group_new();
gtk_window_add_accel_group(GTK_WINDOW(cap_open_w), accel_group);
main_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(cap_open_w), main_vb);
gtk_widget_show(main_vb);
/* Capture-related options frame */
capture_fr = gtk_frame_new("Capture");
gtk_container_add(GTK_CONTAINER(main_vb), capture_fr);
@ -218,7 +218,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
if_lb = gtk_label_new("Interface:");
gtk_box_pack_start(GTK_BOX(if_hb), if_lb, FALSE, FALSE, 6);
gtk_widget_show(if_lb);
if_cb = gtk_combo_new();
if (if_list != NULL)
gtk_combo_set_popdown_strings(GTK_COMBO(if_cb), if_list);
@ -234,7 +234,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(if_cb)->entry), if_list->data);
gtk_box_pack_start(GTK_BOX(if_hb), if_cb, TRUE, TRUE, 6);
gtk_widget_show(if_cb);
free_interface_list(if_list);
/* Capture length row */
@ -256,9 +256,9 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
snap_sb = gtk_spin_button_new (snap_adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (snap_sb), TRUE);
gtk_widget_set_usize (snap_sb, 80, 0);
gtk_box_pack_start (GTK_BOX(snap_hb), snap_sb, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX(snap_hb), snap_sb, FALSE, FALSE, 0);
gtk_widget_show(snap_sb);
snap_lb = gtk_label_new("bytes");
gtk_misc_set_alignment(GTK_MISC(snap_lb), 0, 0.5);
gtk_box_pack_start(GTK_BOX(snap_hb), snap_lb, FALSE, FALSE, 0);
@ -280,15 +280,15 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
filter_bt = gtk_button_new_with_label("Filter:");
gtk_signal_connect(GTK_OBJECT(filter_bt), "clicked",
GTK_SIGNAL_FUNC(capture_filter_construct_cb), NULL);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_bt, FALSE, FALSE, 3);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_bt, FALSE, FALSE, 3);
gtk_widget_show(filter_bt);
filter_te = gtk_entry_new();
if (cfile.cfilter) gtk_entry_set_text(GTK_ENTRY(filter_te), cfile.cfilter);
gtk_object_set_data(GTK_OBJECT(filter_bt), E_FILT_TE_PTR_KEY, filter_te);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_te, TRUE, TRUE, 3);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_te, TRUE, TRUE, 3);
gtk_widget_show(filter_te);
/* Capture file-related options frame */
file_fr = gtk_frame_new("Capture file(s)");
gtk_container_add(GTK_CONTAINER(main_vb), file_fr);
@ -304,11 +304,11 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
gtk_widget_show(file_hb);
file_bt = gtk_button_new_with_label("File:");
gtk_box_pack_start(GTK_BOX(file_hb), file_bt, FALSE, FALSE, 3);
gtk_box_pack_start(GTK_BOX(file_hb), file_bt, FALSE, FALSE, 3);
gtk_widget_show(file_bt);
file_te = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(file_hb), file_te, TRUE, TRUE, 3);
gtk_box_pack_start(GTK_BOX(file_hb), file_te, TRUE, TRUE, 3);
gtk_widget_show(file_te);
gtk_signal_connect(GTK_OBJECT(file_bt), "clicked",
@ -332,7 +332,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
GTK_SIGNAL_FUNC(capture_prep_adjust_sensitivity), GTK_OBJECT(cap_open_w));
gtk_box_pack_start(GTK_BOX(ringbuffer_hb), ringbuffer_on_tb, FALSE, FALSE, 0);
gtk_widget_show(ringbuffer_on_tb);
ringbuffer_nbf_lb = gtk_label_new("Number of files");
gtk_misc_set_alignment(GTK_MISC(ringbuffer_nbf_lb), 1, 0.5);
gtk_box_pack_start(GTK_BOX(ringbuffer_hb), ringbuffer_nbf_lb, FALSE, FALSE, 6);
@ -343,9 +343,9 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
ringbuffer_nbf_sb = gtk_spin_button_new (ringbuffer_nbf_adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (ringbuffer_nbf_sb), TRUE);
gtk_widget_set_usize (ringbuffer_nbf_sb, 40, 0);
gtk_box_pack_start (GTK_BOX(ringbuffer_hb), ringbuffer_nbf_sb, TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX(ringbuffer_hb), ringbuffer_nbf_sb, TRUE, TRUE, 0);
gtk_widget_show(ringbuffer_nbf_sb);
/* Display-related options frame */
display_fr = gtk_frame_new("Display options");
gtk_container_add(GTK_CONTAINER(main_vb), display_fr);
@ -399,14 +399,14 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
count_sb = gtk_spin_button_new (count_adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (count_sb), TRUE);
gtk_widget_set_usize (count_sb, 80, 0);
gtk_box_pack_start (GTK_BOX(count_hb), count_sb, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX(count_hb), count_sb, FALSE, FALSE, 0);
gtk_widget_show(count_sb);
count_lb = gtk_label_new("packet(s) captured");
gtk_misc_set_alignment(GTK_MISC(count_lb), 0, 0.5);
gtk_box_pack_start(GTK_BOX(count_hb), count_lb, FALSE, FALSE, 0);
gtk_widget_show(count_lb);
/* Filesize row */
filesize_hb = gtk_hbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(limit_vb), filesize_hb);
@ -425,14 +425,14 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
filesize_sb = gtk_spin_button_new (filesize_adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (filesize_sb), TRUE);
gtk_widget_set_usize (filesize_sb, 80, 0);
gtk_box_pack_start (GTK_BOX(filesize_hb), filesize_sb, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX(filesize_hb), filesize_sb, FALSE, FALSE, 0);
gtk_widget_show(filesize_sb);
filesize_lb = gtk_label_new("");
gtk_misc_set_alignment(GTK_MISC(filesize_lb), 0, 0.5);
gtk_box_pack_start(GTK_BOX(filesize_hb), filesize_lb, FALSE, FALSE, 0);
gtk_widget_show(filesize_lb);
/* Duration row */
duration_hb = gtk_hbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(limit_vb), duration_hb);
@ -451,14 +451,14 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
duration_sb = gtk_spin_button_new (duration_adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (duration_sb), TRUE);
gtk_widget_set_usize (duration_sb, 80, 0);
gtk_box_pack_start (GTK_BOX(duration_hb), duration_sb, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX(duration_hb), duration_sb, FALSE, FALSE, 0);
gtk_widget_show(duration_sb);
duration_lb = gtk_label_new("second(s)");
gtk_misc_set_alignment(GTK_MISC(duration_lb), 0, 0.5);
gtk_box_pack_start(GTK_BOX(duration_hb), duration_lb, FALSE, FALSE, 0);
gtk_widget_show(duration_lb);
/* Resolution options frame */
resolv_fr = gtk_frame_new("Name resolution");
gtk_container_add(GTK_CONTAINER(main_vb), resolv_fr);
@ -488,7 +488,7 @@ capture_prep_cb(GtkWidget *w _U_, gpointer d _U_)
g_resolv_flags & RESOLV_TRANSPORT);
gtk_container_add(GTK_CONTAINER(resolv_vb), t_resolv_cb);
gtk_widget_show(t_resolv_cb);
/* Button row: OK and cancel buttons */
bbox = gtk_hbutton_box_new();
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);
@ -618,7 +618,7 @@ capture_prep_file_cb(GtkWidget *w, gpointer file_te)
the ESC key being pressed and act as if the "Cancel" button had
been selected. */
dlg_set_cancel(fs, GTK_FILE_SELECTION(fs)->cancel_button);
gtk_widget_show(fs);
}
@ -635,7 +635,7 @@ static void
cap_prep_fs_cancel_cb(GtkWidget *w _U_, gpointer data)
{
gtk_widget_destroy(GTK_WIDGET(data));
}
}
static void
cap_prep_fs_destroy_cb(GtkWidget *win, gpointer data _U_)
@ -735,7 +735,7 @@ capture_prep_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w) {
if (cfile.cfilter)
g_free(cfile.cfilter);
g_assert(filter_text != NULL);
cfile.cfilter = g_strdup(filter_text);
cfile.cfilter = g_strdup(filter_text);
save_file = gtk_entry_get_text(GTK_ENTRY(file_te));
if (save_file && save_file[0]) {
@ -899,7 +899,7 @@ capture_prep_adjust_sensitivity(GtkWidget *tb _U_, gpointer parent_w)
in real time" captures, so make its toggle button insensitive. */
gtk_widget_set_sensitive(GTK_WIDGET(auto_scroll_cb), FALSE);
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ringbuffer_on_tb))) {
/* Ring buffer mode enabled. Make the spin button for the number
of ring buffer files, and its label, sensitive. */

View File

@ -1,23 +1,23 @@
/* capture_dlg.h
* Definitions for packet capture windows
*
* $Id: capture_dlg.h,v 1.2 2000/10/11 06:01:16 guy Exp $
* $Id: capture_dlg.h,v 1.3 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* capture_prefs.c
* Dialog box for capture preferences
*
* $Id: capture_prefs.c,v 1.13 2002/07/17 00:22:30 guy Exp $
* $Id: capture_prefs.c,v 1.14 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -76,7 +76,7 @@ capture_prefs_show(void)
gtk_table_attach_defaults(GTK_TABLE(main_tb), if_lb, 0, 1, 0, 1);
gtk_misc_set_alignment(GTK_MISC(if_lb), 1.0, 0.5);
gtk_widget_show(if_lb);
if_cb = gtk_combo_new();
/*
* XXX - what if we can't get the list?
@ -90,7 +90,7 @@ capture_prefs_show(void)
gtk_table_attach_defaults(GTK_TABLE(main_tb), if_cb, 1, 2, 0, 1);
gtk_widget_show(if_cb);
gtk_object_set_data(GTK_OBJECT(main_vb), DEVICE_KEY, if_cb);
free_interface_list(if_list);
/* Promiscuous mode */

View File

@ -1,22 +1,22 @@
/* capture_prefs.h
* Definitions for capture preferences window
*
* $Id: capture_prefs.h,v 1.1 2002/01/10 07:43:39 guy Exp $
* $Id: capture_prefs.h,v 1.2 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* color_dlg.c
* Definitions for dialog boxes for color filters
*
* $Id: color_dlg.c,v 1.15 2002/08/02 22:34:53 jmayer Exp $
* $Id: color_dlg.c,v 1.16 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -1141,14 +1141,14 @@ color_sel_ok_cb (GtkButton *button _U_,
color_sel_win_destroy(color_dialog);
/* now apply the change to the fore/background */
style = gtk_style_copy(gtk_widget_get_style(filt_name_entry));
if (is_bg)
style->base[GTK_STATE_NORMAL] = new_color;
else
style->fg[GTK_STATE_NORMAL] = new_color;
gtk_widget_set_style(filt_name_entry, style);
gtk_widget_set_style(filt_text_entry, style);
gtk_widget_set_style(filt_text_entry, style);
}
}

View File

@ -1,23 +1,23 @@
/* color_dlg.h
* Definitions for dialog boxes for color filters
*
* $Id: color_dlg.h,v 1.1 2000/02/12 08:31:47 guy Exp $
* $Id: color_dlg.h,v 1.2 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -2,23 +2,23 @@
* Utilities for converting between "toolkit-independent" and GDK
* notions of color
*
* $Id: color_utils.c,v 1.1 2000/11/21 23:54:09 guy Exp $
* $Id: color_utils.c,v 1.2 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -2,23 +2,23 @@
* Declarations of utilities for converting between "toolkit-independent"
* and GDK notions of color
*
* $Id: color_utils.h,v 1.1 2000/11/21 23:54:09 guy Exp $
* $Id: color_utils.h,v 1.2 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* colors.c
* Definitions for color structures and routines
*
* $Id: colors.c,v 1.22 2002/08/02 22:34:53 jmayer Exp $
* $Id: colors.c,v 1.23 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -126,7 +126,7 @@ prime_edt(gpointer data, gpointer user_data)
if (colorf->c_colorfilter != NULL)
epan_dissect_prime_dfilter(edt, colorf->c_colorfilter);
}
}
/* Prime the epan_dissect_t with all the compiler
* color filters in 'filter_list'. */
@ -171,7 +171,7 @@ read_filters(void)
do {
if (fgets(buf,sizeof buf, f) == NULL)
break;
if (strspn(buf," \t") == (size_t)((strchr(buf,'*') - buf))) {
/* leading # comment */
continue;

View File

@ -1,22 +1,22 @@
/* colors.h
* Definitions for color structures and routines
*
* $Id: colors.h,v 1.7 2002/05/27 22:00:37 guy Exp $
* $Id: colors.h,v 1.8 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* column_prefs.c
* Dialog box for column preferences
*
* $Id: column_prefs.c,v 1.11 2002/04/23 06:25:37 guy Exp $
* $Id: column_prefs.c,v 1.12 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -68,12 +68,12 @@ column_prefs_show() {
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_widget_show(main_vb);
gtk_object_set_data(GTK_OBJECT(main_vb), E_COL_CM_KEY, (gpointer)FALSE);
/* Top row: Column list and buttons */
top_hb = gtk_hbox_new(FALSE, 5);
gtk_container_add(GTK_CONTAINER(main_vb), top_hb);
gtk_widget_show(top_hb);
list_bb = gtk_vbutton_box_new();
gtk_button_box_set_layout (GTK_BUTTON_BOX (list_bb), GTK_BUTTONBOX_START);
gtk_container_add(GTK_CONTAINER(top_hb), list_bb);
@ -84,32 +84,32 @@ column_prefs_show() {
GTK_SIGNAL_FUNC(column_list_new_cb), NULL);
gtk_container_add(GTK_CONTAINER(list_bb), new_bt);
gtk_widget_show(new_bt);
del_bt = gtk_button_new_with_label ("Delete");
gtk_widget_set_sensitive(del_bt, FALSE);
gtk_signal_connect(GTK_OBJECT(del_bt), "clicked",
GTK_SIGNAL_FUNC(column_list_delete_cb), NULL);
gtk_container_add(GTK_CONTAINER(list_bb), del_bt);
gtk_widget_show(del_bt);
arrow_hb = gtk_hbox_new(TRUE, 3);
gtk_container_add(GTK_CONTAINER(list_bb), arrow_hb);
gtk_widget_show(arrow_hb);
up_bt = gtk_button_new_with_label("Up");
gtk_widget_set_sensitive(up_bt, FALSE);
gtk_signal_connect(GTK_OBJECT(up_bt), "clicked",
GTK_SIGNAL_FUNC(column_arrow_cb), NULL);
gtk_box_pack_start(GTK_BOX(arrow_hb), up_bt, TRUE, TRUE, 0);
gtk_widget_show(up_bt);
dn_bt = gtk_button_new_with_label("Down");
gtk_widget_set_sensitive(dn_bt, FALSE);
gtk_signal_connect(GTK_OBJECT(dn_bt), "clicked",
GTK_SIGNAL_FUNC(column_arrow_cb), NULL);
gtk_box_pack_start(GTK_BOX(arrow_hb), dn_bt, TRUE, TRUE, 0);
gtk_widget_show(dn_bt);
column_sc = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(column_sc),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@ -136,24 +136,24 @@ column_prefs_show() {
while (clp) {
cfmt = (fmt_data *) clp->data;
col_ent[0] = cfmt->title;
col_ent[1] = col_format_desc(get_column_format_from_str(cfmt->fmt));
col_ent[1] = col_format_desc(get_column_format_from_str(cfmt->fmt));
row = gtk_clist_append(GTK_CLIST(column_l), col_ent);
gtk_clist_set_row_data(GTK_CLIST(column_l), row, clp);
clp = clp->next;
}
/* Colunm name entry and format selection */
tb = gtk_table_new(2, 2, FALSE);
gtk_container_add(GTK_CONTAINER(main_vb), tb);
gtk_table_set_row_spacings(GTK_TABLE(tb), 10);
gtk_table_set_col_spacings(GTK_TABLE(tb), 15);
gtk_widget_show(tb);
lb = gtk_label_new("Column title:");
gtk_misc_set_alignment(GTK_MISC(lb), 1.0, 0.5);
gtk_table_attach_defaults(GTK_TABLE(tb), lb, 0, 1, 0, 1);
gtk_widget_show(lb);
title_te = gtk_entry_new();
gtk_table_attach_defaults(GTK_TABLE(tb), title_te, 1, 2, 0, 1);
gtk_signal_connect(GTK_OBJECT(title_te), "changed",
@ -184,12 +184,12 @@ column_prefs_show() {
gtk_option_menu_set_history(GTK_OPTION_MENU(fmt_m), cur_fmt);
gtk_widget_set_sensitive(fmt_m, FALSE);
gtk_box_pack_start(GTK_BOX(top_hb), fmt_m, FALSE, FALSE, 0);
gtk_widget_show(fmt_m);
gtk_widget_show(fmt_m);
return(main_vb);
}
/* For each selection, set the entry and option menu widgets to match
/* For each selection, set the entry and option menu widgets to match
the currently selected item. Set the up/down button sensitivity.
Draw focus to the entry widget. */
static void
@ -200,7 +200,7 @@ column_list_select_cb(GtkCList *clist,
gpointer user_data _U_) {
fmt_data *cfmt;
GList *clp;
clp = gtk_clist_get_row_data(clist, row);
g_assert(clp != NULL);
cfmt = (fmt_data *) clp->data;
@ -211,7 +211,7 @@ column_list_select_cb(GtkCList *clist,
gtk_entry_set_text(GTK_ENTRY(title_te), cfmt->title);
gtk_editable_select_region(GTK_EDITABLE(title_te), 0, -1);
gtk_widget_grab_focus(title_te);
gtk_option_menu_set_history(GTK_OPTION_MENU(fmt_m), cur_fmt);
gtk_widget_set_sensitive(del_bt, TRUE);
@ -227,10 +227,10 @@ column_list_unselect_cb(GtkCList *clist _U_,
gint column _U_,
GdkEvent *event _U_,
gpointer user_data _U_) {
cur_row = -1;
gtk_editable_delete_text(GTK_EDITABLE(title_te), 0, -1);
gtk_widget_set_sensitive(del_bt, FALSE);
gtk_widget_set_sensitive(title_te, FALSE);
gtk_widget_set_sensitive(fmt_m, FALSE);
@ -239,12 +239,12 @@ column_list_unselect_cb(GtkCList *clist _U_,
}
/* To do: add input checking to each of these callbacks */
static void
column_list_new_cb(GtkWidget *w _U_, gpointer data _U_) {
fmt_data *cfmt;
gchar *title = "New Column", *col_ent[2];
cur_fmt = 0;
cfmt = (fmt_data *) g_malloc(sizeof(fmt_data));
cfmt->title = g_strdup(title);
@ -281,9 +281,9 @@ static void
column_entry_changed_cb(GtkEditable *te, gpointer data) {
fmt_data *cfmt;
GList *clp;
GtkCList *cl = data;
GtkCList *cl = data;
gchar *title;
if (cur_row >= 0) {
title = gtk_editable_get_chars(te, 0, -1);
clp = gtk_clist_get_row_data(cl, cur_row);
@ -300,7 +300,7 @@ static void
column_menu_changed_cb(GtkWidget *w _U_, gpointer data) {
fmt_data *cfmt;
GList *clp;
if (cur_row >= 0) {
cur_fmt = (gint) data;
clp = gtk_clist_get_row_data(GTK_CLIST(column_l), cur_row);
@ -317,15 +317,15 @@ column_arrow_cb(GtkWidget *w, gpointer data _U_) {
GList *clp;
fmt_data *cfmt;
gint inc = 1;
g_assert(cur_row >= 0);
g_assert(cur_row >= 0);
if (w == up_bt)
inc = -1;
/* This would end up appending to the list. We shouldn't have to check for
appending past the end of the list. */
g_assert((cur_row + inc) >= 0);
g_assert((cur_row + inc) >= 0);
clp = gtk_clist_get_row_data(GTK_CLIST(column_l), cur_row);
cfmt = (fmt_data *) clp->data;
@ -363,9 +363,9 @@ column_prefs_apply(GtkWidget *w _U_) {
void
column_prefs_destroy(GtkWidget *w) {
/* Let the list cb know we're about to destroy the widget tree, so it */
/* doesn't operate on widgets that don't exist. */
/* doesn't operate on widgets that don't exist. */
gtk_object_set_data(GTK_OBJECT(w), E_COL_CM_KEY, (gpointer)TRUE);
gtk_widget_destroy(GTK_WIDGET(w));
}
}

View File

@ -1,23 +1,23 @@
/* gui_prefs.h
* Definitions for column preferences window
*
* $Id: column_prefs.h,v 1.2 2000/08/21 08:09:10 guy Exp $
* $Id: column_prefs.h,v 1.3 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,6 +1,6 @@
/* decode_as_dlg.c
*
* $Id: decode_as_dlg.c,v 1.24 2002/08/02 22:34:53 jmayer Exp $
* $Id: decode_as_dlg.c,v 1.25 2002/08/28 21:03:46 jmayer Exp $
*
* Routines to modify dissector tables on the fly.
*
@ -11,12 +11,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -326,7 +326,7 @@ decode_show_reset_cb (GtkWidget *reset_bt _U_, gpointer parent_w)
{
dissector_delete_item_t *item;
GSList *tmp;
dissector_all_tables_foreach_changed(decode_build_reset_list, NULL);
for (tmp = dissector_reset_list; tmp; tmp = g_slist_next(tmp)) {
@ -405,7 +405,7 @@ decode_show_cb (GtkWidget * w _U_, gpointer data _U_)
GTK_SIGNAL_FUNC(decode_show_delete_cb), NULL);
gtk_signal_connect(GTK_OBJECT(decode_show_w), "destroy",
GTK_SIGNAL_FUNC(decode_show_destroy_cb), NULL);
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 2);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
@ -1223,7 +1223,7 @@ decode_as_cb (GtkWidget * w _U_, gpointer data _U_)
GTK_SIGNAL_FUNC(decode_delete_cb), NULL);
gtk_signal_connect(GTK_OBJECT(decode_w), "destroy",
GTK_SIGNAL_FUNC(decode_destroy_cb), NULL);
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 2);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);

View File

@ -1,6 +1,6 @@
/* decode_as_dlg.c
*
* $Id: decode_as_dlg.h,v 1.2 2001/02/11 23:02:05 guy Exp $
* $Id: decode_as_dlg.h,v 1.3 2002/08/28 21:03:46 jmayer Exp $
*
* Routines to modify dissector tables on the fly.
*
@ -11,12 +11,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -7,7 +7,7 @@
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> and
* Guy Harris <guy@alum.mit.edu>
*
* $Id: dfilter_expr_dlg.c,v 1.26 2002/08/02 22:34:53 jmayer Exp $
* $Id: dfilter_expr_dlg.c,v 1.27 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -17,22 +17,22 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* Todo -
/* Todo -
* may want to check the enable field to decide if protocol should be in tree
* improve speed of dialog box creation
* - I believe this is slow because of tree widget creation.
* 1) could improve the widget
* 1) could improve the widget
* 2) keep a copy in memory after the first time.
* user can pop multiple tree dialogs by pressing the "Tree" button multiple
* time. not a good thing.
@ -788,7 +788,7 @@ dfilter_expr_dlg_accept_cb(GtkWidget *w, gpointer filter_te_arg)
g_free(value_str);
return;
}
/*
* Make sure the value is valid.
*
@ -1004,7 +1004,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
range_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(col2_vb), range_entry, FALSE, FALSE, 0);
/*
* OK, show the relation label and range stuff as it would be
* with everything turned on, so it'll request as much space
@ -1036,7 +1036,7 @@ dfilter_expr_dlg_new(GtkWidget *filter_te)
value_entry = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(value_vb), value_entry, FALSE, FALSE, 0);
gtk_widget_show(value_entry);
value_list_scrolled_win = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(value_list_scrolled_win),
GTK_POLICY_AUTOMATIC,

View File

@ -1,23 +1,23 @@
/* dfilter_expr_dlg.h
* Definitions for dialog boxes for display filter expression construction
*
* $Id: dfilter_expr_dlg.h,v 1.1 2001/01/02 01:32:21 guy Exp $
* $Id: dfilter_expr_dlg.h,v 1.2 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* display_opts.c
* Routines for packet display windows
*
* $Id: display_opts.c,v 1.28 2002/08/02 22:34:53 jmayer Exp $
* $Id: display_opts.c,v 1.29 2002/08/28 21:03:46 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -99,9 +99,9 @@ display_opt_cb(GtkWidget *w _U_, gpointer d _U_) {
initial_timestamp_type = timestamp_type;
/* Save the current timestamp type so that we know whether it has changed;
we don't want to redisplay the time fields unless we've changed the way
they should be displayed (as redisplaying the time fields could be
expensive - we have to scan through all the packets and rebuild the
we don't want to redisplay the time fields unless we've changed the way
they should be displayed (as redisplaying the time fields could be
expensive - we have to scan through all the packets and rebuild the
packet list).*/
current_timestamp_type = timestamp_type;
@ -120,7 +120,7 @@ display_opt_cb(GtkWidget *w _U_, gpointer d _U_) {
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(display_opt_w), main_vb);
gtk_widget_show(main_vb);
button = dlg_radio_button_new_with_label_with_mnemonic(NULL, "_Time of day",
accel_group);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button),
@ -128,7 +128,7 @@ display_opt_cb(GtkWidget *w _U_, gpointer d _U_) {
gtk_object_set_data(GTK_OBJECT(display_opt_w), E_DISPLAY_TIME_ABS_KEY,
button);
gtk_box_pack_start(GTK_BOX(main_vb), button, TRUE, TRUE, 0);
gtk_widget_show(button);
button = dlg_radio_button_new_with_label_with_mnemonic(
@ -179,7 +179,7 @@ display_opt_cb(GtkWidget *w _U_, gpointer d _U_) {
button);
gtk_box_pack_start(GTK_BOX(main_vb), button, TRUE, TRUE, 0);
gtk_widget_show(button);
button = dlg_check_button_new_with_label_with_mnemonic(
"Enable _network name resolution", accel_group);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button),
@ -188,7 +188,7 @@ display_opt_cb(GtkWidget *w _U_, gpointer d _U_) {
button);
gtk_box_pack_start(GTK_BOX(main_vb), button, TRUE, TRUE, 0);
gtk_widget_show(button);
button = dlg_check_button_new_with_label_with_mnemonic(
"Enable _transport name resolution", accel_group);
gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(button),
@ -197,7 +197,7 @@ display_opt_cb(GtkWidget *w _U_, gpointer d _U_) {
button);
gtk_box_pack_start(GTK_BOX(main_vb), button, TRUE, TRUE, 0);
gtk_widget_show(button);
/* Button row: OK, Apply, and Cancel buttons */
bbox = gtk_hbutton_box_new();
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);

View File

@ -1,23 +1,23 @@
/* display_opts.h
* Definitions for display option window
*
* $Id: display_opts.h,v 1.1 1999/10/18 12:48:13 gram Exp $
* $Id: display_opts.h,v 1.2 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,23 +1,23 @@
/* dlg_utils.c
* Utilities to use when constructing dialogs
*
* $Id: dlg_utils.c,v 1.7 2002/03/05 11:55:58 guy Exp $
* $Id: dlg_utils.c,v 1.8 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -160,7 +160,7 @@ dlg_check_button_new_with_label_with_mnemonic(const gchar *label,
GtkAccelGroup *accel_group)
{
GtkWidget *check_button;
check_button = gtk_check_button_new_with_label (label);
dlg_fix_button_label(check_button, accel_group);
return check_button;

View File

@ -1,23 +1,23 @@
/* dlg_utils.h
* Declarations of utilities to use when constructing dialogs
*
* $Id: dlg_utils.h,v 1.5 2000/08/23 06:55:39 guy Exp $
* $Id: dlg_utils.h,v 1.6 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* file_dlg.c
* Dialog boxes for handling files
*
* $Id: file_dlg.c,v 1.49 2002/03/05 11:55:58 guy Exp $
* $Id: file_dlg.c,v 1.50 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -123,7 +123,7 @@ file_open_cmd_cb(GtkWidget *w, gpointer data _U_)
GTK_SIGNAL_FUNC(display_filter_construct_cb), &args);
gtk_box_pack_start(GTK_BOX(filter_hbox), filter_bt, FALSE, TRUE, 0);
gtk_widget_show(filter_bt);
filter_te = gtk_entry_new();
gtk_object_set_data(GTK_OBJECT(filter_bt), E_FILT_TE_PTR_KEY, filter_te);
gtk_box_pack_start(GTK_BOX(filter_hbox), filter_te, TRUE, TRUE, 3);
@ -158,7 +158,7 @@ file_open_cmd_cb(GtkWidget *w, gpointer data _U_)
gtk_widget_show(t_resolv_cb);
gtk_object_set_data(GTK_OBJECT(GTK_FILE_SELECTION(file_open_w)->ok_button),
E_FILE_T_RESOLVE_KEY, t_resolv_cb);
/* Connect the ok_button to file_open_ok_cb function and pass along a
pointer to the file selection box widget */
gtk_signal_connect(GTK_OBJECT (GTK_FILE_SELECTION(file_open_w)->ok_button),
@ -252,7 +252,7 @@ file_open_ok_cb(GtkWidget *w, GtkFileSelection *fs) {
g_free(cf_name);
return;
}
/* Save the name of the containing directory specified in the path name,
if any; we can write over cf_name, which is a good thing, given that
"get_dirname()" does write over its argument. */
@ -323,7 +323,7 @@ can_save_with_wiretap(int ft)
"filtered" is TRUE if we're to save only the packets that passed
the display filter (in which case we have to save it using Wiretap)
and FALSE if we're to save the entire file (in which case, if we're
saving it in the type it has already, we can just copy it).
saving it in the type it has already, we can just copy it).
"marked" is TRUE if we have to save only the marked packets,
the same remark as "filtered" applies.
@ -455,7 +455,7 @@ file_save_as_cmd_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_box_pack_start(GTK_BOX(GTK_FILE_SELECTION(file_save_as_w)->action_area),
main_vb, FALSE, FALSE, 0);
gtk_widget_show(main_vb);
/*
* XXX - should this be sensitive only if the current display filter
* has rejected some packets, so that not all packets are currently
@ -495,7 +495,7 @@ file_save_as_cmd_cb(GtkWidget *w _U_, gpointer data _U_)
ft_hb = gtk_hbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(main_vb), ft_hb);
gtk_widget_show(ft_hb);
ft_lb = gtk_label_new("File type:");
gtk_box_pack_start(GTK_BOX(ft_hb), ft_lb, FALSE, FALSE, 0);
gtk_widget_show(ft_lb);

View File

@ -1,22 +1,22 @@
/* file_dlg.h
* Definitions for dialog boxes for handling files
*
* $Id: file_dlg.h,v 1.2 2001/12/06 02:21:26 guy Exp $
* $Id: file_dlg.h,v 1.3 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -3,22 +3,22 @@
* (This used to be a notebook page under "Preferences", hence the
* "prefs" in the file name.)
*
* $Id: filter_prefs.c,v 1.37 2002/06/22 20:00:26 guy Exp $
* $Id: filter_prefs.c,v 1.38 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -317,7 +317,7 @@ filter_dialog_new(GtkWidget *caller _U_, GtkWidget *parent_filter_te,
*ok_bt, /* "OK" button */
*apply_bt, /* "Apply" button */
*save_bt, /* "Save" button */
*close_bt; /* "Cancel" button */
*close_bt; /* "Cancel" button */
GtkWidget *filter_pg = NULL; /* filter settings box */
GtkWidget *top_hb,
*list_bb,
@ -381,7 +381,7 @@ filter_dialog_new(GtkWidget *caller _U_, GtkWidget *parent_filter_te,
gtk_container_add(GTK_CONTAINER(main_w), main_vb);
gtk_widget_show(main_vb);
/* Make sure everything is set up */
/* Make sure everything is set up */
if (parent_filter_te)
filter_te_str = gtk_entry_get_text(GTK_ENTRY(parent_filter_te));
@ -501,11 +501,11 @@ filter_dialog_new(GtkWidget *caller _U_, GtkWidget *parent_filter_te,
middle_hb = gtk_hbox_new(FALSE, 5);
gtk_container_add(GTK_CONTAINER(filter_pg), middle_hb);
gtk_widget_show(middle_hb);
name_lb = gtk_label_new("Filter name:");
gtk_box_pack_start(GTK_BOX(middle_hb), name_lb, FALSE, FALSE, 3);
gtk_widget_show(name_lb);
name_te = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(middle_hb), name_te, TRUE, TRUE, 3);
gtk_object_set_data(GTK_OBJECT(main_w), E_FILT_NAME_TE_KEY, name_te);
@ -517,11 +517,11 @@ filter_dialog_new(GtkWidget *caller _U_, GtkWidget *parent_filter_te,
bottom_hb = gtk_hbox_new(FALSE, 5);
gtk_container_add(GTK_CONTAINER(filter_pg), bottom_hb);
gtk_widget_show(bottom_hb);
filter_lb = gtk_label_new("Filter string:");
gtk_box_pack_start(GTK_BOX(bottom_hb), filter_lb, FALSE, FALSE, 3);
gtk_widget_show(filter_lb);
filter_te = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(bottom_hb), filter_te, TRUE, TRUE, 3);
gtk_object_set_data(GTK_OBJECT(main_w), E_FILT_FILTER_TE_KEY, filter_te);
@ -681,7 +681,7 @@ filter_apply(GtkWidget *main_w, gboolean destroy)
gtk_object_get_data(GTK_OBJECT(main_w), E_FILT_PARENT_FILTER_TE_KEY);
GtkWidget *filter_te;
gchar *filter_string;
if (parent_filter_te != NULL) {
/*
* We have a text entry widget associated with this dialog
@ -865,7 +865,7 @@ filter_sel_list_cb(GtkWidget *l, gpointer data _U_)
sl = GTK_LIST(l)->selection;
else
sl = NULL;
if (sl) { /* Something was selected */
l_item = GTK_OBJECT(sl->data);
flp = (GList *) gtk_object_get_data(l_item, E_FILT_LIST_ITEM_MODEL_KEY);
@ -916,7 +916,7 @@ filter_list_destroy_cb(GtkWidget *l, gpointer data _U_)
}
/* To do: add input checking to each of these callbacks */
/* Structure containing arguments to be passed to "new_filter_cb()".
"active_filter_l" is the list in the dialog box in which "New" or
@ -966,10 +966,10 @@ filter_new_bt_clicked_cb(GtkWidget *w, gpointer data)
GList *fl_entry;
gchar *name, *strval;
new_filter_cb_args_t args;
name = gtk_entry_get_text(GTK_ENTRY(name_te));
strval = gtk_entry_get_text(GTK_ENTRY(filter_te));
if (strlen(name) > 0 && strlen(strval) > 0) {
/* Add a new entry to the filter list. */
fl_entry = add_to_filter_list(list, name, strval);
@ -1040,7 +1040,7 @@ filter_chg_bt_clicked_cb(GtkWidget *w, gpointer data)
nl_lb = (GtkLabel *) gtk_object_get_data(l_item, E_FILT_LBL_KEY);
if (fl_entry != NULL && nl_lb != NULL) {
filt = (filter_def *) fl_entry->data;
if (strlen(name) > 0 && strlen(strval) > 0 && filt) {
g_free(filt->name);
g_free(filt->strval);
@ -1137,7 +1137,7 @@ filter_del_bt_clicked_cb(GtkWidget *w, gpointer data)
/* Update all the filter list widgets, not just the one in
the dialog box in which we clicked on "Delete". */
g_list_foreach(get_filter_dialog_list(list), delete_filter_cb, &pos);
}
}
}
}

View File

@ -3,23 +3,23 @@
* (This used to be a notebook page under "Preferences", hence the
* "prefs" in the file name.)
*
* $Id: filter_prefs.h,v 1.11 2001/02/23 05:54:27 guy Exp $
* $Id: filter_prefs.h,v 1.12 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* find_dlg.c
* Routines for "find frame" window
*
* $Id: find_dlg.c,v 1.22 2002/05/03 21:55:14 guy Exp $
* $Id: find_dlg.c,v 1.23 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -96,30 +96,30 @@ find_frame_cb(GtkWidget *w _U_, gpointer d _U_)
Ctrl+<key> is an accelerator). */
accel_group = gtk_accel_group_new();
gtk_window_add_accel_group(GTK_WINDOW(find_frame_w), accel_group);
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 3);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(find_frame_w), main_vb);
gtk_widget_show(main_vb);
/* Filter row */
filter_hb = gtk_hbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(main_vb), filter_hb);
gtk_widget_show(filter_hb);
filter_bt = gtk_button_new_with_label("Filter:");
gtk_signal_connect(GTK_OBJECT(filter_bt), "clicked",
GTK_SIGNAL_FUNC(display_filter_construct_cb), &args);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_bt, FALSE, TRUE, 0);
gtk_widget_show(filter_bt);
filter_te = gtk_entry_new();
if (cfile.sfilter) gtk_entry_set_text(GTK_ENTRY(filter_te), cfile.sfilter);
gtk_object_set_data(GTK_OBJECT(filter_bt), E_FILT_TE_PTR_KEY, filter_te);
gtk_box_pack_start(GTK_BOX(filter_hb), filter_te, TRUE, TRUE, 0);
gtk_widget_show(filter_te);
/* Misc row: Forward and reverse radio buttons */
direction_hb = gtk_hbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(main_vb), direction_hb);
@ -259,9 +259,9 @@ find_previous_next(GtkWidget *w, gpointer d, gboolean sens)
dfilter_t *sfcode;
if (cfile.sfilter) {
if (!dfilter_compile(cfile.sfilter, &sfcode))
if (!dfilter_compile(cfile.sfilter, &sfcode))
return;
if (sfcode == NULL)
if (sfcode == NULL)
return;
cfile.sbackward = sens;
find_packet(&cfile, sfcode);

View File

@ -1,23 +1,23 @@
/* find_dlg.h
* Definitions for "find frame" window
*
* $Id: find_dlg.h,v 1.2 2002/05/03 21:55:15 guy Exp $
* $Id: find_dlg.h,v 1.3 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,6 +1,6 @@
/* follow_dlg.c
*
* $Id: follow_dlg.c,v 1.24 2002/08/02 22:34:53 jmayer Exp $
* $Id: follow_dlg.c,v 1.25 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -10,12 +10,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -470,7 +470,7 @@ follow_read_stream(follow_info_t *follow_info,
gboolean skip;
iplen = (follow_info->is_ipv6) ? 16 : 4;
data_out_file = fopen(follow_info->data_out_filename, "rb");
if (data_out_file) {
char buffer[FLT_BUF_SIZE];
@ -524,7 +524,7 @@ follow_read_stream(follow_info_t *follow_info,
int i, cur;
/* is_server indentation : put 63 spaces at the begenning
* of the string */
sprintf(hexbuf, (is_server &&
sprintf(hexbuf, (is_server &&
follow_info->show_stream == BOTH_HOSTS) ?
" "
" %08X " :
@ -546,7 +546,7 @@ follow_read_stream(follow_info_t *follow_info,
/* Fill it up if column isn't complete */
if (i < 16) {
int j;
for (j = i; j < 16; j++) {
if (j == 7)
hexbuf[cur++] = ' ';
@ -565,7 +565,7 @@ follow_read_stream(follow_info_t *follow_info,
buffer[current_pos + i] : '.' );
if (i == 7) {
hexbuf[cur++] = ' ';
}
}
}
current_pos += i;
(*global_pos) += i;

View File

@ -1,6 +1,6 @@
/* follow_dlg.c
*
* $Id: follow_dlg.h,v 1.3 2000/09/08 10:59:12 guy Exp $
* $Id: follow_dlg.h,v 1.4 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -10,12 +10,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* goto_dlg.c
* Routines for "go to frame" window
*
* $Id: goto_dlg.c,v 1.15 2002/03/05 11:55:59 guy Exp $
* $Id: goto_dlg.c,v 1.16 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -60,22 +60,22 @@ goto_frame_cb(GtkWidget *w _U_, gpointer d _U_)
*bbox, *ok_bt, *cancel_bt;
goto_frame_w = dlg_window_new("Ethereal: Go To Frame");
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 3);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(goto_frame_w), main_vb);
gtk_widget_show(main_vb);
/* Frame number row */
fnumber_hb = gtk_hbox_new(FALSE, 3);
gtk_container_add(GTK_CONTAINER(main_vb), fnumber_hb);
gtk_widget_show(fnumber_hb);
fnumber_lb = gtk_label_new("Frame number:");
gtk_box_pack_start(GTK_BOX(fnumber_hb), fnumber_lb, FALSE, FALSE, 0);
gtk_widget_show(fnumber_lb);
fnumber_te = gtk_entry_new();
gtk_box_pack_start(GTK_BOX(fnumber_hb), fnumber_te, FALSE, FALSE, 0);
gtk_widget_show(fnumber_te);

View File

@ -1,23 +1,23 @@
/* goto_dlg.h
* Definitions for "go to frame" window
*
* $Id: goto_dlg.h,v 1.1 1999/11/08 01:03:40 guy Exp $
* $Id: goto_dlg.h,v 1.2 2002/08/28 21:03:47 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
* file for a list of people on the GTK+ Team. See the ChangeLog
* files for a list of changes. These files are distributed with
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __GTK_CLIST_H__
@ -54,7 +54,7 @@ enum {
GTK_CLIST_USE_DRAG_ICONS = 1 << 8,
GTK_CLIST_DRAW_DRAG_LINE = 1 << 9,
GTK_CLIST_DRAW_DRAG_RECT = 1 << 10
};
};
/* cell types */
typedef enum
@ -145,58 +145,58 @@ struct _GtkCListDestInfo
struct _GtkCList
{
GtkContainer container;
guint16 flags;
/* mem chunks */
GMemChunk *row_mem_chunk;
GMemChunk *cell_mem_chunk;
guint freeze_count;
/* allocation rectangle after the conatiner_border_width
* and the width of the shadow border */
GdkRectangle internal_allocation;
/* rows */
gint rows;
gint row_center_offset;
gint row_height;
GList *row_list;
GList *row_list_end;
/* columns */
gint columns;
GdkRectangle column_title_area;
GdkWindow *title_window;
/* dynamicly allocated array of column structures */
GtkCListColumn *column;
/* the scrolling window and its height and width to
* make things a little speedier */
GdkWindow *clist_window;
gint clist_window_width;
gint clist_window_height;
/* offsets for scrolling */
gint hoffset;
gint voffset;
/* border shadow style */
GtkShadowType shadow_type;
/* the list's selection mode (gtkenums.h) */
GtkSelectionMode selection_mode;
/* list of selected rows */
GList *selection;
GList *selection_end;
GList *undo_selection;
GList *undo_unselection;
gint undo_anchor;
/* mouse buttons */
guint8 button_actions[5];
@ -208,30 +208,30 @@ struct _GtkCList
/* scroll adjustments */
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
/* xor GC for the vertical drag line */
GdkGC *xor_gc;
/* gc for drawing unselected cells */
GdkGC *fg_gc;
GdkGC *bg_gc;
/* cursor used to indicate dragging */
GdkCursor *cursor_drag;
/* the current x-pixel location of the xor-drag line */
gint x_drag;
/* focus handling */
gint focus_row;
/* dragging the selection */
gint anchor;
GtkStateType anchor_state;
gint drag_pos;
gint htimer;
gint vtimer;
GtkSortType sort_type;
GtkCListCompareFunc compare;
gint sort_column;
@ -240,7 +240,7 @@ struct _GtkCList
struct _GtkCListClass
{
GtkContainerClass parent_class;
void (*set_scroll_adjustments) (GtkCList *clist,
GtkAdjustment *hadjustment,
GtkAdjustment *vadjustment);
@ -320,16 +320,16 @@ struct _GtkCListColumn
{
gchar *title;
GdkRectangle area;
GtkWidget *button;
GdkWindow *window;
gint width;
gint min_width;
gint max_width;
GtkJustification justification;
guint visible : 1;
guint visible : 1;
guint width_set : 1;
guint resizeable : 1;
guint auto_resize : 1;
@ -340,15 +340,15 @@ struct _GtkCListRow
{
GtkCell *cell;
GtkStateType state;
GdkColor foreground;
GdkColor background;
GtkStyle *style;
gpointer data;
GtkDestroyNotify destroy;
guint fg_set : 1;
guint bg_set : 1;
guint selectable : 1;
@ -358,10 +358,10 @@ struct _GtkCListRow
struct _GtkCellText
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
gchar *text;
@ -370,10 +370,10 @@ struct _GtkCellText
struct _GtkCellPixmap
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
GdkPixmap *pixmap;
@ -383,10 +383,10 @@ struct _GtkCellPixmap
struct _GtkCellPixText
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
gchar *text;
@ -398,10 +398,10 @@ struct _GtkCellPixText
struct _GtkCellWidget
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
GtkWidget *widget;
@ -410,27 +410,27 @@ struct _GtkCellWidget
struct _GtkCell
{
GtkCellType type;
gint16 vertical;
gint16 horizontal;
GtkStyle *style;
union {
gchar *text;
struct {
GdkPixmap *pixmap;
GdkBitmap *mask;
} pm;
struct {
gchar *text;
guint8 spacing;
GdkPixmap *pixmap;
GdkBitmap *mask;
} pt;
GtkWidget *widget;
} u;
};
@ -485,7 +485,7 @@ void gtk_clist_thaw (GtkCList *clist);
void gtk_clist_column_titles_show (GtkCList *clist);
void gtk_clist_column_titles_hide (GtkCList *clist);
/* set the column title to be a active title (responds to button presses,
/* set the column title to be a active title (responds to button presses,
* prelights, and grabs keyboard focus), or passive where it acts as just
* a title
*/

View File

@ -1,22 +1,22 @@
/* gtkglobals.h
* GTK-related Global defines, etc.
*
* $Id: gtkglobals.h,v 1.17 2002/01/11 06:43:17 guy Exp $
* $Id: gtkglobals.h,v 1.18 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* gui_prefs.c
* Dialog box for GUI preferences
*
* $Id: gui_prefs.c,v 1.34 2002/03/05 11:55:59 guy Exp $
* $Id: gui_prefs.c,v 1.35 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -194,13 +194,13 @@ gui_prefs_show(void)
prefs.gui_hex_dump_highlight_style);
gtk_object_set_data(GTK_OBJECT(main_vb), HEX_DUMP_HIGHLIGHT_STYLE_KEY,
highlight_style_om);
/* Geometry prefs */
save_position_cb = create_preference_check_button(main_tb,
6, "Save window position:", NULL, prefs.gui_geometry_save_position);
gtk_object_set_data(GTK_OBJECT(main_vb), GEOMETRY_POSITION_KEY,
save_position_cb);
save_size_cb = create_preference_check_button(main_tb,
7, "Save window size:", NULL, prefs.gui_geometry_save_size);
gtk_object_set_data(GTK_OBJECT(main_vb), GEOMETRY_SIZE_KEY,
@ -282,7 +282,7 @@ font_browse_cb(GtkWidget *w, gpointer data _U_)
/* Set the FONT_DIALOG_PTR_KEY for the caller to point to us */
gtk_object_set_data(GTK_OBJECT(caller), FONT_DIALOG_PTR_KEY,
font_browse_w);
/* Connect the ok_button to font_browse_ok_cb function and pass along a
pointer to the font selection box widget */
gtk_signal_connect(
@ -407,10 +407,10 @@ gui_prefs_fetch(GtkWidget *w)
prefs.gui_hex_dump_highlight_style = fetch_enum_value(
gtk_object_get_data(GTK_OBJECT(w), HEX_DUMP_HIGHLIGHT_STYLE_KEY),
highlight_style_vals);
prefs.gui_geometry_save_position =
prefs.gui_geometry_save_position =
gtk_toggle_button_get_active(gtk_object_get_data(GTK_OBJECT(w),
GEOMETRY_POSITION_KEY));
prefs.gui_geometry_save_size =
prefs.gui_geometry_save_size =
gtk_toggle_button_get_active(gtk_object_get_data(GTK_OBJECT(w),
GEOMETRY_SIZE_KEY));
@ -534,9 +534,9 @@ color_browse_cb(GtkWidget *w, gpointer data _U_)
GtkWidget *main_vb, *main_tb, *label, *optmenu, *menu, *menuitem;
GtkWidget *sample, *colorsel, *bbox, *cancel_bt, *ok_bt, *color_w;
int width, height, i;
gdouble scolor[4];
gdouble scolor[4];
GtkWidget *caller = gtk_widget_get_toplevel(w);
/* Has a color dialog box already been opened for that top-level
widget? */
color_w = gtk_object_get_data(GTK_OBJECT(caller),
@ -570,7 +570,7 @@ color_browse_cb(GtkWidget *w, gpointer data _U_)
if any, that we've been destroyed. */
gtk_signal_connect(GTK_OBJECT(color_w), "destroy",
GTK_SIGNAL_FUNC(color_destroy_cb), NULL);
main_vb = gtk_vbox_new(FALSE, 5);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add (GTK_CONTAINER (color_w), main_vb);
@ -589,7 +589,7 @@ color_browse_cb(GtkWidget *w, gpointer data _U_)
menu = gtk_menu_new();
for (i = 0; i < MAX_HANDLED_COL; i++){
menuitem = gtk_menu_item_new_with_label(color_info[i].label);
gtk_object_set_data(GTK_OBJECT(menuitem), COLOR_SELECTION_PTR_KEY,
gtk_object_set_data(GTK_OBJECT(menuitem), COLOR_SELECTION_PTR_KEY,
(gpointer) colorsel);
gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
GTK_SIGNAL_FUNC(update_current_color),
@ -606,18 +606,18 @@ color_browse_cb(GtkWidget *w, gpointer data _U_)
width = gdk_string_width(sample->style->font, SAMPLE_MARKED_TEXT);
gtk_widget_set_usize(GTK_WIDGET(sample), width, height);
gtk_text_set_editable(GTK_TEXT(sample), FALSE);
gtk_text_insert(GTK_TEXT(sample), NULL,
&color_info[MFG_IDX].color,
gtk_text_insert(GTK_TEXT(sample), NULL,
&color_info[MFG_IDX].color,
&color_info[MBG_IDX].color,
SAMPLE_MARKED_TEXT, -1);
gtk_table_attach_defaults(GTK_TABLE(main_tb), sample, 2, 3, 0, 2);
gtk_widget_show(sample);
gtk_color_selection_set_color(GTK_COLOR_SELECTION(colorsel),
gtk_color_selection_set_color(GTK_COLOR_SELECTION(colorsel),
&scolor[CS_RED]);
gtk_table_attach_defaults(GTK_TABLE(main_tb), colorsel, 0, 3, 2, 3);
gtk_object_set_data(GTK_OBJECT(colorsel), COLOR_SAMPLE_PTR_KEY,
(gpointer) sample);
gtk_signal_connect(GTK_OBJECT(colorsel), "color-changed",
gtk_signal_connect(GTK_OBJECT(colorsel), "color-changed",
GTK_SIGNAL_FUNC(update_text_color), NULL);
gtk_widget_show(colorsel);
gtk_widget_show(main_vb);
@ -625,7 +625,7 @@ color_browse_cb(GtkWidget *w, gpointer data _U_)
gtk_object_set_data(GTK_OBJECT(color_w), COLOR_CALLER_PTR_KEY, caller);
gtk_object_set_data(GTK_OBJECT(caller), COLOR_DIALOG_PTR_KEY, color_w);
/* Ok, Cancel Buttons */
/* Ok, Cancel Buttons */
bbox = gtk_hbutton_box_new();
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
@ -640,7 +640,7 @@ color_browse_cb(GtkWidget *w, gpointer data _U_)
gtk_widget_grab_default(ok_bt);
gtk_widget_show(ok_bt);
cancel_bt = gtk_button_new_with_label ("Cancel");
gtk_signal_connect_object(GTK_OBJECT(cancel_bt), "clicked",
gtk_signal_connect_object(GTK_OBJECT(cancel_bt), "clicked",
(GtkSignalFunc)gtk_widget_destroy,
GTK_OBJECT(color_w));
gtk_box_pack_start(GTK_BOX (bbox), cancel_bt, TRUE, TRUE, 0);
@ -656,16 +656,16 @@ update_text_color(GtkWidget *w, gpointer data _U_) {
gdouble scolor[4];
gtk_color_selection_get_color(GTK_COLOR_SELECTION(w), &scolor[CS_RED]);
curcolor->red = (gushort) (scolor[CS_RED] * 65535.0);
curcolor->green = (gushort) (scolor[CS_GREEN] * 65535.0);
curcolor->blue = (gushort) (scolor[CS_BLUE] * 65535.0);
gtk_text_freeze(sample);
gtk_text_set_point(sample, 0);
gtk_text_forward_delete(sample, gtk_text_get_length(sample));
gtk_text_insert(GTK_TEXT(sample), NULL,
&color_info[MFG_IDX].color,
gtk_text_insert(GTK_TEXT(sample), NULL,
&color_info[MFG_IDX].color,
&color_info[MBG_IDX].color,
SAMPLE_MARKED_TEXT, -1);
gtk_text_thaw(sample);
@ -674,7 +674,7 @@ update_text_color(GtkWidget *w, gpointer data _U_) {
static void
update_current_color(GtkWidget *w, gpointer data)
{
GtkColorSelection *colorsel;
GtkColorSelection *colorsel;
gdouble scolor[4];
colorsel = GTK_COLOR_SELECTION(gtk_object_get_data(GTK_OBJECT(w),
@ -684,7 +684,7 @@ update_current_color(GtkWidget *w, gpointer data)
scolor[CS_GREEN] = (gdouble) (curcolor->green) / 65535.0;
scolor[CS_BLUE] = (gdouble) (curcolor->blue) / 65535.0;
scolor[CS_OPACITY] = 1.0;
gtk_color_selection_set_color(colorsel, &scolor[CS_RED]);
}
@ -722,7 +722,7 @@ color_delete_cb(GtkWidget *prefs_w _U_, gpointer dummy _U_)
static void
color_destroy_cb(GtkWidget *w, gpointer data _U_)
{
GtkWidget *caller = gtk_object_get_data(GTK_OBJECT(w),
GtkWidget *caller = gtk_object_get_data(GTK_OBJECT(w),
COLOR_CALLER_PTR_KEY);
if (caller != NULL) {
gtk_object_set_data(GTK_OBJECT(caller), COLOR_DIALOG_PTR_KEY, NULL);

View File

@ -1,23 +1,23 @@
/* gui_prefs.h
* Definitions for GUI preferences window
*
* $Id: gui_prefs.h,v 1.3 2000/08/21 08:09:12 guy Exp $
* $Id: gui_prefs.h,v 1.4 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,6 +1,6 @@
/* help_dlg.c
*
* $Id: help_dlg.c,v 1.23 2002/08/02 22:34:53 jmayer Exp $
* $Id: help_dlg.c,v 1.24 2002/08/28 21:03:48 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@ -12,12 +12,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -77,13 +77,13 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
*proto_vb,
*dfilter_tb, *dfilter_vsb,
*cfilter_vb;
if (help_w != NULL) {
/* There's already a "Help" dialog box; reactivate it. */
reactivate_window(help_w);
return;
}
help_w = gtk_window_new(GTK_WINDOW_DIALOG);
gtk_widget_set_name(help_w, "Ethereal Help window" );
gtk_window_set_title(GTK_WINDOW(help_w), "Ethereal: Help");
@ -93,7 +93,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
GTK_SIGNAL_FUNC (window_icon_realize_cb), NULL);
gtk_widget_set_usize(GTK_WIDGET(help_w), DEF_WIDTH * 2/3, DEF_HEIGHT * 2/3);
gtk_container_border_width(GTK_CONTAINER(help_w), 2);
/* Container for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 1);
@ -109,7 +109,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
/* Overview panel */
overview_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(overview_vb), 1);
gtk_container_border_width(GTK_CONTAINER(overview_vb), 1);
txt_scrollw = scrolled_window_new(NULL, NULL);
gtk_box_pack_start(GTK_BOX(overview_vb), txt_scrollw, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(txt_scrollw),
@ -133,7 +133,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
proto_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(proto_vb), 1);
txt_scrollw = scrolled_window_new(NULL, NULL);
gtk_box_pack_start(GTK_BOX(proto_vb), txt_scrollw, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(txt_scrollw),
@ -144,22 +144,22 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_text_set_line_wrap(GTK_TEXT(proto_text), FALSE);
set_help_text(proto_text, PROTOCOL_HELP);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(txt_scrollw),
proto_text);
proto_text);
gtk_widget_show(txt_scrollw);
gtk_widget_show(proto_text);
gtk_widget_show(proto_vb);
label = gtk_label_new("Protocols");
gtk_notebook_append_page(GTK_NOTEBOOK(help_nb), proto_vb, label);
/* display filter help */
/* X windows have a maximum size of 32767. Since the height can easily
exceed this, we have to jump through some hoops to have a functional
vertical scroll bar. */
dfilter_tb = gtk_table_new(2, 2, FALSE);
gtk_table_set_col_spacing (GTK_TABLE (dfilter_tb), 0, 3);
gtk_table_set_row_spacing (GTK_TABLE (dfilter_tb), 0, 3);
gtk_container_border_width(GTK_CONTAINER(dfilter_tb), 1);
gtk_container_border_width(GTK_CONTAINER(dfilter_tb), 1);
txt_scrollw = scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(txt_scrollw),
@ -184,7 +184,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_text_set_line_wrap(GTK_TEXT(dfilter_text), FALSE);
set_help_text(dfilter_text, DFILTER_HELP);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(txt_scrollw),
dfilter_text);
dfilter_text);
gtk_widget_show(txt_scrollw);
gtk_widget_show(dfilter_text);
gtk_widget_show(dfilter_tb);
@ -195,7 +195,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
/* capture filter help (this one has no horizontal scrollbar) */
cfilter_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(cfilter_vb), 1);
gtk_container_border_width(GTK_CONTAINER(cfilter_vb), 1);
txt_scrollw = scrolled_window_new(NULL, NULL);
gtk_box_pack_start(GTK_BOX(cfilter_vb), txt_scrollw, TRUE, TRUE, 0);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(txt_scrollw),
@ -217,7 +217,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_widget_show(help_nb);
/* Buttons (only one for now) */
/* Buttons (only one for now) */
bbox = gtk_hbox_new(FALSE, 1);
gtk_box_pack_end(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0);
@ -229,7 +229,7 @@ void help_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_container_add(GTK_CONTAINER(bbox), close_bt);
gtk_widget_grab_default(close_bt);
gtk_widget_show(close_bt);
gtk_quit_add_destroy(gtk_main_level(), GTK_OBJECT(help_w));
gtk_widget_show(help_w);
@ -251,15 +251,15 @@ static void set_text(GtkWidget *w, char *buffer, int nchars)
gtk_text_insert(GTK_TEXT(w), m_r_font, NULL, NULL, buffer, nchars);
}
static char *proto_help =
static char *proto_help =
"The protocols (and packet types) currently supported by "
"Ethereal are the following:\n\n";
static char *dfilter_help =
static char *dfilter_help =
"The following list shows all per-protocol fields that "
"can be used in a display filter:\n";
static char *cfilter_help =
static char *cfilter_help =
"Packet capturing is performed with the pcap library. The capture filter "
"syntax follows the rules of this library.\nSo this syntax is different "
"from the display filter syntax: see manual page of tcpdump.\n"
@ -269,7 +269,7 @@ static char *cfilter_help =
;
#endif
static char *overview_help =
static char *overview_help =
"Ethereal is a GUI network protocol analyzer. It lets you interactively "
"browse packet data from a live network or from a previously saved capture "
"file. Ethereal knows how to read libpcap capture files, including those "
@ -319,7 +319,7 @@ static void set_help_text(GtkWidget *w, help_type_t type)
set_text(w, overview_help, -1);
break;
case PROTOCOL_HELP :
case PROTOCOL_HELP :
/* first pass to know the maximum length of first field */
for (i = proto_get_first_protocol(&cookie); i != -1;
i = proto_get_next_protocol(&cookie)) {
@ -333,7 +333,7 @@ static void set_help_text(GtkWidget *w, help_type_t type)
maxlen2 = strlen(proto_help);
width = gdk_string_width(m_r_font, proto_help);
set_text(w, proto_help, maxlen2);
/* ok, display the correctly aligned strings */
for (i = proto_get_first_protocol(&cookie); i != -1;
i = proto_get_next_protocol(&cookie)) {
@ -378,7 +378,7 @@ static void set_help_text(GtkWidget *w, help_type_t type)
set_text(w, dfilter_help, maxlen3);
for (i = 0; i < proto_registrar_n() ; i++) {
hfinfo = proto_registrar_get_nth(i);
hfinfo = proto_registrar_get_nth(i);
if (proto_registrar_is_protocol(i)) {
snprintf(buffer, BUFF_LEN, "\n%s:\n", hfinfo->name);
set_text(w, buffer, strlen(buffer));
@ -387,7 +387,7 @@ static void set_help_text(GtkWidget *w, help_type_t type)
type_name = ftype_pretty_name(hfinfo->type);
snprintf(buffer, BUFF_LEN, "%s%s%s%s(%s)\n",
hfinfo->abbrev,
hfinfo->abbrev,
&blanks[B_LEN - (maxlen - strlen(hfinfo->abbrev)) - 2],
hfinfo->name,
&blanks[B_LEN - (maxlen2 - strlen(hfinfo->name)) - 2],
@ -423,7 +423,7 @@ static void clear_help_text(GtkWidget *w)
GtkText *txt = GTK_TEXT(w);
gtk_text_set_point(txt, 0);
/* Keep GTK+ 1.2.3 through 1.2.6 from dumping core - see
/* Keep GTK+ 1.2.3 through 1.2.6 from dumping core - see
http://www.ethereal.com/lists/ethereal-dev/199912/msg00312.html and
http://www.gnome.org/mailing-lists/archives/gtk-devel-list/1999-October/0051.shtml
for more information */

View File

@ -1,6 +1,6 @@
/* help_dlg.h
*
* $Id: help_dlg.h,v 1.3 2000/09/08 10:59:14 guy Exp $
* $Id: help_dlg.h,v 1.4 2002/08/28 21:03:48 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@ -12,12 +12,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* keys.h
* Key definitions for various objects
*
* $Id: keys.h,v 1.13 2002/05/03 03:24:47 guy Exp $
* $Id: keys.h,v 1.14 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,6 +1,6 @@
/* main.c
*
* $Id: main.c,v 1.258 2002/08/24 01:17:08 guy Exp $
* $Id: main.c,v 1.259 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -9,18 +9,18 @@
* Richard Sharpe, 13-Feb-1999, added support for initializing structures
* needed by dissect routines
* Jeff Foster, 2001/03/12, added support tabbed hex display windowss
*
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -423,7 +423,7 @@ get_text_from_packet_list(gpointer data)
epan_dissect_free(edt);
}
return buf;
}
@ -534,10 +534,10 @@ filter_activate_cb(GtkWidget *w, gpointer data)
gboolean add_filter = TRUE;
gboolean free_filter = TRUE;
char *s;
g_assert(data);
s = g_strdup(gtk_entry_get_text(GTK_ENTRY(data)));
/* GtkCombos don't let us get at their list contents easily, so we maintain
our own filter list, and feed it to gtk_combo_set_popdown_strings when
a new filter is added. */
@ -584,9 +584,9 @@ packet_list_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
/* Attempt to convert to numbers */
double num1 = atof(text1);
double num2 = atof(text2);
gint col_fmt = cfile.cinfo.col_fmt[clist->sort_column];
if ((col_fmt == COL_NUMBER) || (col_fmt == COL_REL_TIME) || (col_fmt == COL_DELTA_TIME) ||
((col_fmt == COL_CLS_TIME) && (timestamp_type == RELATIVE)) ||
((col_fmt == COL_CLS_TIME) && (timestamp_type == DELTA)) ||
@ -604,9 +604,9 @@ packet_list_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
else
return 0;
}
else {
/* Compare text column */
if (!text2)
return (text1 != NULL);
@ -619,19 +619,19 @@ packet_list_compare(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
}
/* What to do when a column is clicked */
static void
static void
packet_list_click_column_cb(GtkCList *clist, gint column, gpointer data)
{
column_arrows *col_arrows = (column_arrows *) data;
int i;
gtk_clist_freeze(clist);
for (i = 0; i < cfile.cinfo.num_cols; i++) {
gtk_widget_hide(col_arrows[i].ascend_pm);
gtk_widget_hide(col_arrows[i].descend_pm);
}
if (column == clist->sort_column) {
if (clist->sort_type == GTK_SORT_ASCENDING) {
clist->sort_type = GTK_SORT_DESCENDING;
@ -652,7 +652,7 @@ packet_list_click_column_cb(GtkCList *clist, gint column, gpointer data)
}
/* mark packets */
static void
static void
set_frame_mark(gboolean set, frame_data *frame, gint row) {
GdkColor fg, bg;
@ -674,7 +674,7 @@ set_frame_mark(gboolean set, frame_data *frame, gint row) {
static void
packet_list_button_pressed_cb(GtkWidget *w, GdkEvent *event, gpointer data _U_) {
GdkEventButton *event_button = (GdkEventButton *)event;
gint row, column;
@ -693,8 +693,8 @@ void mark_frame_cb(GtkWidget *w _U_, gpointer data _U_) {
if (cfile.current_frame) {
/* XXX hum, should better have a "cfile->current_row" here ... */
set_frame_mark(!cfile.current_frame->flags.marked,
cfile.current_frame,
gtk_clist_find_row_from_data(GTK_CLIST(packet_list),
cfile.current_frame,
gtk_clist_find_row_from_data(GTK_CLIST(packet_list),
cfile.current_frame));
}
}
@ -704,7 +704,7 @@ static void mark_all_frames(gboolean set) {
for (fdata = cfile.plist; fdata != NULL; fdata = fdata->next) {
set_frame_mark(set,
fdata,
gtk_clist_find_row_from_data(GTK_CLIST(packet_list), fdata));
gtk_clist_find_row_from_data(GTK_CLIST(packet_list), fdata));
}
}
@ -773,7 +773,7 @@ tree_view_select_row_cb(GtkCTree *ctree, GList *node, gint column _U_, gpointer
set_menus_for_selected_tree_row(TRUE);
if (finfo->hfinfo) {
if (finfo->hfinfo->blurb != NULL &&
if (finfo->hfinfo->blurb != NULL &&
finfo->hfinfo->blurb[0] != '\0') {
has_blurb = TRUE;
length = strlen(finfo->hfinfo->blurb);
@ -791,7 +791,7 @@ tree_view_select_row_cb(GtkCTree *ctree, GList *node, gint column _U_, gpointer
if (length) {
length += strlen(finfo->hfinfo->abbrev) + strlen(len_str) + 10;
help_str = g_malloc(sizeof(gchar) * length);
sprintf(help_str, "%s (%s)%s",
sprintf(help_str, "%s (%s)%s",
(has_blurb) ? finfo->hfinfo->blurb : finfo->hfinfo->name,
finfo->hfinfo->abbrev, len_str);
statusbar_push_field_msg(help_str);
@ -829,7 +829,7 @@ tree_view_unselect_row_cb(GtkCTree *ctree _U_, GList *node _U_, gint column _U_,
{
GtkWidget *byte_view;
const guint8 *data;
guint len;
guint len;
/*
* Which byte view is displaying the current protocol tree
@ -906,7 +906,7 @@ set_plist_sel_browse(gboolean val)
gtk_clist_set_selection_mode(GTK_CLIST(packet_list), GTK_SELECTION_BROWSE);
}
}
/* Set the font of the packet list window. */
void
set_plist_font(GdkFont *font)
@ -1066,13 +1066,13 @@ file_quit_cmd_cb (GtkWidget *widget _U_, gpointer data _U_)
do_quit();
}
static void
static void
print_usage(gboolean print_ver) {
if (print_ver) {
fprintf(stderr, "This is GNU " PACKAGE " " VERSION ", compiled %s\n",
comp_info_str->str);
}
}
#ifdef HAVE_LIBPCAP
fprintf(stderr, "\n%s [ -vh ] [ -klpQS ] [ -a <capture autostop condition> ] ...\n",
PACKAGE);
@ -1093,7 +1093,7 @@ print_usage(gboolean print_ver) {
#endif
}
static void
static void
show_version(void)
{
#ifdef WIN32
@ -1199,9 +1199,9 @@ main(int argc, char *argv[])
extern char pcap_version[];
#endif /* HAVE_PCAP_VERSION */
#endif /* HAVE_LIBPCAP */
#ifdef WIN32
WSADATA wsaData;
WSADATA wsaData;
#endif
char *gpf_path, *cf_path, *df_path;
@ -1323,7 +1323,7 @@ main(int argc, char *argv[])
exit(0);
}
/* Set the current locale according to the program environment.
/* Set the current locale according to the program environment.
* We haven't localized anything, but some GTK widgets are localized
* (the file selection dialogue, for example).
* This also sets the C-language locale to the native environment. */
@ -1331,7 +1331,7 @@ main(int argc, char *argv[])
/* Let GTK get its args */
gtk_init (&argc, &argv);
/* Read the preference files. */
prefs = read_prefs(&gpf_open_errno, &gpf_path, &pf_open_errno, &pf_path);
@ -1458,7 +1458,7 @@ main(int argc, char *argv[])
#ifdef HAVE_LIBPCAP
if (set_autostop_criterion(optarg) == FALSE) {
fprintf(stderr, "ethereal: Invalid or unknown -a flag \"%s\"\n", optarg);
exit(1);
exit(1);
}
#else
capture_option_specified = TRUE;
@ -1762,12 +1762,12 @@ main(int argc, char *argv[])
if_list = get_interface_list(&err, err_str);
if (if_list == NULL) {
switch (err) {
case CANT_GET_INTERFACE_LIST:
fprintf(stderr, "ethereal: Can't get list of interfaces: %s\n",
err_str);
break;
case NO_INTERFACES_FOUND:
fprintf(stderr, "ethereal: There are no interfaces on which a capture can be done\n");
break;
@ -1789,7 +1789,7 @@ main(int argc, char *argv[])
}
#endif
/* Build the column format array */
/* Build the column format array */
col_init(&cfile.cinfo, prefs->num_cols);
for (i = 0; i < cfile.cinfo.num_cols; i++) {
cfile.cinfo.col_fmt[i] = get_column_format(i);
@ -1813,14 +1813,14 @@ main(int argc, char *argv[])
else if (capture_opts.snaplen < MIN_PACKET_SIZE)
capture_opts.snaplen = MIN_PACKET_SIZE;
}
/* Check the value range of the ringbuffer_num_files parameter */
if (capture_opts.ringbuffer_num_files < RINGBUFFER_MIN_NUM_FILES)
capture_opts.ringbuffer_num_files = RINGBUFFER_MIN_NUM_FILES;
else if (capture_opts.ringbuffer_num_files > RINGBUFFER_MAX_NUM_FILES)
capture_opts.ringbuffer_num_files = RINGBUFFER_MAX_NUM_FILES;
#endif
rc_file = get_persconffile_path(RC_FILE, FALSE);
gtk_rc_parse(rc_file);
@ -2001,10 +2001,10 @@ main(int argc, char *argv[])
documentation correctly, gdk_window_get_deskrelative_origin applies
mainly to Enlightenment and gdk_window_get_root_origin applies for
all other WMs.
The code below tries both routines, and picks the one that returns
the upper-left-most coordinates.
More info at:
http://mail.gnome.org/archives/gtk-devel-list/2001-March/msg00289.html
@ -2035,7 +2035,7 @@ main(int argc, char *argv[])
prefs_write_needed = TRUE;
}
}
if (prefs->gui_geometry_save_size) {
if (top_level->window != NULL) {
/* XXX - Is this the "approved" method? */
@ -2050,7 +2050,7 @@ main(int argc, char *argv[])
prefs_write_needed = TRUE;
}
}
if (prefs_write_needed) {
write_prefs(&pf_path);
}
@ -2058,7 +2058,7 @@ main(int argc, char *argv[])
/* Ignore errors silently */
g_free(pf_path);
}
epan_cleanup();
g_free(rc_file);
@ -2190,7 +2190,7 @@ static const struct {
{ "bold", "ultrabold" }
};
#define N_WEIGHTS (sizeof weight_map / sizeof weight_map[0])
char *
boldify(const char *font_name)
{
@ -2262,11 +2262,11 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
TRUE,
TRUE
};
/* Main window */
/* Main window */
top_level = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_set_name(top_level, "main window");
gtk_signal_connect(GTK_OBJECT(top_level), "delete_event",
gtk_signal_connect(GTK_OBJECT(top_level), "delete_event",
GTK_SIGNAL_FUNC(main_window_delete_event_cb), NULL);
gtk_signal_connect (GTK_OBJECT (top_level), "realize",
GTK_SIGNAL_FUNC (window_icon_realize_cb), NULL);
@ -2317,7 +2317,7 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
gtk_container_add(GTK_CONTAINER(pkt_scrollw), packet_list);
col_arrows = (column_arrows *) g_malloc(sizeof(column_arrows) * cfile.cinfo.num_cols);
set_plist_sel_browse(prefs->gui_plist_sel_browse);
set_plist_font(m_r_font);
gtk_widget_set_name(packet_list, "packet list");
@ -2333,12 +2333,12 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
/* Right-justify the packet number column. */
if (cfile.cinfo.col_fmt[i] == COL_NUMBER)
gtk_clist_set_column_justification(GTK_CLIST(packet_list), i,
gtk_clist_set_column_justification(GTK_CLIST(packet_list), i,
GTK_JUSTIFY_RIGHT);
}
gtk_widget_set_usize(packet_list, -1, pl_size);
gtk_signal_connect(GTK_OBJECT(packet_list), "button_press_event",
GTK_SIGNAL_FUNC(popup_menu_handler),
GTK_SIGNAL_FUNC(popup_menu_handler),
gtk_object_get_data(GTK_OBJECT(popup_menu_object), PM_PACKET_LIST_KEY));
gtk_signal_connect(GTK_OBJECT(packet_list), "button_press_event",
GTK_SIGNAL_FUNC(packet_list_button_pressed_cb), NULL);
@ -2377,7 +2377,7 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
GTK_SIGNAL_FUNC(display_filter_construct_cb), &args);
gtk_box_pack_start(GTK_BOX(stat_hbox), filter_bt, FALSE, TRUE, 0);
gtk_widget_show(filter_bt);
filter_cm = gtk_combo_new();
filter_list = g_list_append (filter_list, "");
gtk_combo_set_popdown_strings(GTK_COMBO(filter_cm), filter_list);
@ -2453,7 +2453,7 @@ create_main_window (gint pl_size, gint tv_size, gint bv_size, e_prefs *prefs)
GTK_SHRINK, GTK_SHRINK, 0, 0);
gtk_widget_show(column_lb);
col_arrows[i].ascend_pm = gtk_pixmap_new(ascend_pm, ascend_bm);
gtk_table_attach(GTK_TABLE(col_arrows[i].table), col_arrows[i].ascend_pm,
gtk_table_attach(GTK_TABLE(col_arrows[i].table), col_arrows[i].ascend_pm,
1, 2, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
if (i == 0) {
gtk_widget_show(col_arrows[i].ascend_pm);

View File

@ -1,22 +1,22 @@
/* main.h
* Global defines, etc.
*
* $Id: main.h,v 1.27 2002/08/24 01:17:09 guy Exp $
* $Id: main.h,v 1.28 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* menu.c
* Menu routines
*
* $Id: menu.c,v 1.65 2002/08/24 01:17:09 guy Exp $
* $Id: menu.c,v 1.66 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -87,7 +87,7 @@ static void set_menu_sensitivity (gchar *, gint);
<path> -> path of a radio item to link against
"<Separator>" -> create a separator
"<Branch>" -> create an item to hold sub items (optional)
"<LastBranch>" -> create a right justified branch
"<LastBranch>" -> create a right justified branch
*/
/* main menu */
@ -207,7 +207,7 @@ static GtkItemFactoryEntry packet_list_menu_items[] =
{"/Colorize Display...", NULL, GTK_MENU_FUNC(color_display_cb), 0, NULL},
{"/Print...", NULL, GTK_MENU_FUNC(file_print_cmd_cb), 0, NULL},
{"/Print Packet", NULL, GTK_MENU_FUNC(file_print_packet_cmd_cb), 0, NULL},
{"/Show Packet In New Window", NULL, GTK_MENU_FUNC(new_window_cb), 0, NULL},
{"/Show Packet In New Window", NULL, GTK_MENU_FUNC(new_window_cb), 0, NULL},
};
static GtkItemFactoryEntry tree_view_menu_items[] =
@ -293,7 +293,7 @@ menus_init(void) {
gtk_item_factory_create_items_ac(hexdump_menu_factory, sizeof(hexdump_menu_items)/sizeof(hexdump_menu_items[0]), hexdump_menu_items, popup_menu_object, 2);
gtk_object_set_data(GTK_OBJECT(popup_menu_object), PM_HEXDUMP_KEY, hexdump_menu_factory->widget);
popup_menu_list = g_slist_append((GSList *)popup_menu_list, hexdump_menu_factory);
factory = gtk_item_factory_new(GTK_TYPE_MENU_BAR, "<main>", grp);
gtk_item_factory_create_items_ac(factory, nmenu_items, menu_items, NULL,2);
set_menus_for_unsaved_capture_file(FALSE);
@ -314,7 +314,7 @@ menus_init(void) {
void
set_menu_sensitivity_meat(GtkItemFactory *ifactory, gchar *path, gint val) {
GtkWidget *menu = NULL;
if((menu = gtk_item_factory_get_widget(ifactory, path)) != NULL) {
gtk_widget_set_sensitive(menu,val);
}
@ -360,7 +360,7 @@ void
set_menu_object_data_meat(GtkItemFactory *ifactory, gchar *path, gchar *key, gpointer data)
{
GtkWidget *menu = NULL;
if ((menu = gtk_item_factory_get_widget(ifactory, path)) != NULL)
gtk_object_set_data(GTK_OBJECT(menu), key, data);
}
@ -369,7 +369,7 @@ void
set_menu_object_data (gchar *path, gchar *key, gpointer data) {
GSList *menu_list = popup_menu_list;
gchar *shortpath = strrchr(path, '/');
set_menu_object_data_meat(factory, path, key, data);
while (menu_list != NULL) {
set_menu_object_data_meat(menu_list->data, shortpath, key, data);
@ -388,7 +388,7 @@ popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data)
if(widget == NULL || event == NULL || data == NULL) {
return FALSE;
}
/*
* If we ever want to make the menu differ based on what row
* and/or column we're above, we'd use "gtk_clist_get_selection_info()"
@ -412,7 +412,7 @@ popup_menu_handler(GtkWidget *widget, GdkEvent *event, gpointer data)
menu = (GtkWidget *)data;
if(event->type == GDK_BUTTON_PRESS) {
event_button = (GdkEventButton *) event;
if(event_button->button == 3) {
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, event_button->button, event_button->time);
gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "button_press_event");
@ -488,7 +488,7 @@ set_menus_for_selected_packet(gboolean have_selected_packet)
have_selected_packet ? (cfile.edt->pi.ipproto == 6) : FALSE);
set_menu_sensitivity("/Tools/Decode As...",
have_selected_packet && decode_as_ok());
set_menu_sensitivity("/Resolve Name",
set_menu_sensitivity("/Resolve Name",
have_selected_packet && g_resolv_flags == 0);
set_menu_sensitivity("/Tools/TCP Stream Analysis",
have_selected_packet ? (cfile.edt->pi.ipproto == 6) : FALSE);

View File

@ -1,23 +1,23 @@
/* menu.h
* Menu definitions
*
* $Id: menu.h,v 1.6 2000/08/21 12:33:21 deniel Exp $
* $Id: menu.h,v 1.7 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* nameres_prefs.c
* Dialog box for name resolution preferences
*
* $Id: nameres_prefs.c,v 1.4 2002/03/05 11:55:59 guy Exp $
* $Id: nameres_prefs.c,v 1.5 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* nameres_prefs.h
* Definitions for name resolution preferences window
*
* $Id: nameres_prefs.h,v 1.1 2002/01/13 20:35:12 guy Exp $
* $Id: nameres_prefs.h,v 1.2 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -3,22 +3,22 @@
*
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet_win.c,v 1.38 2002/06/04 07:48:57 guy Exp $
* $Id: packet_win.c,v 1.39 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -184,8 +184,8 @@ destroy_new_window(GtkObject *object _U_, gpointer user_data)
g_free(DataPtr);
}
/* called when a tree row is selected in the popup packet window */
/* called when a tree row is selected in the popup packet window */
static void
new_tree_view_select_row_cb(GtkCTree *ctree, GList *node, gint column _U_,
gpointer user_data)
@ -217,7 +217,7 @@ new_tree_view_select_row_cb(GtkCTree *ctree, GList *node, gint column _U_,
DataPtr->frame, finfo, len);
}
/* called when a tree row is unselected in the popup packet window */
/* called when a tree row is unselected in the popup packet window */
static void
new_tree_view_unselect_row_cb(GtkCTree *ctree _U_, GList *node _U_, gint column _U_,
gpointer user_data)
@ -225,7 +225,7 @@ new_tree_view_unselect_row_cb(GtkCTree *ctree _U_, GList *node _U_, gint column
GtkWidget* byte_view;
const guint8* data;
guint len;
struct PacketWinData *DataPtr = (struct PacketWinData*)user_data;
DataPtr->finfo_selected = NULL;

View File

@ -3,7 +3,7 @@
*
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
* $Id: packet_win.h,v 1.7 2001/03/24 02:14:56 guy Exp $
* $Id: packet_win.h,v 1.8 2002/08/28 21:03:48 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -13,12 +13,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* prefs_dlg.c
* Routines for handling preferences
*
* $Id: prefs_dlg.c,v 1.51 2002/08/02 22:34:54 jmayer Exp $
* $Id: prefs_dlg.c,v 1.52 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -85,8 +85,8 @@ static void prefs_tree_select_cb(GtkCTree *, GtkCTreeNode *, gint, gpointer);
#define FIRST_PROTO_PREFS_PAGE 6
/*
* Keep a static pointer to the notebook to be able to choose the
/*
* Keep a static pointer to the notebook to be able to choose the
* displayed page.
*/
static GtkWidget *notebook;
@ -230,7 +230,7 @@ module_prefs_show(module_t *module, gpointer user_data)
gtk_notebook_append_page(GTK_NOTEBOOK(cts->notebook), frame, NULL);
strcpy(label_str, module->title);
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts->ctree), cts->node, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts->ctree), cts->node, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts->ctree), ct_node,
GINT_TO_POINTER(cts->page));
@ -269,7 +269,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
GTK_SIGNAL_FUNC(prefs_main_delete_cb), NULL);
gtk_signal_connect(GTK_OBJECT(prefs_w), "destroy",
GTK_SIGNAL_FUNC(prefs_main_destroy_cb), NULL);
/*
* Unfortunately, we can't arrange that a GtkTable widget wrap an event box
* around a table row, so the spacing between the preference item's label
@ -283,7 +283,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(prefs_w), main_vb);
gtk_widget_show(main_vb);
/* Top row: Preferences tree and notebook */
top_hb = gtk_hbox_new(FALSE, 10);
gtk_container_add(GTK_CONTAINER(main_vb), top_hb);
@ -304,14 +304,14 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_signal_connect(GTK_OBJECT(cts.ctree), "tree-select-row",
GTK_SIGNAL_FUNC(prefs_tree_select_cb), NULL);
gtk_widget_show(cts.ctree);
/* A notebook widget sans tabs is used to flip between prefs */
notebook = prefs_nb = gtk_notebook_new();
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook), FALSE);
gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook), FALSE);
gtk_container_add(GTK_CONTAINER(top_hb), prefs_nb);
gtk_widget_show(prefs_nb);
/* Printing prefs */
frame = gtk_frame_new("Printing");
gtk_widget_show(GTK_WIDGET(frame));
@ -320,12 +320,12 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_object_set_data(GTK_OBJECT(prefs_w), E_PRINT_PAGE_KEY, print_pg);
gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
strcpy(label_str, "Printing");
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts.ctree), ct_node,
GINT_TO_POINTER(cts.page));
cts.page++;
/* Column prefs */
frame = gtk_frame_new("Columns");
gtk_widget_show(GTK_WIDGET(frame));
@ -334,12 +334,12 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_object_set_data(GTK_OBJECT(prefs_w), E_COLUMN_PAGE_KEY, column_pg);
gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
strcpy(label_str, "Columns");
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts.ctree), ct_node,
GINT_TO_POINTER(cts.page));
cts.page++;
/* TCP Streams prefs */
frame = gtk_frame_new("TCP Streams");
gtk_widget_show(GTK_WIDGET(frame));
@ -348,7 +348,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_object_set_data(GTK_OBJECT(prefs_w), E_STREAM_PAGE_KEY, stream_pg);
gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
strcpy(label_str, "TCP Streams");
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts.ctree), ct_node,
GINT_TO_POINTER(cts.page));
@ -362,7 +362,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_object_set_data(GTK_OBJECT(prefs_w), E_GUI_PAGE_KEY, gui_pg);
gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
strcpy(label_str, "User Interface");
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts.ctree), ct_node,
GINT_TO_POINTER(cts.page));
@ -381,7 +381,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_object_set_data(GTK_OBJECT(prefs_w), E_CAPTURE_PAGE_KEY, capture_pg);
gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
strcpy(label_str, "Capture");
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts.ctree), ct_node,
GINT_TO_POINTER(cts.page));
@ -399,7 +399,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_object_set_data(GTK_OBJECT(prefs_w), E_NAMERES_PAGE_KEY, nameres_pg);
gtk_notebook_append_page (GTK_NOTEBOOK(prefs_nb), frame, NULL);
strcpy(label_str, "Name resolution");
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
ct_node = gtk_ctree_insert_node(GTK_CTREE(cts.ctree), NULL, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL, TRUE, TRUE);
gtk_ctree_node_set_row_data(GTK_CTREE(cts.ctree), ct_node,
GINT_TO_POINTER(cts.page));
@ -423,7 +423,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
gtk_container_add(GTK_CONTAINER(main_vb), bbox);
gtk_widget_show(bbox);
ok_bt = gtk_button_new_with_label ("OK");
gtk_signal_connect(GTK_OBJECT(ok_bt), "clicked",
GTK_SIGNAL_FUNC(prefs_main_ok_cb), GTK_OBJECT(prefs_w));
@ -445,7 +445,7 @@ prefs_cb(GtkWidget *w _U_, gpointer dummy _U_)
GTK_WIDGET_SET_FLAGS(save_bt, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (bbox), save_bt, TRUE, TRUE, 0);
gtk_widget_show(save_bt);
cancel_bt = gtk_button_new_with_label ("Cancel");
gtk_signal_connect(GTK_OBJECT(cancel_bt), "clicked",
GTK_SIGNAL_FUNC(prefs_main_cancel_cb), GTK_OBJECT(prefs_w));
@ -1144,7 +1144,7 @@ module_search_properties(module_t *module, gpointer user_data)
}
void
properties_cb(GtkWidget *w, gpointer dummy)
properties_cb(GtkWidget *w, gpointer dummy)
{
gchar *title = NULL;
struct properties_data p;
@ -1160,9 +1160,9 @@ properties_cb(GtkWidget *w, gpointer dummy)
} else {
return;
}
if (!title) return;
if (prefs_w != NULL) {
reactivate_window(prefs_w);
} else {
@ -1177,13 +1177,13 @@ properties_cb(GtkWidget *w, gpointer dummy)
}
/* Prefs tree selection callback. The node data has been loaded with
/* Prefs tree selection callback. The node data has been loaded with
the proper notebook page to load. */
static void
prefs_tree_select_cb(GtkCTree *ct, GtkCTreeNode *node, gint col _U_, gpointer dummy _U_)
{
gint page = GPOINTER_TO_INT(gtk_ctree_node_get_row_data(ct, node));
if (page >= 0)
if (page >= 0)
gtk_notebook_set_page(GTK_NOTEBOOK(notebook), page);
}

View File

@ -1,22 +1,22 @@
/* prefs_dlg.h
* Definitions for preference handling routines
*
* $Id: prefs_dlg.h,v 1.8 2002/01/20 20:05:18 guy Exp $
* $Id: prefs_dlg.h,v 1.9 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* print_dlg.c
* Dialog boxes for printing
*
* $Id: print_dlg.c,v 1.34 2002/07/30 07:04:08 guy Exp $
* $Id: print_dlg.c,v 1.35 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -117,7 +117,7 @@ file_print_cmd_cb(GtkWidget *widget _U_, gpointer data _U_)
GSList *expand_grp;
GtkWidget *bbox, *ok_bt, *cancel_bt;
if (print_w != NULL) {
/* There's already a "Print" dialog box; reactivate it. */
reactivate_window(print_w);
@ -139,7 +139,7 @@ file_print_cmd_cb(GtkWidget *widget _U_, gpointer data _U_)
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
gtk_container_add(GTK_CONTAINER(print_w), main_vb);
gtk_widget_show(main_vb);
main_tb = gtk_table_new(4, 2, FALSE);
gtk_box_pack_start(GTK_BOX(main_vb), main_tb, FALSE, FALSE, 0);
@ -275,7 +275,7 @@ file_print_cmd_cb(GtkWidget *widget _U_, gpointer data _U_)
GTK_SIGNAL_FUNC(print_cmd_toggle_detail), NULL);
gtk_container_add(GTK_CONTAINER(print_type_vb), detail_rb);
gtk_widget_show(detail_rb);
/* "Print hex" check button. */
hex_cb = dlg_check_button_new_with_label_with_mnemonic("Print _hex data",
accel_group);
@ -475,7 +475,7 @@ print_file_cb(GtkWidget *file_bt, gpointer file_te)
static void
print_fs_ok_cb(GtkWidget *w _U_, gpointer data)
{
gtk_entry_set_text(GTK_ENTRY(gtk_object_get_data(GTK_OBJECT(data),
PRINT_FILE_TE_KEY)),
gtk_file_selection_get_filename (GTK_FILE_SELECTION(data)));
@ -519,7 +519,7 @@ void setup_mswin_print( print_args_t *print_args) {
print_args->dest = g_strdup(path1);
print_args->to_file = TRUE;
}
#endif
#endif
static void
print_ok_cb(GtkWidget *ok_bt, gpointer parent_w)
@ -542,7 +542,7 @@ print_ok_cb(GtkWidget *ok_bt, gpointer parent_w)
#ifdef _WIN32
win_printer_flag = TRUE;
setup_mswin_print(&print_args);
#else
#else
print_args.dest = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_object_get_data(GTK_OBJECT(ok_bt),
PRINT_CMD_TE_KEY))));
#endif

View File

@ -6,17 +6,17 @@
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2002, Jeffrey C. Foster <jfoste@woodward.com>
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -41,7 +41,7 @@ void init_doc_struct( DOCINFO* di, char* docname);
void print_file( char* file_name, HDC hdc);
void print_mswin(char *file_name)
{
@ -49,16 +49,16 @@ void print_mswin(char *file_name)
DOCINFO di;
HWND hWndParent = HWND_DESKTOP; /* would be better to be a real window */
/* Need a printer DC to print to. */
hDC = get_printer_dc();
/* Did you get a good DC?, Cancel will return NULL also, so what to do? */
if( !hDC)
{
return;
}
/* You always have to use an AbortProc(). */
if( SetAbortProc( hDC, abort_proc ) == SP_ERROR )
{
@ -66,43 +66,43 @@ void print_mswin(char *file_name)
"Error", MB_APPLMODAL | MB_OK);
return;
}
/* Init the DOCINFO and start the document. */
init_doc_struct( &di, "MyDoc");
StartDoc( hDC, &di );
/* Print one page. */
StartPage( hDC );
print_file(file_name, hDC );
EndPage( hDC );
/* Indicate end of document. */
EndDoc( hDC );
/* Clean up */
DeleteDC( hDC );
}
/*===============================*/
/* Obtain printer device context */
/* ==============================*/
HDC get_printer_dc(void)
{
PRINTDLG pdlg;
/* Initialize the PRINTDLG structure. */
memset( &pdlg, 0, sizeof( PRINTDLG ) );
pdlg.lStructSize = sizeof( PRINTDLG );
/* Set the flag to return printer DC. */
pdlg.Flags = PD_RETURNDC;
/* Invoke the printer dialog box. */
PrintDlg( &pdlg );
/* hDC member of the PRINTDLG structure contains the printer DC. */
return pdlg.hDC;
}
/*===============================*/
/* The Abort Procudure */
/* ==============================*/
@ -116,7 +116,7 @@ void print_mswin(char *file_name)
}
return TRUE;
}
/*===============================*/
/* Initialize DOCINFO structure */
/* ==============================*/
@ -128,7 +128,7 @@ void print_mswin(char *file_name)
di->cbSize = sizeof( DOCINFO );
di->lpszDocName = docname;
}
/*===============================*/
/* Drawing on the DC */
/* ==============================*/
@ -143,7 +143,7 @@ void print_file( char *file_name, HDC hdc) {
int results, cnt=0, y_pos = y_offset, y_cnt = 0;
char buf[ max_buf_size];
char ch;
TEXTMETRIC tm;
TEXTMETRIC tm;
GetTextMetrics(hdc, &tm);
SetMapMode (hdc, MM_TEXT);
@ -161,13 +161,13 @@ void print_file( char *file_name, HDC hdc) {
if ( ch == 0x0a){
buf[ cnt] = 0;
TextOut(hdc, x_offset,y_pos, buf, strlen(buf));
y_pos += tm.tmHeight;
y_pos += tm.tmHeight;
cnt = 0;
if ( ++y_cnt == max_lines){
/* Print one page. */
EndPage( hdc );
StartPage( hdc );
y_pos = y_offset;
y_pos = y_offset;
y_cnt = 0;
}
@ -175,18 +175,18 @@ void print_file( char *file_name, HDC hdc) {
}else { if ( cnt == ( max_buf_size - 1)) {
buf[ cnt] = 0;
TextOut(hdc, x_offset, y_pos, buf, strlen(buf));
y_pos += tm.tmHeight;
y_pos += tm.tmHeight;
cnt = 0;
if ( ++y_cnt == max_lines){
/* Print one page. */
EndPage( hdc );
StartPage( hdc );
y_pos = y_offset;
y_pos = y_offset;
y_cnt = 0;
}
}
buf[ cnt++] = ch;
}
}

View File

@ -6,22 +6,22 @@
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2002, Jeffrey C. Foster <jfoste@woodward.com>
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
void print_mswin(char *file_name);

View File

@ -1,22 +1,22 @@
/* print_prefs.c
* Dialog boxes for preferences for printing
*
* $Id: print_prefs.c,v 1.13 2002/08/13 07:54:37 guy Exp $
* $Id: print_prefs.c,v 1.14 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -171,7 +171,7 @@ printer_opts_file_cb(GtkWidget *file_bt, gpointer file_te) {
static void
printer_opts_fs_ok_cb(GtkWidget *w, gpointer data) {
gtk_entry_set_text(GTK_ENTRY(gtk_object_get_data(GTK_OBJECT(data),
PRINT_FILE_TE_KEY)),
gtk_file_selection_get_filename (GTK_FILE_SELECTION(data)));
@ -180,9 +180,9 @@ printer_opts_fs_ok_cb(GtkWidget *w, gpointer data) {
static void
printer_opts_fs_cancel_cb(GtkWidget *w _U_, gpointer data) {
gtk_widget_destroy(GTK_WIDGET(data));
}
}
static void
printer_opts_fs_destroy_cb(GtkWidget *win, gpointer data _U_)

View File

@ -1,23 +1,23 @@
/* print_prefs.h
* Definitions for print preferences window
*
* $Id: print_prefs.h,v 1.5 2000/08/21 08:09:15 guy Exp $
* $Id: print_prefs.h,v 1.6 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* progress_dlg.c
* Routines for progress-bar (modal) dialog
*
* $Id: progress_dlg.c,v 1.12 2002/08/28 10:07:37 guy Exp $
* $Id: progress_dlg.c,v 1.13 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -191,7 +191,7 @@ create_progress_dlg(const gchar *task_title, const gchar *item_title, const gcha
bbox = gtk_hbutton_box_new();
gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
gtk_container_add(GTK_CONTAINER(main_vb), bbox);
/*
* Allow user to either click a "stop this operation" button, or
* the close button on the window, to stop an operation in
@ -218,8 +218,8 @@ create_progress_dlg(const gchar *task_title, const gchar *item_title, const gcha
}
progdlg_t *
delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
const gchar *stop_title, gboolean *stop_flag,
delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
const gchar *stop_title, gboolean *stop_flag,
GTimeVal *start_time, gfloat progress)
{
GTimeVal time_now;
@ -267,7 +267,7 @@ delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
else
min_display = 2 * MIN_DISPLAY_DEFAULT - delta_time;
/* = MIN_DISPLAY_DEFAULT - (delta_time - MIN_DISPLAY_DEFAULT) */
/* Assuming the progress increases linearly, see if the progress
* dialog would be displayed for at least min_display microseconds if
* we created it now.
@ -294,7 +294,7 @@ static gint
delete_event_cb(GtkWidget *w _U_, GdkEvent *event _U_, gpointer data)
{
gboolean *stop_flag = (gboolean *) data;
*stop_flag = TRUE;
return TRUE;
}
@ -309,7 +309,7 @@ static void
stop_cb(GtkWidget *w _U_, gpointer data)
{
gboolean *stop_flag = (gboolean *) data;
*stop_flag = TRUE;
}
@ -349,7 +349,7 @@ update_progress_dlg(progdlg_t *dlg, gfloat percentage, gchar *status)
g_snprintf(tmp, sizeof(tmp), "%02lu:%02lu", ul_elapsed / 60, ul_elapsed % 60);
gtk_label_set_text(dlg->elapsed_lb, tmp);
/* show "Time Left" only,
/* show "Time Left" only,
* if at least 5% and 3 seconds running (to get a useful estimation) */
if (ul_percentage >= 5 && delta_time >= 3 * 1e6) {
ul_left = (delta_time / percentage - delta_time) / 1000 / 1000;

View File

@ -1,6 +1,6 @@
/* proto_dlg.c
*
* $Id: proto_dlg.c,v 1.12 2002/08/02 22:34:54 jmayer Exp $
* $Id: proto_dlg.c,v 1.13 2002/08/28 21:03:49 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@ -12,12 +12,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -69,9 +69,9 @@ typedef struct protocol_data {
void proto_cb(GtkWidget *w _U_, gpointer data _U_)
{
GtkWidget *main_vb, *bbox, *proto_nb, *apply_bt, *cancel_bt, *ok_bt,
GtkWidget *main_vb, *bbox, *proto_nb, *apply_bt, *cancel_bt, *ok_bt,
*label, *scrolled_w, *selection_vb, *button;
if (proto_w != NULL) {
reactivate_window(proto_w);
return;
@ -92,7 +92,7 @@ void proto_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_widget_show(main_vb);
/* Protocol topics container */
proto_nb = gtk_notebook_new();
gtk_container_add(GTK_CONTAINER(main_vb), proto_nb);
/* XXX do not know why I need this to fill all space around buttons */
@ -102,12 +102,12 @@ void proto_cb(GtkWidget *w _U_, gpointer data _U_)
/* Protocol selection panel ("enable/disable" protocols) */
selection_vb = gtk_vbox_new(FALSE, 0);
gtk_container_border_width(GTK_CONTAINER(selection_vb), 1);
gtk_container_border_width(GTK_CONTAINER(selection_vb), 1);
label = gtk_label_new("Button pressed: protocol decoding is enabled");
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(selection_vb), label, FALSE, FALSE, 0);
scrolled_w = scrolled_window_new(NULL, NULL);
gtk_container_set_border_width(GTK_CONTAINER(scrolled_w), 1);
scrolled_w = scrolled_window_new(NULL, NULL);
gtk_container_set_border_width(GTK_CONTAINER(scrolled_w), 1);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_w),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_ALWAYS);
@ -155,7 +155,7 @@ void proto_cb(GtkWidget *w _U_, gpointer data _U_)
gtk_widget_show(proto_nb);
/* Ok, Apply, Cancel Buttons */
/* Ok, Apply, Cancel Buttons */
bbox = gtk_hbutton_box_new();
gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
@ -250,14 +250,14 @@ static void proto_destroy_cb(GtkWidget *w _U_, gpointer data _U_)
if (proto_w)
gtk_widget_destroy(proto_w);
proto_w = NULL;
/* remove protocol list */
if (protocol_list) {
for (entry = protocol_list; entry != NULL; entry = g_slist_next(entry)) {
g_free(entry->data);
}
g_slist_free(protocol_list);
protocol_list = NULL;
protocol_list = NULL;
}
}
@ -271,7 +271,7 @@ static gboolean proto_delete_cb(GtkWidget *proto_w, gpointer dummy _U_)
return FALSE;
}
static void proto_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w)
static void proto_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w)
{
gboolean redissect;
@ -281,13 +281,13 @@ static void proto_ok_cb(GtkWidget *ok_bt _U_, gpointer parent_w)
redissect_packets(&cfile);
}
static void proto_apply_cb(GtkWidget *apply_bt _U_, gpointer parent_w)
static void proto_apply_cb(GtkWidget *apply_bt _U_, gpointer parent_w)
{
if (set_proto_selection(GTK_WIDGET(parent_w)))
redissect_packets(&cfile);
}
static void proto_cancel_cb(GtkWidget *cancel_bt _U_, gpointer parent_w)
static void proto_cancel_cb(GtkWidget *cancel_bt _U_, gpointer parent_w)
{
gboolean redissect;
@ -311,7 +311,7 @@ static gboolean set_proto_selection(GtkWidget *parent_w)
if (proto_is_protocol_enabled(p->hfinfo_index) != GTK_TOGGLE_BUTTON (button)->active) {
proto_set_decoding(p->hfinfo_index, GTK_TOGGLE_BUTTON (button)->active);
need_redissect = TRUE;
}
}
}
return need_redissect;
@ -332,7 +332,7 @@ static gboolean revert_proto_selection(void)
if (proto_is_protocol_enabled(p->hfinfo_index) != p->was_enabled) {
proto_set_decoding(p->hfinfo_index, p->was_enabled);
need_redissect = TRUE;
}
}
}
return need_redissect;
@ -341,7 +341,7 @@ static gboolean revert_proto_selection(void)
gint protocol_data_compare(gconstpointer a, gconstpointer b)
{
return strcmp(((protocol_data_t *)a)->abbrev,
return strcmp(((protocol_data_t *)a)->abbrev,
((protocol_data_t *)b)->abbrev);
}
@ -367,8 +367,8 @@ static void show_proto_selection(GtkWidget *main, GtkWidget *container)
p->abbrev = proto_get_protocol_filter_name(i);
p->hfinfo_index = i;
p->was_enabled = proto_is_protocol_enabled(i);
protocol_list = g_slist_insert_sorted(protocol_list,
p, protocol_data_compare);
protocol_list = g_slist_insert_sorted(protocol_list,
p, protocol_data_compare);
nb_proto ++;
}
}

View File

@ -1,6 +1,6 @@
/* proto_dlg.h
*
* $Id: proto_dlg.h,v 1.1 2000/08/13 14:03:49 deniel Exp $
* $Id: proto_dlg.h,v 1.2 2002/08/28 21:03:49 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
@ -12,12 +12,12 @@
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,7 +1,7 @@
/* proto_draw.c
* Routines for GTK+ packet display
*
* $Id: proto_draw.c,v 1.56 2002/08/02 22:34:54 jmayer Exp $
* $Id: proto_draw.c,v 1.57 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -9,17 +9,17 @@
*
* Jeff Foster, 2001/03/12, added support for displaying named
* data sources as tabbed hex windows
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -134,7 +134,7 @@ redraw_hex_dump(GtkWidget *nb, frame_data *fd, field_info *finfo)
GtkWidget *bv;
const guint8 *data;
guint len;
bv = get_notebook_bv_ptr(nb);
if (bv != NULL) {
data = get_byte_view_data_and_length(bv, &len);
@ -149,7 +149,7 @@ redraw_hex_dump_all(void)
{
if (cfile.current_frame != NULL)
redraw_hex_dump( byte_nb_ptr, cfile.current_frame, finfo_selected);
redraw_hex_dump_packet_wins();
}
@ -413,7 +413,7 @@ byte_view_button_press_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
if(widget == NULL || event == NULL || data == NULL) {
return FALSE;
}
if(event->type == GDK_BUTTON_PRESS) {
event_button = (GdkEventButton *) event;
@ -566,7 +566,7 @@ packet_hex_print_common(GtkText *bv, const guint8 *pd, int len, int bstart,
/* Clear out the text */
gtk_text_set_point(bv, 0);
/* Keep GTK+ 1.2.3 through 1.2.6 from dumping core - see
/* Keep GTK+ 1.2.3 through 1.2.6 from dumping core - see
http://www.ethereal.com/lists/ethereal-dev/199912/msg00312.html and
http://www.gnome.org/mailing-lists/archives/gtk-devel-list/1999-October/0051.shtml
for more information */
@ -605,7 +605,7 @@ packet_hex_print_common(GtkText *bv, const guint8 *pd, int len, int bstart,
line[cur++] = ' ';
line[cur++] = ' ';
line[cur] = '\0';
/* Display with inverse video ? */
if (prefs.gui_hex_dump_highlight_style) {
gtk_text_insert(bv, m_r_font, &BLACK, &WHITE, line, -1);
@ -902,7 +902,7 @@ set_ptree_style_cb(gpointer data, gpointer user_data)
{
gtk_widget_set_style((GtkWidget *)data, (GtkStyle *)user_data);
}
void
set_ptree_font_all(GdkFont *font)
{
@ -933,7 +933,7 @@ create_tree_view(gint tv_size, e_prefs *prefs, GtkWidget *pane,
gtk_paned_pack1(GTK_PANED(pane), tv_scrollw, TRUE, TRUE);
gtk_widget_set_usize(tv_scrollw, -1, tv_size);
gtk_widget_show(tv_scrollw);
tree_view = ctree_new(1, 0);
gtk_signal_connect( GTK_OBJECT(tree_view), "key-press-event",
(GtkSignalFunc) toggle_tree, NULL );
@ -1037,7 +1037,7 @@ proto_tree_draw_node(GNode *node, gpointer data)
is_leaf = TRUE;
is_expanded = FALSE;
}
info.ctree = parent_info->ctree;
parent = gtk_ctree_insert_node ( info.ctree, parent_info->ctree_node, NULL,
&label_ptr, 5, NULL, NULL, NULL, NULL,

View File

@ -1,22 +1,22 @@
/* proto_draw.h
* Definitions for GTK+ packet display structures and routines
*
* $Id: proto_draw.h,v 1.18 2002/06/04 07:03:57 guy Exp $
* $Id: proto_draw.h,v 1.19 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,6 +1,6 @@
/* proto_hier_stats_dlg.c
*
* $Id: proto_hier_stats_dlg.c,v 1.9 2002/03/05 11:56:00 guy Exp $
* $Id: proto_hier_stats_dlg.c,v 1.10 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -146,7 +146,7 @@ create_tree(GtkWidget *container, ph_stats_t *ps)
for (i = 0; i < NUM_STAT_COLUMNS; i++) {
gtk_clist_set_column_auto_resize(GTK_CLIST(tree), i, TRUE);
}
/* Right justify numeric columns */
for (i = 1; i <= 5; i++) {

View File

@ -1,23 +1,23 @@
/* simple_dialog.c
* Simple message dialog box routines.
*
* $Id: simple_dialog.c,v 1.10 2002/06/04 11:24:35 guy Exp $
* $Id: simple_dialog.c,v 1.11 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -51,17 +51,17 @@ static const gchar bm_key[] = "button mask";
/* Simple dialog function - Displays a dialog box with the supplied message
* text.
*
*
* Args:
* type : One of ESD_TYPE_*.
* btn_mask : The address of a gint. The value passed in determines if
* the 'Cancel' button is displayed. The button pressed by the
* the 'Cancel' button is displayed. The button pressed by the
* user is passed back.
* msg_format : Sprintf-style format of the text displayed in the dialog.
* ... : Argument list for msg_format
*
*/
#define ESD_MAX_MSG_LEN 2048
void
simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
@ -109,7 +109,7 @@ simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
top_hb = gtk_hbox_new(FALSE, 10);
gtk_container_add(GTK_CONTAINER(main_vb), top_hb);
gtk_widget_show(top_hb);
style = gtk_widget_get_style(win);
cmap = gdk_colormap_get_system();
pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL, cmap, &mask,
@ -128,7 +128,7 @@ simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
gtk_label_set_justify(GTK_LABEL(msg_label), GTK_JUSTIFY_FILL);
gtk_container_add(GTK_CONTAINER(top_hb), msg_label);
gtk_widget_show(msg_label);
/* Button row */
bbox = gtk_hbutton_box_new();
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);
@ -137,7 +137,7 @@ simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
ok_btn = gtk_button_new_with_label ("OK");
gtk_signal_connect_object(GTK_OBJECT(ok_btn), "clicked",
GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT (win));
GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT (win));
gtk_container_add(GTK_CONTAINER(bbox), ok_btn);
GTK_WIDGET_SET_FLAGS(ok_btn, GTK_CAN_DEFAULT);
gtk_widget_grab_default(ok_btn);
@ -171,7 +171,7 @@ simple_dialog(gint type, gint *btn_mask, gchar *msg_format, ...) {
static void
simple_dialog_cancel_cb(GtkWidget *w _U_, gpointer win) {
gint *btn_mask = (gint *) gtk_object_get_data(win, bm_key);
if (btn_mask)
*btn_mask = ESD_BTN_CANCEL;
gtk_widget_destroy(GTK_WIDGET(win));

View File

@ -1,22 +1,22 @@
/* stream_prefs.c
* Dialog boxes for preferences for the stream window
*
* $Id: stream_prefs.c,v 1.11 2002/03/05 11:56:00 guy Exp $
* $Id: stream_prefs.c,v 1.12 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -70,14 +70,14 @@ stream_prefs_show()
color_t_to_gdkcolor(&tcolors[CBG_IDX], &prefs.st_client_bg);
color_t_to_gdkcolor(&tcolors[SFG_IDX], &prefs.st_server_fg);
color_t_to_gdkcolor(&tcolors[SBG_IDX], &prefs.st_server_bg);
curcolor = &tcolors[CFG_IDX];
scolor[CS_RED] = (gdouble) (curcolor->red) / 65535.0;
scolor[CS_GREEN] = (gdouble) (curcolor->green) / 65535.0;
scolor[CS_BLUE] = (gdouble) (curcolor->blue) / 65535.0;
scolor[CS_OPACITY] = 1.0;
/* Enclosing containers for each row of widgets */
main_vb = gtk_vbox_new(FALSE, 5);
gtk_container_border_width(GTK_CONTAINER(main_vb), 5);
@ -100,7 +100,7 @@ stream_prefs_show()
menu = gtk_menu_new ();
for (i = 0; i < mcount; i++){
menuitem = gtk_menu_item_new_with_label (mt[i]);
gtk_object_set_data(GTK_OBJECT(menuitem), STREAM_CS_KEY,
gtk_object_set_data(GTK_OBJECT(menuitem), STREAM_CS_KEY,
(gpointer) colorsel);
gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
GTK_SIGNAL_FUNC(update_current_color), &tcolors[i]);
@ -129,7 +129,7 @@ stream_prefs_show()
gtk_object_set_data(GTK_OBJECT(colorsel), STREAM_SAMPLE_KEY,
(gpointer) sample);
gtk_signal_connect(GTK_OBJECT(colorsel), "color-changed",
gtk_signal_connect(GTK_OBJECT(colorsel), "color-changed",
GTK_SIGNAL_FUNC(update_text_color), NULL);
gtk_widget_show(colorsel);
@ -143,11 +143,11 @@ update_text_color(GtkWidget *w, gpointer data _U_) {
gdouble scolor[4];
gtk_color_selection_get_color(GTK_COLOR_SELECTION(w), &scolor[CS_RED]);
curcolor->red = (gushort) (scolor[CS_RED] * 65535.0);
curcolor->green = (gushort) (scolor[CS_GREEN] * 65535.0);
curcolor->blue = (gushort) (scolor[CS_BLUE] * 65535.0);
gtk_text_freeze(sample);
gtk_text_set_point(sample, 0);
gtk_text_forward_delete(sample, gtk_text_get_length(sample));
@ -166,12 +166,12 @@ update_current_color(GtkWidget *w, gpointer data)
gdouble scolor[4];
curcolor = (GdkColor *) data;
scolor[CS_RED] = (gdouble) (curcolor->red) / 65535.0;
scolor[CS_GREEN] = (gdouble) (curcolor->green) / 65535.0;
scolor[CS_BLUE] = (gdouble) (curcolor->blue) / 65535.0;
scolor[CS_OPACITY] = 1.0;
gtk_color_selection_set_color(colorsel, &scolor[CS_RED]);
}

View File

@ -1,23 +1,23 @@
/* stream_prefs.h
* Definitions for stream preferences window
*
* $Id: stream_prefs.h,v 1.3 2000/08/21 08:09:17 guy Exp $
* $Id: stream_prefs.h,v 1.4 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1999 Gerald Combs
*
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,7 +1,7 @@
/* summary_dlg.c
* Routines for capture file summary window
*
* $Id: summary_dlg.c,v 1.12 2002/03/05 11:56:00 guy Exp $
* $Id: summary_dlg.c,v 1.13 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -62,7 +62,7 @@ summary_open_cb(GtkWidget *w _U_, gpointer d _U_)
{
summary_tally summary;
GtkWidget *sum_open_w,
*main_vb, *file_fr, *data_fr, *capture_fr, *file_box,
*main_vb, *file_fr, *data_fr, *capture_fr, *file_box,
*data_box, *capture_box, *bbox, *close_bt;
gchar string_buff[SUM_STR_MAX];

View File

@ -3,22 +3,22 @@
* By Pavel Mores <pvl@uh.cz>
* Win32 port: rwh@unifiedtech.com
*
* $Id: tcp_graph.c,v 1.19 2002/08/02 22:34:54 jmayer Exp $
* $Id: tcp_graph.c,v 1.20 2002/08/28 21:03:49 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -773,7 +773,7 @@ static void create_drawing_area (struct graph *g)
* and we don't have the GC's at all. so we just postpone installation
* of configure handler until we're ready to deal with it.
*
* !!! NEMÌLO BY TO BÝT NA KONCI graph_init_sequence()? !!!
* !!! NEMÌLO BY TO BÝT NA KONCI graph_init_sequence()? !!!
*
*/
gtk_signal_connect (GTK_OBJECT(g->drawing_area),"configure_event",
@ -978,7 +978,7 @@ static void callback_create_help (GtkWidget *widget _U_, gpointer data)
gtk_box_pack_start (GTK_BOX (box), close, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (close), "clicked",
(GtkSignalFunc )callback_close_help, toplevel);
gtk_widget_show_all (toplevel);
}
@ -1166,9 +1166,9 @@ static void callback_zoom_flags (GtkWidget *toggle, gpointer data)
int flag = (int )gtk_object_get_data (GTK_OBJECT (toggle), "flag");
if (GTK_TOGGLE_BUTTON (toggle)->active)
g->zoom.flags |= flag;
g->zoom.flags |= flag;
else
g->zoom.flags &= ~flag;
g->zoom.flags &= ~flag;
}
static void update_zoom_spins (struct graph *g)
@ -1381,9 +1381,9 @@ static void callback_mag_flags (GtkWidget *toggle, gpointer data)
int flag = (int )gtk_object_get_data (GTK_OBJECT (toggle), "flag");
if (GTK_TOGGLE_BUTTON (toggle)->active)
g->magnify.flags |= flag;
g->magnify.flags |= flag;
else
g->magnify.flags &= ~flag;
g->magnify.flags &= ~flag;
}
static GtkWidget *control_panel_create_zoomlock_group (struct graph *g)
@ -1419,9 +1419,9 @@ static void callback_zoomlock_h (GtkWidget *toggle, gpointer data)
struct graph *g = (struct graph * )data;
if (GTK_TOGGLE_BUTTON (toggle)->active)
g->zoom.flags |= ZOOM_HLOCK;
g->zoom.flags |= ZOOM_HLOCK;
else
g->zoom.flags &= ~ZOOM_HLOCK;
g->zoom.flags &= ~ZOOM_HLOCK;
}
static void callback_zoomlock_v (GtkWidget *toggle, gpointer data)
@ -1429,9 +1429,9 @@ static void callback_zoomlock_v (GtkWidget *toggle, gpointer data)
struct graph *g = (struct graph * )data;
if (GTK_TOGGLE_BUTTON (toggle)->active)
g->zoom.flags |= ZOOM_VLOCK;
g->zoom.flags |= ZOOM_VLOCK;
else
g->zoom.flags &= ~ZOOM_VLOCK;
g->zoom.flags &= ~ZOOM_VLOCK;
}
static GtkWidget *control_panel_create_cross_group (struct graph *g)
@ -1523,9 +1523,9 @@ static GtkWidget *control_panel_create_graph_type_group (struct graph *g)
(gpointer )0);
gtk_object_set_data (GTK_OBJECT (graph_tseqttrace), "new-graph-type",
(gpointer )1);
gtk_object_set_data (GTK_OBJECT (graph_tput), "new-graph-type",
gtk_object_set_data (GTK_OBJECT (graph_tput), "new-graph-type",
(gpointer )2);
gtk_object_set_data (GTK_OBJECT (graph_rtt), "new-graph-type",
gtk_object_set_data (GTK_OBJECT (graph_rtt), "new-graph-type",
(gpointer )3);
gtk_signal_connect (GTK_OBJECT (graph_tseqttrace), "toggled",
@ -2207,7 +2207,7 @@ static void h_axis_pixmap_draw (struct axis *axis)
gdk_draw_rectangle (axis->pixmap[not_disp], g->bg_gc, TRUE, 0, 0,
axis->p.width, axis->p.height);
/* axis */
gdk_draw_line (axis->pixmap[not_disp], g->fg_gc, 0, 0,
gdk_draw_line (axis->pixmap[not_disp], g->fg_gc, 0, 0,
axis->s.width + (axis->p.width-axis->s.width)/2.0, 0);
offset = g->wp.x - g->geom.x;
@ -2341,10 +2341,10 @@ static void axis_compute_ticks (struct axis *axis, double x0, double xmax, int d
axis->minor = steps[jj] * pow (10, ii);
check_needed = TRUE;
diminished = TRUE;
debug(DBS_AXES_TICKS) printf ("axis->minor diminished to %.1f\n",
axis->minor);
if (axis->minor*zoom < 10) {
debug(DBS_AXES_TICKS) printf ("refusing axis->minor of %f: "
"axis->minor*zoom == %f\n", axis->minor, axis->minor*zoom);
@ -2892,7 +2892,7 @@ static gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
y = event->y;
state = event->state;
}
/* Testing just (state & GDK_BUTTON1_MASK) is not enough since when button1
* is pressed while pointer is in motion, we will receive one more motion
* notify *before* we get the button press. This last motion notify works
@ -2929,7 +2929,7 @@ static gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event)
if (g->cross.draw)
cross_draw (g, x, y);
}
return TRUE;
}
@ -3583,7 +3583,7 @@ static void rtt_initialize (struct graph *g)
for (tmp=g->segments; tmp; tmp=tmp->next) {
if (compare_headers (g->current, tmp, COMPARE_CURR_DIR)) {
unsigned int seqno = g_ntohl (tmp->tcphdr.seq);
if (!first)
first= tmp;

View File

@ -3,22 +3,22 @@
* By Pavel Mores <pvl@uh.cz>
* Win32 port: rwh@unifiedtech.com
*
* $Id: tcp_graph.h,v 1.1 2001/12/08 09:27:51 guy Exp $
* $Id: tcp_graph.h,v 1.2 2002/08/28 21:03:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -1,22 +1,22 @@
/* ui_util.c
* UI utility routines
*
* $Id: ui_util.c,v 1.9 2002/03/05 11:56:00 guy Exp $
* $Id: ui_util.c,v 1.10 2002/08/28 21:03:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@ -75,8 +75,8 @@ reactivate_window(GtkWidget *win)
/* Set our window icon. The GDK documentation doesn't provide any
actual documentation for gdk_window_set_icon(), so we'll steal
libgimp/gimpdialog.c:gimp_dialog_realize_callback() from the Gimp
sources and assume it's safe.
sources and assume it's safe.
XXX - The current icon size is fixed at 16x16 pixels, which looks fine
with kwm (KDE 1.x's window manager), Sawfish (the "default" window
manager for GNOME?), and under Windows with Exceed putting X windows
@ -116,7 +116,7 @@ reactivate_window(GtkWidget *win)
part of the installation of Ethereal.
*/
void
window_icon_realize_cb (GtkWidget *win, gpointer data _U_)
window_icon_realize_cb (GtkWidget *win, gpointer data _U_)
{
#ifndef WIN32
static GdkPixmap *icon_pmap = NULL;

View File

@ -1,22 +1,22 @@
/* ui_util.h
* Definitions for UI utility routines
*
* $Id: ui_util.h,v 1.4 2002/01/11 07:40:32 guy Exp $
* $Id: ui_util.h,v 1.5 2002/08/28 21:03:50 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* 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.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

View File

@ -2,7 +2,7 @@
* 4.4-Lite-2 Internet checksum routine, modified to take a vector of
* pointers/lengths giving the pieces to be checksummed.
*
* $Id: in_cksum.c,v 1.8 2002/08/03 20:01:13 guy Exp $
* $Id: in_cksum.c,v 1.9 2002/08/28 21:00:06 jmayer Exp $
*/
/*
@ -81,7 +81,7 @@ in_cksum(const vec_t *vec, int veclen)
* of a word spanning between this chunk and the
* last chunk.
*
* s_util.c[0] is already saved when scanning previous
* s_util.c[0] is already saved when scanning previous
* chunk.
*/
s_util.c[1] = *(const guint8 *)w;

Some files were not shown because too many files have changed in this diff Show More