--- ./po/ja.po Thu Jun 28 13:03:43 2001 +++ ../xtraceroute-0.9.0/./po/ja.po Wed Nov 14 14:37:40 2001 @@ -1244,7 +1244,7 @@ #, c-format msgid "" "%s%s\n" -"By Björn Augustsson (d3august@dtek.chalmers.se)\n" +"By Bjorn Augustsson (d3august@dtek.chalmers.se)\n" "Official homepage: http://www.dtek.chalmers.se/~d3august/xt\n" msgstr "" "%s%s\n" --- ./xt.h Wed Jun 27 18:17:47 2001 +++ ../xtraceroute-0.9.0/./xt.h Wed Nov 14 14:46:23 2001 @@ -88,7 +88,7 @@ #define W 450 /* Default window size */ #define H 640 /* Ought to be enough for everyone. */ -char currentloc[100]; +extern char currentloc[100]; typedef struct { @@ -104,7 +104,7 @@ double lat; double lon; char suffix[4]; - char name[70]; + char *name; } countrycode; typedef struct @@ -132,7 +132,7 @@ char extpipe_data[200]; /** Data from the pipe */ } site; -site sites[MAX_SITES]; +extern site sites[MAX_SITES]; typedef struct { @@ -168,14 +168,14 @@ #define SYNCH_RESOLV 0x4000 -database *ndg_hosts; -database *ndg_nets; -database *local_site_hosts; -database *local_site_nets; -database *local_user_hosts; -database *local_user_nets; -database *local_user_generic; -database *internal; +extern database *ndg_hosts; +extern database *ndg_nets; +extern database *local_site_hosts; +extern database *local_site_nets; +extern database *local_user_hosts; +extern database *local_user_nets; +extern database *local_user_generic; +extern database *internal; /* Eduoard @@ -192,7 +192,7 @@ database* DBs[3][3]; */ -GtkWidget *glarea; +extern GtkWidget *glarea; texture *readTexture(char *); database *readNetDB(char *); --- ./db_host_gui.c Fri May 4 20:34:11 2001 +++ ../xtraceroute-0.9.0/./db_host_gui.c Wed Nov 14 13:49:40 2001 @@ -49,7 +49,7 @@ if(text_has_changed) { - // tell_user(_("Info has changed!\n Updating the database is not yet supported!")); + /* tell_user(_("Info has changed!\n Updating the database is not yet supported!")); */ text_has_changed = FALSE; --- ./main.c Thu Jun 28 12:29:25 2001 +++ ../xtraceroute-0.9.0/./main.c Wed Nov 14 14:43:31 2001 @@ -27,12 +27,25 @@ #include #include #include -#include // for sigaction -#include // for waitpid -#include // for close -#include // for atoi +#include /* for sigaction */ +#include /* for waitpid */ +#include /* for close */ +#include /* for atoi */ #include "trackball.h" +/* Global variables declared in */ +char currentloc[100]; +site sites[MAX_SITES]; +database *ndg_hosts; +database *ndg_nets; +database *local_site_hosts; +database *local_site_nets; +database *local_user_hosts; +database *local_user_nets; +database *local_user_generic; +database *internal; +GtkWidget *glarea; + GtkWidget *clist; /* The list of sites below the globe */ texture *earth_texture; @@ -68,12 +81,12 @@ if(sites[i].extpipe_pid != 0) { kill(sites[i].extpipe_pid, SIGTERM); - //printf("Killed %ld\n", sites[i].extpipe_pid); + /* printf("Killed %ld\n", sites[i].extpipe_pid); */ } } } - // spinner_reset(); + /* spinner_reset(); */ } /** @@ -135,7 +148,7 @@ if (!gtk_gl_area_make_current(GTK_GL_AREA(glarea))) printf("make_current failed early in which_site()\n"); - //printf("which_site?\n"); + /* printf("which_site?\n"); */ glSelectBuffer(MAXSELECT, selectBuf); glRenderMode(GL_SELECT); glInitNames(); @@ -145,7 +158,7 @@ glLoadIdentity(); gluPickMatrix(x, glarea->allocation.height - y, 1, 1, vp); - // Note: This code is common to some in reshape. Maybe look into that. + /* Note: This code is common to some in reshape. Maybe look into that. */ aspect = (float)glarea->allocation.width / (float)glarea->allocation.height; if(glarea->allocation.width > glarea->allocation.height) @@ -247,7 +260,7 @@ } -// have these un-globalized or put in a separate file later +/* have these un-globalized or put in a separate file later */ gint rotation_track_tag = 0; gint translation_track_tag = 0; gint zoom_track_tag = 0; @@ -271,13 +284,13 @@ w = glarea->allocation.width; h = glarea->allocation.height; - // Begin zoom stuff, sort this out later. - // if (zoom_track_tag && (zbegin > -1) ) + /* Begin zoom stuff, sort this out later. */ + /* if (zoom_track_tag && (zbegin > -1) ) */ if (zoom_track_tag && (y != zbegin) ) { double fakt; fakt = (1.0 - (2*(y-zbegin) / (double)h)); - // printf("fact: %f, zoom: %f\n", fakt, zoom); + /* printf("fact: %f, zoom: %f\n", fakt, zoom); */ zoom*=fakt; if (zoom > Z_OF_EYE - EARTH_SIZE) @@ -359,7 +372,7 @@ switch(ev->button) { case 1: /* Left button, rotation or selection */ - // printf("Mouse 1 down!\n"); + /* printf("Mouse 1 down!\n"); */ /* In case the user is trying to select a site */ site = which_site(x, y); @@ -374,7 +387,7 @@ } /* He wasn't, he's trying to rotate the earth. */ -//printf("no site!\n"); + /* printf("no site!\n"); */ xbegin = x; ybegin = y; @@ -384,7 +397,7 @@ break; case 2: /* Middle button, translation */ - // printf("Mouse 2 down!\n"); + /* printf("Mouse 2 down!\n"); */ xbeginstrafe = x; ybeginstrafe = y; @@ -393,7 +406,7 @@ break; case 3: /* Right button, zoom */ - // printf("Mouse 3 down!\n"); + /* printf("Mouse 3 down!\n"); */ zbegin = y; if(zoom_track_tag == 0) /* To prevent duplicate callbacks. */ @@ -415,7 +428,7 @@ { gtk_idle_remove(rotation_track_tag); rotation_track_tag = 0; - // printf("Mouse 1 up!\n"); + /* printf("Mouse 1 up!\n"); */ } if(ev->button == 2 && translation_track_tag != 0) @@ -422,7 +435,7 @@ { gtk_idle_remove(translation_track_tag); translation_track_tag = 0; - // printf("Mouse 2 up!\n"); + /* printf("Mouse 2 up!\n"); */ } if(ev->button == 3 && zoom_track_tag != 0) @@ -429,7 +442,7 @@ { gtk_idle_remove(zoom_track_tag); zoom_track_tag = 0; - // printf("Mouse 3 up!\n"); + /* printf("Mouse 3 up!\n"); */ } return TRUE; @@ -479,7 +492,7 @@ static void exit_program(GtkWidget *wi, gpointer *data) { - extern traceroute_state_t traceroute_state; // From extprog.c + extern traceroute_state_t traceroute_state; /* From extprog.c */ if(traceroute_state.fd[0] != -1) { @@ -691,7 +704,7 @@ int i; extern traceroute_state_t traceroute_state; - // dprintf("pid: %ld died\n", (long)pid); + /* dprintf("pid: %ld died\n", (long)pid); */ if(traceroute_state.pid == pid) { @@ -698,7 +711,7 @@ traceroute_state.pid = 0; spinner_unref("traceroute"); } - else // It was a host process that died. + else /* It was a host process that died. */ { for(i=0 ; in_entries); } - // writeNetDB(ndg_nets, "/usr/scratch/net_apa"); + /* writeNetDB(ndg_nets, "/usr/scratch/net_apa"); */ trackball(curquat, 0.0, 0.0, 0.0, 0.0); - // Set initial orientation of the globe. + /* Set initial orientation of the globe. */ { float tmpquat[4]; @@ -922,7 +935,7 @@ while (local.extpipe_active != FALSE) { - // printf("."); + /* printf("."); */ get_from_extDNS(&local, local.extpipe[0], GDK_INPUT_READ|SYNCH_RESOLV); } @@ -1062,7 +1075,7 @@ gtk_widget_show(dummyscrwin); gtk_container_add(GTK_CONTAINER(dummyscrwin), clist); gtk_box_pack_start(GTK_BOX(hbox), dummyscrwin, TRUE, TRUE, 0); -#else // GTK+ 1.0.x +#else /* GTK+ 1.0.x */ gtk_clist_set_policy (GTK_CLIST(clist), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); @@ -1086,11 +1099,11 @@ label = gtk_label_new (_("Traceroute")); gtk_notebook_append_page (GTK_NOTEBOOK (notebook), hbox, label); - // for all other pages: - // - // widg = create_page(...) - // label = gtk_label_new ("page name"); - // gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widg, label); + /* for all other pages: */ + /* */ + /* widg = create_page(...) */ + /* label = gtk_label_new ("page name"); */ + /* gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widg, label); */ gtk_paned_add1(GTK_PANED(pane), glarea); --- ./xtraceroute.1.in Mon Jun 11 20:10:53 2001 +++ ../xtraceroute-0.9.0/./xtraceroute.1.in Wed Nov 14 13:53:17 2001 @@ -136,7 +136,7 @@ .SH "SEE ALSO" traceroute(8) .PP -More information on xtraceroute is in /usr/doc/xtraceroute. +More information on xtraceroute is in @prefix@/doc/xtraceroute. .SH AUTHOR This manual page was written by Stephane Bortzmeyer , for the Debian GNU/Linux system (but may be used by others). --- ./dbio.c Sat Apr 28 21:16:38 2001 +++ ../xtraceroute-0.9.0/./dbio.c Wed Nov 14 13:54:35 2001 @@ -171,7 +171,7 @@ { struct stat sb; if(!stat(fn, &sb)) - mkdir(fn, 700); // Too paranoid? + mkdir(fn, 700); /* Too paranoid? */ else if(!(sb.st_mode&S_IFDIR)) { printf("Ouch! $HOME/.xt exists but is not a directory!\n"); @@ -221,8 +221,8 @@ fprintf(fh,"%s %s %s %s\n",entry->ip, entry->name, lat, lon); free(lat); /* Bigtime memleak fixed... */ free(lon); - // if(i != db->n_entries-1) /* Last one */ - // fprintf(fh,"\n"); + /* if(i != db->n_entries-1) */ /* Last one */ + /* fprintf(fh,"\n"); */ } fclose(fh); @@ -266,8 +266,8 @@ free(lat); free(lon); - // if(i != db->n_entries-1) /* Last one */ - // fprintf(fh,"\n"); + /* if(i != db->n_entries-1) */ /* Last one */ + /* fprintf(fh,"\n"); */ } fclose(fh); @@ -313,8 +313,8 @@ free(lat); free(lon); - // if(i != db->n_entries-1) /* Last one */ - // fprintf(fh,"\n"); + /* if(i != db->n_entries-1) */ /* Last one */ + /* fprintf(fh,"\n"); */ } fclose(fh); --- ./glstuff.c Wed Jun 27 19:19:31 2001 +++ ../xtraceroute-0.9.0/./glstuff.c Wed Nov 14 13:55:48 2001 @@ -27,7 +27,7 @@ extern void sphere(int level); extern texture *earth_texture; -//extern struct traceroute_stuff; // from extprog.c +/*extern struct traceroute_stuff; // from extprog.c */ extern GLfloat zoom; static GLUquadricObj *lineobj; @@ -255,7 +255,7 @@ glVertex3f( panel_width, panel_width, -panel_width ); glVertex3f( panel_length, panel_width, -panel_width ); } - glEnd(); // GL_QUADS + glEnd(); /* GL_QUADS */ glEnable(GL_CULL_FACE); glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_nospecular); @@ -278,10 +278,11 @@ diffz = satz*factor - fromz; difflen = sqrt(diffx*diffx + diffy*diffy + diffz*diffz); - // printf("x: %2.3f\ty: %2.3f\tz: %2.3f\tlen: %2.3f\n", diffx, diffy, diffz, difflen); + /* printf("x: %2.3f\ty: %2.3f\tz: %2.3f\tlen: %2.3f\n", + diffx, diffy, diffz, difflen); */ - // FIXME Undoubtedly there's an error here, acos only returns angles - // between 0 and pi, so I better do some thinking. + /* FIXME Undoubtedly there's an error here, acos only returns angles */ + /* between 0 and pi, so I better do some thinking. */ glRotatef(todeg*acos(diffz/difflen), -diffy, diffx, 0.0); @@ -290,7 +291,7 @@ line_size, difflen, 4, - 10); // FIXME tweak this value later. + 10); /* FIXME tweak this value later. */ } glPopMatrix(); @@ -315,7 +316,7 @@ line_size, difflen, 4, - 10); // FIXME tweak this value later. + 10); /* FIXME tweak this value later. */ } glPopMatrix(); @@ -463,16 +464,16 @@ if (zoom <= EARTH_SIZE/4) zoom = EARTH_SIZE/4; /* prevents going beyond "infinity" */ - // glMatrixMode(GL_MODELVIEW); - // glPopMatrix(); - // glLoadIdentity(); + /* glMatrixMode(GL_MODELVIEW); */ + /* glPopMatrix(); */ + /* glLoadIdentity(); */ /* look to y=0 for zoom min and make y tend to * EARTH_SIZE when zoom max*/ - // gluLookAt( 0.0, 0.0, Z_OF_EYE, - // 0.0, EARTH_SIZE-(EARTH_SIZE/(zoom*zoom)), 0.0, - // 0.0, 1.0, 0.0); + /* gluLookAt( 0.0, 0.0, Z_OF_EYE, */ + /* 0.0, EARTH_SIZE-(EARTH_SIZE/(zoom*zoom)), 0.0, */ + /* 0.0, 1.0, 0.0); */ - // glPushMatrix(); /* dummy push so we can pop on model recalc */ + /* glPushMatrix(); */ /* dummy push so we can pop on model recalc */ } @@ -565,7 +566,7 @@ #if 0 - // This stuff _might be needed for PCs now. Strange stuff, endianness... + /* This stuff _might be needed for PCs now. Strange stuff, endianness... */ if(htons(1234) == 1234) /* We're on a real machine */ { @@ -572,7 +573,7 @@ /* ABGR -> RGBA */ #ifdef DEBUG printf("Byteswapping texture..."); -#endif // DEBUG +#endif /* DEBUG */ for (i = 0; i < earth_texture->width * earth_texture->height; i++) { register unsigned char *cp = (unsigned char *) &(earth_texture->bits[i]); @@ -587,10 +588,10 @@ } #ifdef DEBUG printf("done."); -#endif //DEBUG +#endif /*DEBUG */ } -#endif //endif 0 +#endif /*endif 0 */ #if 0 gluQuadricTexture(earthobj,GL_TRUE); @@ -606,7 +607,7 @@ appropriate_format, GL_UNSIGNED_BYTE, earth_texture->bits); -#endif //0 +#endif /*0 */ map_texture(); /* s.g */ @@ -658,7 +659,7 @@ int bad_behind = 0; int any_good_sites_plotted = 0; - // glxmakecurrent isn't allowed in select or feedback modes. + /* glxmakecurrent isn't allowed in select or feedback modes. */ if (render_mode == NORMAL_MODE) { if (!gtk_gl_area_make_current(GTK_GL_AREA(glarea))) --- ./util.c Mon Jun 11 20:39:19 2001 +++ ../xtraceroute-0.9.0/./util.c Wed Nov 14 13:56:03 2001 @@ -52,11 +52,11 @@ } loc += sub*factor; - // Skip all spaces and tabs + /* Skip all spaces and tabs */ while(is_whitespace(str[i])) i++; - // Skip all numbers (including decimal point) + /* Skip all numbers (including decimal point) */ while(isdigit((int)str[i]) || str[i] == '.') i++; @@ -132,7 +132,7 @@ else direction = 'n'; break; - default: // LONGITUDE + default: /* LONGITUDE */ if(loc < 0) { direction = 'w'; --- ./db_net_gui.c Fri May 4 20:33:36 2001 +++ ../xtraceroute-0.9.0/./db_net_gui.c Wed Nov 14 13:56:28 2001 @@ -44,7 +44,7 @@ if(text_has_changed) { - // tell_user(_("Info has changed!\n Updating the database is not yet supported!")); + /* tell_user(_("Info has changed!\n Updating the database is not yet supported!")); */ text_has_changed = FALSE; ent = (dbentry *)malloc(sizeof(dbentry)); @@ -145,7 +145,8 @@ add_widget_to_table(GTK_WIDGET(info_entry), GTK_TABLE(table), 3, 1); -// label = gtk_label_new(_("IP number:")); + /* + // label = gtk_label_new(_("IP number:")); // gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(label), 0, 1, 0 ,1); // gtk_widget_show(GTK_WIDGET(label)); @@ -172,6 +173,7 @@ // gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(info_entry), 1, 2, 3 ,4); // gtk_widget_show(GTK_WIDGET(info_entry)); + */ gtk_widget_show(GTK_WIDGET(table)); --- ./info_window.c Thu Jun 28 12:54:32 2001 +++ ../xtraceroute-0.9.0/./info_window.c Wed Nov 14 13:56:52 2001 @@ -102,8 +102,8 @@ text_has_changed = FALSE; - // FIXME! Should somehow "repack" the window here, so it - // can shrink as well as grow. + /* FIXME! Should somehow "repack" the window here, so it */ + /* can shrink as well as grow. */ } static gint prevbutton_callback (GtkWidget *wi, gpointer *data) @@ -132,7 +132,7 @@ { dbentry *ent; char *tmp; - // tell_user(_("Info has changed!\n Updating the database is not yet supported!")); + /* tell_user(_("Info has changed!\n Updating the database is not yet supported!")); */ text_has_changed = FALSE; ent = (dbentry *)malloc(sizeof(dbentry)); @@ -201,7 +201,7 @@ if(guard == TRUE) { - //tell_user(_("You can only have one\ninfo window at at time!")); + /*tell_user(_("You can only have one\ninfo window at at time!")); */ destroy_widget_callback(NULL, dialog); return TRUE; } --- ./resolve.c Sat Apr 28 21:17:39 2001 +++ ../xtraceroute-0.9.0/./resolve.c Wed Nov 14 13:57:10 2001 @@ -137,7 +137,7 @@ site->accuracy = ACC_LOCAL_USER; return; } - /// GENERIC + /* GENERIC */ /* Check for the name/IP in the site-wide files */ @@ -151,7 +151,7 @@ site->accuracy = ACC_LOCAL_SITE; return; } - // GENERIC + /* GENERIC */ /* Check for the name/IP in the NDG host cache. */