Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 25. október 2026

Rozdiely pre dead/mail2sms/mail2sms.c medzi verziami 1.22 a 1.23

verzia 1.22, 2001/10/27 20:32:43 verzia 1.23, 2001/10/30 17:24:02
Riadok 1 
Riadok 1 
 /*  /*
  * Author: Lubomir Host 'rajo' <host8@kepler.fmph.uniba.sk>   * Author: Lubomir Host 'rajo' <host8@kepler.fmph.uniba.sk>
  * $Log$   * $Log$
    * Revision 1.23  2001/10/30 17:24:02  host8
    * New implementation of http request.
    *
  * Revision 1.22  2001/10/27 20:32:43  host8   * Revision 1.22  2001/10/27 20:32:43  host8
  * mail2sms.c splited to multiple files.   * mail2sms.c splited to multiple files.
  * Little improvements in Makefile.in.   * Little improvements in Makefile.in.
Riadok 59 
Riadok 62 
 /* global variables {{{ */  /* global variables {{{ */
 char *message, *scratch, *keybd;  char *message, *scratch, *keybd;
 GLOB g;  GLOB g;
 WWW www;  //WWW www;
 SERVER servers[] = {  SERVER servers[] = {
 #ifdef ENABLE_AZET  #ifdef ENABLE_AZET
         { AZET,       "azet",       "62.168.116.69",   80, 420 },          //{ AZET,       "azet",       "62.168.116.69",   80, 420 },
           { AZET,       "azet",       "sms.azet.sk",   80, 420 },
 #endif  #endif
 #ifdef ENABLE_WHIZDIARY  #ifdef ENABLE_WHIZDIARY
         { WHIZDIARY,  "whizdiary",  "196.38.82.17",    80, 0 },          //{ WHIZDIARY,  "whizdiary",  "196.38.82.17",    80, 0 },
           { WHIZDIARY,  "whizdiary",  "www.whizdiary.com",    80, 0 },
 #endif  #endif
 #ifdef ENABLE_SPISNET  #ifdef ENABLE_SPISNET
         { SPISNET,    "spisnet",    "195.168.233.131", 80, 132 },          //{ SPISNET,    "spisnet",    "195.168.233.131", 80, 132 },
           { SPISNET,    "spisnet",    "sms.spisnet.sk", 80, 132 },
 #endif  #endif
 #ifdef ENABLE_GLOBTELNET  #ifdef ENABLE_GLOBTELNET
         { GLOBTELNET, "globtelnet", "213.151.200.27",  80, 0 },          //{ GLOBTELNET, "globtelnet", "213.151.200.27",  80, 0 },
           { GLOBTELNET, "globtelnet", "www.globtelnet.sk",  80, 0 },
 #endif  #endif
 #ifdef ENABLE_MTNSMS  #ifdef ENABLE_MTNSMS
 //      { MTNSMS,     "mtnsms",     "196.36.119.197",  80, 0 },          //      { MTNSMS,     "mtnsms",     "196.36.119.197",  80, 0 },
         { MTNSMS,     "mtnsms",     "196.36.119.186",  80, 0 },          //{ MTNSMS,     "mtnsms",     "196.36.119.186",  80, 0 },
           { MTNSMS,     "mtnsms",     "www.mtnsms.com",  80, 0 },
 #endif  #endif
         { 0, NULL, NULL, 0, 0 }          { 0, NULL, NULL, 0, 0 }
 };  };
 int id=-1; /* index to servers[] */  int id=-1; /* index to servers[] */
   
 /* }}} */  /* }}} */
   // Function my_free() {{{
   void my_free(void *ptr)
   {
           /* Normal function 'free()' is buggy,
            * she crash for free(NULL);
            */
           if (ptr != NULL)
                   free(ptr);
   }
   // }}}
 // Function void_read_at_exit() {{{  // Function void_read_at_exit() {{{
 void void_read_at_exit(void)  void void_read_at_exit(void)
 {  {
Riadok 105  void void_read_at_exit(void)
Riadok 123  void void_read_at_exit(void)
                 } // end switch ( select() )                  } // end switch ( select() )
         } // end while (!koniec)          } // end while (!koniec)
   
         free(message);          my_free(message);
         free(scratch);          my_free(scratch);
         free(keybd);          my_free(keybd);
         exit(0);          exit(0);
 } // }}}  } // }}}
 // Function print_usage() {{{  // Function print_usage() {{{
Riadok 181  int main(int argc, char *argv[])
Riadok 199  int main(int argc, char *argv[])
         g.is_mail = 0;          g.is_mail = 0;
         g.reverse = 0;          g.reverse = 0;
 #ifdef DEBUG  #ifdef DEBUG
         g.debug   = 0;          debug   = 0;
 #endif  #endif
   
         strcpy(argv[0], "lynx");          //strcpy(argv[0], "lynx");
         if (argc < 2) {          if (argc < 2) {
                 print_usage(argv[0]);                  print_usage(argv[0]);
                 return(0);                  return(0);
Riadok 269  int main(int argc, char *argv[])
Riadok 287  int main(int argc, char *argv[])
 #ifdef DEBUG  #ifdef DEBUG
                         case 'd':                          case 'd':
                                 if (optarg!=NULL) {                                  if (optarg!=NULL) {
                                         g.debug = atoi(optarg);                                          debug = atoi(optarg);
                                 }                                  }
                                 else g.debug = 1;                                  else debug = 1;
                                 fprintf(stderr, "d: debug = %d\n", g.debug);                                  fprintf(stderr, "d: debug = %d\n", debug);
 #endif  #endif
                                 break;                                  break;
                         case 'h':                          case 'h':
Riadok 332  int main(int argc, char *argv[])
Riadok 350  int main(int argc, char *argv[])
 #endif  #endif
 #ifdef ENABLE_MTNSMS  #ifdef ENABLE_MTNSMS
                 case MTNSMS:                  case MTNSMS:
                           strcpy(message, "dummy=&smsToNumbers=");
                           strncat(message, g.number, strlen(g.number));
                           strcat(message, "&smsMessage=");
                         break;                          break;
 #endif  #endif
                 default:                  default:
Riadok 344  int main(int argc, char *argv[])
Riadok 365  int main(int argc, char *argv[])
   
         if (optind < argc) {          if (optind < argc) {
 #ifdef DEBUG  #ifdef DEBUG
                 if (g.debug)                  if (debug)
                         fprintf (stderr, "non-option ARGV-elements:\n");                          fprintf (stderr, "non-option ARGV-elements:\n");
 #endif  #endif
                 while (optind < argc) {                  while (optind < argc) {
 #ifdef DEBUG  #ifdef DEBUG
                         if (g.debug)                          if (debug)
                                 fprintf (stderr, "%s ", argv[optind]);                                  fprintf (stderr, "%s ", argv[optind]);
 #endif  #endif
                         strcat(message, argv[optind++]);                          strcat(message, argv[optind++]);
                         if (argv[optind] != NULL) strcat(message, "+");                          if (argv[optind] != NULL) strcat(message, "+");
                 }                  }
 #ifdef DEBUG  #ifdef DEBUG
                 if (g.debug)                  if (debug)
                         fprintf (stderr, "\n");                          fprintf (stderr, "\n");
 #endif  #endif
         }          }
Riadok 415  int main(int argc, char *argv[])
Riadok 436  int main(int argc, char *argv[])
 #endif  #endif
 #ifdef ENABLE_MTNSMS  #ifdef ENABLE_MTNSMS
                 case MTNSMS:                  case MTNSMS:
                           strcat(message, "&smsSig=0&smsSigDyna=rajo"
                                                                           "&lenSSig=5&lenLSig=5&lenSysSig=11");
                         /* empty */                          /* empty */
                         break;                          break;
 #endif  #endif
Riadok 428  int main(int argc, char *argv[])
Riadok 451  int main(int argc, char *argv[])
   
         if (          if (
 #ifdef DEBUG  #ifdef DEBUG
                                                         sendsms(message, g.debug-1) != 0                                                          sendsms(message, debug-1) != 0
 #else  #else
                                                         sendsms(message, 0) != 0                                                          sendsms(message, 0) != 0
 #endif  #endif
Riadok 437  int main(int argc, char *argv[])
Riadok 460  int main(int argc, char *argv[])
                 fprintf(stderr, "Zlyhalo posielanie SMSky, "                  fprintf(stderr, "Zlyhalo posielanie SMSky, "
                                                                 "skusam poslat este raz ...\n");                                                                  "skusam poslat este raz ...\n");
 #ifdef DEBUG  #ifdef DEBUG
                 sendsms(message, g.debug-1);                  sendsms(message, debug-1);
 #else  #else
                 sendsms(message, 0);                  sendsms(message, 0);
 #endif  #endif
         }          }
         free(message);          my_free(message);
         free(scratch);          my_free(scratch);
         free(keybd);          my_free(keybd);
         return 0;          return 0;
 } // }}}  } // }}}
 /* Modeline for ViM {{{1  /* Modeline for ViM {{{1

Legend:
Odstranené z verzie1.22  
zmenené riadky
  Pridané vo verzii1.23

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok