Browse Source

rename debconf_input() to my_debconf_input() to avoid clashes with

#defines in cdebconf/debconfclient.h.  Also make it static everywhere.

r1573
master
Richard Hirst 21 years ago
parent
commit
3a52ac8abb
  1. 8
      debian/changelog
  2. 6
      netcfg-dhcp.c
  3. 12
      netcfg-static.c
  4. 10
      netcfg.c

8
debian/changelog

@ -1,3 +1,11 @@
netcfg (0.22) UNRELEASED; urgency=low
* Richard Hirst
- rename debconf_input() to my_debconf_input() to avoid clashes with
#defines in cdebconf/debconfclient.h
-- Tollef Fog Heen <tfheen@debian.org> Fri, 13 Dec 2002 19:53:45 +0000
netcfg (0.21) unstable; urgency=low
* Martin Sjögren

6
netcfg-dhcp.c

@ -49,7 +49,7 @@ int dhcp_client = PUMP;
static char *dhcp_hostname = NULL;
char *debconf_input(char *priority, char *template)
static char *my_debconf_input(char *priority, char *template)
{
client->command(client, "fset", template, "seen", "false", NULL);
client->command(client, "input", priority, template, NULL);
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
netcfg_get_dhcp();
ptr = debconf_input("medium", "netcfg/confirm_dhcp");
ptr = my_debconf_input("medium", "netcfg/confirm_dhcp");
if (strstr(ptr, "true"))
finished = 1;
@ -183,7 +183,7 @@ int main(int argc, char *argv[])
netcfg_write_dhcp();
netcfg_write_common(ipaddress, domain, hostname, nameserver_array);
debconf_input("medium", "netcfg/do_dhcp");
my_debconf_input("medium", "netcfg/do_dhcp");
netcfg_activate_dhcp();
return 0;

12
netcfg-static.c

@ -45,7 +45,7 @@ static u_int32_t gateway = 0;
static u_int32_t pointopoint = 0;
static struct debconfclient *client;
char *debconf_input(char *priority, char *template)
static char *my_debconf_input(char *priority, char *template)
{
client->command(client, "fset", template, "seen", "false", NULL);
client->command(client, "input", priority, template, NULL);
@ -62,7 +62,7 @@ static void netcfg_get_static()
ipaddress = network = broadcast = netmask = gateway = pointopoint =
0;
ptr = debconf_input("critical", "netcfg/get_ipaddress");
ptr = my_debconf_input("critical", "netcfg/get_ipaddress");
dot2num(&ipaddress, ptr);
client->command(client, "subst", "netcfg/confirm_static",
@ -74,21 +74,21 @@ static void netcfg_get_static()
|| strncmp(interface, "ctc", 3) == 0
|| strncmp(interface, "escon", 5) == 0
|| strncmp(interface, "iucv", 4) == 0) {
ptr = debconf_input("critical", "netcfg/get_pointopoint");
ptr = my_debconf_input("critical", "netcfg/get_pointopoint");
dot2num(&pointopoint, ptr);
dot2num(&netmask, "255.255.255.255");
network = ipaddress;
gateway = pointopoint;
} else {
ptr = debconf_input("critical", "netcfg/get_netmask");
ptr = my_debconf_input("critical", "netcfg/get_netmask");
dot2num(&netmask, ptr);
gateway = ipaddress & netmask;
client->command(client, "set", "netcfg/get_gateway",
num2dot(gateway+1), NULL);
ptr = debconf_input("critical", "netcfg/get_gateway");
ptr = my_debconf_input("critical", "netcfg/get_gateway");
dot2num(&gateway, ptr);
network = ipaddress & netmask;
@ -237,7 +237,7 @@ int main(int argc, char *argv[])
netcfg_get_static();
ptr = debconf_input("medium", "netcfg/confirm_static");
ptr = my_debconf_input("medium", "netcfg/confirm_static");
if (strstr(ptr, "true"))
finished = 1;

10
netcfg.c

@ -35,7 +35,7 @@
#include "netcfg.h"
static char *debconf_input(struct debconfclient *client, char *priority,
static char *my_debconf_input(struct debconfclient *client, char *priority,
char *template)
{
client->command(client, "fset", template, "seen", "false", NULL);
@ -299,7 +299,7 @@ netcfg_get_interface(struct debconfclient *client, char **interface)
"ifchoices", ptr, NULL);
free(ptr);
inter =
debconf_input(client, "high",
my_debconf_input(client, "high",
"netcfg/choose_interface");
if (!inter)
@ -341,7 +341,7 @@ netcfg_get_common(struct debconfclient *client, char **interface,
free(*hostname);
*hostname =
strdup(debconf_input
strdup(my_debconf_input
(client, "medium", "netcfg/get_hostname"));
len = strlen(*hostname);
@ -370,14 +370,14 @@ netcfg_get_common(struct debconfclient *client, char **interface,
*domain = NULL;
if ((ptr = debconf_input(client, "medium", "netcfg/get_domain")))
if ((ptr = my_debconf_input(client, "medium", "netcfg/get_domain")))
*domain = strdup(ptr);
free(*nameservers);
*nameservers = NULL;
if ((ptr =
debconf_input(client, "medium", "netcfg/get_nameservers")))
my_debconf_input(client, "medium", "netcfg/get_nameservers")))
*nameservers = strdup(ptr);
}

Loading…
Cancel
Save