This website works better with JavaScript.
Home
Explore
Help
Sign In
Immanuel
/
btpd
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
Add function benc_strlen.
master
Richard Nyberg
18 years ago
parent
c4379cdfb9
commit
47358cf420
2 changed files
with
8 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+7
-0
misc/benc.c
+1
-0
misc/benc.h
+ 7
- 0
misc/benc.c
View File
@@ -78,6 +78,13 @@ benc_validate_aux(const char *p, const char *end)
return p;
}
size_t
benc_strlen(const char *p)
{
char *endptr;
return strtoul(p, &endptr, 10);
}
size_t
benc_length(const char *p)
{
+ 1
- 0
misc/benc.h
View File
@@ -17,6 +17,7 @@ int benc_isdct(const char *p);
int benc_isint(const char *p);
int benc_isstr(const char *p);
size_t benc_strlen(const char *p);
size_t benc_length(const char *p);
size_t benc_nelems(const char *p);
Write
Preview
Loading…
Cancel
Save