home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / ftp.vapor.com / microdot-1 / md1_src_02.lzx / req_point.c < prev    next >
C/C++ Source or Header  |  2014-05-19  |  14KB  |  519 lines

  1. #include "microdot.h"
  2.  
  3. #include "ogre.h"
  4. #include "ogre_protos.h"
  5.  
  6. #define SD_OK 1
  7. #define SD_CANCEL 2
  8.  
  9. #define SD_DEVICE 3
  10. #define SD_UNIT 4
  11. #define SD_BAUD 5
  12. #define SD_RTS 6
  13. #define SD_HS 7
  14. #define SD_SHARED 8
  15.  
  16. #define SD_MINIT 9
  17. #define SD_MDIAL 10
  18. #define SD_MHANGUP 11
  19.  
  20. #define SD_ZMBUF 12
  21.  
  22. #define SD_XFER 13
  23. #define SD_DTR 14
  24.  
  25. #define SD_CARRIER 15
  26.  
  27. #define SD_HYD_AUTOCHAT 16
  28. #define SD_HYD_NOTIMEOUT 17
  29.  
  30. void doserialcfg( void )
  31. {
  32.     struct ogwin *ogw;
  33.     struct Window *iw;
  34.     struct IntuiMessage *im;
  35.     char *xfermode[] = { "Z-Modem", "Z-Modem-8k", "Hydra", NULL };
  36.  
  37.     int Done = FALSE;
  38.  
  39.     if( !isv37 )
  40.         xfermode[á2 ]á= NULL;
  41.  
  42.     ogw = ogreInitWindow( scr, 0, 0, "Modem-Konfiguration..." );
  43.  
  44.     ogreAddGroup( ogw, 0 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " Serielle Parameter " );
  45.     ogreAddString( ogw, 0, 'e', "D_evice:", SD_DEVICE, prefs.modemdevice, 32, 32 );
  46.     ogreAddInteger( ogw, 1, 0,  "  Unit:", SD_UNIT, prefs.modemunit, 0, MAXINT, 16, 32 );
  47.     ogreAddInteger( ogw, 1, 0, "Baud:", SD_BAUD, prefs.modembaud, 75, MAXINT, 16, 32 );
  48.     ogreAddCheckbox( ogw, 2, 'r', "_RTS/CTS", SD_RTS, prefs.modemflags & 1 );
  49.     ogreAddCheckbox( ogw, 2, 'h', "_Highspeed", SD_HS, prefs.modemflags & 2 );
  50.     ogreAddCheckbox( ogw, 2, 's', "_Shared", SD_SHARED, prefs.modemflags & 4 );
  51.     ogreAddCheckbox( ogw, 2, 'c', "_Carriercheck", SD_CARRIER, ! ( prefs.modemflags & 8 ) );
  52.     ogreAddCycle( ogw, 3, 't', "Pro_tokoll", SD_XFER, xfermode, 16, prefs.pointxfer );
  53.     ogreAddInteger( ogw, 4, 'z', "_Z-Modem-Dateipuffer", SD_ZMBUF, prefs.zmodembuffer, 1, MAXINT, 32, 32 );
  54.     ogreAddCheckbox( ogw, 5, 0, "Hydra-Auto-Chat", SD_HYD_AUTOCHAT, prefs.hydra_autochat );
  55.     ogreAddCheckbox( ogw, 5, 0, "Kein Hydra-Chattimeout", SD_HYD_NOTIMEOUT, prefs.hydra_nochattimeout );
  56.     
  57.  
  58.     ogreAddGroup( ogw, 1 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " Modem-Kommandos " );
  59.     ogreAddString( ogw, 0, 'i', "    _Init:", SD_MINIT, prefs.modeminit, 32, 80 );
  60.     ogreAddString( ogw, 1, 0,   "  WΣhlen:", SD_MDIAL, prefs.modemdial, 32, 80 );
  61.     ogreAddString( ogw, 2, 0,   "Auflegen:", SD_MHANGUP, prefs.modemhangup, 32, 80 );
  62.     ogreAddCheckbox( ogw, 3, 'd', "Auflegen per _DTR-Drop", SD_DTR, prefs.modem_dropdtr );
  63.  
  64.     ogreAddGroup( ogw, 2, OGFRAME_NONE, NULL );
  65.     ogreAddButton( ogw, 0 | OGB_ONENTER, 'o', "_OK", SD_OK );
  66.     ogreAddHelp( ogw, 0 );
  67.     ogreAddButton( ogw, 0 | OGB_ONESC, 'a', "_Abbruch", SD_CANCEL );
  68.  
  69.     iw = ogreOpenWindow( ogw );
  70.     if( !iw )
  71.         return;
  72.  
  73.     while( !Done )
  74.     {
  75.         ogreEnable( ogw, ogreValue( ogw, SD_XFER ) != 2, SD_ZMBUF, 0 );
  76.  
  77.         im = ogreWaitIM( ogw );
  78.  
  79.         if( im->Class == IDCMP_GADGETHELP)
  80.             showguidenum( "modemwin_gads", im->Code );
  81.         else if( im->Class == IDCMP_GADGETUP )
  82.         {
  83.             switch( im->Code )
  84.             {
  85.                 case SD_OK:
  86.                     Done = 2;
  87.                     break;
  88.                 case SD_CANCEL:
  89.                     Done = 1;
  90.                     break;
  91.  
  92.             }
  93.         }
  94.         ogreIMReply( ogw, im );
  95.     }
  96.  
  97.     if( Done == 2 )
  98.     {
  99.         ogreCopyStringValue( ogw, SD_DEVICE, prefs.modemdevice );
  100.         ogreCopyStringValue( ogw, SD_MINIT, prefs.modeminit );
  101.         ogreCopyStringValue( ogw, SD_MDIAL, prefs.modemdial );
  102.         ogreCopyStringValue( ogw, SD_MHANGUP, prefs.modemhangup );
  103.  
  104.         prefs.modemunit    = ogreValue( ogw, SD_UNIT );
  105.         prefs.modembaud    = ogreValue( ogw, SD_BAUD );
  106.         prefs.zmodembuffer = ogreValue( ogw, SD_ZMBUF );
  107.         prefs.pointxfer       = ogreValue( ogw, SD_XFER );
  108.  
  109.         prefs.hydra_nochattimeout = ogreValue( ogw, SD_HYD_NOTIMEOUT );
  110.         prefs.hydra_autochat = ogreValue( ogw, SD_HYD_AUTOCHAT );
  111.  
  112.         prefs.modem_dropdtr = ogreValue( ogw, SD_DTR );
  113.  
  114.         if( ogreValue( ogw, SD_RTS ) )
  115.             prefs.modemflags |= 1;
  116.         else
  117.             prefs.modemflags &= ~1;
  118.  
  119.         if( ogreValue( ogw, SD_HS ) )
  120.             prefs.modemflags |= 2;
  121.         else
  122.             prefs.modemflags &= ~2;
  123.  
  124.         if( ogreValue( ogw, SD_SHARED ) )
  125.             prefs.modemflags |= 4;
  126.         else
  127.             prefs.modemflags &= ~4;
  128.  
  129.         if( !ogreValue( ogw, SD_CARRIER ) )
  130.             prefs.modemflags |= 8;
  131.         else
  132.             prefs.modemflags &= ~8;
  133.  
  134.     }
  135.  
  136.     ogreExitWindow( ogw );
  137. }
  138.  
  139. #ifndef NO_RFC
  140.  
  141. #define RI_OK 1
  142. #define RI_CANCEL 2
  143. #define RI_FMTMAIL 3
  144. #define RI_FMTNEWS 4
  145. #define RI_BATCHNEWS 5
  146. #define RI_BATCHMAIL 6
  147. #define RI_CICOOPT 7
  148. #define RI_CICOCON 8
  149. #define RI_LOGIN 9
  150.  
  151. static void rfcopts( void )
  152. {
  153.     struct ogwin *ogw;
  154.     struct Window *iw;
  155.     struct IntuiMessage *im;
  156.     int Done = FALSE;
  157.     char *sevenbit[] = { "7 Bit (ASCII)", "8 Bit (ISO-8859-1)", NULL };
  158.     char *newsb[]á= { "Compress", "GZip", NULL };
  159.     //char *mailb[]á= { "Ungebatcht", "bsmtp unkomprimiert", "bsmtp Compress", "bsmtp GZip", NULL };
  160.  
  161.     ogw = ogreInitWindow( scr, 0, 0, "RFC/UUCP-Konfiguration..." );
  162.  
  163.     ogreAddGroup( ogw, 0 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " Daten-Format " );
  164.     ogreAddCycle( ogw, 0, 'n', "_News:", RI_FMTNEWS, sevenbit, 20, prefs.rfc_newsfmt );
  165.     //ogreAddCycle( ogw, 0, 'm', "_Mail:", RI_FMTMAIL, sevenbit, 20, prefs.rfc_mailfmt );
  166.     ogreAddCycle( ogw, 1, 'b', "News_batch-Modus:", RI_BATCHNEWS, newsb, 40, prefs.rfc_newsbatch );
  167.     //ogreAddCycle( ogw, 2, 't', "Mail_batch-Modus:", RI_BATCHMAIL, mailb, 40, prefs.rfc_mailbatch );
  168.  
  169.     ogreAddGroup( ogw, 1 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " UUCICO-Optionen " );
  170.     ogreAddString( ogw, 0, 'l', "_Login-Script:", RI_LOGIN, prefs.rfc_login, 40, 256 );
  171.     ogreAddString( ogw, 1, 'c', "_CON:-Fenster", RI_CICOCON, prefs.rfc_cicocon, 40, 256 );
  172.     ogreAddString( ogw, 2, 'p', "ZusΣtzliche O_ptionen:", RI_CICOOPT, prefs.rfc_cicoopts, 40, 128 );
  173.  
  174.     ogreAddGroup( ogw, 2, OGFRAME_NONE, NULL );
  175.     ogreAddButton( ogw, 0 | OGB_ONENTER, 'o', "_OK", RI_OK );
  176.     ogreAddHelp( ogw, 0 );
  177.     ogreAddButton( ogw, 0 | OGB_ONESC, 'a', "_Abbruch", RI_CANCEL );
  178.  
  179.     iw = ogreOpenWindow( ogw );
  180.     if( !iw )
  181.         return;
  182.  
  183.     while( !Done )
  184.     {
  185.         im = ogreWaitIM( ogw );
  186.  
  187.         if( im->Class == IDCMP_GADGETHELP)
  188.             showguidenum( "rfcwin_gads", im->Code );
  189.         else if( im->Class == IDCMP_GADGETUP )
  190.         {
  191.             switch( im->Code )
  192.             {
  193.                 case RI_OK:
  194.                     Done = 2;
  195.                     break;
  196.  
  197.                 case RI_CANCEL:
  198.                     Done = 1;
  199.                     break;
  200.             }
  201.         }
  202.         ogreIMReply( ogw, im );
  203.     }
  204.  
  205.     if( Done == 2 )
  206.     {
  207.         prefs.rfc_newsfmt = ogreValue( ogw, RI_FMTNEWS );
  208.         //prefs.rfc_mailfmt = ogreValue( ogw, RI_FMTMAIL );
  209.         prefs.rfc_newsbatch = ogreValue( ogw, RI_BATCHNEWS );
  210.         //prefs.rfc_mailbatch = ogreValue( ogw, RI_BATCHMAIL );
  211.  
  212.         ogreCopyStringValue( ogw, RI_CICOCON, prefs.rfc_cicocon );
  213.         ogreCopyStringValue( ogw, RI_CICOOPT, prefs.rfc_cicoopts );
  214.         ogreCopyStringValue( ogw, RI_LOGIN, prefs.rfc_login );
  215.     }
  216.  
  217.     ogreExitWindow( ogw );
  218. }
  219.  
  220. #endif
  221.  
  222.  
  223. #define PD_OK 1
  224. #define PD_CANCEL 2
  225.  
  226. #define PD_BOX 3
  227. #define PD_BOXDOMAIN 4
  228. #define PD_USER 5
  229. #define PD_POINT 6
  230. #define PD_PW 7
  231. #define PD_PACK 8
  232. #define PD_UNPACK 9
  233. #define PD_PHONE 10
  234. #define PD_RETRIES 11
  235. #define PD_RETRYDELAY 12
  236. #define PD_TIMEOUT 13
  237. #define PD_PACKTIMEOUT 14
  238. #define PD_NETCALLMODE 15
  239. #define PD_USERPW 16
  240. #define PD_NETCALLSAVE 17
  241. #define PD_CRLF 18
  242. #define PD_BREAKLOGIN 19
  243. #define PD_RFC 20
  244.  
  245. #define PD_IP 21
  246.  
  247. #define PD_JANUS2 22
  248.  
  249. extern int allow_rfc;
  250.  
  251. static void renameuser( char *olduser, char *newuser )
  252. {
  253.     struct mbrett *mb = ( struct mbrett * ) brettlist.lh_Head;
  254.     char newname[ 80 ];
  255.  
  256.     pushdir( prefs.datadir );
  257.     UnLock( CreateDir( prefs.username ) );
  258.     while( !Rename( olduser, newuser ) )
  259.     {
  260.         if( !askreq( "AmigaDOS-Fehler %ld beim Umbenennen des\nUserpostfachs von %s nach %s!", "Wiederholen|Ignorieren", IoErr(), olduser, newuser ) )
  261.             break;
  262.     }
  263.     popdir();
  264.  
  265.     saveprefs( currentprefsname );
  266.  
  267.     strcpy( mb->b.name, newuser );
  268.  
  269.     mb = GetEntry( &brettlist, 4 );
  270.  
  271.     while( mb && mb->n.ln_Succ && ( mb->b.flags & BFLAG_EXTEND_PM ) )
  272.     {
  273.         sprintf( newname, "%s/%s", newuser, strchr( mb->b.name, '/' ) + 1 );
  274.         strcpy( mb->b.name, newname );
  275.         mb = ( struct mbrett * ) mb->n.ln_Succ;
  276.     }
  277. }
  278.  
  279. extern void enablejanus2menus( void );
  280.  
  281. int dopointcfg( void )
  282. {
  283.     struct ogwin *ogw;
  284.     struct Window *iw;
  285.     struct IntuiMessage *im;
  286.     int Done = FALSE;
  287.     char buffer[á256 ];
  288.     int ncmode = prefs.mode;
  289.     char *netcallmode_options[] = 
  290.     {
  291.           "ZConnect",
  292.           "Netcall3.8",
  293.           NULL,
  294.           NULL
  295.     };
  296.  
  297.  
  298. /*    if( ncmode )
  299.         ncmode = 1;*/
  300.  
  301.     if( !allow_rfc )
  302.     {
  303.         if( ncmode == MDM_RFC )
  304.             ncmode = MDM_JANUS;
  305.     }
  306.     else
  307.     {
  308.         if( !netcallmode_options[á2 ]á)
  309.         {
  310.             netcallmode_options[á2 ]á= netcallmode_options[á1 ];
  311.             netcallmode_options[á1 ]á= "RFC/UUCP";
  312.         }
  313.     }
  314.  
  315.     ogw = ogreInitWindow( scr, 0, 0, "Point-Konfiguration..." );
  316.  
  317.     ogreAddGroup( ogw, 0 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " Netz " );
  318.  
  319.     ogreAddString( ogw, 0, 'b', "  _Boxname:", PD_BOX, prefs.boxname, 20, 40 );
  320.     ogreAddString( ogw, 0, 0,   "    Boxdomain:", PD_BOXDOMAIN, prefs.boxdomain, 20, 40 );
  321.     ogreAddString( ogw, 1, 0,   " Username:", PD_USER, prefs.username, 20, 40 );
  322.     ogreAddString( ogw, 1, 0,   " Userpasswort:", PD_USERPW, prefs.userpassword, 20, 40 );
  323.     ogreAddString( ogw, 2, 0,   "Pointname:", PD_POINT, prefs.pointname, 20, 40 );
  324.     ogreAddString( ogw, 2, 0,   "Pointpasswort:", PD_PW, prefs.password, 20, 40 );
  325.  
  326.     ogreAddGroup( ogw, 1 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " Packer " );
  327.     ogreAddString( ogw, 0, 'p', "   _Packer:", PD_PACK, prefs.packer, 20, 40 );
  328.     ogreAddString( ogw, 0, 0,   "Entpacker:", PD_UNPACK, prefs.unpacker, 20, 40 );
  329.  
  330.     ogreAddGroup( ogw, 2 | OGGP_EXPANDSTRING, OGFRAME_OUTLINE, " Anruf " );
  331.     ogreAddString( ogw, 0, 't', " _Telefon:", PD_PHONE, prefs.phone, 40, 128 );
  332.     ogreAddInteger( ogw, 1, 0, "Versuche:", PD_RETRIES, prefs.dialretries, 1, MAXINT, 12, 12 );
  333.     ogreAddInteger( ogw, 1, 0, "        Anwahlpause:", PD_RETRYDELAY, prefs.retrydelay, 1, MAXINT, 12, 12 );
  334.     ogreAddInteger( ogw, 2, 0, " Timeout:", PD_TIMEOUT, prefs.dialtimeout, 10, MAXINT, 12, 12 );
  335.     ogreAddInteger( ogw, 2, 0, "Timeout beim Packen:", PD_PACKTIMEOUT, prefs.packtimeout, 30, MAXINT, 12, 12 );
  336.     ogreAddCycle( ogw, 3, 'n', "_Netcallmodus:", PD_NETCALLMODE, netcallmode_options, 11, ncmode );
  337.     ogreAddCheckbox( ogw, 3, 'j', "_Janus2?", PD_JANUS2, prefs.flags2 & MDF2_JANUS2 );
  338.     ogreAddCheckbox( ogw, 3, 'e', "_Empfangene Daten sichern?", PD_NETCALLSAVE, prefs.netcall_save );
  339.     ogreAddCheckbox( ogw, 4, 'c', "_CR/LF verwenden?", PD_CRLF, prefs.flags2 & MDF2_NETCALLCRLF );
  340.     ogreAddCheckbox( ogw, 4, 'l', "_Login abbrechen?", PD_BREAKLOGIN, prefs.flags2 & MDF2_BREAKLOGIN );
  341. #if 0
  342.     if( SocketBase )
  343.         ogreAddCheckbox( ogw, 4, 's', "_CLIPSaug?", PD_IP, prefs.flags2 & MDF2_CLIPSAUG );
  344. #endif
  345.  
  346.     ogreAddGroup( ogw, 3, OGFRAME_NONE, NULL );
  347.     ogreAddButton( ogw, 0 | OGB_ONENTER, 'o', "_OK", PD_OK );
  348.  
  349.     if( allow_rfc )
  350.         ogreAddButton( ogw, 0, 'r', "_RFC/UU-Optionen", PD_RFC );
  351.  
  352.     ogreAddHelp( ogw, 0 );
  353.     ogreAddButton( ogw, 0 | OGB_ONESC, 'a', "_Abbruch", PD_CANCEL );
  354.  
  355.     iw = ogreOpenWindow( ogw );
  356.     if( !iw )
  357.         return( 0 );
  358.  
  359.     while( !Done )
  360.     {
  361.         ogreEnable( ogw, ogreValue( ogw, PD_NETCALLMODE ) == MDM_RFC,
  362.             PD_RFC,
  363.             0
  364.         );
  365.  
  366.         ogreEnable( ogw, ogreValue( ogw, PD_NETCALLMODE ) == MDM_JANUS,
  367.             PD_JANUS2,
  368.             0
  369.         );
  370.  
  371.         ogreEnable( ogw, ogreValue( ogw, PD_NETCALLMODE ) != MDM_RFC,
  372.             PD_PW,
  373.             PD_PACK, PD_UNPACK,
  374.             PD_PACKTIMEOUT, PD_NETCALLSAVE, PD_CRLF, PD_BREAKLOGIN,
  375.             0
  376.         );
  377.  
  378.         im = ogreWaitIM( ogw );
  379.  
  380.         if( im->Class == IDCMP_GADGETHELP)
  381.             showguidenum( "pointwin_gads", im->Code );
  382.         else if( im->Class == IDCMP_GADGETUP )
  383.         {
  384.             switch( im->Code )
  385.             {
  386.                 case PD_OK:
  387.                     ncmode = ogreValue( ogw, PD_NETCALLMODE );
  388.                     if( ncmode != MDM_RFC )
  389.                     {
  390.                         ogreCopyStringValue( ogw, PD_PACK, buffer );
  391.                         if( !checkprograminpath( buffer ) )
  392.                         {
  393.                             char *p = strchr( buffer, ' 'á);
  394.                             if( p )
  395.                                 *p = 0;
  396.                             askreq( "Packer \"%s\" nicht gefunden!\nDas Program mu▀ im Pfad liegen und aufrufbar sein!",
  397.                                 "Abbruch",
  398.                                 buffer
  399.                             );
  400.                             ogreActivate( ogw, PD_PACK );
  401.                             break;
  402.                         }
  403.  
  404.                         ogreCopyStringValue( ogw, PD_UNPACK, buffer );
  405.                         if( !checkprograminpath( buffer ) )
  406.                         {
  407.                             char *p = strchr( buffer, ' 'á);
  408.                             if( p )
  409.                                 *p = 0;
  410.                             askreq( "Entpacker \"%s\" nicht gefunden!\nDas Program mu▀ im Pfad liegen und aufrufbar sein!",
  411.                                 "Abbruch",
  412.                                 buffer
  413.                             );
  414.                             ogreActivate( ogw, PD_UNPACK );
  415.                             break;
  416.                         }
  417.                     }
  418.  
  419.                     Done = 2;
  420.                     break;
  421.  
  422.                 case PD_CANCEL:
  423.                     Done = 1;
  424.                     break;
  425.  
  426. #ifndef NO_RFC
  427.                 case PD_RFC:
  428.                     ogreLockWindow( ogw );
  429.                     rfcopts();
  430.                     ogreUnlockWindow( ogw );
  431.                     break;
  432. #endif
  433.             }
  434.         }
  435.         ogreIMReply( ogw, im );
  436.     }
  437.  
  438.     if( Done == 2 )
  439.     {
  440.         char *p;
  441.  
  442.         ogreCopyStringValue( ogw, PD_BOX, prefs.boxname );
  443.         ogreCopyStringValue( ogw, PD_BOXDOMAIN, prefs.boxdomain );
  444.  
  445.         p = ogreStringValue( ogw, PD_USER );
  446.         if( !( prefs.flags2 & MDF2_NOPREFS ) && strcmp( p, prefs.username ) )
  447.         {
  448.             renameuser( prefs.username, p );
  449.             strcpy( prefs.username, p );
  450.             settitletxt();
  451.             makebrettview();
  452.             displayscroller();
  453.         }
  454.         else
  455.             strcpy( prefs.username, p );
  456.  
  457.         ogreCopyStringValue( ogw, PD_USERPW, prefs.userpassword );
  458.         ogreCopyStringValue( ogw, PD_POINT, prefs.pointname );
  459.         ogreCopyStringValue( ogw, PD_PW, prefs.password );
  460.         ogreCopyStringValue( ogw, PD_PACK, prefs.packer );
  461.         ogreCopyStringValue( ogw, PD_UNPACK, prefs.unpacker );
  462.  
  463.         ogreCopyStringValue( ogw, PD_PHONE, prefs.phone );
  464.  
  465.         prefs.dialretries = ogreValue( ogw, PD_RETRIES );
  466.         prefs.dialtimeout = ogreValue( ogw, PD_TIMEOUT );
  467.         prefs.packtimeout = ogreValue( ogw, PD_PACKTIMEOUT );
  468.         prefs.retrydelay  = ogreValue( ogw, PD_RETRYDELAY );
  469.  
  470.         prefs.netcall_save = ogreValue( ogw, PD_NETCALLSAVE );
  471.  
  472. #if 0
  473.         if( SocketBase )
  474.         {
  475.             if( ogreValue( ogw, PD_IP ) )
  476.                 prefs.flags2 |= MDF2_CLIPSAUG;
  477.             else
  478.                 prefs.flags2 &= ~MDF2_CLIPSAUG;
  479.         }
  480. #endif
  481.  
  482.         if( allow_rfc )
  483.         {
  484.             prefs.mode = ogreValue( ogw, PD_NETCALLMODE );
  485.         }
  486.         else
  487.         {
  488.             if( ogreValue( ogw, PD_NETCALLMODE ) )
  489.                 prefs.mode = MDM_N38;
  490.             else
  491.                 prefs.mode = MDM_JANUS;
  492.         }
  493.  
  494.         if( ogreValue( ogw, PD_CRLF ) )
  495.             prefs.flags2 |= MDF2_NETCALLCRLF;
  496.         else
  497.             prefs.flags2 &= ~MDF2_NETCALLCRLF;
  498.  
  499.         if( ogreValue( ogw, PD_JANUS2 ) )
  500.             prefs.flags2 |= MDF2_JANUS2;
  501.         else
  502.             prefs.flags2 &= ~MDF2_JANUS2;
  503.  
  504.         if( ogreValue( ogw, PD_BREAKLOGIN ) )
  505.             prefs.flags2 |= MDF2_BREAKLOGIN;
  506.         else
  507.             prefs.flags2 &= ~MDF2_BREAKLOGIN;
  508.  
  509.         if( prefs.boxdomain[0]á!= '.'á)
  510.             strins( prefs.boxdomain, "." );
  511.  
  512.         enablejanus2menus();
  513.     }
  514.  
  515.     ogreExitWindow( ogw );
  516.  
  517.     return( Done == 2 );
  518. }
  519.