=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rcs/co.c,v retrieving revision 1.90 retrieving revision 1.91 diff -c -r1.90 -r1.91 *** src/usr.bin/rcs/co.c 2006/05/11 09:43:19 1.90 --- src/usr.bin/rcs/co.c 2006/05/17 19:37:40 1.91 *************** *** 1,4 **** ! /* $OpenBSD: co.c,v 1.90 2006/05/11 09:43:19 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: co.c,v 1.91 2006/05/17 19:37:40 xsa Exp $ */ /* * Copyright (c) 2005 Joris Vink * All rights reserved. *************** *** 347,353 **** if (!(flags & QUIET) && !(flags & NEWFILE) && !(flags & CO_REVERT) && file->rf_ndelta != 0) ! printf("revision %s", buf); if (file->rf_ndelta != 0) { if ((bp = rcs_getrev(file, rev)) == NULL) { --- 347,353 ---- if (!(flags & QUIET) && !(flags & NEWFILE) && !(flags & CO_REVERT) && file->rf_ndelta != 0) ! (void)fprintf(stderr, "revision %s", buf); if (file->rf_ndelta != 0) { if ((bp = rcs_getrev(file, rev)) == NULL) { *************** *** 393,399 **** if (file->rf_ndelta != 0) { if (!(flags & QUIET) && !(flags & NEWFILE) && !(flags & CO_REVERT)) ! printf(" (locked)"); } } else if (flags & CO_UNLOCK) { if (file->rf_ndelta != 0) { --- 393,399 ---- if (file->rf_ndelta != 0) { if (!(flags & QUIET) && !(flags & NEWFILE) && !(flags & CO_REVERT)) ! (void)fprintf(stderr, " (locked)"); } } else if (flags & CO_UNLOCK) { if (file->rf_ndelta != 0) { *************** *** 412,424 **** if (file->rf_ndelta != 0) { if (!(flags & QUIET) && !(flags & NEWFILE) && !(flags & CO_REVERT)) ! printf(" (unlocked)"); } } if (file->rf_ndelta == 0 && !(flags & QUIET) && ((flags & CO_LOCK) || (flags & CO_UNLOCK))) { ! (void)fprintf(stderr, "no revisions, so nothing can be %s", (flags & CO_LOCK) ? "locked" : "unlocked"); } else if (file->rf_ndelta != 0) { /* XXX - Not a good way to detect if a newline is needed. */ --- 412,424 ---- if (file->rf_ndelta != 0) { if (!(flags & QUIET) && !(flags & NEWFILE) && !(flags & CO_REVERT)) ! (void)fprintf(stderr, " (unlocked)"); } } if (file->rf_ndelta == 0 && !(flags & QUIET) && ((flags & CO_LOCK) || (flags & CO_UNLOCK))) { ! (void)fprintf(stderr, "no revisions, so nothing can be %s\n", (flags & CO_LOCK) ? "locked" : "unlocked"); } else if (file->rf_ndelta != 0) { /* XXX - Not a good way to detect if a newline is needed. */ *************** *** 449,459 **** * revision, and prompt if there are differences. */ if (st.st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)) ! printf("writable "); ! printf("%s exists%s; ", dst, (getuid() == st.st_uid) ? "" : ", and you do not own it"); ! printf("remove it? [ny](n): "); /* default is n */ if (rcs_yesno() == -1) { if (!(flags & QUIET) && isatty(STDIN_FILENO)) --- 449,459 ---- * revision, and prompt if there are differences. */ if (st.st_mode & (S_IWUSR|S_IWGRP|S_IWOTH)) ! (void)fprintf(stderr, "writable "); ! (void)fprintf(stderr, "%s exists%s; ", dst, (getuid() == st.st_uid) ? "" : ", and you do not own it"); ! (void)fprintf(stderr, "remove it? [ny](n): "); /* default is n */ if (rcs_yesno() == -1) { if (!(flags & QUIET) && isatty(STDIN_FILENO))