OSDN Git Service
(root)
/
winmerge-jp
/
winmerge-jp.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Reduce compilation time (2)
[winmerge-jp/winmerge-jp.git]
/
Src
/
Common
/
coretools.cpp
1
/**
2
* @file coretools.cpp
3
*
4
* @brief Common routines
5
*
6
*/
7
8
#include "pch.h"
9
#include "coretools.h"
10
11
size_t linelen(const char *string, size_t maxlen)
12
{
13
size_t stringlen = 0;
14
while (stringlen < maxlen)
15
{
16
char c = string[stringlen];
17
if (c == '\r' || c == '\n' || c == '\0')
18
break;
19
++stringlen;
20
}
21
return stringlen;
22
}
23