Resolve conflicts after import of Heimdal 0.6.1 libcom_err.
This commit is contained in:
parent
d2387d42b8
commit
2b2b372003
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=127807
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
|
* Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -14,12 +14,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -35,17 +30,18 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
/* $FreeBSD$ */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
RCSID("$Id: com_err.c,v 1.13 1999/03/12 15:17:08 bg Exp $");
|
RCSID("$Id: com_err.c,v 1.18 2002/03/10 23:07:01 assar Exp $");
|
||||||
#endif
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "com_err.h"
|
#include "com_err.h"
|
||||||
|
|
||||||
struct et_list *_et_list;
|
struct et_list *_et_list = NULL;
|
||||||
|
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
@ -53,8 +49,12 @@ error_message (long code)
|
|||||||
{
|
{
|
||||||
static char msg[128];
|
static char msg[128];
|
||||||
const char *p = com_right(_et_list, code);
|
const char *p = com_right(_et_list, code);
|
||||||
if (p == NULL)
|
if (p == NULL) {
|
||||||
p = strerror(code);
|
if (code < 0)
|
||||||
|
sprintf(msg, "Unknown error %ld", code);
|
||||||
|
else
|
||||||
|
p = strerror(code);
|
||||||
|
}
|
||||||
if (p != NULL && *p != '\0') {
|
if (p != NULL && *p != '\0') {
|
||||||
strncpy(msg, p, sizeof(msg) - 1);
|
strncpy(msg, p, sizeof(msg) - 1);
|
||||||
msg[sizeof(msg) - 1] = 0;
|
msg[sizeof(msg) - 1] = 0;
|
||||||
@ -70,6 +70,10 @@ init_error_table(const char **msgs, long base, int count)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
default_proc (const char *whoami, long code, const char *fmt, va_list args)
|
||||||
|
__attribute__((__format__(__printf__, 3, 0)));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
default_proc (const char *whoami, long code, const char *fmt, va_list args)
|
default_proc (const char *whoami, long code, const char *fmt, va_list args)
|
||||||
{
|
{
|
||||||
@ -153,3 +157,17 @@ error_table_name(int num)
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
return(buf);
|
return(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
add_to_error_table(struct et_list *new_table)
|
||||||
|
{
|
||||||
|
struct et_list *et;
|
||||||
|
|
||||||
|
for (et = _et_list; et; et = et->next) {
|
||||||
|
if (et->table->base == new_table->table->base)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
new_table->next = _et_list;
|
||||||
|
_et_list = new_table;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
|
* Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -14,12 +14,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -36,8 +31,8 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: com_err.h,v 1.3 1998/05/02 20:13:28 assar Exp $ */
|
|
||||||
/* $FreeBSD$ */
|
/* $FreeBSD$ */
|
||||||
|
/* $Id: com_err.h,v 1.9 2001/05/11 20:03:36 assar Exp $ */
|
||||||
|
|
||||||
/* MIT compatible com_err library */
|
/* MIT compatible com_err library */
|
||||||
|
|
||||||
@ -45,10 +40,7 @@
|
|||||||
#define __COM_ERR_H__
|
#define __COM_ERR_H__
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <com_right.h>
|
#include <com_right.h>
|
||||||
|
|
||||||
@ -57,12 +49,17 @@ typedef void (*errf) __P((const char *, long, const char *, va_list));
|
|||||||
const char * error_message __P((long));
|
const char * error_message __P((long));
|
||||||
int init_error_table __P((const char**, long, int));
|
int init_error_table __P((const char**, long, int));
|
||||||
|
|
||||||
void com_err_va __P((const char *, long, const char *, va_list));
|
void com_err_va __P((const char *, long, const char *, va_list))
|
||||||
void com_err __P((const char *, long, const char *, ...));
|
__printflike(3, 0);
|
||||||
|
|
||||||
|
void com_err __P((const char *, long, const char *, ...))
|
||||||
|
__printflike(3, 4);
|
||||||
|
|
||||||
errf set_com_err_hook __P((errf));
|
errf set_com_err_hook __P((errf));
|
||||||
errf reset_com_err_hook __P((void));
|
errf reset_com_err_hook __P((void));
|
||||||
|
|
||||||
const char *error_table_name __P((int num));
|
const char *error_table_name __P((int num));
|
||||||
|
|
||||||
|
void add_to_error_table __P((struct et_list *new_table));
|
||||||
|
|
||||||
#endif /* __COM_ERR_H__ */
|
#endif /* __COM_ERR_H__ */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 1998 Kungliga Tekniska Högskolan
|
* Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -14,12 +14,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -36,13 +31,14 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: com_right.h,v 1.8 1998/02/17 21:19:43 bg Exp $ */
|
/* $Id: com_right.h,v 1.11 2000/07/31 01:11:08 assar Exp $ */
|
||||||
/* $FreeBSD$ */
|
/* $FreeBSD$ */
|
||||||
|
|
||||||
#ifndef __COM_RIGHT_H__
|
#ifndef __COM_RIGHT_H__
|
||||||
#define __COM_RIGHT_H__
|
#define __COM_RIGHT_H__
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
struct error_table {
|
struct error_table {
|
||||||
char const * const * msgs;
|
char const * const * msgs;
|
||||||
@ -56,8 +52,7 @@ struct et_list {
|
|||||||
extern struct et_list *_et_list;
|
extern struct et_list *_et_list;
|
||||||
|
|
||||||
const char *com_right __P((struct et_list *list, long code));
|
const char *com_right __P((struct et_list *list, long code));
|
||||||
void initialize_error_table_r __P((struct et_list **, const char **, int,
|
void initialize_error_table_r __P((struct et_list **, const char **, int, long));
|
||||||
long));
|
|
||||||
void free_error_table __P((struct et_list *));
|
void free_error_table __P((struct et_list *));
|
||||||
|
|
||||||
#endif /* __COM_RIGHT_H__ */
|
#endif /* __COM_RIGHT_H__ */
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
|
* Copyright (c) 1998-2002 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -14,12 +14,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -35,13 +30,14 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
/* $FreeBSD$ */
|
||||||
|
|
||||||
#undef ROKEN_RENAME
|
#undef ROKEN_RENAME
|
||||||
#include "compile_et.h"
|
#include "compile_et.h"
|
||||||
#include <getarg.h>
|
#include <getarg.h>
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
RCSID("$Id: compile_et.c,v 1.12 1999/04/01 09:13:52 joda Exp $");
|
RCSID("$Id: compile_et.c,v 1.16 2002/08/20 12:44:51 joda Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <err.h>
|
#include <err.h>
|
||||||
@ -89,7 +85,7 @@ generate_c(void)
|
|||||||
fprintf(c_file, "#include \"%s\"\n", hfn);
|
fprintf(c_file, "#include \"%s\"\n", hfn);
|
||||||
fprintf(c_file, "\n");
|
fprintf(c_file, "\n");
|
||||||
|
|
||||||
fprintf(c_file, "static const char *text[] = {\n");
|
fprintf(c_file, "static const char *%s_error_strings[] = {\n", name);
|
||||||
|
|
||||||
for(ec = codes, n = 0; ec; ec = ec->next, n++) {
|
for(ec = codes, n = 0; ec; ec = ec->next, n++) {
|
||||||
while(n < ec->number) {
|
while(n < ec->number) {
|
||||||
@ -104,20 +100,22 @@ generate_c(void)
|
|||||||
fprintf(c_file, "\tNULL\n");
|
fprintf(c_file, "\tNULL\n");
|
||||||
fprintf(c_file, "};\n");
|
fprintf(c_file, "};\n");
|
||||||
fprintf(c_file, "\n");
|
fprintf(c_file, "\n");
|
||||||
|
fprintf(c_file, "#define num_errors %d\n", number);
|
||||||
|
fprintf(c_file, "\n");
|
||||||
fprintf(c_file,
|
fprintf(c_file,
|
||||||
"void initialize_%s_error_table_r(struct et_list **list)\n",
|
"void initialize_%s_error_table_r(struct et_list **list)\n",
|
||||||
name);
|
name);
|
||||||
fprintf(c_file, "{\n");
|
fprintf(c_file, "{\n");
|
||||||
fprintf(c_file,
|
fprintf(c_file,
|
||||||
" initialize_error_table_r(list, text, "
|
" initialize_error_table_r(list, %s_error_strings, "
|
||||||
"%s_num_errors, ERROR_TABLE_BASE_%s);\n", name, name);
|
"num_errors, ERROR_TABLE_BASE_%s);\n", name, name);
|
||||||
fprintf(c_file, "}\n");
|
fprintf(c_file, "}\n");
|
||||||
fprintf(c_file, "\n");
|
fprintf(c_file, "\n");
|
||||||
fprintf(c_file, "void initialize_%s_error_table(void)\n", name);
|
fprintf(c_file, "void initialize_%s_error_table(void)\n", name);
|
||||||
fprintf(c_file, "{\n");
|
fprintf(c_file, "{\n");
|
||||||
fprintf(c_file,
|
fprintf(c_file,
|
||||||
" init_error_table(text, ERROR_TABLE_BASE_%s, "
|
" init_error_table(%s_error_strings, ERROR_TABLE_BASE_%s, "
|
||||||
"%s_num_errors);\n", name, name);
|
"num_errors);\n", name, name);
|
||||||
fprintf(c_file, "}\n");
|
fprintf(c_file, "}\n");
|
||||||
|
|
||||||
fclose(c_file);
|
fclose(c_file);
|
||||||
@ -147,7 +145,7 @@ generate_h(void)
|
|||||||
fprintf(h_file, "#ifndef %s\n", fn);
|
fprintf(h_file, "#ifndef %s\n", fn);
|
||||||
fprintf(h_file, "#define %s\n", fn);
|
fprintf(h_file, "#define %s\n", fn);
|
||||||
fprintf(h_file, "\n");
|
fprintf(h_file, "\n");
|
||||||
fprintf(h_file, "#include <com_right.h>\n");
|
fprintf(h_file, "struct et_list;\n");
|
||||||
fprintf(h_file, "\n");
|
fprintf(h_file, "\n");
|
||||||
fprintf(h_file,
|
fprintf(h_file,
|
||||||
"void initialize_%s_error_table_r(struct et_list **);\n",
|
"void initialize_%s_error_table_r(struct et_list **);\n",
|
||||||
@ -158,16 +156,16 @@ generate_h(void)
|
|||||||
name, name);
|
name, name);
|
||||||
fprintf(h_file, "\n");
|
fprintf(h_file, "\n");
|
||||||
fprintf(h_file, "typedef enum %s_error_number{\n", name);
|
fprintf(h_file, "typedef enum %s_error_number{\n", name);
|
||||||
fprintf(h_file, "\tERROR_TABLE_BASE_%s = %ld,\n", name, base);
|
|
||||||
fprintf(h_file, "\t%s_err_base = %ld,\n", name, base);
|
|
||||||
|
|
||||||
for(ec = codes; ec; ec = ec->next) {
|
for(ec = codes; ec; ec = ec->next) {
|
||||||
fprintf(h_file, "\t%s = %ld,\n", ec->name, base + ec->number);
|
fprintf(h_file, "\t%s = %ld%s\n", ec->name, base + ec->number,
|
||||||
|
(ec->next != NULL) ? "," : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(h_file, "\t%s_num_errors = %d\n", name, number);
|
|
||||||
fprintf(h_file, "} %s_error_number;\n", name);
|
fprintf(h_file, "} %s_error_number;\n", name);
|
||||||
fprintf(h_file, "\n");
|
fprintf(h_file, "\n");
|
||||||
|
fprintf(h_file, "#define ERROR_TABLE_BASE_%s %ld\n", name, base);
|
||||||
|
fprintf(h_file, "\n");
|
||||||
fprintf(h_file, "#endif /* %s */\n", fn);
|
fprintf(h_file, "#endif /* %s */\n", fn);
|
||||||
|
|
||||||
|
|
||||||
@ -200,6 +198,7 @@ main(int argc, char **argv)
|
|||||||
char *p;
|
char *p;
|
||||||
int optind = 0;
|
int optind = 0;
|
||||||
|
|
||||||
|
setprogname(argv[0]);
|
||||||
if(getarg(args, num_args, argc, argv, &optind))
|
if(getarg(args, num_args, argc, argv, &optind))
|
||||||
usage(1);
|
usage(1);
|
||||||
if(help_flag)
|
if(help_flag)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998 Kungliga Tekniska Högskolan
|
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -14,12 +14,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -36,7 +31,8 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: compile_et.h,v 1.3 1998/11/22 09:39:46 assar Exp $ */
|
/* $Id: compile_et.h,v 1.6 2000/07/01 20:21:48 assar Exp $ */
|
||||||
|
/* $FreeBSD$ */
|
||||||
|
|
||||||
#ifndef __COMPILE_ET_H__
|
#ifndef __COMPILE_ET_H__
|
||||||
#define __COMPILE_ET_H__
|
#define __COMPILE_ET_H__
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
%{
|
%{
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998 Kungliga Tekniska Högskolan
|
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -15,12 +15,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -36,6 +31,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
/* $FreeBSD$ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is to handle the definition of this symbol in some AIX
|
* This is to handle the definition of this symbol in some AIX
|
||||||
@ -47,14 +43,18 @@
|
|||||||
|
|
||||||
#include "compile_et.h"
|
#include "compile_et.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
|
#include "lex.h"
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
RCSID("$Id: lex.l,v 1.4 1998/11/20 05:58:52 assar Exp $");
|
RCSID("$Id: lex.l,v 1.6 2000/06/22 00:42:52 assar Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static unsigned lineno = 1;
|
static unsigned lineno = 1;
|
||||||
void error_message(char *, ...);
|
static int getstring(void);
|
||||||
int getstring(void);
|
|
||||||
|
#define YY_NO_UNPUT
|
||||||
|
|
||||||
|
#undef ECHO
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ yywrap ()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
static int
|
||||||
getstring(void)
|
getstring(void)
|
||||||
{
|
{
|
||||||
char x[128];
|
char x[128];
|
||||||
@ -117,7 +117,7 @@ getstring(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
error_message (char *format, ...)
|
error_message (const char *format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
%{
|
%{
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan
|
* Copyright (c) 1998 - 2000 Kungliga Tekniska Högskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@ -15,12 +15,7 @@
|
|||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
* 3. Neither the name of the Institute nor the names of its contributors
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by Kungliga Tekniska
|
|
||||||
* Högskolan and its contributors.
|
|
||||||
*
|
|
||||||
* 4. Neither the name of the Institute nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
@ -36,15 +31,16 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
/* $FreeBSD$ */
|
||||||
|
|
||||||
#include "compile_et.h"
|
#include "compile_et.h"
|
||||||
|
#include "lex.h"
|
||||||
#if 0
|
#if 0
|
||||||
RCSID("$Id: parse.y,v 1.9 1999/07/04 14:54:58 assar Exp $");
|
RCSID("$Id: parse.y,v 1.11 2000/06/22 00:42:52 assar Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void yyerror (char *s);
|
void yyerror (char *s);
|
||||||
long name2number(const char *str);
|
static long name2number(const char *str);
|
||||||
void error_message(char *, ...);
|
|
||||||
|
|
||||||
extern char *yytext;
|
extern char *yytext;
|
||||||
|
|
||||||
@ -141,7 +137,7 @@ statement : INDEX NUMBER
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
long
|
static long
|
||||||
name2number(const char *str)
|
name2number(const char *str)
|
||||||
{
|
{
|
||||||
const char *p;
|
const char *p;
|
||||||
|
Loading…
Reference in New Issue
Block a user