mirror of
https://git.zx2c4.com/cgit
synced 2025-08-02 09:05:01 +02:00
Add trim_end() and use it to remove trailing slashes from repo paths
The new function removes all trailing instances of an arbitrary character from a copy of the supplied char array. This is then used to remove any trailing slashes from cgit_query_path. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
parent
42e459bb1f
commit
382805ee83
3 changed files with 25 additions and 2 deletions
1
cgit.h
1
cgit.h
|
@ -159,6 +159,7 @@ extern int chk_zero(int result, char *msg);
|
|||
extern int chk_positive(int result, char *msg);
|
||||
|
||||
extern int hextoint(char c);
|
||||
extern char *trim_end(const char *str, char c);
|
||||
|
||||
extern void *cgit_free_commitinfo(struct commitinfo *info);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue