BRL-CAD
fb_paged_io.c File Reference
#include "common.h"
#include <stdlib.h>
#include <stdio.h>
#include "bu/color.h"
#include "bu/log.h"
#include "fb_private.h"
#include "fb.h"
Include dependency graph for fb_paged_io.c:

Go to the source code of this file.

Macros

#define PAGE_BYTES   (63*1024L) /* Max # of bytes/dma. */
 
#define PAGE_PIXELS   (((PAGE_BYTES/sizeof(RGBpixel))/ifp->if_width) *ifp->if_width)
 
#define PAGE_SCANS   (ifp->if_ppixels/ifp->if_width)
 
#define Malloc_Bomb(_bytes_)
 

Functions

int fb_ioinit (register fb *ifp)
 
int fb_seek (register fb *ifp, int x, int y)
 
int fb_tell (register fb *ifp, int *xp, int *yp)
 
int fb_wpixel (register fb *ifp, unsigned char *pixelp)
 
int fb_rpixel (register fb *ifp, unsigned char *pixelp)
 
int fb_flush (register fb *ifp)
 

Detailed Description

Buffered frame buffer IO routines.

Definition in file fb_paged_io.c.

Macro Definition Documentation

#define PAGE_BYTES   (63*1024L) /* Max # of bytes/dma. */

Definition at line 40 of file fb_paged_io.c.

#define PAGE_PIXELS   (((PAGE_BYTES/sizeof(RGBpixel))/ifp->if_width) *ifp->if_width)

Definition at line 41 of file fb_paged_io.c.

Referenced by fb_ioinit().

#define PAGE_SCANS   (ifp->if_ppixels/ifp->if_width)

Definition at line 42 of file fb_paged_io.c.

#define Malloc_Bomb (   _bytes_)
Value:
fb_log("\"%s\"(%d) : allocation of %lu bytes failed.\n", \
__FILE__, __LINE__, _bytes_)
void fb_log(const char *fmt,...) _BU_ATTR_PRINTF12
Definition: fb_log.c:42

Definition at line 44 of file fb_paged_io.c.

Referenced by fb_ioinit().

Function Documentation

int fb_ioinit ( register fb ifp)

This initialization routine must be called before any buffered I/O routines in this file are used.

Definition at line 123 of file fb_paged_io.c.

References FB_DEBUG_BIO, fb_log(), fb_internal::if_debug, fb_internal::if_height, fb_internal::if_pbase, fb_internal::if_pcurp, fb_internal::if_pendp, fb_internal::if_pixcur, fb_internal::if_pno, fb_internal::if_ppixels, fb_internal::if_width, Malloc_Bomb, PAGE_PIXELS, and PIXEL_NULL.

Here is the call graph for this function:

int fb_seek ( register fb ifp,
int  x,
int  y 
)

Definition at line 149 of file fb_paged_io.c.

References FB_DEBUG_BIO, fb_log(), if(), fb_internal::if_debug, fb_internal::if_height, fb_internal::if_pbase, fb_internal::if_pcurp, fb_internal::if_pdirty, fb_internal::if_pixcur, fb_internal::if_pno, fb_internal::if_ppixels, and fb_internal::if_width.

Here is the call graph for this function:

int fb_tell ( register fb ifp,
int *  xp,
int *  yp 
)

Definition at line 181 of file fb_paged_io.c.

References FB_DEBUG_BIO, fb_log(), fb_internal::if_debug, fb_internal::if_pixcur, and fb_internal::if_width.

Here is the call graph for this function:

int fb_wpixel ( register fb ifp,
unsigned char *  pixelp 
)
int fb_rpixel ( register fb ifp,
unsigned char *  pixelp 
)
int fb_flush ( register fb ifp)

Definition at line 236 of file fb_paged_io.c.

References fb_internal::if_flush.