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:
Lars Hjemli
2007-06-26 18:04:31 +02:00
부모 42e459bb1f
커밋 382805ee83
3개의 변경된 파일25개의 추가작업 그리고 2개의 파일을 삭제

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);