C ³£Óù¦Äܺ¯Êý ÕûÀí - C/C++ / CÓïÑÔ
C/C++ code:
/*
TSDK.H
Definitions for Common functions and string functions.
Copyright (c) Tody 2010
All Rights Reserved
*/
#ifndef __TSDK_H__
#define __TSDK_H__
#include <string.h>
#include <time.h>
#include <ctype.h>
#if __STDC__
# define _Cdecl
#else
# define _Cdecl cdecl
#endif
#ifdef DOS
# define SAY(x...) printf(x)
#else
# define SAY(x) printf(x)
#endif
#ifndef MAX
# define MAX(a, b) ((a) < (b) ? (b) : (a))
#endif
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#define FATAL(x) do { \
printf("\n[-] PROGRAM ABORT : %s", x); \
exit(1); \
} while (0)
#define VERSION "1.0.0"
#define true 1
#define false 0
typedef char bool;
/* Function Declare */
bool _Cdecl copy_file (char *scr_file, char *dst_file, int flag);
bool _Cdecl file_exist (char *file);
char *_Cdecl skip_spaces (const char *str);
char *_Cdecl strim (char *p);
int _Cdecl t_random (int a, int b);
bool _Cdecl log_save (char *log_file, char *ErrMsg);
bool _Cdecl is_leap_yaer(int year);
int _Cdecl which_day (int year, int mon, int day);
bool _Cdecl is_little_endian( void );
/*******************************************************************
* Remove leading whitesp
Ïà¹ØÎÊ´ð£º
ÈçÌ⣬C/C++ÖеÄexeclÔõôµ÷ÓÃдºÃµÄjava³ÌÐò£¬
execl("/opt/java1.5/bin/java","MyClass",NULL);
ÕâÑùµÄ²»ÐÐŶ¡£
²»»á.
ÔËÐÐjava³ÌÐò
ÕÒ¹¤¾ß²é¿´Ò»ÏÂÄǸö³ÌÐòµÄÃüÁîÐÐ
ËÑË÷Ï£ºjni ......
ÔھƵê¹ÜÀíϵͳÖÐ,ÓÐÒ»¸ö¶ÔÄÚµÄϵͳ,¹©Ç°Ì¨·þÎñÔ±ºÍ¾ÀíʹÓÃ
»¹ÓÐÒ»¸ö¾ÍÊǶÔÍâ,Èÿͻ§¿ÉÒÔÔÚÍøÉÏÔ¤¶©·¿¼ä,
ËüÃÇÖ®¼äÊÇÔõôͨѶµÄ.?µ±ÎÒÌá½»Ô¤¶©·¿¼äÐÅÏ¢µÄʱºò,
ÔÚ¶ÔÄÚµÄϵͳÖÐ,ÈçºÎÖªµÀÎÒÒѾÌá½»ÁËÐÅÏ¢¹ýÈ¥.Ê¹Ç ......