[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#188877: marked as done (flex: new upstream release breaks builds)



Your message dated Wed, 16 Apr 2003 13:47:48 -0400
with message-id <E195r0e-0008DB-00@auric.debian.org>
and subject line Bug#188877: fixed in openoffice.org 1.0.3-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 12 Apr 2003 07:00:59 +0000
>From daniel@raging.dropbear.id.au Sat Apr 12 02:00:57 2003
Return-path: <daniel@raging.dropbear.id.au>
Received: from cpe-144-132-69-218.vic.bigpond.net.au (nanasawa.trinity.unimelb.edu.au) [144.132.69.218] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 194F0S-0001cs-00; Sat, 12 Apr 2003 02:00:56 -0500
Received: by nanasawa.trinity.unimelb.edu.au (Postfix, from userid 1000)
	id 97F49C3F7F4; Sat, 12 Apr 2003 16:59:47 +1000 (EST)
Date: Sat, 12 Apr 2003 16:56:48 +1000
From: Daniel Stone <dstone@trinity.unimelb.edu.au>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: flex: new upstream release breaks builds
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi"
Content-Disposition: inline
X-Reportbug-Version: 2.10.1
User-Agent: Mutt/1.5.4i
Message-Id: <20030412065947.97F49C3F7F4@nanasawa.trinity.unimelb.edu.au>
Delivered-To: submit@bugs.debian.org
X-Spam-Status: No, hits=-1.7 required=4.0
	tests=HAS_PACKAGE,LINES_OF_YELLING,SPAM_PHRASE_00_01,USER_AGENT,
	      USER_AGENT_MUTT
	version=2.44
X-Spam-Level: 


--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: flex
Version: 2.5.31-1
Severity: important

Hi,
I've been building xfree86_4.3.0-0ds3v2 on various architectures now,
but something happened between 2.5.4a-33 and 2.5.31 to break the builds.

A successful build:
Automatic build of xfree86_4.3.0-0ds3v2 on aedificator by sbuild/i386 1.169
Build started at 20030411-0645
[...]
Selecting previously deselected package flex.
Unpacking flex (from .../flex_2.5.4a-33_i386.deb) ...
[...]
Built successfully
Purging chroot-unstable/build/dstone/xfree86-4.3.0

So, 2.5.4a-33 is fine. However:
Automatic build of xfree86_4.3.0-0ds3v2 on aedificator by sbuild/i386 1.169
Build started at 20030412-0029
******************************************************************************
[...]
Get:19 http://software.trinity.unimelb.edu.au unstable/main flex 2.5.31-1 [341kB]
[...]
Selecting previously deselected package flex.
Unpacking flex (from .../flex_2.5.31-1_i386.deb) ...
[...]
flex -l  -t lexer.l > lexer.c
gcc -m32 -g -O2 -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
+-Wredundant-decls -Wnested-externs -Wundef     -I../.. -I../../exports/include   -Dlinux -D__i386__
+-D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE  -D_GNU_SOURCE   -DFUNCPROTO=15
+-DNARROWPROTO   -DXENVIRONMENT    -c -o lexer.o lexer.c
In file included from lexer.l:45:
pswpriv.h:150: warning: redundant redeclaration of `yylineno' in same scope
<stdout>:348: warning: previous declaration of `yylineno'
<stdout>:1058: warning: redundant redeclaration of `yylex' in same scope
pswpriv.h:153: warning: previous declaration of `yylex'
<stdout>: In function `yylex':
<stdout>:1199: `yy_prev_more_offset' undeclared (first use in this function)
<stdout>:1199: (Each undeclared identifier is reported only once
<stdout>:1199: for each function it appears in.)
lexer.l:349: warning: long unsigned int format, long int arg (arg 3)
lexer.l:358: warning: long unsigned int format, long int arg (arg 3)
<stdout>: At top level:
<stdout>:2608: warning: redundant redeclaration of `isatty' in same scope
/usr/include/unistd.h:686: warning: previous declaration of `isatty'
<stdout>:2879: warning: no previous prototype for `yyget_lineno'
<stdout>:2888: warning: no previous prototype for `yyget_in'
<stdout>:2896: warning: no previous prototype for `yyget_out'
<stdout>:2904: warning: no previous prototype for `yyget_leng'
<stdout>:2913: warning: no previous prototype for `yyget_text'
<stdout>:2922: warning: no previous prototype for `yyset_lineno'
<stdout>:2934: warning: no previous prototype for `yyset_in'
<stdout>:2939: warning: no previous prototype for `yyset_out'
<stdout>:2944: warning: no previous prototype for `yyget_debug'
<stdout>:2949: warning: no previous prototype for `yyset_debug'
<stdout>:2955: warning: no previous prototype for `yylex_destroy'
<stdout>:2988: warning: `yy_flex_strlen' defined but not used
make[5]: *** [lexer.o] Error 1
make[5]: Leaving directory `/build/dstone/xfree86-4.3.0/build-tree/xc/config/pswrap'
[...]
Build finished at 20030412-0035
FAILED [dpkg-buildpackage died]

So, something between 2.5.4a-33 and 2.5.31 has changed upstream, to
break the building of XFree86. I've attached lexer.l.

If it's buggy source that needs to be fixed, please let me know how to
fix it and I'll include the fix. I've never had any experience with *lex
before, so be gentle. :)

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux nanasawa 2.5.66-bk6 #1 Tue Apr 1 20:22:06 EST 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages flex depends on:
ii  libc6                         2.3.1-16   GNU C Library: Shared libraries an

-- no debconf information

--6c2NcOVqGQ03X4Wi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="lexer.l"

%{
/*
 * lexer.l
 *
 * (c) Copyright 1988-1994 Adobe Systems Incorporated.
 * All rights reserved.
 * 
 * Permission to use, copy, modify, distribute, and sublicense this software
 * and its documentation for any purpose and without fee is hereby granted,
 * provided that the above copyright notices appear in all copies and that
 * both those copyright notices and this permission notice appear in
 * supporting documentation and that the name of Adobe Systems Incorporated
 * not be used in advertising or publicity pertaining to distribution of the
 * software without specific, written prior permission.  No trademark license
 * to use the Adobe trademarks is hereby granted.  If the Adobe trademark
 * "Display PostScript"(tm) is used to describe this software, its
 * functionality or for any other purpose, such use shall be limited to a
 * statement that this software works in conjunction with the Display
 * PostScript system.  Proper trademark attribution to reflect Adobe's
 * ownership of the trademark shall be given whenever any such reference to
 * the Display PostScript system is made.
 * 
 * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
 * ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
 * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NON- INFRINGEMENT OF THIRD PARTY RIGHTS.  IN NO EVENT SHALL ADOBE BE LIABLE
 * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
 * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  ADOBE WILL NOT
 * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
 * 
 * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
 * Incorporated which may be registered in certain jurisdictions
 * 
 * Author:  Adobe Systems Incorporated
 */
/* $XFree86: xc/config/pswrap/lexer.l,v 1.11 2002/05/31 16:31:21 dawes Exp $ */

#include <ctype.h>
#include <stdlib.h>
#include <string.h>

#include "pswpriv.h"
#include "pswparser.h"

/* flex of EMX seems to be too old */
#if defined(FLEX_SCANNER) && !defined(YY_FLEX_LEX_COMPAT) && !defined(__UNIXOS2__)
int yylineno = 1;
#endif

static int parens = 0;		/* current paren balancing */
static char *sbody;		/* cur pointer into string_temp */
static int curleng = 0;		/* current scanned string length */
static int strlineno;		/* start line of current string */

static int nonComment = true;	/* are we outside C comments? */
static int newLine = true;	/* are we starting a new line? */
static int hexstringerrs = 0;	/* found an error in this hex string */

int errorCount = 0;		/* number of non-fatal errors */

#ifdef PSWDEBUG
int lexdebug = 1;		/* debug flag */
#define DEBUGP(x) {if (lexdebug) { fprintf x ; };}
#else /* PSWDEBUG */
#define DEBUGP(x)
#endif /* PSWDEBUG */

#undef YYLMAX
#define YYLMAX 16384

/* ErrIntro prints a standard intro for error messages;
 * change it if your system uses something else.  We have many options:
 *
 * to match Macintosh:  #define FMT "File \"%s\"; Line %d # "
 * to match BSD cc:	#define FMT "\"%s\", line %d: "
 * to match gcc:	#define FMT "%s:%d: "
 * to match Mips cc:	#define FMT "pswrap: Error: %s, line %d: "
 */
#define INTRO	"# In function %s -\n"

#ifdef macintosh
#define FMT "File \"%s\"; Line %d # "
#else /* macintosh */
#define FMT "\"%s\", line %d: "
#endif /* macintosh */

void ErrIntro(int line)
{
    if (! reportedPSWName && currentPSWName) {
		reportedPSWName = 1;
		fprintf(stderr,INTRO,currentPSWName);
    }
    fprintf(stderr,FMT,ifile,line);
    errorCount++;
}


void yyerror(char *errmsg)
{
    ErrIntro(yylineno);
    fprintf(stderr,"%s near text \"%s\"\n",errmsg,yytext);
}
%}

%o 3500
%a 2500

%START PS STR HEX DEF SUB

DIGIT		([0-9])
HEXDIGIT	([a-fA-F0-9])
RADIXDIGIT	([a-zA-Z0-9])
LETTER		([a-zA-Z])
SIGN		([+-])
EXP		([eE]{SIGN}?{DIGIT}+)
W		([ \t\n\r])

%%

<PS>^defineps 	{	/* inside a wrap - just a PS token */
	if (nonComment) {
	    newLine = false;
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    DEBUGP((stderr,"PSNAME ->%s\n",yytext));
	    return PSNAME;
	}
}

<DEF>^defineps	{ 	/* treat as a C name inside the def part */
	if (nonComment) {
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    DEBUGP((stderr,"CNAME ->%s\n",yytext));
	    return CNAME;
	}
}

<STR>^defineps	{	/* part of string text */
	register int i = yyleng;
	register unsigned char *c = (unsigned char *) yytext;

	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += yyleng;
	for (; i > 0; --i) *sbody++ = *c++;
}

^{W}*defineps { 		/* start of a wrap definition */
	if (nonComment) {
	    BEGIN DEF;
	    DEBUGP((stderr,"DEFINEPS\n"));
	    return DEFINEPS;
	} else ECHO;
}

<PS>endps {		/* end of a wrap */
	if (nonComment){
	    if (newLine) {
	        newLine = false;
	    	DEBUGP((stderr,"ENDPS\n"));
	    	BEGIN 0;
	    	return ENDPS;
	    } else {
	    	DEBUGP((stderr,"PSNAME %s\n",yytext));
	    	yylval.object = psw_malloc(strlen(yytext) + 1);
	    	strcpy(yylval.object, yytext);
	    	return PSNAME;
	    }
	}	    
}

<DEF>^endps	{ 	/* treat as a C name inside the def part? */
	if (nonComment) {
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    DEBUGP((stderr,"CNAME ->%s\n",yytext));
	    return CNAME;
	}
}

<STR>^defineps	{	/* part of string text */
	register int i = yyleng;
	register unsigned char *c = (unsigned char *) yytext;

	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += yyleng;
	for (; i > 0; --i) *sbody++ = *c++;
}

endps { 		/* BOGUS end of a wrap */
	if (nonComment) {
	    ErrIntro(yylineno);
	    fprintf(stderr,"endps without matching defineps\n");
	} else ECHO;
}

%{
    	/* real definition stuff */
%}

<DEF>"/*" {		/* C comments on */
	nonComment = false;
}

<DEF>"*/" {		/* C comments off */
	nonComment = true;
}

<DEF>"("	{	/* formals start */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->(\n"));
	    return '(';
	}
}

<DEF>")"	{	/* formals end */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->)\n"));
	    BEGIN PS;
	    return ')';
	}
}

<DEF>[|,;[\]*:]	{	/* special single chars */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->%c\n",yytext[0]));
	    return (yytext[0]);
	}
}

%{
	/* formals type names */
%}

<DEF>"static" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->static\n"));
	    return STATIC;
	}
}

<DEF>"boolean" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->boolean\n"));
	    return BOOLEAN;
	}
}

<DEF>"char" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->char\n"));
	    return CHAR;
	}
}

<DEF>"int" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->int\n"));
	    return INT;
	}
}

<DEF>"short" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->short\n"));
	    return SHORT;
	}
}

<DEF>"long" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->long\n"));
	    return LONG;
	}
}

<DEF>"unsigned" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->unsigned\n"));
	    return UNSIGNED;
	}
}

<DEF>"float" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->float\n"));
	    return FLOAT;
	}
}

<DEF>"double" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->double\n"));
	    return DOUBLE;
	}
}

<DEF>"userobject" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->userobject\n"));
	    return USEROBJECT;
	}
}

<DEF>"numstring" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->numstring\n"));
	    return NUMSTRING;
	}
}

<DEF>"DPSContext" {
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->DPScontext\n"));
	    return PSCONTEXT;
	}
}

%{
	/* C format numbers in formals part */
%}

<DEF>[1-9]{DIGIT}*	{ 		/* base 10 number */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->CINTEGER %s\n",yytext));
	    yylval.intobj = atoi((char *) yytext);
	    return CINTEGER;
	}
}

<DEF>0{DIGIT}*		{		/* octal number (and zero) */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->CINTEGER %s\n",yytext));
	    /* I have no idea why the cast is needed in the next line,
	       but it seems to make the compiler happy on alpha */
	    sscanf((char *) yytext,"%lo",&yylval.intobj);
	    return CINTEGER;
	}
}

<DEF>0[xX]{HEXDIGIT}+	{		/* hex number */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->CINTEGER %s\n",yytext));
	    /* See previous comment... */
	    sscanf((char *) yytext,"0x%lx",&yylval.intobj);
	    return CINTEGER;
	}
}

<DEF>[a-zA-Z_][a-zA-Z0-9_]* {	/* C identifier */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->CNAME %s\n",yytext));
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    return CNAME;
	}
}

<DEF>{W}+ {
}

<DEF>[^a-zA-Z0-9_|,;[\]*:\(\)/ \t\n\r]+ {	/* all else - ERROR */
	if (nonComment) {
	    DEBUGP((stderr,"DEF ->JUNK %s\n",yytext));
	    ErrIntro(yylineno);
	    fprintf(stderr,"invalid characters '%s' in definition\n",
	    	yytext);
	}
}


%{
	/* body part - PostScript code */
%}

<PS>\%.* {			/* a PS comment, ignore */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"comment %s\n",yytext));
	    /* yylval = yytext; return PSCOMMENT; */
	}
}

<PS>{SIGN}?{DIGIT}+ {		/* a decimal integer */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PSINTEGER ->%s\n",yytext));
	    yylval.intobj = atoi((char *) yytext);
	    return PSINTEGER;
	}
}

<PS>{DIGIT}+#{RADIXDIGIT}+ {	/* a radix number */
#define MAX_ULONG ((unsigned long) -1)
	unsigned base = 0;
	unsigned char *s = (unsigned char *) yytext;
	register unsigned long x, limit;
	register unsigned long i = 0;

	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PSINTEGER radix->%s\n",yytext));
	    while (*s != '#') {
		base *= 10;
		base += *s++ - '0';
		if (base > 32) break;
	    }

	    if ((base < 2) || (base > 36)) {goto error;}
	    else {
		limit = MAX_ULONG / base;
		s++; /* skip # sign */
		while (*s != '\0') {
		    if (i > limit) goto error;
		    i *= base;
		    if (isdigit(*s)) { x = *s - '0';}
		    else { x = (*s | 040) - ('a'-10);}
		    if (x >= base) goto error;
		    if (x > (MAX_ULONG - i)) goto error;
		    i += x;
		    s++;
		}
	    }
	    yylval.intobj = i;
	    return PSINTEGER;

	    error:;
	    ErrIntro(yylineno);
	    fprintf(stderr,"invalid radix number %s\n",yytext);
	    yylval.intobj = 0; /* ERROR */
	    return PSINTEGER;
	}
}

<PS>(({SIGN}?{DIGIT}+(\.{DIGIT}*)?{EXP}?)|({SIGN}?{DIGIT}*\.{DIGIT}+{EXP}?)) {
				/* a float */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PSREAL ->%s\n",yytext));
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object,yytext);
	    return PSREAL;
	}
}

<PS>"(" {			/* start PS string */
	if (nonComment) {
	    newLine = false;
	    BEGIN STR;
	    parens=1;
	    sbody = string_temp;
	    curleng = 0;
	    strlineno = yylineno;
	    *sbody = '\0';
	}
}

%{
	/* inside PS strings */
%}

<STR>"(" {			/* balancing parens */
	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += yyleng;
	parens++;
	*sbody++ = '(';
}

<STR>")" {			/* balancing parens or end string */
	if ((--parens) == 0) {
		BEGIN PS;
		*sbody = '\0';
		yylval.object = psw_malloc(strlen(string_temp) + 1);
		strcpy(yylval.object, string_temp);
		DEBUGP((stderr,"PSSTRING ->%s\n",string_temp));
		return PSSTRING;
	}
	else if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += yyleng;
	*sbody++ = ')';
}

<STR>"\\"[0-7]([0-7]?)([0-7]?) {	/* quoted octal byte */
	if (4 + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += 4;
	sprintf(sbody,"\\%3.3s",(yytext + 1));
	while (*sbody) {
	    if (*sbody == ' ') *sbody = '0';
	    sbody++;
	}
}


<STR>"\\\n"	{ /* ignore quoted newline */
}

<STR>"\\\\"	{ /* keep quoted backslashes in */
	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	*sbody++ = '\\';
	*sbody++ = '\\';
	curleng += 2;
}


<STR>("\\".) {		/* other quoted char, including parens */
	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	switch (yytext[1]) {
	case 'b':
	    *sbody++ = '\b';
	    break;
	case 'f':
	    *sbody++ = '\f';
	    break;
	case 'n':
	    *sbody++ = '\012';
	    break;
	case 'r':
	    *sbody++ = '\015';
	    break;
	case 't':
	    *sbody++ = '\t';
	    break;
	default:
	    *sbody++ = yytext[1];
	    break;
	}
	curleng++;
}


<STR>"\n" {		/* newline in a string */
	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += yyleng;

	*sbody++ = '\n';
}

<STR>[^()\\\n]+ {		/* anything else */
	register int i = yyleng;
	register unsigned char *c = (unsigned char *) yytext;

	if (yyleng + curleng >= maxstring) {
		stringerr(1);
		BEGIN PS;
		*sbody = '\0';
		return PSSTRING;
	}
	curleng += yyleng;
	for (; i > 0; --i) *sbody++ = *c++;
}

%{
	/* hexidecimal strings "< >" */
%}

<PS>"<" {			/* begin hex string */
	if (nonComment) {
	    newLine = false;
	    BEGIN HEX;
	    sbody = string_temp;
	    *sbody = '\0';
	    curleng = 0;
	    strlineno = yylineno;
	    hexstringerrs = 0;
	}
}

<HEX>{W}+ {			/* hex whitespace */
	/* ignore */
}

<HEX>[0-9A-Fa-f]+ {		/* hex string data */
	if (yyleng + curleng >= maxstring) {
		stringerr(2);
		*sbody = '\0';
		BEGIN PS;
		return PSHEXSTRING;
	}
	curleng += yyleng;
	strcpy(sbody,yytext);
	sbody += yyleng;
}

<HEX>">" {			/* end hex string */
	BEGIN PS;
	*sbody = '\0';
	DEBUGP((stderr,"PSHEXSTRING ->%s\n",string_temp));
	yylval.object = psw_malloc(strlen(string_temp) + 1);
	strcpy(yylval.object, string_temp);
	return PSHEXSTRING;
}

<HEX>[^a-fA-F0-9> \t\n\r]+	{	/* ERROR */
	if (hexstringerrs == 0) { /* only complain once per string */
	    ErrIntro(yylineno);
	    fprintf(stderr,"invalid characters in hex string '%s'\n",yytext);
	    hexstringerrs++;
	}
}


%{
	/* straight postscript */
%}

<PS>"<<" 	{	/* just a PS token (for level 2 compatablity) */
	if (nonComment) {
	    newLine = false;
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    DEBUGP((stderr,"PSNAME ->%s\n",yytext));
	    return PSNAME;
	}
}

<PS>">>" 	{	/* just a PS token (for level 2 compatablity) */
	if (nonComment) {
	    newLine = false;
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    DEBUGP((stderr,"PSNAME ->%s\n",yytext));
	    return PSNAME;
	}
}

<PS>[\[\]\{\}] {		/* PS self delimiter */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PS ->%s\n",yytext));
	    return (yytext[0]);
	}
}

<PS>"true"|"false" {		/* boolean */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PSBOOLEAN %s\n",yytext));
	    yylval.intobj = (*yytext == 't');
	    return PSBOOLEAN;
	}
}

<PS>"/"[^ <>\(\)\[\]\{\}\%\/\t\n\r]* {	/* literal name */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PSLITNAME %s\n",yytext));
	    yylval.object = psw_malloc(strlen(yytext));
	    strcpy(yylval.object, yytext+1);
	    return PSLITNAME;
	}
}

<PS>[^ <>\(\)\[\]\{\}\%\/\\\t\n\r]+ {	/* executable name */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PSNAME %s\n",yytext));
	    yylval.object = psw_malloc(strlen(yytext) + 1);
	    strcpy(yylval.object, yytext);
	    return PSNAME;
	}
}

<PS>"*/" {				/* special case */
	if (nonComment) {
	    newLine = false;
	    unput('/');
	    yylval.object = psw_malloc(2);
	    strcpy(yylval.object, "*");
	    return PSNAME;
	}
}

<PS>"\\"[^ <>\(\)\[\]\{\}\%\/\\\t\n\r]+/"[" {	/* \name[index] */
	if (nonComment) {
	    DEBUGP((stderr,"\\PSNAME %s\n",yytext));
	    yylval.object = psw_malloc(strlen(yytext));
	    strcpy(yylval.object, yytext+1);
	    BEGIN SUB;
	    return PSSUBNAME;
	}
}

<SUB>[\[][^ \t\]]*[\]] {	/* [index] */
	if (nonComment) {
	    int len = strlen(yytext);
	    DEBUGP((stderr,"PSINDEX %s\n",yytext));
	    if (len == 2) {
		ErrIntro(yylineno);
		fprintf(stderr,"parameter index expression empty\n");
		yylval.object = "0";
	    }
	    else {
		yylval.object = psw_malloc(len);
		strncpy(yylval.object, yytext+1, len-2);
		yylval.object[len-2] = '\0';
	    }
	    BEGIN PS;
	    return PSINDEX;
	}
}

<SUB>[\[][^\]]*[\]] { /* error */
	if (nonComment) {
	    ErrIntro(yylineno);
	    fprintf(stderr,"parameter index expression error\n");
	    yylval.object = "0";
	    BEGIN PS;
	    return PSINDEX;
	}
}

<PS>[\)\>\\]+	{	/* ERROR */
	if (nonComment) {
	    newLine = false;
	    DEBUGP((stderr,"PS JUNK ->%s\n",yytext));
	    ErrIntro(yylineno);
	    fprintf(stderr,"invalid characters '%s'\n",yytext);
	}
}

<PS>[ \t\r]+ { }

<PS>[\n]+ {
	newLine = true;
}

[ \t]+	{		/* passthru stuff */
	ECHO;
}

\n	{
	outlineno++;
	ECHO;
};

"/*" {		/* C comments on */
	nonComment = false;
	ECHO;
}

"*/" {		/* C comments off */
	if (!nonComment) {
		nonComment = true;
		ECHO;
	}
}

%%

int yywrap (void) {
    if (!feof(yyin))
    	return (0);
/* The following appears not to work with flex.  As it is error
   handling code, we just comment it out. */
#if !defined(FLEX_SCANNER)
    if (yybgin != (yysvec+1)) {	/* make sure we are in state 0 */
	ErrIntro(yylineno);
	fprintf(stderr,"end of input file/missing endps\n");
    }
#endif
    return (1);
}

void stringerr(int type)
{
    ErrIntro(strlineno);
    fprintf(stderr,"%sstring too long (caught at line %d)\n",
    	((type==1)?"":"hex "),yylineno);
    errorCount++;
    return;
}

--6c2NcOVqGQ03X4Wi--

--6F913C3F7F4.1050130618/nanasawa.trinity.unimelb.edu.au--


---------------------------------------
Received: (at 188877-close) by bugs.debian.org; 16 Apr 2003 17:53:03 +0000
>From katie@auric.debian.org Wed Apr 16 12:53:02 2003
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 195r5i-0002l6-00; Wed, 16 Apr 2003 12:53:02 -0500
Received: from katie by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 195r0e-0008DB-00; Wed, 16 Apr 2003 13:47:48 -0400
From: Chris Halls <halls@debian.org>
To: 188877-close@bugs.debian.org
X-Katie: $Revision: 1.33 $
Subject: Bug#188877: fixed in openoffice.org 1.0.3-2
Message-Id: <E195r0e-0008DB-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Wed, 16 Apr 2003 13:47:48 -0400
Delivered-To: 188877-close@bugs.debian.org

We believe that the bug you reported is fixed in the latest version of
openoffice.org, which is due to be installed in the Debian FTP archive:

openoffice.org-bin_1.0.3-2_i386.deb
  to pool/contrib/o/openoffice.org/openoffice.org-bin_1.0.3-2_i386.deb
openoffice.org-help-en_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-help-en_1.0.3-2_all.deb
openoffice.org-l10n-ar_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-ar_1.0.3-2_all.deb
openoffice.org-l10n-da_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-da_1.0.3-2_all.deb
openoffice.org-l10n-de_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-de_1.0.3-2_all.deb
openoffice.org-l10n-el_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-el_1.0.3-2_all.deb
openoffice.org-l10n-en_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-en_1.0.3-2_all.deb
openoffice.org-l10n-es_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-es_1.0.3-2_all.deb
openoffice.org-l10n-fr_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-fr_1.0.3-2_all.deb
openoffice.org-l10n-it_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-it_1.0.3-2_all.deb
openoffice.org-l10n-ja_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-ja_1.0.3-2_all.deb
openoffice.org-l10n-ko_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-ko_1.0.3-2_all.deb
openoffice.org-l10n-nl_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-nl_1.0.3-2_all.deb
openoffice.org-l10n-pl_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-pl_1.0.3-2_all.deb
openoffice.org-l10n-pt_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-pt_1.0.3-2_all.deb
openoffice.org-l10n-ru_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-ru_1.0.3-2_all.deb
openoffice.org-l10n-sv_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-sv_1.0.3-2_all.deb
openoffice.org-l10n-tr_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-tr_1.0.3-2_all.deb
openoffice.org-l10n-zh-cn_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-zh-cn_1.0.3-2_all.deb
openoffice.org-l10n-zh-tw_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org-l10n-zh-tw_1.0.3-2_all.deb
openoffice.org_1.0.3-2.diff.gz
  to pool/contrib/o/openoffice.org/openoffice.org_1.0.3-2.diff.gz
openoffice.org_1.0.3-2.dsc
  to pool/contrib/o/openoffice.org/openoffice.org_1.0.3-2.dsc
openoffice.org_1.0.3-2_all.deb
  to pool/contrib/o/openoffice.org/openoffice.org_1.0.3-2_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 188877@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Chris Halls <halls@debian.org> (supplier of updated openoffice.org package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 16 Apr 2003 16:47:57 +0200
Source: openoffice.org
Binary: openoffice.org-l10n-el openoffice.org-l10n-en openoffice.org-l10n-ja openoffice.org-l10n-fr openoffice.org-l10n-ar openoffice.org-l10n-zh-cn openoffice.org-l10n-es openoffice.org openoffice.org-l10n-zh-tw openoffice.org-l10n-ru openoffice.org-l10n-tr openoffice.org-l10n-de openoffice.org-l10n-ko openoffice.org-help-en openoffice.org-l10n-pl openoffice.org-bin openoffice.org-l10n-nl openoffice.org-l10n-sv openoffice.org-l10n-da openoffice.org-l10n-pt openoffice.org-l10n-it
Architecture: all i386 source 
Version: 1.0.3-2
Distribution: unstable
Urgency: low
Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
Changed-By: Chris Halls <halls@debian.org>
Description: 
 openoffice.org - high-quality office productivity suite
 openoffice.org-bin - OpenOffice.org office suite binary files
 openoffice.org-help-en - OpenOffice.org office suite help (English)
 openoffice.org-l10n-ar - Arabic language package for openoffice.org
 openoffice.org-l10n-da - Danish language package for openoffice.org
 openoffice.org-l10n-de - German language package for openoffice.org
 openoffice.org-l10n-el - Greek language package for openoffice.org
 openoffice.org-l10n-en - English (US) language package for openoffice.org
 openoffice.org-l10n-es - Spanish language package for openoffice.org
 openoffice.org-l10n-fr - French language package for openoffice.org
 openoffice.org-l10n-it - Italian language package for openoffice.org
 openoffice.org-l10n-ja - Japanese language package for openoffice.org
 openoffice.org-l10n-ko - Korean language package for openoffice.org
 openoffice.org-l10n-nl - Dutch language package for openoffice.org
 openoffice.org-l10n-pl - Polish language package for openoffice.org
 openoffice.org-l10n-pt - Portuguese language package for openoffice.org
 openoffice.org-l10n-ru - Russian language package for openoffice.org
 openoffice.org-l10n-sv - Swedish language package for openoffice.org
 openoffice.org-l10n-tr - Turkish language package for openoffice.org
 openoffice.org-l10n-zh-cn - Chinese (simplified) language package for openoffice.org
 openoffice.org-l10n-zh-tw - Chinese (traditional) language package for openoffice.org
Closes: 188877 189034 189283
Changes: 
 openoffice.org (1.0.3-2) unstable; urgency=low
 .
   * 001_IZ13031_printfix: Hotfix for bug in 1.0.3. OOo hangs
     when printing to a non-default printer. (closes: #189283)
   * add upstream patch fixing transex3 to compile with flex 2.5.31
     (closes: #188877), thanks Ken
   * Conflict against 1.0.2 langpacks to force them off the system
     (closes: #189034)
   * Link against dynamic libstlport on s390.  Patch 502_stlportlink
     from Gerhard.
Files: 
 09b0889086659f9a1de96fbd76f55d7c 1575050 contrib/editors optional openoffice.org-l10n-tr_1.0.3-2_all.deb
 141e53469f2e1ccd7d60729763e6ecc7 12688054 contrib/editors optional openoffice.org-help-en_1.0.3-2_all.deb
 212994fe7ef5155643382121d6ea83f1 1870058 contrib/editors optional openoffice.org-l10n-es_1.0.3-2_all.deb
 2ba54b5e5a9ef26a21d6787ea9c4592b 36074054 contrib/editors optional openoffice.org-bin_1.0.3-2_i386.deb
 309429b9b0ec36e5aad2690cae896f49 1668 contrib/editors optional openoffice.org_1.0.3-2.dsc
 3467e2c63222e4ebef0e1f10bfc4e8f4 1860398 contrib/editors optional openoffice.org-l10n-da_1.0.3-2_all.deb
 3e22eb864269e964cec1d5356ddddbbe 1774482 contrib/editors optional openoffice.org-l10n-ja_1.0.3-2_all.deb
 4aa47f715a84ef28d7540a8046937847 10871306 contrib/editors optional openoffice.org_1.0.3-2_all.deb
 5658051c4526a030747b000ad07503af 1433942 contrib/editors optional openoffice.org-l10n-el_1.0.3-2_all.deb
 5abe2522e118c9ddc36dd4c9d2f2eaeb 1792616 contrib/editors optional openoffice.org-l10n-ko_1.0.3-2_all.deb
 7fa334d5083065cafe992e3ca3236a34 1765798 contrib/editors optional openoffice.org-l10n-nl_1.0.3-2_all.deb
 91613f6b5ee69301330873b951bb842f 1761486 contrib/editors optional openoffice.org-l10n-zh-tw_1.0.3-2_all.deb
 97117d183cdf8a53b47606c34dfdcd7a 1984856 contrib/editors optional openoffice.org-l10n-ru_1.0.3-2_all.deb
 a0dae87c284f66ca1600c19474cb0c9d 1906792 contrib/editors optional openoffice.org-l10n-pl_1.0.3-2_all.deb
 b07b9c458e6615d7f0a2ec7c7cda370a 1859282 contrib/editors optional openoffice.org-l10n-it_1.0.3-2_all.deb
 bfaef3be126246bc55e49a03cfff1493 1832958 contrib/editors optional openoffice.org-l10n-pt_1.0.3-2_all.deb
 c1e790c92518f86434844666b847df19 1759472 contrib/editors optional openoffice.org-l10n-zh-cn_1.0.3-2_all.deb
 c5eb46c0c352d989a4a2bcaa7519d287 1390894 contrib/editors optional openoffice.org-l10n-ar_1.0.3-2_all.deb
 c953735c3a7302f26cf33de434a09805 1835798 contrib/editors optional openoffice.org-l10n-de_1.0.3-2_all.deb
 cfe782712fafa734fb0f34b954cf4303 1842400 contrib/editors optional openoffice.org-l10n-en_1.0.3-2_all.deb
 d15c2abc7fd1b598c262504ff145471e 131503 contrib/editors optional openoffice.org_1.0.3-2.diff.gz
 d8a4b01efe0832572c0a32f0726bfc0f 1802044 contrib/editors optional openoffice.org-l10n-fr_1.0.3-2_all.deb
 ddb8aa56ae9e1b889bb1a0db90ec8cc2 1856242 contrib/editors optional openoffice.org-l10n-sv_1.0.3-2_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+nZIXexmdExmX588RArtPAJ46bQGBW36pH766PnOzfEIYJjMNIwCff/F1
/uTw8XDEcHbou5pxjieYzJM=
=mMiB
-----END PGP SIGNATURE-----



Reply to: