Wolfgang Thallerfix newlibec13cc97 years agoHistory
25 lines · 656 B · C
RawDownload
#ifndef _NO_BASENAME/* Copyright 2015 Red Hat, Inc. * Permission to use, copy, modify, and distribute this software * is freely granted, provided that this notice is preserved. */ /* The differences with the POSIX version (unix/basename.c): * - declared in <string.h> (instead of <libgen.h>); * - the argument is never modified, and therefore is marked const; * - the empty string is returned if path is an empty string, "/", or ends *   with a trailing slash. */ #include <string.h> char *__gnu_basename (const char *path){  char *p;  if ((p = strrchr (path, '/')))    return p + 1;  return (char *) path;} #endif /* !_NO_BASENAME  */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t