version 1.319, 2019/06/28 13:35:00 |
version 1.320, 2020/10/19 19:51:20 |
|
|
int kwtype; |
int kwtype; |
u_int j, found; |
u_int j, found; |
const u_char *c, *start, *fin, *end; |
const u_char *c, *start, *fin, *end; |
char *kwstr; |
char *kwstr, *rcsfile_basename; |
char expbuf[256], buf[256]; |
char expbuf[256], buf[256], path[PATH_MAX]; |
size_t clen, kwlen, len, tlen; |
size_t clen, kwlen, len, tlen; |
|
|
kwtype = 0; |
kwtype = 0; |
|
|
/* Final character in buffer. */ |
/* Final character in buffer. */ |
fin = c + len - 1; |
fin = c + len - 1; |
|
|
|
if (strlcpy(path, rcsfile, sizeof(path)) >= sizeof(path)) |
|
fatal("rcs_kwexp_line: truncation"); |
|
rcsfile_basename = basename(path); |
|
|
/* |
/* |
* Keyword formats: |
* Keyword formats: |
* $Keyword$ |
* $Keyword$ |
|
|
if (mode & RCS_KWEXP_VAL) { |
if (mode & RCS_KWEXP_VAL) { |
if (kwtype & RCS_KW_RCSFILE) { |
if (kwtype & RCS_KW_RCSFILE) { |
if (!(kwtype & RCS_KW_FULLPATH)) |
if (!(kwtype & RCS_KW_FULLPATH)) |
(void)strlcat(expbuf, basename(rcsfile), |
(void)strlcat(expbuf, rcsfile_basename, |
sizeof(expbuf)); |
sizeof(expbuf)); |
else |
else |
(void)strlcat(expbuf, rcsfile, |
(void)strlcat(expbuf, rcsfile, |
|
|
/* Log line */ |
/* Log line */ |
if (!(kwtype & RCS_KW_FULLPATH)) |
if (!(kwtype & RCS_KW_FULLPATH)) |
(void)strlcat(expbuf, |
(void)strlcat(expbuf, |
basename(rcsfile), sizeof(expbuf)); |
rcsfile_basename, sizeof(expbuf)); |
else |
else |
(void)strlcat(expbuf, rcsfile, |
(void)strlcat(expbuf, rcsfile, |
sizeof(expbuf)); |
sizeof(expbuf)); |