version 1.13, 2005/07/25 12:05:43 |
version 1.14, 2005/07/25 12:13:08 |
|
|
#include "rcs.h" |
#include "rcs.h" |
|
|
|
|
static int rcsnum_setsize (RCSNUM *, u_int); |
static int rcsnum_setsize(RCSNUM *, u_int); |
|
|
|
|
/* |
/* |
|
|
* Allocate an RCS number structure and return a pointer to it on success, |
* Allocate an RCS number structure and return a pointer to it on success, |
* or NULL on failure. |
* or NULL on failure. |
*/ |
*/ |
RCSNUM* |
RCSNUM * |
rcsnum_alloc(void) |
rcsnum_alloc(void) |
{ |
{ |
RCSNUM *rnp; |
RCSNUM *rnp; |
|
|
* |
* |
* Parse a string specifying an RCS number and return the corresponding RCSNUM. |
* Parse a string specifying an RCS number and return the corresponding RCSNUM. |
*/ |
*/ |
RCSNUM* |
RCSNUM * |
rcsnum_parse(const char *str) |
rcsnum_parse(const char *str) |
{ |
{ |
char *ep; |
char *ep; |
|
|
* Increment the revision number specified in <num>. |
* Increment the revision number specified in <num>. |
* Returns a pointer to the <num> on success, or NULL on failure. |
* Returns a pointer to the <num> on success, or NULL on failure. |
*/ |
*/ |
RCSNUM* |
RCSNUM * |
rcsnum_inc(RCSNUM *num) |
rcsnum_inc(RCSNUM *num) |
{ |
{ |
if (num->rn_id[num->rn_len - 1] == RCSNUM_MAXNUM) |
if (num->rn_id[num->rn_len - 1] == RCSNUM_MAXNUM) |
|
|
* If <num> is a branch revision, the returned value will be the same |
* If <num> is a branch revision, the returned value will be the same |
* number as the argument. |
* number as the argument. |
*/ |
*/ |
RCSNUM* |
RCSNUM * |
rcsnum_revtobr(const RCSNUM *num) |
rcsnum_revtobr(const RCSNUM *num) |
{ |
{ |
RCSNUM *brnum; |
RCSNUM *brnum; |
|
|
* Retrieve the initial revision number associated with the branch number <num>. |
* Retrieve the initial revision number associated with the branch number <num>. |
* If <num> is a revision number, an error will be returned. |
* If <num> is a revision number, an error will be returned. |
*/ |
*/ |
RCSNUM* |
RCSNUM * |
rcsnum_brtorev(const RCSNUM *brnum) |
rcsnum_brtorev(const RCSNUM *brnum) |
{ |
{ |
RCSNUM *num; |
RCSNUM *num; |