📄 fax.c++
字号:
/*
* JTAPI library copyright 1998 by Web4Groups consortium (http://Web4Groups.at)
*/
#include <string.h>
#include <string.h>
#include <stdlib.h>
#include "ClientHandler.h"
void JNICALL Java_ClientHandler_sendToHyla(JNIEnv *env, jobject obj, jint cmd, jstring dest, jstring fileName) {
char *buf = (char*)malloc(64);
/* a value of 0 for cmd means to execute sendfax
otherwise execute faxmail
*/
if (cmd == 0)
buf = strcpy(buf, "sendfax -n -d ");
else buf = strcpy(buf, "faxmail -n -d ");
const char *number = env->GetStringUTFChars(dest, 0);
buf = strcat(buf, number);
if (cmd == 0)
buf = strcat(buf, " ");
else
buf = strcat(buf, " < ");
const char *fName = env->GetStringUTFChars(fileName, 0);
buf = strcat(buf, fName);
env->ReleaseStringUTFChars(dest, number);
env->ReleaseStringUTFChars(fileName, fName);
printf("cmd: %d, %s\n", cmd, buf);
system(buf);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -