implement the conveniently-already-prototyped puffs_framebuf_remaining(),
which is just shorthand for tellsize() - telloff()
This commit is contained in:
parent
cfd2c55859
commit
4226bd8b40
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: framebuf.c,v 1.2 2007/05/06 10:21:45 pooka Exp $ */
|
||||
/* $NetBSD: framebuf.c,v 1.3 2007/05/06 10:54:41 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: framebuf.c,v 1.2 2007/05/06 10:21:45 pooka Exp $");
|
||||
__RCSID("$NetBSD: framebuf.c,v 1.3 2007/05/06 10:54:41 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -231,6 +231,13 @@ puffs_framebuf_tellsize(struct puffs_framebuf *pufbuf)
|
||||
return pufbuf->maxoff;
|
||||
}
|
||||
|
||||
size_t
|
||||
puffs_framebuf_remaining(struct puffs_framebuf *pufbuf)
|
||||
{
|
||||
|
||||
return puffs_framebuf_tellsize(pufbuf) - puffs_framebuf_telloff(pufbuf);
|
||||
}
|
||||
|
||||
int
|
||||
puffs_framebuf_seekset(struct puffs_framebuf *pufbuf, size_t newoff)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user