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

📄 common.h

📁 一个类似与Windows环境下的softice的源代码
💻 H
字号:
/******************************************************************************/
/*                                                                            */
/*               Common (C) by Gerhard W. Gruber in Vienna 2003               */
/*                          All rights reserved                               */
/*                                                                            */
/******************************************************************************/

/******************************************************************************
 *
 * PROJECT: Common functions, which are usefull for a variety of modules.
 * $Source: /cvsroot/pice/pice/module/common.h,v $
 * $Revision: 1.1 $
 * $Date: 2004/02/17 23:12:25 $
 * $Author: lightweave $
 * $Name:  $
 *
 * $Log: common.h,v $ * Revision 1.1  2004/02/17 23:12:25  lightweave * New configuration handler for reading config files. See CHANGES.txt for * details. *
 *
 *****************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef _COMMON_H
#define _COMMON_H

#ifdef __KERNEL__

#define SEEK_SET       0       /* Seek from beginning of file.  */
#define SEEK_CUR       1       /* Seek from current position.  */
#define SEEK_END       2       /* Seek from end of file.  */

typedef struct file FILE;
//typedef long FILE;
#define BAD_FILE   NULL

#define fopen      filp_open
#define fclose(pf) filp_close(pf, 0)

ULONG fread(BYTE *buffer, ULONG cs, ULONG blen, FILE *pf);
ULONG fwrite(BYTE *buffer, ULONG cs, ULONG blen, FILE *pf);

BYTE toupper(UBYTE b);
int stricmp(const char *p1, const char *p2);

#endif

#ifdef __cplusplus
extern "C" {
#endif

/**
 *  Allocates and copies a string.
 */
char *StrAlloc(char *str);

LONG FindChar(BYTE *s, BYTE *p, BOOLEAN Case, BOOLEAN Find, BYTE SkipChar);
BYTE *Strip(BYTE *s, int Start);
BYTE *StrStrip(BYTE *s, int Start, char *p);

#ifdef __cplusplus
};
#endif

#endif // _PROFILE_H

⌨️ 快捷键说明

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