canonical-posix.c - scc - simple c99 compiler
HTML git clone git://git.simple-cc.org/scc
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
canonical-posix.c (153B)
---
1 #include <string.h>
2
3 #include <scc/scc.h>
4
5 char *
6 canonical(char *path)
7 {
8 char *name = strrchr(path, '/');
9 return (name && name[1]) ? name+1 : path;
10 }