MCPcopy Create free account
hub / github.com/eggert/tz / rcomp

Function rcomp

zic.c:1871–1876  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1869
1870/* Return 1 if NAME is an absolute symbolic link, -1 if it is relative,
1871 0 if it is not a symbolic link. If *CACHE is not -2, it is the
1872 cached result of a previous call to this function with the same NAME. */
1873static int
1874itssymlink(char const *name, int *cache)
1875{
1876 if (*cache == -2) {
1877 char c = '\0';
1878 *cache = readlink(name, &c, 1) < 0 ? 0 : c == '/' ? 1 : -1;
1879 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected