gefaxcover.c

来自「收发传真」· C语言 代码 · 共 68 行

C
68
字号
/* gefax: (gefax is a easy frontend for efax. With efax you can send faxesover your modem to someone else.) Copyright (C) 2000 Rainer Wiener <rainer@konqui.de>This program is free software; you can redistribute it and/ormodify it under the terms of the GNU Public License as published bythe Free Software Foundation; either version 2 of the License, or (atyour option) any later version.This program is distibuted in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public Licence for more details.You should have received a copy of the GNU General Public Licencealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.*/ #include <gtk/gtk.h>#include <stdio.h>#include "gefaxcover.h"#include <sys/time.h>#include <sys/types.h>#include <getopt.h>#include <stdlib.h>extern GString *faxnr, *filenam, *to1, *from1, *faxfrom1, *file10;extern int makecover;extern FILE *f;void creat_cover(){  FILE *f;  struct timeval tv;  struct timezone tz;  time_t now;  gettimeofday(&tv, &tz);  now = tv.tv_sec;   f = fopen("gefax.txt","w");  fprintf(f,"------------------------------------------------------\n\n");  fprintf(f,"                 FAX COVER PAGE                       \n\n");  fprintf(f,"------------------------------------------------------\n\n");  fprintf(f,"  To: %s\n",to1->str);  fprintf(f," fax: %s\n\n",faxnr->str);  fprintf(f,"------------------------------------------------------\n\n");  fprintf(f,"From: %s\n",from1->str);  fprintf(f," fax: %s\n",faxfrom1->str);  fprintf(f,"Time: %s\n", ctime(&now));  //fprintf(f,"Time: \n");  fprintf(f,"\n");  fprintf(f,"------------------------------------------------------\n");  fclose(f);}  void cover(GtkWidget *checkbutton, GtkWidget *entry){  if (GTK_TOGGLE_BUTTON(checkbutton)->active)  makecover=1;  else    makecover=0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?