kevin@kosman.UUCP (Kevin O'Gorman) (04/04/89)
I scarfed indent off the sources group, applied the patches for sysv, (but not the second such patch, which patch complained looked like a reversed patch anyway). Then, to test that it was working, I tried indent indent.c foo and it complained about an unterminated literal in line 26. The line is the last before the #endif in the following: >#ifndef lint >char copyright[] = >"@(#) Copyright (c) 1985 Sun Microsystems, Inc.\n\ > @(#) Copyright (c) 1980 The Regents of the University of California.\n\ > @(#) Copyright (c) 1976 Board of Trustees of the University of Illinois.\n\ > All rights reserved.\n"; >#endif /* not lint */ In foo, the output looks like >#ifndef lint >char copyright[] = >"@(#) Copyright (c) 1985 Sun Microsystems, Inc.\n\ > @(#) Copyright (c) 1980 The Regents of the University of California.\n\ > @(#) Copyright (c) 1976 Board of Trustees of the University of Illinois.\n\ >All rights reserved.\ n "; >#endif /* not lint */ Note the missing space at the beginning, and two added near the end of the line. Am I doing something wrong? Did the sysv patches do this? Was there something in that second sysv patch that I needed? Does indent not like copyrights? Anyone else see this?
oz@yunexus.UUCP (Ozan Yigit) (04/11/89)
In article <735@kosman.UUCP> kevin@kosman.UUCP (Kevin O'Gorman) writes: >Am I doing something wrong? Did the sysv patches do this? Was there something >in that second sysv patch that I needed? Does indent not like copyrights? >Anyone else see this? No, you run into a known indent bug, where it cannot handle string literals longer that a certain size. There is an easy fix to this, and there is a hard one, which requires some code re-structuring so buffers are allocated dynamically and can grow. I did not fix this, because I hate fast+dirty patches to some code that requires quite a bit of re-working. [Keith ?? Are you there ??] oz -- ... and I say to them, Usenet: oz@nexus.yorku.ca `Where the hell were you ......!uunet!utai!yunexus!oz when the page was blank?' Bitnet: oz@[yulibra|yuyetti] Harlan Ellison Phonet: +1 416 736-5257x3976