Linuxϳ£ÓÃCÓïÑÔ×Ö·û´®²Ù×÷º¯Êý
stroul£¬
strdup
snprintf()
atio
CÖг£ÓÃ×Ö·û´®²Ù×÷º¯Êý
#include <string.h>
size_t strlen(const char *s) ²âÁ¿×Ö·û´®³¤¶ÈsµÄʵ¼Ê³¤¶È¡£
ÀýÈçs[20]="abc",ÄÇôstrlen(s)µÄ½á¹ûÊÇ3£¬¶ø²»ÊÇ20.Õâ¾ÍÊÇʵ¼Ê³¤¶È
char *strcat(const char *s1, const *s2) ½«×Ö·û´®s2Á¬½Óµ½s1µÄβ²¿¡£´Ós1µÄ\0¿ªÊ¼¡£
int strcmp(const *s1,const *s2) ±È½Ïs1ºÍs2¡£
s1 = s2µÄʱºò·µ»ØÖµ =0
s1 < s2µÄʱºò·µ»ØÖÁ <0
s1 > s2µÄʱºò·µ»ØÖµ >0
char *strchr(const char *s, char c); ·µ»ØsÖÐÊ״γöÏÖCµÄλÖõÄÖ¸Õë¡£Èç¹ûsÖв»´æÔÚcÔò·µ»ØNULL
char *strrchr(const char *s, char c );·µ»ØsÖÐ×îºóÒ»´Î³öÏÖcµÄλÖõÄÖ¸Õë¡£Èç¹ûûÓУ¬Ôò·µ»Ø0
char *strstr(const char *haystack, const char *needle);·µ»ØhaystackÖÐneedle×Ö·û´®Ê״γöÏÖµÄλÖõÄÖ¸Õ루²»±È½Ï½áÊø·ûNULL£©¡£Èô¹ûûÕÒµ½Ôò·µ»ØNULL
ÏÞ¶¨³¤¶ÈµÄ±È½Ï£¬¿½±´ºÍ×·¼Óº¯Êý
int strncmp(char *s1, const char *s2, size_t n);(ÕâЩ¶¼ÊÇÕë¶Ô×Ö·û´®µÄÇ°n¸ö×Ö·ûÀ´²Ù×÷µÄ)
char *strncpy(char *dest, const char *src, size_t n);
char *strncat(char *dest, const char *src, size_t n);
char *strdup(char *s)·µ»ØÖ¸Ïò±»¸´ÖƵÄ×Ö·û´®µÄÖ¸Õ룬ËùÐè¿Õ¼äÓÉmalloc()·ÖÅä¶øÇÒÐèÒªfreeÊÍ·Å¿Õ¼ä
int atoi(const char *nptr);½«×Ö·û´®×ª»»³ÉÕûÐÍÊý
atoi()»áɨÃè²ÎÊýnptr×Ö·û´®£¬Ìø¹ýÇ°ÃæµÄ¿Õ¸ñ£¬Ö±µ½ÓöÉÏÊý×Ö»òÕßÕý¸ººÅ²Å¿ªÊ¼×°»»£¬¶øÔÙÓöµ½·ÇÊý×Ö»òÕß·Ç×Ö·û´®½áÊøʱ('\0')
ÆäʵatoÊÇÒ»×彫×Ö·ûת»»ÎªÊýµÄº¯Êý£¬atof£¬atol:ËûÃÇ·Ö±ðÊǽ«×Ö·û´®×ª»»³É¸¡µãÐÍ£¬³¤ÕûÐÍÊý¡£
unsigned long int stroul(const char *nptr, char **endptr, int base);
stroul() »á¸ù¾ÝbaseËùÖ¸¶¨µÄ½øÖÆ£¨10´ú±í½øÖÆ£¬18´ú±í16½øÖÆ£©½«×Ö·û´®nptrת»»³ÉÎÞ·ûºÅµÄ³¤ÕûÐÎÊý£¬baseµÄ·¶Î§ÊÇ 2~36£¬»òÕßÊÇ0.µ±baseµÄֵΪ0ʱÔòÊDzÉÓÃ10½øÖÆ×öת»»£¬µ±Óöµ½'0x'¿ªÍ·µÄ×Ö·ûÔò»áʹÓÃ16½øÖÆ×öת»»¡£Ò»¿ªÊ¼stroul()»áɨÃè²ÎÊý nptr×Ö·û´®£¬Ìø¹ýÇ°ÃæµÄ¿Õ¸ñ×Ö·û´®£¬Ö±µ½ÓöÉÏÊý×Ö»òÕßÕý¸ººÅ²Å¿ªÊ¼×ª»»£¬ÔÚÓöµ½·ÇÊý×Ö»òÕß×Ö·û´®½áÊø'\0'ʱ½áÊøת»»£¬²¢½«½á¹û·µ»Ø¡£Èô²ÎÊý endptr²»ÎªNULL£¬Ôò»á½«Óöµ½²»ºÏÌõ¼þ¶øÖÕÖ¹µÄnptrµÄ×Ö·û´®Ö¸ÕëÓÉendptr·µ
Ïà¹ØÎĵµ£º
import sun.misc.Signal;
import sun.misc.SignalHandler;
/***
* javaÐźŴ¦Àídemo
* @author jiang_qh
*
*/
public class SignalHandlerExample implements SignalHandler{
private SignalHandler oldHandler;
public void handle(Signal signal) {
System.out.println("Signal handler called for signal " ......
Ëæ×ÅLinuxÓ¦ÓõÄÀ©Õ¹Ðí¶àÅóÓÑ¿ªÊ¼½Ó´¥Linux£¬¸ù¾ÝѧϰWindwosµÄ¾ÑéÍùÍùÓÐһЩãȻµÄ¸Ð¾õ£º²»Öª´ÓºÎ´¦¿ªÊ¼Ñ§Æð¡£ÕâÀï½éÉÜѧϰLinuxµÄһЩ½¨Òé¡£
Ò»¡¢´Ó»ù´¡¿ªÊ¼£º³£³£ÓÐЩÅóÓÑÔÚLinuxÂÛ̳ÎÊһЩÎÊÌ⣬²»¹ý£¬ÆäÖдó¶àÊýµÄÎÊÌⶼÊǺܻù´¡µÄ¡£ÀýÈ磺ΪʲôÎÒʹÓÃÒ»¸öÃüÁîµÄʱºò£¬ÏµÍ³¸æËßÎÒÕÒ²»µ½¸ÃĿ¼£¬ÎÒÒªÈçºÎÏÞÖÆʹÓÃÕß ......
Yum£¨È«³ÆΪ Yellow dog Updater, Modified£©ÊÇÒ»¸öÔÚFedoraÖеÄshellÇ°¶ËÈí¼þ°ü¹ÜÀíÆ÷¡£»ùÓÚrpm°ü¹ÜÀí£¬Äܹ»´ÓÖ¸¶¨µÄ·þÎñÆ÷×Ô¶¯ÏÂÔØRPM°ü²¢ÇÒ°²×°£¬¿ÉÒÔ×Ô¶¯´¦ÀíÒÀÀµÐÔ¹Øϵ£¬²¢ÇÒÒ»´Î°²×°ËùÓÐÒÀÀµµÄÈíÌå°ü£¬ÎÞÐë·±ËöµØÒ»´Î´ÎÏÂÔØ¡¢°²×°¡£
ÏÂÃæ½éÉÜÒ»¸ö´Ó¹âÅÌ×öyumÔ´µÄСʵÑé
±¾ÊÔÑéʹÓÃCentOS-5.4-i386-bin,DVD.isoÈí¼þ° ......
LinuxÉϹ¹ÖþiPhone OS3.1.2¿ª·¢»·¾³´î½¨
½Ì³ÌµØÖ·£º http://www.yifeiyang.net/iphone-development-introduction-3-linux-development-environment-on-the-build-iphone-os3-1-2/
#µÚÒ»²½Ã»ÓÐʲôÎÊÌâ
$ ./toolchain.sh headers
#µÚ¶þ²½Ò²Ë³Àûͨ¹ý
$ ./toolchain.sh firmware
#µÚÈý²½Ò²Í¦Ë³Àû
$ ./toolchain ......
1. LinusºÍBill
ËƺõÔÚÒ»Ò¹Ö®¼ä£¬Õâ¸öÃû×ÖͻȻ±äµÃͬÏó±È¶û¡£¸Ç´ÄÒ»ÑùµÄ¶úÊìÄÜÏê¡£µ«ÊDZȶû¡£¸Ç´Ä£¬ÄÄÅÂÉí¼ÛÓÐÊý²»Ç屶µÄ°ÙÍòÃÀ½ð£¬Ò²ÓÀÔ¶²»»á±ä³ÉLinux Torvalds¡£Õâλ29ËêµÄ·ÒÀ¼ÈË£¬¼òµ¥¶øÇ¿´óµÄLinux²Ù×÷ϵͳµÄ´´ÔìÕߣ¬³¬Ô½Á˸ǴĵÄÉñ»°¡£Ò²Óд«ÎÅ˵¸Ç´ÄÊÇÒ»¸ö׿ԽµÄ³ÌÐòÔ±£¬µ«LinusÊÇ»õÕæ¼ÛʵµÄ¸ßÊ ......