=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/diff.c,v retrieving revision 1.9 retrieving revision 1.10 diff -c -r1.9 -r1.10 *** src/usr.bin/cvs/diff.c 2004/12/06 02:46:47 1.9 --- src/usr.bin/cvs/diff.c 2004/12/06 21:03:12 1.10 *************** *** 1,4 **** ! /* $OpenBSD: diff.c,v 1.9 2004/12/06 02:46:47 jfb Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: diff.c,v 1.10 2004/12/06 21:03:12 deraadt Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. *************** *** 418,425 **** if (argc == 0) { cvs_files = cvs_file_get(".", flags); ! } ! else cvs_files = cvs_file_getspec(argv, argc, 0); if (cvs_files == NULL) return (EX_DATAERR); --- 418,424 ---- if (argc == 0) { cvs_files = cvs_file_get(".", flags); ! } else cvs_files = cvs_file_getspec(argv, argc, 0); if (cvs_files == NULL) return (EX_DATAERR); *************** *** 453,468 **** if (dap->rev1 != NULL) { cvs_sendarg(root, "-r", 0); cvs_sendarg(root, dap->rev1, 1); ! } ! else if (dap->date1 != NULL) { cvs_sendarg(root, "-D", 0); cvs_sendarg(root, dap->date1, 1); } if (dap->rev2 != NULL) { cvs_sendarg(root, "-r", 0); cvs_sendarg(root, dap->rev2, 1); ! } ! else if (dap->date2 != NULL) { cvs_sendarg(root, "-D", 0); cvs_sendarg(root, dap->date2, 1); } --- 452,465 ---- if (dap->rev1 != NULL) { cvs_sendarg(root, "-r", 0); cvs_sendarg(root, dap->rev1, 1); ! } else if (dap->date1 != NULL) { cvs_sendarg(root, "-D", 0); cvs_sendarg(root, dap->date1, 1); } if (dap->rev2 != NULL) { cvs_sendarg(root, "-r", 0); cvs_sendarg(root, dap->rev2, 1); ! } else if (dap->date2 != NULL) { cvs_sendarg(root, "-D", 0); cvs_sendarg(root, dap->date2, 1); } *************** *** 496,503 **** root = cfp->cf_parent->cf_ddat->cd_root; cvs_sendreq(root, CVS_REQ_QUESTIONABLE, CVS_FILE_NAME(cfp)); ! } ! else { root = cfp->cf_ddat->cd_root; if ((cfp->cf_parent == NULL) || (root != cfp->cf_parent->cf_ddat->cd_root)) { --- 493,499 ---- root = cfp->cf_parent->cf_ddat->cd_root; cvs_sendreq(root, CVS_REQ_QUESTIONABLE, CVS_FILE_NAME(cfp)); ! } else { root = cfp->cf_ddat->cd_root; if ((cfp->cf_parent == NULL) || (root != cfp->cf_parent->cf_ddat->cd_root)) { *************** *** 518,525 **** dir = cvs_file_getpath(cfp->cf_parent, dfpath, sizeof(dfpath)); root = cfp->cf_parent->cf_ddat->cd_root; repo = cfp->cf_parent->cf_ddat->cd_repo; ! } ! else { dir = "."; root = NULL; repo = NULL; --- 514,520 ---- dir = cvs_file_getpath(cfp->cf_parent, dfpath, sizeof(dfpath)); root = cfp->cf_parent->cf_ddat->cd_root; repo = cfp->cf_parent->cf_ddat->cd_repo; ! } else { dir = "."; root = NULL; repo = NULL; *************** *** 557,564 **** if (root->cr_method != CVS_METHOD_LOCAL) { cvs_sendreq(root, CVS_REQ_MODIFIED, CVS_FILE_NAME(cfp)); cvs_sendfile(root, diff_file); ! } ! else { snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s", root->cr_dir, repo, diff_file, RCS_FILE_EXT); --- 552,558 ---- if (root->cr_method != CVS_METHOD_LOCAL) { cvs_sendreq(root, CVS_REQ_MODIFIED, CVS_FILE_NAME(cfp)); cvs_sendfile(root, diff_file); ! } else { snprintf(rcspath, sizeof(rcspath), "%s/%s/%s%s", root->cr_dir, repo, diff_file, RCS_FILE_EXT); *************** *** 587,594 **** r2 = rcsnum_alloc(); rcsnum_aton(dap->rev2, NULL, r2); b2 = rcs_getrev(rf, r2); ! } ! else { b2 = cvs_buf_load(diff_file, BUF_AUTOEXT); } --- 581,587 ---- r2 = rcsnum_alloc(); rcsnum_aton(dap->rev2, NULL, r2); b2 = rcs_getrev(rf, r2); ! } else { b2 = cvs_buf_load(diff_file, BUF_AUTOEXT); }