blob: 2927deaae72de40c4aedcf00579b4ced5448622e (
plain) (
tree)
|
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
int
libskrift_open_font_at(LIBSKRIFT_FONT **fontp, int dirfd, const char *path)
{
int fd, ret;
if (!*path) {
return libskrift_open_font_fd(fontp, dirfd);
} else {
fd = openat(dirfd, path, O_RDONLY);
if (fd < 0)
return -1;
ret = libskrift_open_font_fd(fontp, fd);
close(fd);
return ret;
}
}
|