summaryrefslogtreecommitdiff
path: root/backend/dvi/mdvi-lib/files.c
diff options
context:
space:
mode:
authorLaurent Napias <[email protected]>2019-06-29 10:43:23 +0200
committerraveit65 <[email protected]>2019-07-01 17:07:40 +0200
commitaa24676651f8bd3e8b434f72d5aac98e84c0867d (patch)
tree37693766ecb4733c6061dcc2ddc26954fab5ca01 /backend/dvi/mdvi-lib/files.c
parent6741c5db1e5c48c01b25bb7900dc40d48552925d (diff)
downloadatril-aa24676651f8bd3e8b434f72d5aac98e84c0867d.tar.bz2
atril-aa24676651f8bd3e8b434f72d5aac98e84c0867d.tar.xz
Remove trailing whitespaces
Diffstat (limited to 'backend/dvi/mdvi-lib/files.c')
-rw-r--r--backend/dvi/mdvi-lib/files.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/dvi/mdvi-lib/files.c b/backend/dvi/mdvi-lib/files.c
index b7065068..fd88be69 100644
--- a/backend/dvi/mdvi-lib/files.c
+++ b/backend/dvi/mdvi-lib/files.c
@@ -26,13 +26,13 @@
char *dgets(Dstring *dstr, FILE *in)
{
char buffer[256];
-
+
dstr->length = 0;
if(feof(in))
return NULL;
while(fgets(buffer, 256, in) != NULL) {
int len = strlen(buffer);
-
+
if(buffer[len-1] == '\n') {
dstring_append(dstr, buffer, len - 1);
break;
@@ -49,21 +49,21 @@ char *dgets(Dstring *dstr, FILE *in)
const char *file_basename(const char *filename)
{
const char *ptr = strrchr(filename, '/');
-
+
return (ptr ? ptr + 1 : filename);
}
const char *file_extension(const char *filename)
{
const char *ptr = strchr(file_basename(filename), '.');
-
+
return (ptr ? ptr + 1 : NULL);
}
int file_readable(const char *filename)
{
int status = (access(filename, R_OK) == 0);
-
+
DEBUG((DBG_FILES, "file_redable(%s) -> %s\n",
filename, status ? "Yes" : "No"));
return status;
@@ -72,7 +72,7 @@ int file_readable(const char *filename)
int file_exists(const char *filename)
{
int status = (access(filename, F_OK) == 0);
-
+
DEBUG((DBG_FILES, "file_exists(%s) -> %s\n",
filename, status ? "Yes" : "No"));
return status;