| 1867 |
if (ts->XmodemTimeOutVLong < 1) |
if (ts->XmodemTimeOutVLong < 1) |
| 1868 |
ts->XmodemTimeOutVLong = 1; |
ts->XmodemTimeOutVLong = 1; |
| 1869 |
|
|
| 1870 |
|
// Ymodem Timeout |
| 1871 |
|
GetPrivateProfileString(Section, "YmodemTimeouts", "10,3,10,20,60", Temp, sizeof(Temp), FName); |
| 1872 |
|
ts->YmodemTimeOutInit = GetNthNum2(Temp, 1, 10); |
| 1873 |
|
if (ts->YmodemTimeOutInit < 1) |
| 1874 |
|
ts->YmodemTimeOutInit = 1; |
| 1875 |
|
ts->YmodemTimeOutInitCRC = GetNthNum2(Temp, 2, 3); |
| 1876 |
|
if (ts->YmodemTimeOutInitCRC < 1) |
| 1877 |
|
ts->YmodemTimeOutInitCRC = 1; |
| 1878 |
|
ts->YmodemTimeOutShort = GetNthNum2(Temp, 3, 10); |
| 1879 |
|
if (ts->YmodemTimeOutShort < 1) |
| 1880 |
|
ts->YmodemTimeOutShort = 1; |
| 1881 |
|
ts->YmodemTimeOutLong = GetNthNum2(Temp, 4, 20); |
| 1882 |
|
if (ts->YmodemTimeOutLong < 1) |
| 1883 |
|
ts->YmodemTimeOutLong = 1; |
| 1884 |
|
ts->YmodemTimeOutVLong = GetNthNum2(Temp, 5, 60); |
| 1885 |
|
if (ts->YmodemTimeOutVLong < 1) |
| 1886 |
|
ts->YmodemTimeOutVLong = 1; |
| 1887 |
|
|
| 1888 |
|
// Zmodem Timeout |
| 1889 |
|
GetPrivateProfileString(Section, "ZmodemTimeouts", "10,0,10,3", Temp, sizeof(Temp), FName); |
| 1890 |
|
ts->ZmodemTimeOutNormal = GetNthNum2(Temp, 1, 10); |
| 1891 |
|
if (ts->ZmodemTimeOutNormal < 1) |
| 1892 |
|
ts->ZmodemTimeOutNormal = 1; |
| 1893 |
|
ts->ZmodemTimeOutTCPIP = GetNthNum2(Temp, 2, 0); |
| 1894 |
|
if (ts->ZmodemTimeOutTCPIP < 0) |
| 1895 |
|
ts->ZmodemTimeOutTCPIP = 0; |
| 1896 |
|
ts->ZmodemTimeOutInit = GetNthNum2(Temp, 3, 10); |
| 1897 |
|
if (ts->ZmodemTimeOutInit < 1) |
| 1898 |
|
ts->ZmodemTimeOutInit = 1; |
| 1899 |
|
ts->ZmodemTimeOutFin = GetNthNum2(Temp, 4, 3); |
| 1900 |
|
if (ts->ZmodemTimeOutFin < 1) |
| 1901 |
|
ts->ZmodemTimeOutFin = 1; |
| 1902 |
|
|
| 1903 |
GetPrivateProfileString(Section, "VTPos", "-2147483648,-2147483648", Temp, sizeof(Temp), FName); /* default: random position */ |
GetPrivateProfileString(Section, "VTPos", "-2147483648,-2147483648", Temp, sizeof(Temp), FName); /* default: random position */ |
| 1904 |
GetNthNum(Temp, 1, (int far *) (&ts->VTPos.x)); |
GetNthNum(Temp, 1, (int far *) (&ts->VTPos.x)); |
| 1905 |
GetNthNum(Temp, 2, (int far *) (&ts->VTPos.y)); |
GetNthNum(Temp, 2, (int far *) (&ts->VTPos.y)); |
| 3133 |
); |
); |
| 3134 |
WritePrivateProfileString(Section, "XmodemTimeouts", Temp, FName); |
WritePrivateProfileString(Section, "XmodemTimeouts", Temp, FName); |
| 3135 |
|
|
| 3136 |
|
// Ymodem Timeout |
| 3137 |
|
_snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "%d,%d,%d,%d,%d", |
| 3138 |
|
ts->YmodemTimeOutInit, |
| 3139 |
|
ts->YmodemTimeOutInitCRC, |
| 3140 |
|
ts->YmodemTimeOutShort, |
| 3141 |
|
ts->YmodemTimeOutLong, |
| 3142 |
|
ts->YmodemTimeOutVLong |
| 3143 |
|
); |
| 3144 |
|
WritePrivateProfileString(Section, "YmodemTimeouts", Temp, FName); |
| 3145 |
|
|
| 3146 |
|
// Zmodem Timeout |
| 3147 |
|
_snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "%d,%d,%d,%d", |
| 3148 |
|
ts->ZmodemTimeOutNormal, |
| 3149 |
|
ts->ZmodemTimeOutTCPIP, |
| 3150 |
|
ts->ZmodemTimeOutInit, |
| 3151 |
|
ts->ZmodemTimeOutFin |
| 3152 |
|
); |
| 3153 |
|
WritePrivateProfileString(Section, "ZmodemTimeouts", Temp, FName); |
| 3154 |
|
|
| 3155 |
// CygTerm Configuration File |
// CygTerm Configuration File |
| 3156 |
WriteCygtermConfFile(ts); |
WriteCygtermConfFile(ts); |
| 3157 |
} |
} |