Deleted Added
full compact
1/* RCS stream editor */
2
3/******************************************************************************
4 * edits the input file according to a
5 * script from stdin, generated by diff -n
6 * performs keyword expansion
7 ******************************************************************************
8 */

--- 22 unchanged lines hidden (view full) ---

31Report problems and direct all questions to:
32
33 rcs-bugs@cs.purdue.edu
34
35*/
36
37/*
38 * $Log: rcsedit.c,v $
39 * Revision 1.4 1995/10/28 21:49:36 peter
40 * First part of import conflict merge from rcs-5.7 import.
41 *
42 * All those $Log$ entries, combined with the whitespace changes are a real
43 * pain.
44 *
45 * I'm committing this now, before it's completely finished to get it compiling
46 * and working again ASAP. Some of the FreeBSD specific features are not working
47 * in this commit yet (mainly rlog stuff and $FreeBSD: head/gnu/usr.bin/rcs/lib/rcsedit.c 11927 1995-10-29 19:31:11Z peter $ support)
48 *
49 * Revision 5.19 1995/06/16 06:19:24 eggert
50 * Update FSF address.
51 *
52 * Revision 5.18 1995/06/01 16:23:43 eggert
53 * (dirtpname): No longer external.
54 * (do_link): Simplify logic.
55 * (finisheditline, finishedit): Replace Iseek/Itell with what they stand for.
56 * (fopen_update_truncate): Replace `#if' with `if'.

--- 150 unchanged lines hidden (view full) ---

207 * changed type of result of getc() from char to int.
208 * made keyword expansion loop in expandline() portable to machines
209 * without sign-extension.
210 */
211
212
213#include "rcsbase.h"
214
205libId(editId, "$Id: rcsedit.c,v 5.19 1995/06/16 06:19:24 eggert Exp $")
215libId(editId, "$Id: rcsedit.c,v 1.4 1995/10/28 21:49:36 peter Exp $")
216
217static void editEndsPrematurely P((void)) exiting;
218static void editLineNumberOverflow P((void)) exiting;
219static void escape_string P((FILE*,char const*));
220static void keyreplace P((enum markers,struct hshentry const*,int,RILE*,FILE*,int));
221
222FILE *fcopy; /* result file descriptor */
223char const *resultname; /* result pathname */

--- 830 unchanged lines hidden (view full) ---

1054
1055 switch (marker) {
1056 case Author:
1057 aputs(delta->author, out);
1058 break;
1059 case Date:
1060 aputs(date2str(date,datebuf), out);
1061 break;
1062 case FreeBSD:
1063 case Id:
1064 case Header:
1065 escape_string(out,
1055 marker==Id || RCSv
1066 marker==Id || marker==FreeBSD || RCSv<VERSION(4)
1067 ? basefilename(RCSname)
1068 : getfullRCSname()
1069 );
1070 aprintf(out, " %s %s %s %s",
1071 delta->num,
1072 date2str(date, datebuf),
1073 delta->author,
1074 RCSv==VERSION(3) && delta->lockedby ? "Locked"

--- 886 unchanged lines hidden ---