rcs.c (128269) | rcs.c (131688) |
---|---|
1/* 2 * Copyright (c) 1992, Brian Berliner and Jeff Polk 3 * 4 * You may distribute under the terms of the GNU General Public License as 5 * specified in the README file that comes with the CVS source distribution. 6 * 7 * The routines contained in this file do all the rcs file parsing and 8 * manipulation 9 * | 1/* 2 * Copyright (c) 1992, Brian Berliner and Jeff Polk 3 * 4 * You may distribute under the terms of the GNU General Public License as 5 * specified in the README file that comes with the CVS source distribution. 6 * 7 * The routines contained in this file do all the rcs file parsing and 8 * manipulation 9 * |
10 * $FreeBSD: head/contrib/cvs/src/rcs.c 128269 2004-04-15 01:17:28Z peter $ | 10 * $FreeBSD: head/contrib/cvs/src/rcs.c 131688 2004-07-06 08:10:38Z des $ |
11 */ 12 13#include <assert.h> 14#include "cvs.h" 15#include "edit.h" 16#include "hardlink.h" 17 18/* These need to be source after cvs.h or HAVE_MMAP won't be set... */ 19#ifdef HAVE_MMAP 20# include <sys/mman.h> 21# ifndef HAVE_GETPAGESIZE 22# include "getpagesize.h" 23# endif 24# ifndef MAP_FAILED 25# define MAP_FAILED NULL 26# endif 27#endif 28 | 11 */ 12 13#include <assert.h> 14#include "cvs.h" 15#include "edit.h" 16#include "hardlink.h" 17 18/* These need to be source after cvs.h or HAVE_MMAP won't be set... */ 19#ifdef HAVE_MMAP 20# include <sys/mman.h> 21# ifndef HAVE_GETPAGESIZE 22# include "getpagesize.h" 23# endif 24# ifndef MAP_FAILED 25# define MAP_FAILED NULL 26# endif 27#endif 28 |
29int datesep = '/'; |
|
29int preserve_perms = 0; 30 31/* The RCS -k options, and a set of enums that must match the array. 32 These come first so that we can use enum kflag in function 33 prototypes. */ 34static const char *const kflags[] = 35 {"kv", "kvl", "k", "v", "o", "b", (char *) NULL}; 36enum kflag { KFLAG_KV = 0, KFLAG_KVL, KFLAG_K, KFLAG_V, KFLAG_O, KFLAG_B }; --- 3507 unchanged lines hidden (view full) --- 3544{ 3545 int year, mon, mday, hour, min, sec; 3546 char buf[100]; 3547 3548 (void) sscanf (rcs_date, SDATEFORM, &year, &mon, &mday, &hour, &min, 3549 &sec); 3550 if (year < 1900) 3551 year += 1900; | 30int preserve_perms = 0; 31 32/* The RCS -k options, and a set of enums that must match the array. 33 These come first so that we can use enum kflag in function 34 prototypes. */ 35static const char *const kflags[] = 36 {"kv", "kvl", "k", "v", "o", "b", (char *) NULL}; 37enum kflag { KFLAG_KV = 0, KFLAG_KVL, KFLAG_K, KFLAG_V, KFLAG_O, KFLAG_B }; --- 3507 unchanged lines hidden (view full) --- 3545{ 3546 int year, mon, mday, hour, min, sec; 3547 char buf[100]; 3548 3549 (void) sscanf (rcs_date, SDATEFORM, &year, &mon, &mday, &hour, &min, 3550 &sec); 3551 if (year < 1900) 3552 year += 1900; |
3552 sprintf (buf, "%04d/%02d/%02d %02d:%02d:%02d", year, mon, mday, 3553 hour, min, sec); | 3553 sprintf (buf, "%04d%c%02d%c%02d %02d:%02d:%02d", 3554 year, datesep, mon, datesep, mday, hour, min, sec); |
3554 return xstrdup (buf); 3555} 3556 3557/* Escape the characters in a string so that it can be included in an 3558 RCS value. */ 3559 3560static char * 3561escape_keyword_value (value, free_value) --- 5198 unchanged lines hidden --- | 3555 return xstrdup (buf); 3556} 3557 3558/* Escape the characters in a string so that it can be included in an 3559 RCS value. */ 3560 3561static char * 3562escape_keyword_value (value, free_value) --- 5198 unchanged lines hidden --- |