mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
$NetBSD: patch-ag,v 1.2 2007/10/09 11:09:22 rillig Exp $
|
|
|
|
--- laylex.c.orig 1995-03-31 00:14:39.000000000 +0200
|
|
+++ laylex.c 2007-10-09 13:05:03.000000000 +0200
|
|
@@ -42,7 +42,7 @@ int LayYYleng; extern char LayYYtext[];
|
|
int LayYYmorfg;
|
|
extern char *LayYYsptr, LayYYsbuf[];
|
|
int LayYYtchar;
|
|
-FILE *LayYYin = {stdin}, *LayYYout = {stdout};
|
|
+FILE *LayYYin, *LayYYout;
|
|
extern int LayYYlineno;
|
|
struct LayYYsvf {
|
|
struct LayYYwork *LayYYstoff;
|
|
@@ -57,17 +57,30 @@ extern struct LayYYsvf LayYYsvec[], *Lay
|
|
#include <X11/Xresource.h>
|
|
#include <X11/IntrinsicP.h>
|
|
#include <X11/StringDefs.h>
|
|
+#include <stdlib.h>
|
|
|
|
#include "LayoutP.h"
|
|
#include "laygram.h"
|
|
static char *LayYYsourcebase, *LayYYsource;
|
|
|
|
+static int count (char *s, char c);
|
|
+
|
|
#define input() (*LayYYsource++)
|
|
#define unput(c) (--LayYYsource)
|
|
|
|
# define YYNEWLINE 10
|
|
LayYYlex(){
|
|
int nstr; extern int LayYYprevious;
|
|
+static initialised;
|
|
+
|
|
+ if (!initialised) {
|
|
+ if (LayYYin == NULL)
|
|
+ LayYYin = stdin;
|
|
+ if (LayYYout == NULL)
|
|
+ LayYYout = stdout;
|
|
+ initialised = 1;
|
|
+ }
|
|
+
|
|
while((nstr = LayYYlook()) >= 0)
|
|
LayYYfussy: switch(nstr){
|
|
case 0:
|