/* resolv.c
* Routines for network object lookup
*
- * $Id: resolv.c,v 1.39 2003/12/09 05:06:22 guy Exp $
+ * $Id: resolv.c,v 1.40 2004/01/05 18:10:02 ulfl Exp $
*
* Laurent Deniel <laurent.deniel@free.fr>
*
return FALSE; /* failed */
if (num > 0xFF)
return FALSE; /* not a valid octet */
- eth->addr[i] = num;
+ eth->addr[i] = (guint8) num;
cp = p; /* skip past the number */
/* OK, what character terminated the octet? */
/* capture_info_dlg.c
* Routines for packet capture info dialog
*
- * $Id: capture_info_dlg.c,v 1.8 2003/12/21 12:17:59 ulfl Exp $
+ * $Id: capture_info_dlg.c,v 1.9 2004/01/05 18:11:27 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
/* don't try to update the "total" row progress bar */
if (i != 0) {
gtk_progress_bar_update(GTK_PROGRESS_BAR(info->counts[i].percent_pb),
- pct(*info->counts[i].value_ptr, *info->counts[0].value_ptr) / 100.0);
+ (gfloat) (pct(*info->counts[i].value_ptr, *info->counts[0].value_ptr) / 100.0));
}
g_snprintf(label_str, sizeof(label_str), "%.1f%%",
/* io_stat.c
* io_stat 2002 Ronnie Sahlberg
*
- * $Id: io_stat.c,v 1.53 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: io_stat.c,v 1.54 2004/01/05 18:11:27 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
}
/* update num_items */
- if(idx>git->io->num_items){
+ if((guint32)idx > git->io->num_items){
git->io->num_items=idx;
git->io->max_interval=idx*git->io->interval;
}
}
i--;
t-=pt;
- if(t>(git->io->interval*1000)){
+ if(t > (guint32) (git->io->interval*1000)){
pt=git->io->interval*1000;
} else {
pt=t;
if(!io->graphs[i].display){
continue;
}
- for(idx=0;idx<num_time_intervals;idx++){
+ for(idx=0;(guint32) (idx) < num_time_intervals;idx++){
guint32 val;
val=get_it_value(io, i, idx);
/* progress_dlg.c
* Routines for progress-bar (modal) dialog
*
- * $Id: progress_dlg.c,v 1.19 2004/01/02 13:27:00 ulfl Exp $
+ * $Id: progress_dlg.c,v 1.20 2004/01/05 18:11:28 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
const GTimeVal *start_time, gfloat progress)
{
GTimeVal time_now;
- gfloat delta_time;
- gfloat min_display;
+ gdouble delta_time;
+ gdouble min_display;
progdlg_t *dlg;
#define INIT_DELAY 0.1 * 1e6
GtkWidget *dlg_w = dlg->dlg_w;
GtkWidget *prog_bar;
GTimeVal time_now;
- gfloat delta_time;
+ gdouble delta_time;
gulong ul_left;
gulong ul_elapsed;
gulong ul_percentage;
* By Pavel Mores <pvl@uh.cz>
* Win32 port: rwh@unifiedtech.com
*
- * $Id: tcp_graph.c,v 1.40 2003/12/23 00:16:46 ulfl Exp $
+ * $Id: tcp_graph.c,v 1.41 2004/01/05 18:11:28 ulfl Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
*zoom_this = value;
if (g->zoom.flags & ZOOM_STEPS_SAME) {
*zoom_other = value;
- gtk_spin_button_set_value (widget_other, *zoom_other);
+ gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
} else if (g->zoom.flags & ZOOM_STEPS_KEEP_RATIO) {
double old_other = *zoom_other;
*zoom_other *= value / old_this;
if (*zoom_other < 1.0) {
*zoom_other = 1.0;
*zoom_this = old_this * 1.0 / old_other;
- gtk_spin_button_set_value (widget_this, *zoom_this);
+ gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
} else if (*zoom_other > 5.0) {
*zoom_other = 5.0;
*zoom_this = old_this * 5.0 / old_other;
- gtk_spin_button_set_value (widget_this, *zoom_this);
+ gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
}
- gtk_spin_button_set_value (widget_other, *zoom_other);
+ gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
}
}
if (g->magnify.flags & MAGZOOMS_SAME) {
*zoom_other = value;
/* g->magnify.flags |= MAGZOOMS_IGNORE; */
- gtk_spin_button_set_value (widget_other, *zoom_other);
+ gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
} else if (g->magnify.flags & MAGZOOMS_SAME_RATIO) {
double old_other = *zoom_other;
*zoom_other *= value / old_this;
*zoom_other = 1.0;
*zoom_this = old_this * 1.0 / old_other;
/* g->magnify.flags |= MAGZOOMS_IGNORE; */
- gtk_spin_button_set_value (widget_this, *zoom_this);
+ gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
} else if (*zoom_other > 25.0) {
*zoom_other = 25.0;
*zoom_this = old_this * 25.0 / old_other;
/* g->magnify.flags |= MAGZOOMS_IGNORE; */
- gtk_spin_button_set_value (widget_this, *zoom_this);
+ gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
}
/* g->magnify.flags |= MAGZOOMS_IGNORE; */
- gtk_spin_button_set_value (widget_other, *zoom_other);
+ gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
}
}