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
Ïà¹ØÎÊ´ð£º
дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
SHIFT¼ÓF10ÓëÄǸö¼üÓÒctrl±ßÉϵÄÄǸö¼ü¹¦ÄÜÒ»Ñù£¬ÏëÆÁÕâ¸ö
µ«²»ÖªÒªÔõôдÄǸö×éºÏ¼ü£¡
ÓÐûÄĸö´óÏÀ·ÅÒ»¶ÎÕâ¸öµÄ´úÂë»òдһ¶Î
http://topic.csdn.net/u/20090609/15/7dc9fb70-243f-4070-9cfd-34e48b66e6c6.html
......
ÊäÈë10ѧÉúµÄ³É¼¨£¬¹²4¿Æ£¬°´ÕÕÒªÇó±àдʵÏÖÏÂÁй¦ÄܵijÌÐò£¨ÓÃ×Óº¯ÊýʵÏÖ£©
1 Çó³öÿ¿ÆµÄƽ¾ù³É¼¨ ½«Æ½¾ù·Ö¡µ90µÄͬѧµÄÅÅÐò
×÷ÒµÌù~£¡
àÅ ÎÒͬѧ¸øÎÒ·¢µÄ×÷Òµ ÎÒ×òÌì×öÁË µ«Êǽá¹ûÔËÐв»¶Ô ×òÌìÓкö ......
visual c++2008Ëٳɰ棬²»ÄܱàÒëC³ÌÐòÂð£¿Èç¹ûÄÜÊÇÔõô¿ªÊ¼µÄ°¡£¿ÓÃËü´øµÄÃüÁîÌáʾµ¥Ôª³ýÍâ ¡£
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£©
¾ø¶Ô¿ÉÒÔ¡£½¨Á¢win32¿ØÖÆÌ¨³ÌÐò¾Í¿ÉÒÔ
ÒýÓÃ
н¨¹¤³Ì£¨¿Õ¹¤³Ì»òwin32¿ØÖÆÌ¨£ ......