1*84d9c625SLionel Sambuc /* $NetBSD: extern.h,v 1.11 2013/08/11 00:39:22 dholland Exp $ */ 2d5c6c6a5SLionel Sambuc 3d5c6c6a5SLionel Sambuc /*- 4d5c6c6a5SLionel Sambuc * Copyright (c) 1991, 1993 5d5c6c6a5SLionel Sambuc * The Regents of the University of California. All rights reserved. 6d5c6c6a5SLionel Sambuc * 7d5c6c6a5SLionel Sambuc * Redistribution and use in source and binary forms, with or without 8d5c6c6a5SLionel Sambuc * modification, are permitted provided that the following conditions 9d5c6c6a5SLionel Sambuc * are met: 10d5c6c6a5SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 11d5c6c6a5SLionel Sambuc * notice, this list of conditions and the following disclaimer. 12d5c6c6a5SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 13d5c6c6a5SLionel Sambuc * notice, this list of conditions and the following disclaimer in the 14d5c6c6a5SLionel Sambuc * documentation and/or other materials provided with the distribution. 15d5c6c6a5SLionel Sambuc * 3. Neither the name of the University nor the names of its contributors 16d5c6c6a5SLionel Sambuc * may be used to endorse or promote products derived from this software 17d5c6c6a5SLionel Sambuc * without specific prior written permission. 18d5c6c6a5SLionel Sambuc * 19d5c6c6a5SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20d5c6c6a5SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21d5c6c6a5SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22d5c6c6a5SLionel Sambuc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23d5c6c6a5SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24d5c6c6a5SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25d5c6c6a5SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26d5c6c6a5SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27d5c6c6a5SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28d5c6c6a5SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29d5c6c6a5SLionel Sambuc * SUCH DAMAGE. 30d5c6c6a5SLionel Sambuc * 31d5c6c6a5SLionel Sambuc * @(#)extern.h 8.1 (Berkeley) 6/6/93 32d5c6c6a5SLionel Sambuc */ 33d5c6c6a5SLionel Sambuc 34*84d9c625SLionel Sambuc struct str; 35*84d9c625SLionel Sambuc typedef struct str STR; 36d5c6c6a5SLionel Sambuc 37d5c6c6a5SLionel Sambuc #include <limits.h> 38d5c6c6a5SLionel Sambuc #define NCHARS (UCHAR_MAX + 1) /* Number of possible characters. */ 39d5c6c6a5SLionel Sambuc #define OOBCH (UCHAR_MAX + 1) /* Out of band character value. */ 40d5c6c6a5SLionel Sambuc 41*84d9c625SLionel Sambuc STR *str_create(int, const char *); 42*84d9c625SLionel Sambuc void str_destroy(STR *); 43*84d9c625SLionel Sambuc int next(STR *, int *); 44