亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? portable.c

?? 匯編源碼大全 有各種匯編源碼 希望對你有所幫助
?? C
?? 第 1 頁 / 共 2 頁
字號:
#ifndef LINT
/* @(#) portable.c 2.24 88/08/24 01:22:06 */
static char sccsid[]="@(#) portable.c 2.24 88/08/24 01:22:06";
#endif /* LINT */

#include "options.h"
/*
Copyright (C) 1986, 1987 Rahul Dhesi -- All rights reserved
(C) Copyright 1988 Rahul Dhesi -- All rights reserved
*/
/**********************
portable.c contains functions needed to make Zoo portable to various
implementations of C.

Note:  Provided a 2's complement machine is used, all functions in
this file are themselves machine-independent and need not be changed
when implementing Zoo on a different machine.  Some code will choke
on 1's complement machines--I think.  

For machine-dependent declarations see files "machine.h" and "options.h". 

For machine-dependent functions see file "machine.c"
*/

#include "zoo.h"
#include "zooio.h"

#include "various.h"
#include "zoofns.h"

#include "machine.h"
#include "debug.h"
#include "assert.h"

#ifdef NEEDCTYP
#include <ctype.h>              /* for tolower() */
#endif

#include "portable.h"

#ifdef TRACE_IO
extern int verbose;
#endif

/* Functions defined for use within this file only.  */
long to_long PARMS((BYTE[]));
int to_int PARMS((BYTE[]));
void b_to_zooh PARMS((struct zoo_header *, BYTE[]));
void b_to_dir PARMS((struct direntry *, BYTE[]));
int dir_to_b PARMS((BYTE[], struct direntry *));
void zooh_to_b PARMS((BYTE[], struct zoo_header *));
void splitlong PARMS((BYTE[], long));
void splitint PARMS((BYTE[], int));

#ifdef TRACE_IO
void show_h PARMS ((struct zoo_header *));
void show_dir PARMS ((struct direntry *));
#endif /* TRACE_IO */

extern unsigned int crccode;

/************************************************************************/
/* I/O functions */
/************************************************************************/

/* some functions get defined only if they aren't already macros */

#ifndef zooread
int zooread (file, buffer, count)
ZOOFILE file; char *buffer; int count;
{ return (fread (buffer, 1, count, file)); }
#endif /* zooread */

#ifndef FIZ
#ifndef zoowrite
int zoowrite (file, buffer, count)
ZOOFILE file; char *buffer; int count;
{ 
	if (file == NULLFILE)
	   return (count);
	else
		return (fwrite (buffer, 1, count, file)); 
}
#endif /* zoowrite */

ZOOFILE zoocreate (fname)
char *fname;
{ return ((ZOOFILE) fopen (fname, Z_NEW)); }

#endif /* FIZ */

#ifndef zooseek
long zooseek (file, offset, whence)
ZOOFILE file; long offset; int whence;
{ return (fseek (file, offset, whence)); }
#endif /* zooseek */

ZOOFILE zooopen (fname, option)
char *fname; char *option;
{ return ((ZOOFILE) fopen (fname, option)); }

#ifndef zootell
long zootell (file)
ZOOFILE file;
{ return ftell (file); }
#endif /* zootell */

int zooclose (file)
ZOOFILE file;
{ return fclose (file); }

/**********************
low_ch() is a macro that returns a lowercased char; it may be
used with any char, whether or not it is uppercase.   It will
be used below by one or two functions.
*/

#define low_ch(c)		(isupper(c) ? tolower(c) : c)

/************************************************************************/
/*** Following are functions that make up for various implementations ***/
/*** of C not having certain library routines.                        ***/
/************************************************************************/

#ifndef FIZ
/**********************
str_lwr() converts a string to lowercase and returns a pointer to the string
*/
char *str_lwr (str)
char *str;
{
   register char *s;
   s = str;
   while (*s != '\0') {
      *s = toascii(*s);
		*s = low_ch(*s);
      s++;
   }
   return (str);
}

/**********************
str_icmp() compares strings just like strcmp() but it does it without regard to
case.
*/
int str_icmp (s1, s2)
register char *s1, *s2;
{
   for ( ; low_ch(*s1) == low_ch(*s2);  s1++, s2++)
      if (*s1 == '\0')
         return(0);
   return(low_ch(*s1) - low_ch(*s2));
}

#ifdef NEED_MEMSET
/**********************
memset() it sets the first "count" bytes of "dest" to the character
"c" and returns a pointer to "dest".
*/
VOIDPTR memset (dest, c, count)
register VOIDPTR dest;
int c;
unsigned count;
{
   register unsigned i;
   for (i = 0; i < count; i++) {
      *((char *) (dest + i)) = c;
   }
   return dest;
}
#endif /* NEED_MEMSET */

#ifdef NEED_MEMCPY
/**********************
memcpy() copies "count" bytes from "src" to "dest" and returns 
a pointer to "dest".  Not necessarily safe for overlapping moves. */

VOIDPTR memcpy(dest, src, count)
register VOIDPTR dest;
register VOIDPTR src;
unsigned count;
{
	VOIDPTR savedest = dest;
	while (count > 0) {
		*((char *) dest++) = *((char *) src++);
		count--;
	}
}
#endif /* NEED_MEMCPY */

#ifndef FPUTCHAR
/**********************
fputchar() writes a character to stdout.  It is identical to putchar
but is a function, not a macro.
*/
int fputchar (c)
int c;
{
   return (fputc(c, stdout));
}
#endif /* FPUTCHAR */
#endif /* FIZ */

/***********************************************************************/
/*** Following are declarations and functions that are written in a  ***/
/*** machine-independent way but they implement machine-dependent    ***/
/*** activities                                                      ***/
/***********************************************************************/

#ifndef DIRECT_CONVERT
/**********************
to_long() converts four consecutive bytes, in order of increasing
significance, to a long integer.  It is used to make Zoo independent of the
byte order of the system.  
*/
long to_long(data)
BYTE data[];
{
   return (long) ((unsigned long) data[0] | ((unsigned long) data[1] << 8) |
         ((unsigned long) data[2] << 16) | ((unsigned long) data[3] << 24));
}

#ifndef FIZ
/********************
splitlong() converts a long integer to four consecutive BYTEs in order
of increasing significance.
*/
void splitlong(bytes, bigword)
BYTE bytes[];
long bigword;
{
   int i;
   for (i = 0; i < 4; i++) {
      bytes[i] = bigword & 0xff;
      bigword = (unsigned long) bigword >> 8;
   }
}     
#endif /* FIZ */

/*******************
splitint() converts an integer to two consecutive BYTEs in order
of increasing significance.
*/
void splitint(bytes, word)
BYTE bytes[];
int word;
{
   bytes[0] = word & 0xff;
   word = (unsigned int) word >> 8;
   bytes[1] = word & 0xff;
}

/**********************
to_int() converts two consecutive bytes, in order of increasing
significance, to an integer, in a machine-independent manner
*/
int to_int(data)
BYTE data[];
{
   return (int) ((unsigned int) data[0] | ((unsigned int) data[1] << 8));
}

#else /* else of ifndef DIRECT_CONVERT */

long to_long(data)
BYTE data[];
{
   return ( * (long *) data );
}

#ifndef FIZ
/********************
splitlong() converts a long integer to four consecutive BYTEs in order
of increasing significance.
*/
void splitlong(bytes, bigword)
BYTE bytes[];
long bigword;
{
   * (long *) bytes = bigword;
}
#endif /* FIZ */

/*******************
splitint() converts an integer to two consecutive BYTEs in order
of increasing significance.
*/
void splitint(bytes, word)
BYTE bytes[];
int word;
{
   * (int *) bytes = word;
}

/**********************
to_int() converts two consecutive bytes, in order of increasing
significance, to an integer.
*/
int to_int(data)
BYTE data[];
{
   return (*(int *) data);
}

#endif /* ifndef DIRECT_CONVERT .. else ... */

#ifndef FIZ
/**********************
Function frd_zooh() reads the header of a Zoo archive in a machine-
independent manner, from a ZOOFILE.
*/
int frd_zooh(zoo_header, zoo_file)
struct zoo_header *zoo_header;
ZOOFILE zoo_file;
{
   int status;
   BYTE bytes[SIZ_ZOOH];         /* canonical header representation */
#ifdef TRACE_IO
   if (verbose) {
      printf("At file position [%8lx] ", ftell(zoo_file));
   }
#endif
   status = zooread (zoo_file, (char *) bytes, SIZ_ZOOH);
   b_to_zooh (zoo_header, bytes);   /* convert array to structure */
#ifdef TRACE_IO
   if (verbose) {
      printf("frd_zooh: reading\n");
      show_h(zoo_header);
   }
#endif
   if (status < MINZOOHSIZ)
      return (-1);
   else
      return (0);
}
#endif /* FIZ */

/**********************
Function frd_dir() reads a directory entry in a machine-independent manner,
from a ZOOFILE.
*/
int frd_dir(direntry, zoo_file) 
struct direntry *direntry; 
ZOOFILE zoo_file;
{
   int status;
   BYTE bytes[MAXDIRSIZE];    /* big enough to hold variable part too */

   /* To simplify things, we read the maximum possible size of the
   directory entry including the variable size and discard what is not
   needed */
#ifdef TRACE_IO
   if (verbose) {
      printf("At file position [%8lx] ", ftell(zoo_file));
   }
#endif
   status = zooread (zoo_file, (char *) bytes, MAXDIRSIZE);
   if (status < SIZ_DIR)
      return (-1);
   b_to_dir (direntry, bytes);
#ifdef TRACE_IO
   if (verbose) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜a成v人精品| 日本怡春院一区二区| 中文字幕一区视频| 极品少妇一区二区| 大尺度一区二区| 一本到高清视频免费精品| 在线观看日产精品| 精品国产1区2区3区| 中文字幕成人在线观看| 亚洲va国产天堂va久久en| 国内精品久久久久影院一蜜桃| 91精彩视频在线观看| 国产日韩欧美亚洲| 日本aⅴ亚洲精品中文乱码| 99精品视频免费在线观看| 91精品国产综合久久久久久漫画 | 一个色妞综合视频在线观看| 日本色综合中文字幕| 99久久精品情趣| 国产午夜亚洲精品理论片色戒| 亚洲精品国产a久久久久久 | 91精品欧美综合在线观看最新 | 国产成人综合精品三级| 91精品在线免费观看| 视频一区视频二区在线观看| 欧美亚州韩日在线看免费版国语版| 26uuu亚洲综合色| 麻豆成人综合网| 精品国产一区a| 蜜桃av一区二区| 欧美理论电影在线| 偷窥国产亚洲免费视频| 欧美在线|欧美| 亚洲制服欧美中文字幕中文字幕| 91视频免费观看| 一区二区欧美在线观看| 欧美人与禽zozo性伦| 蜜臀av性久久久久av蜜臀妖精| 337p亚洲精品色噜噜狠狠| 蜜臀av一区二区在线免费观看| 欧美电影免费观看高清完整版在线| 日本不卡一区二区三区| 欧美va在线播放| 暴力调教一区二区三区| 1区2区3区国产精品| 欧美日韩国产欧美日美国产精品| 五月天网站亚洲| 久久日韩粉嫩一区二区三区| 成人97人人超碰人人99| 亚洲一卡二卡三卡四卡无卡久久| 欧美日韩在线直播| 国产成人一级电影| 亚洲黄色录像片| 久久综合九色综合欧美就去吻 | 国产精品卡一卡二| 欧美日韩在线三区| 福利视频网站一区二区三区| 一区二区三区欧美激情| 欧美精品一区二区三区在线播放| 成人18视频在线播放| 久88久久88久久久| 亚洲线精品一区二区三区| 国产日韩三级在线| 在线电影院国产精品| 99久久综合国产精品| 极品美女销魂一区二区三区 | 色网综合在线观看| 成人免费看片app下载| 精品无人码麻豆乱码1区2区| 亚洲国产精品一区二区www| 欧美激情中文不卡| 久久久久高清精品| 久久亚洲精精品中文字幕早川悠里| 欧美丰满少妇xxxbbb| 久久综合九色综合97婷婷| 香蕉久久夜色精品国产使用方法| 欧美aaa在线| 中文字幕一区二区三区在线播放| 精品理论电影在线观看| 亚洲精品日日夜夜| 麻豆精品精品国产自在97香蕉| 成人免费观看av| 91精品国产一区二区| 中文字幕亚洲成人| 免费日本视频一区| 亚洲mv大片欧洲mv大片精品| 亚洲一区二区三区四区五区中文| 成人免费小视频| 亚洲精品国产视频| 亚洲黄色在线视频| 亚洲成人777| 日日夜夜免费精品| 免费在线观看一区| 久久精品国产精品亚洲红杏| 久久精品国产一区二区三 | 精品在线播放午夜| 久久成人精品无人区| 国产不卡在线视频| www.色精品| 欧美一区二区三区的| 久久综合资源网| 一区二区三区加勒比av| 日本中文字幕一区二区有限公司| 久久精品国产一区二区三| 色婷婷av一区| 国产精品毛片高清在线完整版| 日韩精品视频网| 色屁屁一区二区| 自拍偷拍亚洲欧美日韩| 国产成人精品午夜视频免费 | 中文字幕综合网| 久久国产夜色精品鲁鲁99| 欧美区一区二区三区| 亚洲人一二三区| 91麻豆精品在线观看| 欧美国产精品一区二区三区| 日韩高清在线电影| 69av一区二区三区| 偷拍与自拍一区| 日韩欧美一区中文| 日本成人中文字幕| 欧美一区二区免费视频| 国精产品一区一区三区mba视频 | 国产在线视频一区二区三区| 日韩色视频在线观看| 蜜桃视频一区二区三区在线观看| 91精品国产综合久久香蕉的特点 | 欧美精品xxxxbbbb| wwww国产精品欧美| 99精品欧美一区二区三区小说| 亚洲一区二区三区四区在线| 国产精品女同一区二区三区| 欧美一级高清片| 欧美视频在线一区| 在线视频国内自拍亚洲视频| 岛国精品一区二区| 国产一区二区三区不卡在线观看 | 亚洲二区在线视频| 精品国产髙清在线看国产毛片| 国产麻豆精品久久一二三| 亚洲精品视频在线观看免费| 26uuu久久天堂性欧美| 色婷婷av一区二区三区大白胸| 青青草国产精品亚洲专区无| 日本一区二区视频在线| 91精品国产综合久久久蜜臀粉嫩 | 欧美成人官网二区| 色综合久久88色综合天天6| 美女脱光内衣内裤视频久久网站| 亚洲桃色在线一区| 精品久久一区二区| 欧美日韩免费电影| 本田岬高潮一区二区三区| 久久99最新地址| 亚洲自拍另类综合| 亚洲在线视频一区| 亚洲免费av网站| 亚洲欧美激情插 | 欧美在线视频全部完| 91视频精品在这里| 91在线你懂得| 欧美色区777第一页| 4438x成人网最大色成网站| 欧美日韩一卡二卡| 欧美日韩在线观看一区二区| 欧美中文字幕不卡| 欧美日韩国产一级片| 欧美色区777第一页| 欧美不卡一区二区三区| 亚洲精品在线电影| 国产精品国产三级国产aⅴ原创| 国产精品女同一区二区三区| 亚洲天堂成人在线观看| 一区二区三区欧美在线观看| 日韩精品亚洲一区| 国产很黄免费观看久久| www.欧美日韩| 欧美一区二区观看视频| 日韩精品一区二区三区在线观看| 久久久久九九视频| 一区二区三区中文在线| 蜜臀av国产精品久久久久| 国产一区二区精品久久| 在线免费观看日本欧美| 欧美成人免费网站| 亚洲一区二区精品视频| 国产乱人伦偷精品视频不卡| 欧美日本国产一区| 亚洲色图欧美激情| 免费久久99精品国产| 91精品办公室少妇高潮对白| 国产欧美日韩麻豆91| 天天综合天天综合色| 波多野洁衣一区| 久久久影视传媒| 美女任你摸久久| 欧美一卡二卡三卡| 日韩电影一区二区三区| 一本大道av一区二区在线播放| 久久综合一区二区|