1 .ig \"-*- nroff -*- 2 Copyright (C) 2004, 2005 Free Software Foundation, Inc. 3 4 This file is part of the gdiffmk utility, which is part of groff. 5 Written by Mike Bianchi <MBianchi (a] Foveal.com <mailto:MBianchi (a] Foveal.com>> 6 7 Permission is granted to make and distribute verbatim copies of 8 this manual provided the copyright notice and this permission notice 9 are preserved on all copies. 10 11 Permission is granted to copy and distribute modified versions of this 12 manual under the conditions for verbatim copying, provided that the 13 entire resulting derived work is distributed under the terms of a 14 permission notice identical to this one. 15 16 Permission is granted to copy and distribute translations of this 17 manual into another language, under the above conditions for modified 18 versions, except that this permission notice may be included in 19 translations approved by the Free Software Foundation instead of in 20 the original English. 21 .. 22 . 23 .do mso www.tmac 24 . 25 .TH GDIFFMK @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@" 26 . 27 . 28 .SH NAME 29 gdiffmk \- mark differences between groff/nroff/troff files 30 . 31 . 32 .SH SYNOPSIS 33 .nr a \n(.j 34 .ad l 35 .nr i \n(.i 36 .in +\w'\fBgdiffmk 'u 37 .ti \niu 38 .B gdiffmk 39 .de OP 40 . ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]" 41 . el .RB "[\ " "\\$1" "\ ]" 42 .. 43 .OP \-a \%addmark 44 .OP \-c \%changemark 45 .OP \-d \%deletemark 46 [\ \c 47 .B \-D 48 .OP \-B 49 .OP \-M "mark1 mark2" 50 ] 51 .OP \-x \%diffcmd 52 .OP \-\- 53 .OP \-\-help 54 .OP \%\-\-version 55 .I \%file1 56 .I \%file2 57 [\ \c 58 .IR \%output \ \c 59 ] 60 .br 61 .ad \na 62 . 63 . 64 .SH DESCRIPTION 65 .B gdiffmk 66 compares two 67 .BR groff (1), 68 .BR nroff (1), 69 or 70 .BR troff (1) 71 documents, 72 .I file1 73 and 74 .IR file2 , 75 and creates an output which is 76 .I file2 77 with added `margin character' (.mc) commands that indicate the differences. 78 . 79 .LP 80 If the 81 .I output 82 filename is present, 83 the output is written there. 84 If it is 85 .B \- 86 or absent the output is written to the standard output. 87 . 88 .LP 89 If the 90 .I file1 91 or 92 .I file2 93 argument is 94 .B \- 95 the standard input is read for that input. 96 Clearly both cannot be 97 .BR \- . 98 . 99 .LP 100 Note that the output is not necessarily compatible with all macro packages 101 and all preprocessors. 102 See the 103 .B BUGS 104 section below. 105 . 106 . 107 .SH OPTIONS 108 .TP 109 .BI \-a addmark 110 Use the 111 .I addmark 112 for source lines not in 113 .I file1 114 but present in 115 .IR file2 . 116 Default: 117 .BR + . 118 . 119 .TP 120 .B \-B 121 By default, the deleted texts marked by the 122 .B \-D 123 option end 124 with an added troff break command, 125 .BR .br , 126 to ensure that the deletions are marked properly. 127 This is the only way to guarantee that deletions and small 128 changes get flagged. 129 This option directs the program not to insert these breaks; it makes no 130 sense to use it without 131 .BR \-D . 132 . 133 .TP 134 .BI \-c changemark 135 Use the 136 .I changemark 137 for changed source lines. 138 Default: 139 .BR | . 140 . 141 .TP 142 .BI \-d deletemark 143 Use the 144 .I deletemark 145 for deleted source lines. 146 Default: 147 .BR * . 148 . 149 .TP 150 .B \-D 151 Show the deleted portions from changed and deleted text. 152 Default delimiting marks: 153 .BR "[[" " .\&.\&.\&. " "]]" . 154 . 155 .TP 156 .BI \-M "mark1 mark2" 157 Change the delimiting marks for the 158 .B \-D 159 option. 160 It makes no sense to use this option without 161 .BR \-D . 162 . 163 .TP 164 .BI \-x diffcmd 165 Use the 166 .I diffcmd 167 command to perform the comparison of 168 .I file1 169 and 170 .IR file2 . 171 In particular, 172 .I diffcmd 173 should accept the GNU 174 .B diff 175 .BI \-D name 176 option. 177 Default: 178 .BR diff (1). 179 . 180 .TP 181 .B \-\- 182 All the following arguments are treated as file names, 183 even if they begin with 184 .BR \- . 185 . 186 .TP 187 .B \-\-help 188 Print a usage message on standard error output and exit. 189 . 190 .TP 191 .B \-\-version 192 Print version information on the standard output and exit. 193 . 194 . 195 .SH BUGS 196 The output is not necessarily compatible with all macro packages 197 and all preprocessors. 198 A workaround that is often successful against preprocessor problems 199 is to run 200 .B gdiffmk 201 on the output of all the preprocessors instead of the input source. 202 . 203 .LP 204 .B gdiffmk 205 relies on the 206 .BI \-D name 207 option of GNU 208 .BR diff (1) 209 to make a merged `#ifdef' output format. 210 It hasn't been tested whether other versions of 211 .BR diff (1) 212 do support this option. 213 See also the 214 .BI \-x diffcmd 215 option. 216 . 217 .LP 218 Report bugs to bug-groff (a] gnu.org. 219 Include a complete, self-contained example that will allow the bug to 220 be reproduced, and say which version of 221 .B gdiffmk 222 you are using. 223 . 224 . 225 .SH AUTHORS 226 This document was written and is maintained by 227 .MTO MBianchi (a] Foveal.com "Mike Bianchi" . 228 . 229 .LP 230 This document is distributed under the terms of the FDL (GNU Free 231 Documentation License) version 1.1 or later. 232 You should have received a copy of the FDL on your system, it is also 233 available on-line at the 234 .URL http://\:www.gnu.org/\:copyleft/\:fdl.html "GNU copyleft site" . 235 . 236 .LP 237 .B gdiffmk 238 is part of the 239 .I groff 240 GNU free software project. 241 All parts of the 242 .I groff package 243 are protected by GNU copyleft licenses. 244 The software files are distributed under the terms of the GNU General 245 Public License (GPL), while the documentation files mostly use the GNU 246 Free Documentation License (FDL). 247 . 248 . 249 .SH COPYRIGHT 250 Copyright \(co 2004, 2005 Free Software Foundation, Inc. 251 . 252 .LP 253 .B gdiffmk 254 is free software; you can redistribute it and/or modify it under 255 the terms of the GNU General Public License as published by the Free 256 Software Foundation; either version 2, or (at your option) any later 257 version. 258 . 259 .LP 260 .B gdiffmk 261 is distributed in the hope that it will be useful, but WITHOUT ANY 262 WARRANTY; without even the implied warranty of MERCHANTABILITY or 263 FITNESS FOR A PARTICULAR PURPOSE. 264 See the GNU General Public License for more details. 265 . 266 .LP 267 You should have received a copy of the GNU General Public License along 268 with groff; see the file COPYING. 269 If not, write to the Free Software 270 Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. 271 . 272 . 273 .SH "SEE ALSO" 274 .BR groff (@MAN1EXT@), 275 .BR nroff (@MAN1EXT@), 276 .BR gtroff (@MAN1EXT@), 277 .BR diff (@MAN1EXT@) 278 . 279 .\" Local Variables: 280 .\" mode: nroff 281 .\" End: 282