# HG changeset patch # User Matti Hamalainen # Date 1560722107 -10800 # Node ID e286454d305fb63dfc7b085c7e15ebe4754021a0 # Parent 972d56ad2b788b9192d3b0cd56769afba829ad0e Cosmetics. diff -r 972d56ad2b78 -r e286454d305f src/dmres.c --- a/src/dmres.c Mon Jun 17 00:49:21 2019 +0300 +++ b/src/dmres.c Mon Jun 17 00:55:07 2019 +0300 @@ -922,60 +922,70 @@ return fh->fops->freset(fh); } + int dmferror(DMResource *fh) { fh->atime = time(NULL); return fh->fops->ferror(fh); } + int dmfseek(DMResource *fh, const off_t offset, const int whence) { fh->atime = time(NULL); return fh->fops->fseek(fh, offset, whence); } + off_t dmfsize(DMResource *fh) { fh->atime = time(NULL); return fh->fops->fsize(fh); } + off_t dmftell(DMResource *fh) { fh->atime = time(NULL); return fh->fops->ftell(fh); } + BOOL dmfeof(DMResource *fh) { fh->atime = time(NULL); return fh->fops->feof(fh); } + int dmfgetc(DMResource *fh) { fh->atime = time(NULL); return fh->fops->fgetc(fh); } + int dmfputc(const int val, DMResource *fh) { fh->atime = time(NULL); return fh->fops->fputc(val, fh); } + size_t dmfread(void *ptr, size_t size, size_t nmemb, DMResource *fh) { fh->atime = time(NULL); return fh->fops->fread(ptr, size, nmemb, fh); } + size_t dmfwrite(const void *ptr, size_t size, size_t nmemb, DMResource *fh) { fh->atime = time(NULL); return fh->fops->fwrite(ptr, size, nmemb, fh); } + char *dmfgets(char *str, const int size, DMResource *fh) { char *ptr = str, *end = str + size - 1; @@ -995,11 +1005,13 @@ return (ptr > str) ? str : NULL; } + int dmfputs(const char *str, DMResource *fh) { return dmfwrite(str, strlen(str), 1, fh) == 1 ? 1 : EOF; } + int dmResourceRef(DMResource *node) { dmLockLibMutex(node->lib); @@ -1084,7 +1096,6 @@ lib->flags = flags; lib->resPath = dm_strdup(path); - #ifdef DM_USE_PACKFS if (flags & DRF_USE_PACK) {