unifdef.1 (79535) | unifdef.1 (95124) |
---|---|
1.\" Copyright (c) 1985, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Dave Yost. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 | 1.\" Copyright (c) 1985, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Dave Yost. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)unifdef.1 8.2 (Berkeley) 4/1/94 |
36.\" $FreeBSD: head/usr.bin/unifdef/unifdef.1 79535 2001-07-10 14:16:33Z ru $ | 36.\" $FreeBSD: head/usr.bin/unifdef/unifdef.1 95124 2002-04-20 12:18:28Z charnier $ |
37.\" 38.Dd April 1, 1994 39.Dt UNIFDEF 1 40.Os 41.Sh NAME 42.Nm unifdef 43.Nd remove ifdef'ed lines 44.Sh SYNOPSIS 45.Nm 46.Op Fl clt 47.Oo 48.Fl D Ns Ar sym 49.Fl U Ns Ar sym 50.Fl iD Ns Ar sym 51.Fl iU Ns Ar sym 52.Oc 53.Ar ... 54.Op Ar file 55.Sh DESCRIPTION | 37.\" 38.Dd April 1, 1994 39.Dt UNIFDEF 1 40.Os 41.Sh NAME 42.Nm unifdef 43.Nd remove ifdef'ed lines 44.Sh SYNOPSIS 45.Nm 46.Op Fl clt 47.Oo 48.Fl D Ns Ar sym 49.Fl U Ns Ar sym 50.Fl iD Ns Ar sym 51.Fl iU Ns Ar sym 52.Oc 53.Ar ... 54.Op Ar file 55.Sh DESCRIPTION |
56.Nm Unifdef 57is useful for removing ifdef'ed lines | 56The 57.Nm 58utility removes ifdef'ed lines |
58from a file while otherwise leaving the file alone. | 59from a file while otherwise leaving the file alone. |
59.Nm Unifdef 60acts on | 60The 61.Nm 62utility acts on |
61#ifdef, #ifndef, #else, and #endif lines, 62and it knows only enough about C 63to know when one of these is inactive 64because it is inside 65a comment, 66or a single or double quote. 67Parsing for quotes is very simplistic: 68when it finds an open quote, --- 56 unchanged lines hidden (view full) --- 125.Fl iU Ns Ar sym 126similar to 127.Fl D Ns Ar sym 128and 129.Fl U Ns Ar sym 130above. 131.El 132.Pp | 63#ifdef, #ifndef, #else, and #endif lines, 64and it knows only enough about C 65to know when one of these is inactive 66because it is inside 67a comment, 68or a single or double quote. 69Parsing for quotes is very simplistic: 70when it finds an open quote, --- 56 unchanged lines hidden (view full) --- 127.Fl iU Ns Ar sym 128similar to 129.Fl D Ns Ar sym 130and 131.Fl U Ns Ar sym 132above. 133.El 134.Pp |
133.Nm Unifdef 134copies its output to | 135The 136.Nm 137utility copies its output to |
135.Em stdout 136and will take its input from 137.Em stdin 138if no 139.Ar file 140argument is given. 141.Pp | 138.Em stdout 139and will take its input from 140.Em stdin 141if no 142.Ar file 143argument is given. 144.Pp |
142.Nm Unifdef 143works nicely with the | 145The 146.Nm 147utility works nicely with the |
144.Fl D Ns Ar sym 145option added to 146.Xr diff 1 147as of the 4.1 Berkeley Software Distribution. 148.Sh SEE ALSO 149.Xr diff 1 150.Sh DIAGNOSTICS 151.Bl -item -compact --- 18 unchanged lines hidden --- | 148.Fl D Ns Ar sym 149option added to 150.Xr diff 1 151as of the 4.1 Berkeley Software Distribution. 152.Sh SEE ALSO 153.Xr diff 1 154.Sh DIAGNOSTICS 155.Bl -item -compact --- 18 unchanged lines hidden --- |