=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/rcsprog.c,v retrieving revision 1.112 retrieving revision 1.113 diff -c -r1.112 -r1.113 *** src/usr.bin/rcs/rcsprog.c 2006/04/21 17:17:29 1.112 --- src/usr.bin/rcs/rcsprog.c 2006/04/24 04:51:57 1.113 *************** *** 1,4 **** ! /* $OpenBSD: rcsprog.c,v 1.112 2006/04/21 17:17:29 xsa Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: rcsprog.c,v 1.113 2006/04/24 04:51:57 ray Exp $ */ /* * Copyright (c) 2005 Jean-Francois Brousseau * All rights reserved. *************** *** 31,39 **** #define RCS_CMD_MAXARG 128 #define RCSPROG_OPTSTRING "A:a:b::c:e::ik:Ll::m:Mn:N:o:qt::TUu::Vx::z::" - #define DESC_PROMPT "enter description, terminated with single '.' " \ - "or end of file:\nNOTE: This is NOT the log message!\n" - const char rcs_version[] = "OpenCVS RCS version 3.6"; int rcsflags; --- 31,36 ---- *************** *** 60,66 **** struct cvs_wklhead rcs_temp_files; void sighdlr(int); - static void rcs_set_description(RCSFILE *, const char *); static void rcs_attach_symbol(RCSFILE *, const char *); /* ARGSUSED */ --- 57,62 ---- *************** *** 260,266 **** break; case 't': descfile = rcs_optarg; ! rcsflags |= RCSPROG_TFLAG; break; case 'T': rcsflags |= PRESERVETIME; --- 256,262 ---- break; case 't': descfile = rcs_optarg; ! rcsflags |= DESCRIPTION; break; case 'T': rcsflags |= PRESERVETIME; *************** *** 313,319 **** if ((file = rcs_open(fpath, flags, fmode)) == NULL) continue; ! if (rcsflags & RCSPROG_TFLAG) rcs_set_description(file, descfile); else if (flags & RCS_CREATE) rcs_set_description(file, NULL); --- 309,315 ---- if ((file = rcs_open(fpath, flags, fmode)) == NULL) continue; ! if (rcsflags & DESCRIPTION) rcs_set_description(file, descfile); else if (flags & RCS_CREATE) rcs_set_description(file, NULL); *************** *** 539,571 **** symname, rbuf); } } - } - - /* - * Load description from to . - * If starts with a `-', is taken as the description. - * Otherwise is the name of the file containing the description. - * If is NULL, the description is read from stdin. - */ - static void - rcs_set_description(RCSFILE *file, const char *in) - { - BUF *bp; - char *content; - - /* Description is in file . */ - if (in != NULL && *in != '-') { - bp = cvs_buf_load(in, BUF_AUTOEXT); - cvs_buf_putc(bp, '\0'); - content = cvs_buf_release(bp); - /* Description is in . */ - } else if (in != NULL) - /* Skip leading `-'. */ - content = xstrdup(in + 1); - /* Get description from stdin. */ - else - content = rcs_prompt(DESC_PROMPT); - - rcs_desc_set(file, content); - xfree(content); } --- 535,538 ----