⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readxvpic.c

📁 zgv-5.6,一个Linux系统下的图片浏览器(VGA/SVGA)
💻 C
字号:
/* Zgv v2.7 - GIF, JPEG and PBM/PGM/PPM viewer, for VGA PCs running Linux. * Copyright (C) 1993-1995 Russell Marks. See README for license details. * * readxvpic.c - load xv-style thumbnail files. *		 the routine which does the actual loading is *		 read_xv332() in readpnm.c. */#include <stdio.h>#include <string.h>#include <stdlib.h>#include "zgv.h"#include "readpnm.h"	/* where read_xv332() is declared */#include "readxvpic.h"/* no file abort possible, so no aborted file vars */int read_xvpic(filename,howfarfunc,bmap,pal,output_type,pp)char *filename;hffunc howfarfunc;unsigned char **bmap;unsigned char **pal;int *output_type;  /* returns how many bytes per pixel needed for display */PICINFO *pp;{int w,h;*bmap=NULL;*pal=NULL;if((*pal=calloc(768,1))==NULL)  return(_PICERR_NOMEM);make_332_palette(*pal);if(read_xv332(filename,bmap,&w,&h)==_PICERR_NOFILE)  return(_PICERR_NOFILE);pp->width=w;pp->height=h;pp->numcols=256;*output_type=1;return(_PIC_OK);  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -