diff -rcN ../xipmsg-8087/Imakefile ./Imakefile *** ../xipmsg-8087/Imakefile Thu May 8 16:06:39 1997 --- ./Imakefile Mon Oct 12 21:46:29 1998 *************** *** 76,82 **** XCOMM Comment out if you don't want to use Japanese resources. XCOMM ------------------------------------ #define INSTALL_ja ! LANG=ja_JP.EUC XCOMM ------------------------------------ XCOMM Select Athena Widget library --- 76,83 ---- XCOMM Comment out if you don't want to use Japanese resources. XCOMM ------------------------------------ #define INSTALL_ja ! #LANG=ja_JP.EUC ! LANG=ja XCOMM ------------------------------------ XCOMM Select Athena Widget library diff -rcN ../xipmsg-8087/brocas.c ./brocas.c *** ../xipmsg-8087/brocas.c Wed May 7 20:15:20 1997 --- ./brocas.c Tue Nov 10 22:26:58 1998 *************** *** 24,29 **** --- 24,31 ---- #include /* inet_addr() INADDR_ANY */ #include /* inet_addr() */ + #include /* gethostbyaddr() */ + #ifdef SOCKS #include #endif *************** *** 66,71 **** --- 68,75 ---- char *myname; + extern int *add_info; + #define HH(s) ((int)(((s) % 86400)/3600)) #define MM(s) ((int)(((s) % 3600)/60)) #define SS(s) ((int)((s) % 60)) *************** *** 835,843 **** --- 839,858 ---- struct ns_t *ns = DYNA_BUF(&dyns); for (i = 0; i < n; i++, ns++) { size_t len = strlen(ns->ns_nick) + 1 + strlen(ns->ns_host); + struct hostent *hent; + char addr[sizeof(struct in_addr)]; + char info[256]; + + if (add_info) { + memcpy(addr, &ns->ns_maddr.m_saddr.sin.sin_addr, sizeof(struct in_addr)); + hent = gethostbyaddr(addr, (int)sizeof(struct in_addr), AF_INET); + sprintf(info, ": %s(%s)", (hent&&hent->h_name)?hent->h_name:"", inet_ntoa(ns->ns_maddr.m_saddr.sin.sin_addr)); + len += strlen(info); + } ls[i] = malloc(len + 1); if (ls[i] != NULL) { strcat(strcat(strcpy(ls[i], ns->ns_nick), "@"), ns->ns_host); + if (add_info) strcat(ls[i], info); } }/* for */ ls[n] = NULL; diff -rcN ../xipmsg-8087/xipmsg.c ./xipmsg.c *** ../xipmsg-8087/xipmsg.c Thu May 8 14:34:16 1997 --- ./xipmsg.c Mon Sep 21 18:30:38 1998 *************** *** 105,110 **** --- 105,111 ---- static int iconified; static int pause_time = 500; /* milli-seconds */ static int bogus_fix; + int add_info; static void send_dialog(Widget parent, const struct maddr_t *dstaddr, const char *to); *************** *** 1216,1221 **** --- 1217,1223 ---- {"-debug", ".debug", XrmoptionSepArg, NULL}, {"-name", ".name", XrmoptionSepArg, NULL}, {"-port", ".port", XrmoptionSepArg, NULL}, + {"-add_info", ".addinfo", XrmoptionNoArg, "True"}, }; struct appr { Boolean bogusfix; *************** *** 1224,1229 **** --- 1226,1232 ---- Boolean disable; String name; String port; + Boolean addinfo; } app_resources; static XtResource resources[] = { /* resource_{name, class, type, size}, */ *************** *** 1234,1245 **** DEFBOOL(disable, "Disable", False), DEFSTR(name, "Name", NULL), DEFSTR(port, "Port", NULL), }; static char usage_msg[] = "usage: %s " "[-bogus_fix][-disable]" "[-broadcast xx.xx.xx.xx][-debug n]" ! "[-port n][-name str]" "[Xtoolkit options]" "\n"; myname = argv[0]; --- 1237,1249 ---- DEFBOOL(disable, "Disable", False), DEFSTR(name, "Name", NULL), DEFSTR(port, "Port", NULL), + DEFBOOL(addinfo, "Addinfo", False), }; static char usage_msg[] = "usage: %s " "[-bogus_fix][-disable]" "[-broadcast xx.xx.xx.xx][-debug n]" ! "[-port n][-add_info][-name str]" "[Xtoolkit options]" "\n"; myname = argv[0]; *************** *** 1261,1266 **** --- 1265,1271 ---- bro_set_disable(True); if (app_resources.port != NULL) port = strtol(app_resources.port, NULL, 0); + add_info = app_resources.addinfo; if (app_resources.name != NULL) name = app_resources.name; else