elks-enhanced
public
Read
Owner: themaster
Branch: master
Commits: 6893
Updated: 2026-04-19 00:15
Git CLI clone URL
git clone https://www.xt-emporium.com/git/elks-enhanced.git
Fullscreen desktop URL
Code
Commits
History
Branches
Bug Reports
Discussions
Compare
Settings
elks-enhanced
/
libc
/
misc
/
dirname.c
File editor
#include <stdio.h> #include <string.h> #include <libgen.h> /* POSIX implementation of dirname(3) */ char * dirname(char *path) { char *dir; int last; last = strlen (path) - 1; if (last == 0 && path[0] == '/') return path; while (last > 0 && path[last] == '/') path[last--] = '\0'; dir = strrchr (path, '/'); if (dir == NULL) { path[0] = '.'; path[1] = '\0'; return path; } while (dir > path && *dir == '/') --dir; dir[1] = '\0'; return path; }
Commit message
This repository is read-only for this account.
Repository snapshot
Current branch
master
Visibility
public
Your access
Read
Remote
Configured
File activity
View file history