mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-24 07:41:10 -04:00
make next_token() shared.
This commit is contained in:
parent
2ce1e232ae
commit
34fec86ca3
4 changed files with 8 additions and 29 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.c,v 1.96 2000/09/21 23:02:30 mws Exp $ */
|
||||
/* $Id: dig.c,v 1.97 2000/09/21 23:47:36 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -128,19 +128,6 @@ static const char *rcodetext[] = {
|
|||
|
||||
extern char *progname;
|
||||
|
||||
static char *
|
||||
next_token(char **stringp, const char *delim) {
|
||||
char *res;
|
||||
|
||||
do {
|
||||
res = strsep(stringp, delim);
|
||||
if (res == NULL)
|
||||
break;
|
||||
} while (*res == '\0');
|
||||
return (res);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
show_usage(void) {
|
||||
fputs(
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dighost.c,v 1.131 2000/09/21 23:02:32 mws Exp $ */
|
||||
/* $Id: dighost.c,v 1.132 2000/09/21 23:47:38 marka Exp $ */
|
||||
|
||||
/*
|
||||
* Notice to programmers: Do not use this code as an example of how to
|
||||
|
|
@ -145,7 +145,7 @@ recv_done(isc_task_t *task, isc_event_t *event);
|
|||
static void
|
||||
connect_timeout(isc_task_t *task, isc_event_t *event);
|
||||
|
||||
static char *
|
||||
char *
|
||||
next_token(char **stringp, const char *delim) {
|
||||
char *res;
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dig.h,v 1.47 2000/09/21 23:02:34 mws Exp $ */
|
||||
/* $Id: dig.h,v 1.48 2000/09/21 23:47:41 marka Exp $ */
|
||||
|
||||
#ifndef DIG_H
|
||||
#define DIG_H
|
||||
|
|
@ -237,6 +237,9 @@ trying(int frmsize, char *frm, dig_lookup_t *lookup);
|
|||
void
|
||||
dighost_shutdown(void);
|
||||
|
||||
char *
|
||||
next_token(char **stringp, const char *delim);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nslookup.c,v 1.52 2000/09/21 23:10:58 gson Exp $ */
|
||||
/* $Id: nslookup.c,v 1.53 2000/09/21 23:47:40 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -148,17 +148,6 @@ static const char *rtypetext[] = {
|
|||
static void flush_lookup_list(void);
|
||||
static void getinput(isc_task_t *task, isc_event_t *event);
|
||||
|
||||
static char *
|
||||
next_token(char **stringp, const char *delim) {
|
||||
char *res;
|
||||
do {
|
||||
res = strsep(stringp, delim);
|
||||
if (res == NULL)
|
||||
break;
|
||||
} while (*res == '\0');
|
||||
return (res);
|
||||
}
|
||||
|
||||
static void
|
||||
show_usage(void) {
|
||||
fputs("Usage:\n", stderr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue