🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #6808

indent(1)

#6808
From: S. Cowles
Date: Wed, 13 Feb 1991 22:03
42 lines
2033 bytes
When running indent(1) under SunOS 4.0.3 on files under sccs control, I've
been plagued by certain behaviors from indent.  The sccs keyword %Z% is
used by what(1) to print out strings embedded in files; usually this
keyword is translated to the string:  @(#).  When invoking indent on c
code files that have this string present in a macro definition not
protected by quotes, indent forces the sharp to begin the next line, like
a compiler directive, and breaks the macro.  The only workaround I've been
able to come up with so far is to use indent only on the editable version
of sccs files which do not yet have the %Z% substituted.

Example code before indent:

#define SCCSID(arg) static char sccsid[]="arg"
SCCSID(@(#)	file.c	1/2/3);

Example code after indent:

#define SCCSID(arg) static char sccsid[]="arg"
SCCSID(@(
#)	file.c	1/2/3);

In a related problem, when running indent on editable versions of sccs
files, indent breaks the sccs keywords.

Example code before indent:

#define SCCSID(arg) static char sccsid[]="arg"
SCCSID(%W%	%U%	%E%);

Example code after indent:

#define SCCSID(arg) static char sccsid[]="arg"
SCCSID(%W % %U % %E %);

Are these behaviors features or bugs?  If they are bugs, are there any
patches available?

sid cowles  
internet:                uucp:
sid@sybase.com           {pacbell,sun,{uunet,ucbvax}!mtxinu}!sybase!sid
scowles@humpty.llnl.gov  {backbone}!lll-winken!humpty!scowles
scowles@ccc.nersc.gov
Technical Details
Message-ID: <1615@brchh104.bnr.ca>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!cunews!bnrgate!brtph3!brchh104!brchs1!bnr.ca!rice.edu!sun-spots-request
From: mtxinu!sybase!sid@ucbvax.berkeley.edu (S. Cowles)
Newsgroups: comp.sys.sun
Subject: indent(1)
Keywords: Software
Message-ID: <1615@brchh104.bnr.ca>
Date: 13 Feb 91 22:03:00 GMT
Sender: news@brchh104.bnr.ca
Organization: Sun-Spots
Lines: 42
Approved: Sun-Spots@rice.edu
X-Original-Date: 7 Feb 91 20:34:11 GMT
X-Sun-Spots-Digest: Volume 10, Issue 33, message 13
X-Note: Submissions: sun-spots@rice.edu, Admin: sun-spots-request@rice.edu