Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/imgfs/mapbook.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


// mapbook.c

typedef struct Bitmap Bitmap;
typedef struct Mapbook Mapbook;
typedef struct Aux Aux;


struct Mapbook
{
	int width;
	int height;
	int index;
	Bitmap *bitmaps;
};

struct Bitmap
{
	int id;
	char *name;
	uchar *data;
	Bitmap *next;
};


Mapbook *new_mapbook(int width, int height);
Mapbook *free_mapbook(Mapbook *m);
void print_mapbook(Mapbook *m);
Bitmap *get_bitmap(Mapbook *m, int id);
Bitmap *blank_bitmap(Mapbook *m);
Bitmap *get_or_create_bitmap(Mapbook *m, int id);
void clear_mapbook(Mapbook *m);
char *set_mapbook_width(Mapbook *m, int nw);
char *set_mapbook_height(Mapbook *m, int nh);



Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.