version 1.23, 2019/07/19 20:27:25 |
version 1.25, 2019/07/27 13:40:57 |
Line 53 static struct tag_files tag_files; |
|
Line 53 static struct tag_files tag_files; |
|
* but for simplicity, create it anyway. |
* but for simplicity, create it anyway. |
*/ |
*/ |
struct tag_files * |
struct tag_files * |
tag_init(void) |
tag_init(char *tagname) |
{ |
{ |
struct sigaction sa; |
struct sigaction sa; |
int ofd; |
int ofd; |
|
|
ofd = -1; |
ofd = -1; |
tag_files.tfd = -1; |
tag_files.tfd = -1; |
tag_files.tcpgid = -1; |
tag_files.tcpgid = -1; |
|
tag_files.tagname = tagname; |
|
|
/* Clean up when dying from a signal. */ |
/* Clean up when dying from a signal. */ |
|
|
|
|
*tag_files.tfn = '\0'; |
*tag_files.tfn = '\0'; |
tag_files.ofd = -1; |
tag_files.ofd = -1; |
tag_files.tfd = -1; |
tag_files.tfd = -1; |
|
tag_files.tagname = NULL; |
return NULL; |
return NULL; |
} |
} |
|
|
Line 151 tag_put(const char *s, int prio, size_t line) |
|
Line 153 tag_put(const char *s, int prio, size_t line) |
|
s += 2; |
s += 2; |
|
|
/* |
/* |
* Skip whitespace and whatever follows it, |
* Skip whitespace and escapes and whatever follows, |
* and if there is any, downgrade the priority. |
* and if there is any, downgrade the priority. |
*/ |
*/ |
|
|
len = strcspn(s, " \t"); |
len = strcspn(s, " \t\\"); |
if (len == 0) |
if (len == 0) |
return; |
return; |
|
|