version 1.3, 1997/01/17 07:13:43 |
version 1.4, 1997/07/25 22:13:23 |
|
|
#include <errno.h> |
#include <errno.h> |
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
#include <err.h> |
#include "extern.h" |
#include "extern.h" |
|
|
int baudrate __P((char *)); |
int baudrate __P((char *)); |
|
|
copy = strdup(arg); |
copy = strdup(arg); |
mapp = malloc((u_int)sizeof(MAP)); |
mapp = malloc((u_int)sizeof(MAP)); |
if (copy == NULL || mapp == NULL) |
if (copy == NULL || mapp == NULL) |
err("%s", strerror(errno)); |
err(1, "malloc"); |
mapp->next = NULL; |
mapp->next = NULL; |
if (maplist == NULL) |
if (maplist == NULL) |
cur = maplist = mapp; |
cur = maplist = mapp; |
|
|
/* If user specified a port with an option flag, set it. */ |
/* If user specified a port with an option flag, set it. */ |
done: if (port) { |
done: if (port) { |
if (mapp->porttype) |
if (mapp->porttype) |
badmopt: err("illegal -m option format: %s", copy); |
badmopt: errx(1, "illegal -m option format: %s", copy); |
mapp->porttype = port; |
mapp->porttype = port; |
} |
} |
|
|