extern.cpp
资源名称:myftp.zip [点击查看]
上传用户:kkaqas
上传日期:2007-01-07
资源大小:38k
文件大小:1k
源码类别:
Ftp客户端
开发平台:
Visual C++
- #include "stdafx.h"
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #include "extern.h"
- int g_max_file_size =100*1024000;
- int g_max_send_timeout =20;
- int g_max_recv_timeout =60;
- int g_max_retry =20;
- int g_max_reconnect =10;
- BOOL g_if_use_resume =0;
- char g_cur_path[128];
- void log_msg(char *errmsg, ...)
- {
- va_list args;
- char temp[256],log_file[128];
- FILE *fp =NULL;
- wsprintf(log_file, "%s\log.txt", g_cur_path);
- if((fp =fopen(log_file, "a")) ==NULL)
- return;
- va_start(args, errmsg);
- vsprintf(temp, errmsg, args);
- va_end(args);
- if(temp[0] && temp[strlen(temp)-1] =='n')
- temp[strlen(temp)-1] =0;
- fprintf(fp, "%sn", temp);
- fclose(fp);
- }