上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 82 下一页
摘要: The Tcl_FindExecutable procedure computes the full path name of the executable file from which the application was invoked and saves it for Tcl's internal use. The executable's path name is needed for several purposes in Tcl. For example, it is needed on some platforms in the implementation 阅读全文
posted @ 2011-10-26 21:02 greencolor 阅读(473) 评论(0) 推荐(0) 编辑
摘要: 1,ls ls -a 查看所有文件 ls -l 查看详细的属性 2,lsattr 查看文件的扩展属性, 如果文件被 chattr +i 添加了写保护, 用lsattr可以看到添加的属性3,file 查看文件的类型4,stat 查看文件的状态 阅读全文
posted @ 2011-10-26 20:18 greencolor 阅读(125) 评论(0) 推荐(0) 编辑
摘要: char * strcat ( char * destination, const char * source );Concatenate stringsAppends a copy of the source string to the destination string. The terminating null character in destination is overwritten by the first character of source, and a new null-character is appended at the end of the new string 阅读全文
posted @ 2011-10-23 16:37 greencolor 阅读(280) 评论(0) 推荐(0) 编辑
摘要: #include <pthread.h> #include <unistd.h> #include <string.h>#include <iostream> static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; struct node { int n_number; struct node *n_next; } *head = NULL; /*[thread_func]*/ st 阅读全文
posted @ 2011-10-23 00:20 greencolor 阅读(619) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>#include<pthread.h>#include<string.h>#include<sys/types.h>#include<unistd.h>pthread_t ntid;void printids(const char *s){pid_t pid;pthread_t tid;pid = getpid();tid = pthread_self();printf("%s pid %u tid %u (0x%x)\n",s,(unsigned int)pid,(unsigne 阅读全文
posted @ 2011-10-22 17:25 greencolor 阅读(200) 评论(0) 推荐(0) 编辑
摘要: #include <string>#include <iostream>using namespace std;void f(const string &s) { cout << s;std::string aa;aa = s;char* ab = strdup(aa.c_str()); cout << aa; printf(ab);}int main() { f("Hello world!");} 阅读全文
posted @ 2011-10-21 11:10 greencolor 阅读(150) 评论(0) 推荐(0) 编辑
摘要: S_IRUSR Permits the file's owner to read it.S_IWUSR Permits the file's owner to write to it.S_IRGRP Permits the file's group to read it.S_IWGRP Permits the file's group to write to it. 阅读全文
posted @ 2011-10-21 10:14 greencolor 阅读(168) 评论(0) 推荐(0) 编辑
摘要: typedef union 定义联合体.typedef struct 定义结构体.联合体可以由不同类型的简单变量组合构成.结构体可以由不同类型的较复杂的变量组合构成.结构体里可以含联合体.联合体里不能含结构体. 阅读全文
posted @ 2011-10-20 23:12 greencolor 阅读(2212) 评论(0) 推荐(0) 编辑
摘要: readOneSectionFromDumpfile(fopen( filename, "r" ))static int readOneSectionFromDumpfile( FILE* dumpFile ){ memset( dumpFileSection, 0, sizeof(dumpFileSection) ); numLineForSection = 0; while (1) { if (feof( dumpFile ) || ferror( dumpFile )) { break; } char *pLine = dumpFileSection[numLineF 阅读全文
posted @ 2011-10-20 22:47 greencolor 阅读(135) 评论(0) 推荐(0) 编辑
摘要: char * fgets ( char * str, int num, FILE * stream );Get string from streamReads characters from stream and stores them as a C string into str until (num-1) characters have been read or either a newline or a the End-of-File is reached, whichever comes first.A newline character makes fgets stop readin 阅读全文
posted @ 2011-10-20 22:05 greencolor 阅读(209) 评论(0) 推荐(0) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 82 下一页