[CLEANUP] Remove 'extern int errno;'
Remove unexported functions from the header Static what makes sense git-svn-id: https://svn.musicpd.org/mpd/trunk@4326 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
e39289a987
commit
d9f31b1c47
22
src/ls.c
22
src/ls.c
@ -23,25 +23,9 @@
|
|||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "utf8.h"
|
#include "utf8.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
extern int errno;
|
|
||||||
|
|
||||||
char * dupAndStripPlaylistSuffix(char * file) {
|
|
||||||
size_t size = strlen(file)-strlen(PLAYLIST_FILE_SUFFIX)-1;
|
|
||||||
char * ret = malloc(size+1);
|
|
||||||
|
|
||||||
strncpy(ret,file,size);
|
|
||||||
ret[size] = '\0';
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char * remoteUrlPrefixes[] =
|
static char * remoteUrlPrefixes[] =
|
||||||
{
|
{
|
||||||
@ -202,7 +186,7 @@ int myStat(char * utf8file, struct stat * st) {
|
|||||||
return stat(actualFile,st);
|
return stat(actualFile,st);
|
||||||
}
|
}
|
||||||
|
|
||||||
int isFile(char * utf8file, time_t * mtime) {
|
static int isFile(char * utf8file, time_t * mtime) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if(myStat(utf8file,&st)==0) {
|
if(myStat(utf8file,&st)==0) {
|
||||||
@ -226,7 +210,7 @@ int isFile(char * utf8file, time_t * mtime) {
|
|||||||
/* suffixes should be ascii only characters */
|
/* suffixes should be ascii only characters */
|
||||||
char * getSuffix(char * utf8file) {
|
char * getSuffix(char * utf8file) {
|
||||||
char * ret = NULL;
|
char * ret = NULL;
|
||||||
|
|
||||||
while(*utf8file) {
|
while(*utf8file) {
|
||||||
if(*utf8file == '.') ret = utf8file+1;
|
if(*utf8file == '.') ret = utf8file+1;
|
||||||
utf8file++;
|
utf8file++;
|
||||||
@ -262,7 +246,7 @@ int isDir(char * utf8name) {
|
|||||||
|
|
||||||
InputPlugin * hasMusicSuffix(char * utf8file, unsigned int next) {
|
InputPlugin * hasMusicSuffix(char * utf8file, unsigned int next) {
|
||||||
InputPlugin * ret = NULL;
|
InputPlugin * ret = NULL;
|
||||||
|
|
||||||
char * s = getSuffix(utf8file);
|
char * s = getSuffix(utf8file);
|
||||||
if(s) {
|
if(s) {
|
||||||
ret = getInputPluginFromSuffix(s, next);
|
ret = getInputPluginFromSuffix(s, next);
|
||||||
|
4
src/ls.h
4
src/ls.h
@ -39,8 +39,6 @@ int isRemoteUrl(char * url);
|
|||||||
|
|
||||||
int myStat(char * utf8file, struct stat * st);
|
int myStat(char * utf8file, struct stat * st);
|
||||||
|
|
||||||
int isFile(char * utf8file, time_t * mtime);
|
|
||||||
|
|
||||||
int isDir(char * utf8name);
|
int isDir(char * utf8name);
|
||||||
|
|
||||||
int isPlaylist(char * utf8file);
|
int isPlaylist(char * utf8file);
|
||||||
@ -49,8 +47,6 @@ InputPlugin * hasMusicSuffix(char * utf8file, unsigned int next);
|
|||||||
|
|
||||||
InputPlugin * isMusic(char * utf8file, time_t * mtime, unsigned int next);
|
InputPlugin * isMusic(char * utf8file, time_t * mtime, unsigned int next);
|
||||||
|
|
||||||
char * dupAndStripPlaylistSuffix(char * file);
|
|
||||||
|
|
||||||
int printRemoteUrlHandlers(FILE * fp);
|
int printRemoteUrlHandlers(FILE * fp);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user