diff options
| author | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2009-10-31 00:48:38 +0000 |
| commit | 02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b (patch) | |
| tree | 61b9147863cd8be3eff63903dc36cae168254bd5 /src/windows/wintel | |
| parent | 162ab371748cba0cc6f172419bd6e71fa04bb878 (diff) | |
| download | krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.gz krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.tar.xz krb5-02d6bcbc98a214e7aeaaa9f45f0db8784a7b743b.zip | |
make mark-cstyle
make reindent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/wintel')
| -rw-r--r-- | src/windows/wintel/auth.c | 46 | ||||
| -rw-r--r-- | src/windows/wintel/edit.c | 58 | ||||
| -rw-r--r-- | src/windows/wintel/emul.c | 230 | ||||
| -rw-r--r-- | src/windows/wintel/enc_des.c | 6 | ||||
| -rw-r--r-- | src/windows/wintel/encrypt.c | 20 | ||||
| -rw-r--r-- | src/windows/wintel/font.c | 10 | ||||
| -rw-r--r-- | src/windows/wintel/intern.c | 44 | ||||
| -rw-r--r-- | src/windows/wintel/k5stream.c | 21 | ||||
| -rw-r--r-- | src/windows/wintel/negotiat.c | 46 | ||||
| -rw-r--r-- | src/windows/wintel/resource.h | 2 | ||||
| -rw-r--r-- | src/windows/wintel/screen.c | 44 | ||||
| -rw-r--r-- | src/windows/wintel/screen.h | 6 | ||||
| -rw-r--r-- | src/windows/wintel/telnet.c | 190 | ||||
| -rw-r--r-- | src/windows/wintel/telopts.h | 8 |
14 files changed, 365 insertions, 366 deletions
diff --git a/src/windows/wintel/auth.c b/src/windows/wintel/auth.c index 28f515b6c6..433bce38c3 100644 --- a/src/windows/wintel/auth.c +++ b/src/windows/wintel/auth.c @@ -99,10 +99,10 @@ Data(kstream ks, int type, void *d, int c) { unsigned char *p = str_data + 4; unsigned char *cd = (unsigned char *)d; - + if (c == -1) c = strlen((char *)cd); - + *p++ = AUTHTYPE_KERBEROS_V5; *p = AUTH_WHO_CLIENT|AUTH_HOW_MUTUAL; #ifdef ENCRYPTION @@ -144,16 +144,16 @@ static void auth_abort(kstream ks, char *errmsg, long r) { char buf[9]; - + wsprintf(buf, "%c%c%c%c%c%c%c%c", IAC, SB, TELOPT_AUTHENTICATION, TELQUAL_IS, AUTHTYPE_NULL, AUTHTYPE_NULL, IAC, SE); TelnetSend(ks, (LPSTR)buf, 8, 0); - + if (errmsg != NULL) { strTmp[sizeof(strTmp) - 1] = '\0'; strncpy(strTmp, errmsg, sizeof(strTmp) - 1); - + if (r != KSUCCESS) { strncat(strTmp, "\n", sizeof(strTmp) - 1 - strlen(strTmp)); #ifdef KRB4 @@ -163,7 +163,7 @@ auth_abort(kstream ks, char *errmsg, long r) lstrcat(strTmp, error_message(r)); #endif } - + MessageBox(HWND_DESKTOP, strTmp, "Kerberos authentication failed!", MB_OK | MB_ICONEXCLAMATION); } @@ -234,7 +234,7 @@ auth_send(kstream ks, unsigned char *parsedat, int end_sub) #ifdef KRB4 r = k4_auth_send(ks); #endif /* KRB4 */ - + #ifdef KRB5 r = k5_auth_send(ks, auth_how); #endif /* KRB5 */ @@ -400,9 +400,9 @@ auth_decrypt(struct kstream_data_block *out, #ifdef KRB4 /* - * + * * K4_auth_send - gets authentication bits we need to send to KDC. - * + * * Result is left in auth * * Returns: 0 on failure, 1 on success @@ -482,7 +482,7 @@ k4_auth_reply(kstream ks, unsigned char *parsedat, int end_sub) if (end_sub < 4) return KFAILURE; - + if (parsedat[2] != KERBEROS_V4) return KFAILURE; @@ -552,7 +552,7 @@ k4_auth_reply(kstream ks, unsigned char *parsedat, int end_sub) return KSUCCESS; } - + return KFAILURE; } @@ -562,18 +562,18 @@ k4_auth_reply(kstream ks, unsigned char *parsedat, int end_sub) #ifdef KRB5 /* - * + * * K5_auth_send - gets authentication bits we need to send to KDC. - * + * * Code lifted from telnet sample code in the appl directory. - * + * * Result is left in auth * * Returns: 0 on failure, 1 on success - * + * */ -static int +static int k5_auth_send(kstream ks, int how) { krb5_error_code r; @@ -652,14 +652,14 @@ k5_auth_send(kstream ks, int how) r = krb5_mk_req_extended(k5_context, &auth_context, ap_opts, NULL, new_creds, &auth); - + #ifdef ENCRYPTION krb5_auth_con_getlocalsubkey(k5_context, auth_context, &newkey); if (session_key) { krb5_free_keyblock(k5_context, session_key); session_key = 0; } - + if (newkey) { /* * keep the key in our private storage, but don't use it @@ -682,7 +682,7 @@ k5_auth_send(kstream ks, int how) krb5_free_cred_contents(k5_context, &creds); krb5_free_creds(k5_context, new_creds); - + if (r) { com_err(NULL, r, "while authorizing."); return(0); @@ -692,11 +692,11 @@ k5_auth_send(kstream ks, int how) } /* - * + * * K5_auth_reply -- checks the reply for mutual authentication. * * Code lifted from telnet sample code in the appl directory. - * + * */ static int k5_auth_reply(kstream ks, int how, unsigned char *data, int cnt) @@ -843,14 +843,14 @@ kerberos5_forward(kstream ks) com_err(NULL, r, "Kerberos V5: error getting forwarded creds"); goto cleanup; } - + /* Send forwarded credentials */ if (!Data(ks, KRB_FORWARD, forw_creds.data, forw_creds.length)) { MessageBox(HWND_DESKTOP, "Not enough room for authentication data", "", MB_OK | MB_ICONEXCLAMATION); } - + cleanup: if (client) krb5_free_principal(k5_context, client); diff --git a/src/windows/wintel/edit.c b/src/windows/wintel/edit.c index aa230cfc9d..b275850343 100644 --- a/src/windows/wintel/edit.c +++ b/src/windows/wintel/edit.c @@ -28,11 +28,11 @@ void Edit_LbuttonDown( assert(pScr != NULL); hDC = GetDC(hWnd); - for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) { + for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, iTmp % pScr->width * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, - pScr->cxChar, pScr->cyChar, DSTINVERT); + pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp] = 0; } } @@ -82,7 +82,7 @@ void Edit_LbuttonUp( else { hMenu = GetMenu(hWnd); EnableMenuItem(hMenu, IDM_COPY, MF_ENABLED); - } + } } /* Edit_LbuttonUp */ @@ -113,7 +113,7 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){ iYlocCurr = pScr->height - 1; iLocCurr = iXlocCurr + (iYlocCurr * pScr->width); if (iLocCurr > iLocStart) { - for (iTmp=0; iTmp < iLocStart; iTmp++) { + for (iTmp=0; iTmp < iLocStart; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, @@ -134,7 +134,7 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){ cInvertedArray[iTmp2 + (pScr->width * iY)] = pScrLine->text[iTmp2]; } } - } + } else { pScrLine = GetScreenLineFromY(pScr, iY); @@ -164,24 +164,24 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){ PatBlt(hDC, iTmp2 * pScr->cxChar, iY2 * pScr->cyChar, pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp2 + (pScr->width * iY2)] = pScrLine->text[iTmp2]; - } - } - } + } + } + } } - for (iTmp = iLocCurr; iTmp < pScr->width * pScr->height; iTmp++) { + for (iTmp = iLocCurr; iTmp < pScr->width * pScr->height; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, - pScr->cxChar, pScr->cyChar, DSTINVERT); + pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp] = 0; } } } else { /* going backwards */ - for (iTmp = 0; iTmp < iLocCurr; iTmp++) { + for (iTmp = 0; iTmp < iLocCurr; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, - pScr->cxChar, pScr->cyChar, DSTINVERT); + pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp] = 0; } } @@ -198,7 +198,7 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){ cInvertedArray[iTmp2 + (pScr->width * iY)] = pScrLine->text[iTmp2]; } } - } + } else { pScrLine = GetScreenLineFromY(pScr, iY); for (iTmp2 = iX; iTmp2 < pScr->width; iTmp2++) { @@ -206,8 +206,8 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){ PatBlt(hDC, iTmp2 * pScr->cxChar, iY * pScr->cyChar, pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp2 + (pScr->width * iY)] = pScrLine->text[iTmp2]; - } - } + } + } for (iTmp = iY + 1; iTmp < iY2; iTmp++) { pScrLine = GetScreenLineFromY(pScr, iTmp); for (iTmp2 = 0; iTmp2 < pScr->width; iTmp2++) { @@ -225,18 +225,18 @@ void Edit_MouseMove(HWND hWnd, LPARAM lParam){ PatBlt(hDC, iTmp2 * pScr->cxChar, iY2 * pScr->cyChar, pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp2 + (pScr->width * iY2)] = pScrLine->text[iTmp2]; - } - } - } - } - for (iTmp = iLocStart; iTmp < pScr->width * pScr->height; iTmp++) { + } + } + } + } + for (iTmp = iLocStart; iTmp < pScr->width * pScr->height; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp] = 0; - } + } } - } + } ReleaseDC(hWnd, hDC); } /* Edit_MouseMove */ @@ -259,7 +259,7 @@ void Edit_ClearSelection( } bSelection = FALSE; hMenu=GetMenu(pScr->hWnd); - EnableMenuItem(hMenu, IDM_COPY, MF_GRAYED); + EnableMenuItem(hMenu, IDM_COPY, MF_GRAYED); ReleaseDC(pScr->hWnd, hDC); } /* Edit_ClearSelection */ @@ -311,7 +311,7 @@ void Edit_Paste( static HGLOBAL hMyClipBuffer; LPSTR lpClipMemory; LPSTR lpMyClipBuffer; - SCREEN *pScr; + SCREEN *pScr; if (hMyClipBuffer) GlobalFree(hMyClipBuffer); @@ -329,9 +329,9 @@ void Edit_Paste( OutputDebugString(lpMyClipBuffer); #endif PostMessage(pScr->hwndTel, WM_MYSCREENBLOCK, (WPARAM) hMyClipBuffer, (LPARAM) pScr); - CloseClipboard(); + CloseClipboard(); GlobalUnlock(hClipMemory); - GlobalUnlock(hMyClipBuffer); + GlobalUnlock(hMyClipBuffer); } /* Edit_Paste */ @@ -352,7 +352,7 @@ void Edit_LbuttonDblclk( assert(pScr != NULL); hDC = GetDC(hWnd); - for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) { + for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, @@ -411,13 +411,13 @@ void Edit_TripleClick( assert(pScr != NULL); hDC = GetDC(hWnd); - for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) { + for (iTmp = 0; iTmp < pScr->width * pScr->height; iTmp++) { if (cInvertedArray[iTmp]) { PatBlt(hDC, (iTmp % pScr->width) * pScr->cxChar, (int) (iTmp / pScr->width) * pScr->cyChar, pScr->cxChar, pScr->cyChar, DSTINVERT); cInvertedArray[iTmp] = 0; - } + } } bSelection = FALSE; iYloc = (int) HIWORD(lParam) / pScr->cyChar; diff --git a/src/windows/wintel/emul.c b/src/windows/wintel/emul.c index 18547ab807..2a7ef4cd05 100644 --- a/src/windows/wintel/emul.c +++ b/src/windows/wintel/emul.c @@ -13,12 +13,12 @@ ScreenEmChars(SCREEN *pScr, char *c, int len) * control chracters or cause wrapping to another line. When a control * character is encountered or wrapping occurs, display stops and a * count of the number of characters is returned. - * + * * Parameters: * pScr - the screen to place the characters on. * c - the string of characters to place on the screen. * len - the number of characters contained in the string - * + * * Returns: The number of characters actually placed on the screen. */ @@ -31,10 +31,10 @@ ScreenEmChars(SCREEN *pScr, char *c, int len) char *current; /* place to put characters */ char *start; SCREENLINE *pScrLine; - + if (len <= 0) return(0); - + if (pScr->x != pScr->width - 1) pScr->bWrapPending = FALSE; else { @@ -44,24 +44,24 @@ ScreenEmChars(SCREEN *pScr, char *c, int len) ScreenIndex(pScr); } } - + pScrLine = GetScreenLineFromY(pScr, pScr->y); if (pScrLine == NULL) return(0); - + current = &pScrLine->text[pScr->x]; acurrent = &pScrLine->attrib[pScr->x]; start = current; ocount = pScr->x; extra = 0; - + attrib = pScr->attrib; insert = pScr->IRM; - + for (nchars = 0; nchars < len && *c >= 32; nchars++) { if (insert) ScreenInsChar(pScr, 1); - + *current = *c; *acurrent = (char) attrib; c++; @@ -79,10 +79,10 @@ ScreenEmChars(SCREEN *pScr, char *c, int len) } } } - + ScreenDraw(pScr, ocount, pScr->y, pScr->attrib, pScr->x - ocount + extra, start); - + return(nchars); } @@ -96,16 +96,16 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) char stat[20]; int i; int nchars; - + if (pScr->screen_bottom != pScr->buffer_bottom) { ScreenUnscroll(pScr); InvalidateRect(pScr->hWnd, NULL, TRUE); SetScrollPos(pScr->hWnd, SB_VERT, pScr->numlines, TRUE); } - + ScreenCursorOff(pScr); escflg = pScr->escflg; - + #ifdef UM if (pScr->localprint && len > 0) { /* see if printer needs anything */ pcount = send_localprint(c, len); @@ -113,7 +113,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) c += pcount; } #endif - + while (len > 0) { /* * look at first character in the vt100 string, if it is a @@ -121,43 +121,43 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) */ while((*c < 32) && (escflg == 0) && (len > 0)) { switch(*c) { - + case 0x1b: /* ESC found (begin vt100 control sequence) */ escflg++; break; - + case -1: /* IAC from telnet session */ escflg = 6; break; - + #ifdef CISB case 0x05: /* CTRL-E found (answerback) */ bp_ENQ(); break; #endif - + case 0x07: /* CTRL-G found (bell) */ ScreenBell(pScr); break; - + case 0x08: /* CTRL-H found (backspace) */ ScreenBackspace(pScr); break; - + case 0x09: /* CTRL-I found (tab) */ ScreenTab(pScr); /* Later change for versatile tabbing */ break; - + case 0x0a: /* CTRL-J found (line feed) */ case 0x0b: /* CTRL-K found (treat as line feed) */ case 0x0c: /* CTRL-L found (treat as line feed) */ ScreenIndex(pScr); break; - + case 0x0d: /* CTRL-M found (carriage feed) */ ScreenCarriageFeed(pScr); break; - + #if 0 case 0x0e: /* CTRL-N found (invoke Graphics (G1) character set) */ if (pScr->G1) @@ -166,7 +166,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) pScr->attrib = VSnotgraph(pScr->attrib); pScr->charset = 1; break; - + case 0x0f: /* CTRL-O found (invoke 'normal' (G0) character set) */ if(pScr->G0) pScr->attrib = VSgraph(pScr->attrib); @@ -175,14 +175,14 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) pScr->charset = 0; break; #endif - + #ifdef CISB case 0x10: /* CTRL-P found (undocumented in vt100) */ bp_DLE(c, len); len = 0; break; #endif - + #if 0 case 0x11: /* CTRL-Q found (XON) (unused presently) */ case 0x13: /* CTRL-S found (XOFF) (unused presently) */ @@ -191,24 +191,24 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) break; #endif } - + c++; /* advance to the next character in the string */ len--; /* decrement the counter */ } - + if (escflg == 0) { /* check for normal character to print */ nchars = ScreenEmChars(pScr, c, len); c += nchars; len -= nchars; } - + while ((len > 0) && (escflg == 1)) { /* ESC character was found */ switch(*c) { - + case 0x08: /* CTRL-H found (backspace) */ ScreenBackspace(pScr); break; - + /* * mostly cursor movement options, and DEC private stuff following */ @@ -216,77 +216,77 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) ScreenApClear(pScr); escflg = 2; break; - + case '#': /* various screen adjustments */ escflg = 3; break; - + case '(': /* G0 character set options */ escflg = 4; break; - + case ')': /* G1 character set options */ escflg = 5; break; - + case '>': /* keypad numeric mode (DECKPAM) */ pScr->DECPAM = 0; escflg = 0; break; - + case '=': /* keypad application mode (DECKPAM) */ pScr->DECPAM = 1; escflg = 0; break; - + case '7': /* save cursor (DECSC) */ ScreenSaveCursor(pScr); escflg = 0; break; - + case '8': /* restore cursor (DECRC) */ ScreenRestoreCursor(pScr); escflg = 0; break; - + #if 0 case 'c': /* reset to initial state (RIS) */ ScreenReset(pScr); escflg = 0; break; #endif - + case 'D': /* index (move down one line) (IND) */ ScreenIndex(pScr); escflg = 0; break; - + case 'E': /* next line (move down one line and to first column) (NEL) */ pScr->x = 0; ScreenIndex(pScr); escflg = 0; break; - + case 'H': /* horizontal tab set (HTS) */ pScr->tabs[pScr->x] = 'x'; escflg = 0; break; - + #ifdef CISB case 'I': /* undoumented in vt100 */ bp_ESC_I(); break; #endif - + case 'M': /* reverse index (move up one line) (RI) */ ScreenRevIndex(pScr); escflg = 0; break; - + case 'Z': /* identify terminal (DECID) */ escflg = 0; break; - + default: /* put the ESC character into the Screen */ ScreenEmChars(pScr, "\033", 1); @@ -294,20 +294,20 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) ScreenEmChars(pScr, c, 1); escflg = 0; break; - + } /* end switch */ - + c++; len--; } - - while((escflg == 2) && (len > 0)) { /* '[' handling */ + + while((escflg == 2) && (len > 0)) { /* '[' handling */ switch(*c) { - + case 0x08: /* backspace */ ScreenBackspace(pScr); break; - + case '0': case '1': case '2': @@ -323,15 +323,15 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) pScr->parms[pScr->parmptr] *= 10; pScr->parms[pScr->parmptr] += *c - '0'; break; - + case '?': /* vt100 mode change */ pScr->parms[pScr->parmptr++] = -2; break; - + case ';': /* parameter divider */ pScr->parmptr++; break; - + case 'A': /* cursor up (CUU) */ pScr->bWrapPending = FALSE; rc.left = pScr->x * pScr->cxChar; @@ -349,7 +349,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; SendMessage(pScr->hWnd, WM_PAINT, 0, 0); break; - + case 'B': /* cursor down (CUD) */ pScr->bWrapPending = FALSE; rc.left = pScr->x * pScr->cxChar; @@ -367,7 +367,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; SendMessage(pScr->hWnd, WM_PAINT, 0, 0); break; - + case 'C': /* cursor forward (right) (CUF) */ pScr->bWrapPending = FALSE; rc.left = pScr->x * pScr->cxChar; @@ -385,7 +385,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; SendMessage(pScr->hWnd, WM_PAINT, 0, 0); break; - + case 'D': /* cursor backward (left) (CUB) */ pScr->bWrapPending = FALSE; rc.left = pScr->x * pScr->cxChar; @@ -401,7 +401,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; SendMessage(pScr->hWnd, WM_PAINT, 0, 0); break; - + case 'f': /* horizontal & vertical position (HVP) */ case 'H': /* cursor position (CUP) */ pScr->bWrapPending = FALSE; @@ -416,10 +416,10 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; SendMessage(pScr->hWnd, WM_PAINT, 0, 0); break; - + case 'J': /* erase in display (ED) */ switch(pScr->parms[0]) { - + case -1: case 0: /* erase from active position to end of screen */ ScreenEraseToEndOfScreen(pScr); @@ -429,73 +429,73 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) ScreenEraseToPosition(pScr); #endif break; - + case 2: /* erase whole screen */ ScreenEraseScreen(pScr); break; - + default: break; } - + escflg = 0; break; - + case 'K': /* erase in line (EL) */ switch(pScr->parms[0]) { case -1: case 0: /* erase to end of line */ ScreenEraseToEOL(pScr); break; - + case 1: /* erase to beginning of line */ ScreenEraseToBOL(pScr); break; - + case 2: /* erase whole line */ ScreenEraseLine(pScr, -1); break; - + default: break; } - + escflg = 0; break; - + case 'L': /* insert n lines preceding current line (IL) */ if (pScr->parms[0] < 1) pScr->parms[0] = 1; ScreenInsLines(pScr, pScr->parms[0], -1); escflg = 0; break; - + case 'M': /* delete n lines from current position downward (DL) */ if (pScr->parms[0] < 1) pScr->parms[0] = 1; ScreenDelLines(pScr, pScr->parms[0], -1); escflg = 0; break; - + case 'P': /* delete n chars from cursor to the left (DCH) */ if (pScr->parms[0] < 1) pScr->parms[0] = 1; ScreenDelChars(pScr, pScr->parms[0]); escflg = 0; break; - + #if 0 case 'R': /* receive cursor position status from host */ break; #endif - + #if 0 case 'c': /* device attributes (DA) */ ScreenSendIdent(); escflg = 0; break; #endif - + case 'g': /* tabulation clear (TBC) */ if (pScr->parms[0] == 3)/* clear all tabs */ ScreenTabClear(pScr); @@ -504,12 +504,12 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) pScr->tabs[pScr->x] = ' '; escflg = 0; break; - + case 'h': /* set mode (SM) */ ScreenSetOption(pScr,1); escflg = 0; break; - + case 'i': /* toggle printer */ #if 0 if(pScr->parms[pScr->parmptr] == 5) @@ -519,16 +519,16 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) #endif escflg = 0; break; - + case 'l': /* reset mode (RM) */ ScreenSetOption(pScr,0); escflg = 0; break; - + case 'm': /* select graphics rendition (SGR) */ { int temp = 0; - + while (temp <= pScr->parmptr) { if (pScr->parms[temp] < 1) pScr->attrib &= 128; @@ -539,7 +539,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) } escflg = 0; break; - + case 'n': /* device status report (DSR) */ switch (pScr->parms[0]) { #if 0 @@ -556,11 +556,11 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) } /* end switch */ escflg = 0; break; - + case 'q': /* load LEDs (unsupported) (DECLL) */ escflg = 0; break; - + case 'r': /* set top & bottom margins (DECSTBM) */ if (pScr->parms[0] < 0) pScr->top = 0; @@ -596,23 +596,23 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) #endif escflg = 0; break; - -#if 0 + +#if 0 case 'x': /* request/report terminal parameters (DECREQTPARM/DECREPTPARM) */ case 'y': /* invoke confidence test (DECTST) */ break; #endif - + default: escflg = 0; break; - + } - + c++; len--; - + #if 0 if (pScr->localprint && (len > 0)) { /* see if printer needs anything */ pcount = send_localprint(c, len); @@ -621,13 +621,13 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) } #endif } - + while ((escflg == 3) && (len > 0)) { /* # Handling */ switch (*c) { case 0x08: /* backspace */ ScreenBackspace(pScr); break; - + #if 0 case '3': /* top half of double line (DECDHL) */ case '4': /* bottom half of double line (DECDHL) */ @@ -635,29 +635,29 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) case '6': /* double width line (DECDWL) */ break; #endif - + case '8': /* screen alignment display (DECALN) */ ScreenAlign(pScr); escflg = 0; break; - + default: escflg = 0; break; - + } - + c++; len--; } - + while ((escflg == 4) && (len > 0)) { /* ( Handling (GO character set) */ switch (*c) { - + case 0x08: /* backspace */ ScreenBackspace(pScr); break; - + #if 0 case 'A': /* united kingdom character set (unsupported) */ case 'B': /* ASCII character set */ @@ -667,7 +667,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) pScr->attrib = ScreenNotGraph(pScr->attrib); escflg = 0; break; - + case '0': /* choose special graphics set */ case '2': /* alternate character set (special graphics) */ pScr->G0 = 1; @@ -676,24 +676,24 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; break; #endif - + default: escflg = 0; break; } - + c++; len--; - + } /* end while */ - + while((escflg == 5) && (len > 0)) { /* ) Handling (G1 handling) */ switch (*c) { - + case 0x08: /* backspace */ ScreenBackspace(pScr); break; - + #if 0 case 'A': /* united kingdom character set (unsupported) */ case 'B': /* ASCII character set */ @@ -703,7 +703,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) pScr->attrib = ScreenNotGraph(pScr->attrib); escflg = 0; break; - + case '0': /* choose special graphics set */ case '2': /* alternate character set (special graphics) */ pScr->G1 = 1; @@ -712,20 +712,20 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) escflg = 0; break; #endif - + default: escflg = 0; break; } /* end switch */ - + c++; len--; } /* end while */ - + while ((escflg >= 6) && (escflg <= 10) && (len > 0)) { /* Handling IAC */ ic = (unsigned char) *c; switch (escflg) { - + case 6: /* Handling IAC xx */ if (ic == 255) /* if IAC */ escflg = 0; @@ -734,19 +734,19 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) else escflg = 9; break; - + case 7: /* Handling IAC SB xx */ if (ic == 255) /* if IAC */ escflg = 8; break; - + case 8: /* Handling IAC SB IAC xx */ if (ic == 255) /* if IAC IAC */ escflg = 7; else if (ic == 240) /* if IAC SE */ escflg = 0; break; - + case 9: /* IAC xx xx */ escflg = 0; break; @@ -754,7 +754,7 @@ ScreenEm(LPSTR c, int len, SCREEN *pScr) c++; /* advance to the next character in the string */ len--; /* decrement the counter */ } - + if (escflg > 2 && escflg < 6 && len > 0) { escflg = 0; c++; diff --git a/src/windows/wintel/enc_des.c b/src/windows/wintel/enc_des.c index 7bf72f4880..33472ecd67 100644 --- a/src/windows/wintel/enc_des.c +++ b/src/windows/wintel/enc_des.c @@ -582,7 +582,7 @@ fb64_stream_key(key, stp) * INPUT --(--------->(+)+---> DATA * | | * +-------------+ - * + * * * Given: * iV: Initial vector, 64 bits (8 bytes) long. @@ -643,7 +643,7 @@ cfb64_decrypt(data) des_ecb_encrypt(stp->str_output, b, stp->str_sched, 1); memcpy((void *)stp->str_feed, (void *)b, sizeof(Block)); stp->str_index = 1; /* Next time will be 1 */ - index = 0; /* But now use 0 */ + index = 0; /* But now use 0 */ } /* On decryption we store (data) which is cypher. */ @@ -716,7 +716,7 @@ ofb64_decrypt(data) des_ecb_encrypt(stp->str_feed, b, stp->str_sched, 1); memcpy((void *)stp->str_feed, (void *)b, sizeof(Block)); stp->str_index = 1; /* Next time will be 1 */ - index = 0; /* But now use 0 */ + index = 0; /* But now use 0 */ } return(data ^ stp->str_feed[index]); diff --git a/src/windows/wintel/encrypt.c b/src/windows/wintel/encrypt.c index 6d97ccd5d3..a26674d4ca 100644 --- a/src/windows/wintel/encrypt.c +++ b/src/windows/wintel/encrypt.c @@ -110,20 +110,20 @@ kstream EncryptKSGlobalHack = NULL; static long i_support_encrypt = typemask(ENCTYPE_DES_CFB64) | typemask(ENCTYPE_DES_OFB64); -static long i_support_decrypt = +static long i_support_decrypt = typemask(ENCTYPE_DES_CFB64) | typemask(ENCTYPE_DES_OFB64); static long i_wont_support_encrypt = 0; static long i_wont_support_decrypt = 0; #define I_SUPPORT_ENCRYPT (i_support_encrypt & ~i_wont_support_encrypt) #define I_SUPPORT_DECRYPT (i_support_decrypt & ~i_wont_support_decrypt) - + static long remote_supports_encrypt = 0; static long remote_supports_decrypt = 0; static Encryptions encryptions[] = { { "DES_CFB64", ENCTYPE_DES_CFB64, - cfb64_encrypt, + cfb64_encrypt, cfb64_decrypt, cfb64_init, cfb64_start, @@ -134,7 +134,7 @@ static Encryptions encryptions[] = { NULL }, { "DES_OFB64", ENCTYPE_DES_OFB64, - ofb64_encrypt, + ofb64_encrypt, ofb64_decrypt, ofb64_init, ofb64_start, @@ -311,7 +311,7 @@ Encryptions * finddecryption(int type) { Encryptions *ep = encryptions; - + if (!(I_SUPPORT_DECRYPT & remote_supports_encrypt & typemask(type))) return(0); while (ep->type && ep->type != type) @@ -336,18 +336,18 @@ void encrypt_init(kstream iks, kstream_ptr data) { Encryptions *ep = encryptions; - + i_support_encrypt = i_support_decrypt = 0; remote_supports_encrypt = remote_supports_decrypt = 0; encrypt_mode = 0; decrypt_mode = 0; encrypt_output = NULL; decrypt_input = NULL; - + str_suplen = 4; EncryptKSGlobalHack = iks; - + while (ep->type) { #ifdef DEBUG if (encrypt_debug_mode) { @@ -671,7 +671,7 @@ encrypt_request_end() * Called when ENCRYPT REQUEST-START is received. If we receive * this before a type is picked, then that indicates that the * other side wants us to start encrypting data as soon as we - * can. + * can. */ void encrypt_request_start(data, cnt) @@ -688,7 +688,7 @@ static unsigned char str_keyid[(MAXKEYLEN*2)+5] = { IAC, SB, TELOPT_ENCRYPT }; void encrypt_keyid(); - + void encrypt_enc_keyid(keyid, len) unsigned char *keyid; diff --git a/src/windows/wintel/font.c b/src/windows/wintel/font.c index d2858cd104..9224c41f7b 100644 --- a/src/windows/wintel/font.c +++ b/src/windows/wintel/font.c @@ -16,7 +16,7 @@ void ProcessFontChange( TEXTMETRIC tm; char buf[16]; char szStyle[LF_FACESIZE]; - + pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE); assert(pScr != NULL); @@ -32,7 +32,7 @@ void ProcessFontChange( cf.Flags |= CF_FORCEFONTEXIST; cf.Flags |= CF_FIXEDPITCHONLY; cf.Flags |= CF_NOSIMULATIONS; - + if (ChooseFont(&cf)) { if (pScr->hSelectedFont) DeleteObject(pScr->hSelectedFont); @@ -47,7 +47,7 @@ void ProcessFontChange( pScr->cxChar = tm.tmAveCharWidth; pScr->cyChar = tm.tmHeight + tm.tmExternalLeading; ReleaseDC(hWnd, hDC); - SetWindowPos(hWnd, NULL, 0, 0, pScr->cxChar * pScr->width + + SetWindowPos(hWnd, NULL, 0, 0, pScr->cxChar * pScr->width + FRAME_WIDTH, pScr->cyChar * pScr->height + FRAME_HEIGHT, SWP_NOMOVE | SWP_NOZORDER); @@ -78,13 +78,13 @@ void InitializeStruct( HWND hWnd) { LPCHOOSEFONT lpFontChunk; - + if (wCommDlgType == IDC_FONT) { lpFontChunk = (LPCHOOSEFONT) lpStruct; lpFontChunk->lStructSize = sizeof(CHOOSEFONT); lpFontChunk->hwndOwner = hWnd; - lpFontChunk->Flags = CF_SCREENFONTS | CF_FIXEDPITCHONLY + lpFontChunk->Flags = CF_SCREENFONTS | CF_FIXEDPITCHONLY | CF_INITTOLOGFONTSTRUCT | CF_APPLY; lpFontChunk->rgbColors = RGB(0, 0, 255); lpFontChunk->lCustData = 0L; diff --git a/src/windows/wintel/intern.c b/src/windows/wintel/intern.c index 0cdd5537d0..8ff8605569 100644 --- a/src/windows/wintel/intern.c +++ b/src/windows/wintel/intern.c @@ -84,16 +84,16 @@ ScreenELO(SCREEN *pScr, int s) { SCREENLINE *pScrLine; RECT rc; - - if (s < 0) + + if (s < 0) s = pScr->y; - + pScrLine = GetScreenLineFromY(pScr,s); memset(pScrLine->attrib, ScreenClearAttrib, pScr->width); memset(pScrLine->text, ' ', pScr->width); rc.left = 0; rc.right = pScr->width * pScr->cxChar; - rc.top = pScr->cyChar * s; + rc.top = pScr->cyChar * s; rc.bottom = pScr->cyChar * (s+1); InvalidateRect(pScr->hWnd, &rc, TRUE); } @@ -107,7 +107,7 @@ ScreenEraseScreen(SCREEN *pScr) int x2 = pScr->width; int y2 = pScr->height; int n = -1; - + for(i = 0; i < pScr->height; i++) ScreenELO(pScr,i); @@ -135,7 +135,7 @@ ScreenTabInit(SCREEN *pScr) ScreenTabClear(pScr); - while(x <= pScr->width) { + while(x <= pScr->width) { pScr->tabs[x] = 'x'; x += 8; } @@ -185,10 +185,10 @@ ScreenListMove(SCREENLINE *TD, SCREENLINE *BD, SCREENLINE *TI, SCREENLINE *BI) TD->prev = TI; /* Place the node in its new home */ BD->next = BI; - if (TI != NULL) + if (TI != NULL) TI->next = TD; /* Ditto prev->prev */ - if (BI != NULL) + if (BI != NULL) BI->prev = BD; } @@ -204,10 +204,10 @@ ScreenDelLines(SCREEN *pScr, int n, int s) int idx; RECT rc; HDC hDC; - + pScr->bWrapPending = FALSE; - if (s < 0) + if (s < 0) s = pScr->y; if (s + n - 1 > pScr->bottom) @@ -289,13 +289,13 @@ ScreenInsLines(SCREEN *pScr, int n, int s) int idx; RECT rc; HDC hDC; - + pScr->bWrapPending = FALSE; if (s < 0) s = pScr->y; - if (s + n - 1 > pScr->bottom) + if (s + n - 1 > pScr->bottom) n = pScr->bottom - s + 1; /* @@ -400,7 +400,7 @@ ScreenEraseToEOL(SCREEN *pScr) int n = -1; SCREENLINE *pScrLine; RECT rc; - + ScreenWrapNow(pScr, &x1, &y1); y2 = y1; @@ -428,7 +428,7 @@ ScreenDelChars(SCREEN *pScr, int n) int width; SCREENLINE *pScrLine; RECT rc; - + pScr->bWrapPending = FALSE; pScrLine = GetScreenLineFromY(pScr, y); @@ -442,7 +442,7 @@ ScreenDelChars(SCREEN *pScr, int n) memset(&pScrLine->attrib[pScr->width - n], ScreenClearAttrib, n); memset(&pScrLine->text[pScr->width - n], ' ', n); - + rc.left = x * pScr->cxChar; rc.right = pScr->width * pScr->cxChar; rc.top = pScr->cyChar * y; @@ -459,12 +459,12 @@ ScreenRevIndex(SCREEN *pScr) { SCREENLINE *pScrLine; SCREENLINE *pTopLine; - + pScr->bWrapPending = FALSE; pScrLine = GetScreenLineFromY(pScr, pScr->y); pTopLine = GetScreenLineFromY(pScr, pScr->top); - if(pScrLine == pTopLine) + if(pScrLine == pTopLine) ScreenInsertLine(pScr, pScr->y); else pScr->y--; @@ -500,7 +500,7 @@ ScreenEraseLine(SCREEN *pScr, int s) int n = -1; SCREENLINE *pScrLine; RECT rc; - + if (s < 0) { ScreenWrapNow(pScr, &x1, &y1); s = y2 = y1; @@ -566,7 +566,7 @@ ScreenAlign(SCREEN *pScr) /* vt100 alignment, fill screen with 'E's */ int i; int j; SCREENLINE *pScrLine; - + pScrLine = GetScreenLineFromY(pScr, pScr->top); ScreenEraseScreen(pScr); @@ -685,7 +685,7 @@ ScreenInsChar(SCREEN *pScr, int x) int i; SCREENLINE *pScrLine; RECT rc; - + pScrLine = GetScreenLineFromY(pScr, pScr->y); if (pScrLine == NULL) return(FALSE); @@ -732,9 +732,9 @@ ScreenDraw(SCREEN *pScr, int x, int y, int a, int len, char *c) SCREENLINE *pScrLine; RECT rc; - pScrLine = GetScreenLineFromY(pScr, y); + pScrLine = GetScreenLineFromY(pScr, y); assert(pScrLine != NULL); - + for(idx = x; idx < x + len; idx++) { pScrLine->text[idx] = c[idx - x]; pScrLine->attrib[idx - x] = a; diff --git a/src/windows/wintel/k5stream.c b/src/windows/wintel/k5stream.c index a315385188..f39daa8615 100644 --- a/src/windows/wintel/k5stream.c +++ b/src/windows/wintel/k5stream.c @@ -1,9 +1,9 @@ /* - * + * * K5stream - * + * * Emulates the kstream package in Kerberos 4 - * + * */ #include <stdio.h> @@ -13,7 +13,7 @@ #include "k5stream.h" #include "auth.h" -int +int kstream_destroy(kstream ks) { if (ks != NULL) { @@ -25,13 +25,13 @@ kstream_destroy(kstream ks) return 0; } -void +void kstream_set_buffer_mode(kstream ks, int mode) { } -kstream +kstream kstream_create_from_fd(int fd, const struct kstream_crypt_ctl_block *ctl, kstream_ptr data) @@ -60,7 +60,7 @@ kstream_create_from_fd(int fd, return ks; } -int +int kstream_write(kstream ks, void *p_data, size_t p_len) { int n; @@ -80,12 +80,12 @@ kstream_write(kstream ks, void *p_data, size_t p_len) } n = send(ks->fd, p_data, p_len, 0); /* Write the data */ - + return n; /* higher layer does retries */ } -int +int kstream_read(kstream ks, void *p_data, size_t p_len) { int n; @@ -113,7 +113,6 @@ kstream_read(kstream ks, void *p_data, size_t p_len) hexdump("decrypted data:", p_data, n); #endif } - + return n; /* higher layer does retries */ } - diff --git a/src/windows/wintel/negotiat.c b/src/windows/wintel/negotiat.c index 685092df59..28f23b1dea 100644 --- a/src/windows/wintel/negotiat.c +++ b/src/windows/wintel/negotiat.c @@ -147,7 +147,7 @@ static char *SLCflags[]={ /* ascii strings for Linemode SLC flags */ }; /* Linemode default character for each function */ -static unsigned char LMdefaults[NTELOPTS + 1]={ +static unsigned char LMdefaults[NTELOPTS + 1]={ (unsigned char)-1, /* zero isn't used */ (unsigned char)-1, /* we don't support SYNCH */ 3, /* ^C is default for BRK */ @@ -197,7 +197,7 @@ void start_negotiation(kstream ks) { char buf[128]; - + /* Send the initial telnet negotiations */ #ifdef ENCRYPTION /* XXX */ if (encrypt_flag) @@ -220,7 +220,7 @@ start_negotiation(kstream ks) #ifdef NOT /* check whether we are going to be output mapping */ - if(tw->mapoutput) { + if(tw->mapoutput) { netprintf(tw->pnum,"%c%c%c",IAC,DO,TELOPT_BINARY); /* set the flag indicating we wanted server to start transmitting binary */ tw->uwantbinary=1; @@ -247,7 +247,7 @@ start_negotiation(kstream ks) teloptions[BINARY]); tprintf(cvs,"SEND: %s %s\r\n",telstates[WILL - TELCMD_FIRST], teloptions[BINARY]); -#endif +#endif #endif } /* end start_negotiation() */ @@ -269,13 +269,13 @@ parse(CONNECTION *con,unsigned char *st,int cnt) unsigned char *mark, *orig; char buf[256]; kstream ks; - + ks = con->ks; - + #ifdef PRINT_EVERYTHING hexdump("Options to process:", st, cnt); #endif /* PRINT_EVERYTHING */ - + orig = st; /* remember beginning point */ mark = st + cnt; /* set to end of input string */ @@ -289,7 +289,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) */ while(st < mark) { - while(con->telstate != STNORM && st < mark) { + while(con->telstate != STNORM && st < mark) { switch(con->telstate) { case IACFOUND: /* telnet option negotiation */ if(*st == IAC) { /* real data=255 */ @@ -306,7 +306,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) #ifdef NEGOTIATEDEBUG wsprintf(buf, "\r\n strange telnet option"); OutputDebugString(buf); -#endif +#endif orig=++st; con->telstate=STNORM; break; @@ -352,7 +352,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) #ifdef NOT case TELOPT_BINARY: /* DO: binary transmission */ if(!tw->ibinary) { /* binary */ - if(!tw->iwantbinary) { + if(!tw->iwantbinary) { netprintf(tw->pnum,"%c%c%c", IAC,WILL,BINARY); if(tw->condebug>0) @@ -428,7 +428,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) * its default character set */ netprintf(tw->pnum,"%c%c%c%c", - IAC,SB,TELOPT_LINEMODE,SLC,0,SLC_DEFAULT,0,IAC,SE); + IAC,SB,TELOPT_LINEMODE,SLC,0,SLC_DEFAULT,0,IAC,SE); if(tw->condebug>0) { tprintf(cv,"SEND: %s %s\r\n", telstates[WILL - TELCMD_FIRST], @@ -498,7 +498,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) #ifdef NOT case BINARY: /* DONT: check for binary neg. */ if(tw->ibinary) { /* binary */ - if(!tw->iwantbinary) { + if(!tw->iwantbinary) { netprintf(tw->pnum,"%c%c%c",IAC,WONT,BINARY); if(tw->condebug>0) tprintf(cv,"SEND: %s %s\r\n", @@ -523,13 +523,13 @@ parse(CONNECTION *con,unsigned char *st,int cnt) break; #endif } - + /* all these just fall through to here... */ con->telstate=STNORM; orig=++st; break; - + case WILL: /* received a telnet WILL option */ #ifdef NEGOTIATEDEBUG wsprintf(strTmp,"RECV: %s %s\r\n", @@ -554,7 +554,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) tw->ubinary=1; } /* end if */ else { - if(tw->condebug>0) + if(tw->condebug>0) tprintf(cv,"NO REPLY NEEDED: %s %s\r\n", telstates[DO - TELCMD_FIRST], teloptions[TELOPT_BINARY]); @@ -609,7 +609,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) #endif break; #endif - + default: wsprintf(buf,"%c%c%c",IAC,DONT,*st); TelnetSend(ks,buf,lstrlen(buf),0); @@ -649,7 +649,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) tw->mapoutput=0; /* turn output mapping off */ } /* end if */ else { - if(tw->condebug>0) + if(tw->condebug>0) tprintf(cv,"NO REPLY NEEDED: %s %s\r\n", telstates[DONT-TELCMD_FIRST], teloptions[BINARY]); @@ -680,7 +680,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) case TELOPT_ENCRYPT: /* WONT: don't encrypt our input */ break; #endif - + default: break; } /* end switch */ @@ -698,7 +698,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) case NEGOTIATE: /* until we change sub-negotiation states, accumulate bytes */ - if(con->substate==0) { + if(con->substate==0) { if(*st==IAC) { /* check if we found an IAC byte */ if(*(st+1)==IAC) { /* skip over double IAC's */ st++; @@ -715,7 +715,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) else { con->substate=*st++; /* check if we've really ended the sub-negotiations */ - if(con->substate==SE) + if(con->substate==SE) parse_subnegotiat(ks,end_sub); orig=st; @@ -753,7 +753,7 @@ parse(CONNECTION *con,unsigned char *st,int cnt) st++; } /* end while */ #if 0 - if(!tw->timing) + if(!tw->timing) parsewrite(tw,orig,st-orig); #endif orig=st; /* forget what we have sent already */ @@ -803,8 +803,8 @@ parse_subnegotiat(kstream ks, int end_sub) "SEND: SB TERMINAL-TYPE IS vt100 \r\n len=%d \r\n", lstrlen((LPSTR)buf)); OutputDebugString(strTmp); -#endif - } +#endif + } break; case TELOPT_AUTHENTICATION: diff --git a/src/windows/wintel/resource.h b/src/windows/wintel/resource.h index 0d39d5ca09..db79dee148 100644 --- a/src/windows/wintel/resource.h +++ b/src/windows/wintel/resource.h @@ -6,7 +6,7 @@ #define IDC_STATIC -1 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 103 diff --git a/src/windows/wintel/screen.c b/src/windows/wintel/screen.c index 206c97c89e..91de8dd8bd 100644 --- a/src/windows/wintel/screen.c +++ b/src/windows/wintel/screen.c @@ -87,7 +87,7 @@ GetNewScreen(void) } SCREENLINE * -ScreenNewLine(void) +ScreenNewLine(void) { SCREENLINE *pScrLine; @@ -185,7 +185,7 @@ InitNewScreen(CONFIG *Config) scr->width = Config->width; scr->height = Config->height; scr->ID = id; - scr->x = 0; + scr->x = 0; scr->y = 0; scr->Oldx = 0; scr->Oldy = 0; @@ -296,19 +296,19 @@ int ScreenScroll( pNext = pScrollTop->next; pPrev = pScrollTop->prev; - pPrev->next = pNext; + pPrev->next = pNext; pNext->prev = pPrev; pScrLine = pScrollTop; ScreenClearLine(pScr, pScrLine); } else { - pScr->numlines++; - pScrLine = ScreenNewLine(); + pScr->numlines++; + pScrLine = ScreenNewLine(); if (pScrLine == NULL) return(0); pScr->screen_top = pScrollTop->next; - } + } if (pScrLine == NULL) return(0); @@ -347,7 +347,7 @@ int ScreenScroll( if (bFullScreen) ScrollDC(hDC, 0, -pScr->cyChar, NULL, NULL, NULL, NULL); - else + else ScrollDC(hDC, 0, -pScr->cyChar, &rc, &rc, NULL, NULL); PatBlt(hDC, 0, pScr->bottom * pScr->cyChar, @@ -387,7 +387,7 @@ int DrawTextScreen( if (!pScrLine) continue; - if (YPOS >= rcInvalid.top - pScr->cyChar && + if (YPOS >= rcInvalid.top - pScr->cyChar && YPOS <= rcInvalid.bottom + pScr->cyChar) { if (y < 0) @@ -415,12 +415,12 @@ int DrawTextScreen( } if (SCR_isrev(pScrLine->attrib[x])) { - SelectObject(hDC, pScr->hSelectedFont); + SelectObject(hDC, pScr->hSelectedFont); SetTextColor(hDC, RGB(255, 255, 255)); SetBkColor(hDC, RGB(0, 0, 0)); } else if (SCR_isblnk(pScrLine->attrib[x])) { - SelectObject(hDC, pScr->hSelectedFont); + SelectObject(hDC, pScr->hSelectedFont); SetTextColor(hDC, RGB(255, 0, 0)); SetBkColor(hDC, RGB(255, 255, 255)); } @@ -446,7 +446,7 @@ int DrawTextScreen( TextOut(hDC, x*pScr->cxChar, y*pScr->cyChar, &pScrLine->text[x], len); x += len; } - } + } pScrLineTmp = pScrLine->next; pScrLine = pScrLineTmp; } @@ -638,9 +638,9 @@ long PASCAL ScreenWndProc( LPARAM lParam) { MINMAXINFO *lpmmi; - SCREEN *pScr; + SCREEN *pScr; HMENU hMenu; - PAINTSTRUCT ps; + PAINTSTRUCT ps; int x = 0; int y = 0; int ScrollPos; @@ -657,7 +657,7 @@ long PASCAL ScreenWndProc( pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE); assert (pScr != NULL); - switch (wParam) { + switch (wParam) { case IDM_EXIT: if (MessageBox(hWnd, "Terminate this connection?", "Telnet", MB_OKCANCEL) == IDOK) { @@ -690,7 +690,7 @@ long PASCAL ScreenWndProc( case IDM_COPY: Edit_Copy(hWnd); hMenu=GetMenu(hWnd); - Edit_ClearSelection(pScr); + Edit_ClearSelection(pScr); break; case IDM_PASTE: @@ -730,7 +730,7 @@ long PASCAL ScreenWndProc( CheckScreen(pScr); break; #endif - } + } break; @@ -860,7 +860,7 @@ long PASCAL ScreenWndProc( case WM_KEYDOWN: if (wParam == VK_INSERT) { - if (GetKeyState(VK_SHIFT) < 0) + if (GetKeyState(VK_SHIFT) < 0) PostMessage(hWnd, WM_COMMAND, IDM_PASTE, 0); else if (GetKeyState(VK_CONTROL) < 0) PostMessage(hWnd, WM_COMMAND, IDM_COPY, 0); @@ -933,7 +933,7 @@ long PASCAL ScreenWndProc( lpmmi->ptMinTrackSize.y = FRAME_HEIGHT + 4 * pScr->cyChar; break; - case WM_LBUTTONDOWN: + case WM_LBUTTONDOWN: if (bDoubleClick) Edit_TripleClick(hWnd, lParam); else @@ -972,13 +972,13 @@ long PASCAL ScreenWndProc( #if 0 pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE); assert (pScr != NULL); - wsprintf(strTmp,"fp->x=%d fp->y=%d text=%s \r\n", + wsprintf(strTmp,"fp->x=%d fp->y=%d text=%s \r\n", pScr->screen_top->x, pScr->screen_top->y, pScr->screen_top->text); OutputDebugString(strTmp); #endif break; - case WM_PAINT: + case WM_PAINT: pScr = (SCREEN *) GetWindowLong(hWnd, SCREEN_HANDLE); assert (pScr != NULL); BeginPaint (hWnd, &ps); @@ -988,7 +988,7 @@ long PASCAL ScreenWndProc( else OutputDebugString("screen_bottom is NULL.\r\n"); EndPaint(hWnd, &ps); - break; + break; case WM_CLOSE: if (MessageBox(hWnd, "Terminate this connection?", "Telnet", MB_OKCANCEL) == IDOK) { @@ -996,7 +996,7 @@ long PASCAL ScreenWndProc( assert (pScr != NULL); SendMessage(pScr->hwndTel, WM_MYSCREENCLOSE, 0, (LPARAM) pScr); return (DefWindowProc(hWnd, message, wParam, lParam)); - } + } break; case WM_DESTROY: diff --git a/src/windows/wintel/screen.h b/src/windows/wintel/screen.h index 7cba678ce2..e3e7460c85 100644 --- a/src/windows/wintel/screen.h +++ b/src/windows/wintel/screen.h @@ -4,7 +4,7 @@ extern long PASCAL ScreenWndProc(HWND,UINT,WPARAM,LPARAM); * Definition of attribute bits in the Virtual Screen * * 0 - Bold -* 1 - +* 1 - * 2 - * 3 - Underline * 4 - Blink @@ -81,7 +81,7 @@ typedef struct SCREEN { int DECCKM; /* Cursor key mode */ int DECPAM; /* keyPad Application mode */ int IRM; /* Insert/Replace mode */ - int escflg; /* Current Escape level */ + int escflg; /* Current Escape level */ int top; /* Vertical bounds of screen */ int bottom; int parmptr; @@ -242,7 +242,7 @@ intern.c void ScreenSetOption( SCREEN *pScr, int toggle); - + BOOL ScreenInsChar( SCREEN *pScr, int x); diff --git a/src/windows/wintel/telnet.c b/src/windows/wintel/telnet.c index 449471b7bd..a2f5083ca5 100644 --- a/src/windows/wintel/telnet.c +++ b/src/windows/wintel/telnet.c @@ -1,23 +1,23 @@ /**************************************************************************** - + Program: telnet.c - + PURPOSE: Windows networking kernel - Telnet - + FUNCTIONS: - + WinMain() - calls initialization function, processes message loop InitApplication() - initializes window data and registers window InitInstance() - saves instance handle and creates main window MainWndProc() - processes messages About() - processes messages for "About" dialog box - + COMMENTS: - + Windows can have several copies of your application running at the same time. The variable hInst keeps track of which instance this application is so that processing will be to the correct window. - + ****************************************************************************/ #include <windows.h> @@ -36,7 +36,7 @@ static SCREEN *pScr; static int debug = 1; char strTmp[1024]; /* Scratch buffer */ -BOOL bAutoConnection = FALSE; +BOOL bAutoConnection = FALSE; short port_no = 23; char szUserName[64]; /* Used in auth.c */ char szHostName[64]; @@ -53,22 +53,22 @@ krb5_context k5_context; /* * * FUNCTION: WinMain(HINSTANCE, HINSTANCE, LPSTR, int) - * + * * PURPOSE: calls initialization function, processes message loop - * + * * COMMENTS: - * - * Windows recognizes this function by name as the initial entry point - * for the program. This function calls the application initialization - * routine, if no other instance of the program is running, and always - * calls the instance initialization routine. It then executes a message - * retrieval and dispatch loop that is the top-level control structure - * for the remainder of execution. The loop is terminated when a WM_QUIT - * message is received, at which time this function exits the application - * instance by returning the value passed by PostQuitMessage(). - * - * If this function must abort before entering the message loop, it - * returns the conventional value NULL. + * + * Windows recognizes this function by name as the initial entry point + * for the program. This function calls the application initialization + * routine, if no other instance of the program is running, and always + * calls the instance initialization routine. It then executes a message + * retrieval and dispatch loop that is the top-level control structure + * for the remainder of execution. The loop is terminated when a WM_QUIT + * message is received, at which time this function exits the application + * instance by returning the value passed by PostQuitMessage(). + * + * If this function must abort before entering the message loop, it + * returns the conventional value NULL. */ int PASCAL @@ -79,12 +79,12 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS if (!hPrevInstance) if (!InitApplication(hInstance)) return(FALSE); - + /* * Perform initializations that apply to a specific instance */ bAutoConnection = parse_cmdline(lpCmdLine); - + if (!InitInstance(hInstance, nCmdShow)) return(FALSE); @@ -105,7 +105,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS { if (msg.message == WM_QUIT) // Special case: WM_QUIT -- return return msg.wParam; // the value from PostQuitMessage - + TranslateMessage(&msg); DispatchMessage(&msg); } @@ -116,35 +116,35 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdS /* * FUNCTION: InitApplication(HINSTANCE) - * + * * PURPOSE: Initializes window data and registers window class - * + * * COMMENTS: - * - * This function is called at initialization time only if no other - * instances of the application are running. This function performs - * initialization tasks that can be done once for any number of running - * instances. - * - * In this case, we initialize a window class by filling out a data - * structure of type WNDCLASS and calling the Windows RegisterClass() - * function. Since all instances of this application use the same window - * class, we only need to do this when the first instance is initialized. + * + * This function is called at initialization time only if no other + * instances of the application are running. This function performs + * initialization tasks that can be done once for any number of running + * instances. + * + * In this case, we initialize a window class by filling out a data + * structure of type WNDCLASS and calling the Windows RegisterClass() + * function. Since all instances of this application use the same window + * class, we only need to do this when the first instance is initialized. */ BOOL InitApplication(HINSTANCE hInstance) { WNDCLASS wc; - + ScreenInit(hInstance); - + /* * Fill in window class structure with parameters that describe the * main window. */ wc.style = CS_HREDRAW | CS_VREDRAW; /* Class style(s). */ - wc.lpfnWndProc = MainWndProc; /* Function to retrieve messages for + wc.lpfnWndProc = MainWndProc; /* Function to retrieve messages for * windows of this class. */ wc.cbClsExtra = 0; /* No per-class extra data. */ @@ -155,24 +155,24 @@ InitApplication(HINSTANCE hInstance) wc.hbrBackground = NULL; /* GetStockObject(WHITE_BRUSH); */ wc.lpszMenuName = NULL; /* Name of menu resource in .RC file. */ wc.lpszClassName = WINDOW_CLASS; /* Name used in call to CreateWindow. */ - + return(RegisterClass(&wc)); } /* * FUNCTION: InitInstance(HANDLE, int) - * + * * PURPOSE: Saves instance handle and creates main window - * + * * COMMENTS: - * - * This function is called at initialization time for every instance of - * this application. This function performs initialization tasks that - * cannot be shared by multiple instances. - * - * In this case, we save the instance handle in a static variable and - * create and display the main program window. + * + * This function is called at initialization time for every instance of + * this application. This function performs initialization tasks that + * cannot be shared by multiple instances. + * + * In this case, we save the instance handle in a static variable and + * create and display the main program window. */ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) @@ -180,15 +180,15 @@ InitInstance(HINSTANCE hInstance, int nCmdShow) int xScreen = 0; int yScreen = 0; WSADATA wsaData; - + SetScreenInstance(hInstance); - + /* * Save the instance handle in static variable, which will be used in * many subsequence calls from this application to Windows. */ hInst = hInstance; - + /* * Create a main window for this application instance. */ @@ -207,12 +207,12 @@ InitInstance(HINSTANCE hInstance, int nCmdShow) if (!hWnd) return (FALSE); - + if (WSAStartup(0x0101, &wsaData) != 0) { /* Initialize the network */ MessageBox(NULL, "Couldn't initialize Winsock!", NULL, MB_OK | MB_ICONEXCLAMATION); return(FALSE); - } + } if (!OpenTelnetConnection()) { WSACleanup(); @@ -242,12 +242,12 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HGLOBAL hBuffer; - LPSTR lpBuffer; + LPSTR lpBuffer; int iEvent, cnt, ret; char *tmpCommaLoc; struct sockaddr_in remote_addr; struct hostent *remote_host; - + switch (message) { case WM_MYSCREENCHANGEBKSP: if (!con) @@ -255,12 +255,12 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) con->backspace = wParam; if (con->backspace == VK_BACK) { con->ctrl_backspace = 0x7f; - WritePrivateProfileString(INI_TELNET, INI_BACKSPACE, + WritePrivateProfileString(INI_TELNET, INI_BACKSPACE, INI_BACKSPACE_BS, TELNET_INI); } else { con->ctrl_backspace = VK_BACK; - WritePrivateProfileString(INI_TELNET, INI_BACKSPACE, + WritePrivateProfileString(INI_TELNET, INI_BACKSPACE, INI_BACKSPACE_DEL, TELNET_INI); } GetPrivateProfileString(INI_HOSTS, INI_HOST "0", "", buf, 128, TELNET_INI); @@ -323,7 +323,7 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } #endif DestroyWindow(hWnd); - break; + break; case WM_QUERYOPEN: return(0); @@ -339,10 +339,10 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) PostQuitMessage(0); break; - case WM_NETWORKEVENT: + case WM_NETWORKEVENT: iEvent = WSAGETSELECTEVENT(lParam); - switch (iEvent) { + switch (iEvent) { case FD_READ: if (con == NULL) @@ -373,10 +373,10 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; } start_negotiation(con->ks); - break; + break; } - break; + break; case WM_HOSTNAMEFOUND: ret = WSAGETASYNCERROR(lParam); @@ -408,7 +408,7 @@ MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) wsprintf(buf, "%d", con->width); WritePrivateProfileString(INI_TELNET, INI_WIDTH, buf, TELNET_INI); break; - + default: /* Passes it on if unproccessed */ return(DefWindowProc(hWnd, message, wParam, lParam)); } @@ -447,7 +447,7 @@ SaveHostName(char *host, int port) comma = NULL; for (i = 0; i < 10; i++) { wsprintf(buf, INI_HOST "%d", i); /* INI item to fetch */ - GetPrivateProfileString(INI_HOSTS, buf, "", hostName[i], + GetPrivateProfileString(INI_HOSTS, buf, "", hostName[i], 128, TELNET_INI); if (!hostName[i][0]) @@ -467,7 +467,7 @@ SaveHostName(char *host, int port) bs = 0x7f; } else { /* No matching entry */ - GetPrivateProfileString(INI_TELNET, INI_BACKSPACE, INI_BACKSPACE_BS, + GetPrivateProfileString(INI_TELNET, INI_BACKSPACE, INI_BACKSPACE_BS, buf, sizeof(buf), TELNET_INI); bs = VK_BACK; /* Default value */ if (_stricmp(buf, INI_BACKSPACE_DEL) == 0) @@ -505,7 +505,7 @@ OpenTelnetConnection(void) char buf[128]; tmpConfig = calloc(sizeof(CONFIG), 1); - + if (bAutoConnection) { tmpConfig->title = calloc(lstrlen(szHostName), 1); lstrcpy(tmpConfig->title, (char *) szHostName); @@ -514,7 +514,7 @@ OpenTelnetConnection(void) if (nReturn == FALSE) return(FALSE); } - + con = (CONNECTION *) GetNewConnection(); if (con == NULL) return(0); @@ -548,7 +548,7 @@ OpenTelnetConnection(void) } ret = (SOCKET) socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - + if (ret == SOCKET_ERROR) { wsprintf(buf, "Socket error on socket = %d!", WSAGetLastError()); MessageBox(NULL, buf, NULL, MB_OK | MB_ICONEXCLAMATION); @@ -557,17 +557,17 @@ OpenTelnetConnection(void) free(con); free(tmpConfig); return(-1); - } - + } + con->socket = ret; - - sockaddr.sin_family = AF_INET; + + sockaddr.sin_family = AF_INET; sockaddr.sin_addr.s_addr = htonl(INADDR_ANY); sockaddr.sin_port = htons(0); - - ret = bind(con->socket, (struct sockaddr *) &sockaddr, + + ret = bind(con->socket, (struct sockaddr *) &sockaddr, (int) sizeof(struct sockaddr_in)); - + if (ret == SOCKET_ERROR) { wsprintf(buf, "Socket error on bind!"); MessageBox(NULL, buf, NULL, MB_OK | MB_ICONEXCLAMATION); @@ -589,7 +589,7 @@ OpenTelnetConnection(void) strcpy(szHostName, ++p); } - WSAAsyncGetHostByName(hWnd, WM_HOSTNAMEFOUND, szHostName, hostdata, + WSAAsyncGetHostByName(hWnd, WM_HOSTNAMEFOUND, szHostName, hostdata, MAXGETHOSTSTRUCT); ctl.encrypt = auth_encrypt; @@ -626,7 +626,7 @@ int DoDialog(char *szDialog, DLGPROC lpfnDlgProc) { int nReturn; - + nReturn = DialogBox(hInst, szDialog, hWnd, lpfnDlgProc); return (nReturn); } @@ -655,31 +655,31 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) char tmpName[128]; char tmpBuf[80]; char *tmpCommaLoc; - + switch (message) { case WM_INITDIALOG: hDC = GetDC(hDlg); Ext = GetDialogBaseUnits(); xExt = (190 *LOWORD(Ext)) /4 ; yExt = (72 * HIWORD(Ext)) /8 ; - GetPrivateProfileString(INI_HOSTS, INI_HOST "0", "", tmpName, + GetPrivateProfileString(INI_HOSTS, INI_HOST "0", "", tmpName, 128, TELNET_INI); if (tmpName[0]) { tmpCommaLoc = strchr(tmpName, ','); if (tmpCommaLoc) *tmpCommaLoc = '\0'; SetDlgItemText(hDlg, TEL_CONNECT_NAME, tmpName); - } + } hEdit = GetWindow(GetDlgItem(hDlg, TEL_CONNECT_NAME), GW_CHILD); while (TRUE) { wsprintf(tmpBuf, INI_HOST "%d", iHostNum++); - GetPrivateProfileString(INI_HOSTS, tmpBuf, "", tmpName, + GetPrivateProfileString(INI_HOSTS, tmpBuf, "", tmpName, 128, TELNET_INI); - tmpCommaLoc = strchr(tmpName, ','); + tmpCommaLoc = strchr(tmpName, ','); if (tmpCommaLoc) *tmpCommaLoc = '\0'; if (tmpName[0]) - SendDlgItemMessage(hDlg, TEL_CONNECT_NAME, CB_ADDSTRING, 0, + SendDlgItemMessage(hDlg, TEL_CONNECT_NAME, CB_ADDSTRING, 0, (LPARAM) ((LPSTR) tmpName)); else break; @@ -707,7 +707,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) (GetSystemMetrics(SM_CXSCREEN)/2)-(xExt/2), (GetSystemMetrics(SM_CYSCREEN)/2)-(yExt/2), 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_SHOWWINDOW); - ReleaseDC(hDlg, hDC); + ReleaseDC(hDlg, hDC); SendMessage(hEdit, WM_USER + 1, 0, 0); SendMessage(hDlg, WM_SETFOCUS, 0, 0); return (TRUE); @@ -728,7 +728,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) else EnableWindow(GetDlgItem(hDlg, IDC_FORWARDFORWARD), 0); break; - + case IDC_FORWARDFORWARD: forwardable_flag = (BOOL)SendDlgItemMessage(hDlg, IDC_FORWARDFORWARD, BM_GETCHECK, 0, 0); @@ -747,7 +747,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case TEL_OK: GetDlgItemText(hDlg, TEL_CONNECT_NAME, szConnectName, 256); - + n = parse_cmdline (szConnectName); if (! n) { MessageBox(hDlg, "You must enter a session name!", @@ -758,8 +758,8 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) lstrcpy(tmpConfig->title, szConnectName); EndDialog(hDlg, TRUE); break; - } - return (FALSE); + } + return (FALSE); } return(FALSE); } @@ -773,7 +773,7 @@ OpenTelnetDlg(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) * send a buffer of characters to an output socket. It differs * by retrying endlessly if sending the bytes would cause * the send() to block. <gnu@cygnus.com> observed EWOULDBLOCK - * errors when running using TCP Software's PC/TCP 3.0 stack, + * errors when running using TCP Software's PC/TCP 3.0 stack, * even when writing as little as 109 bytes into a socket * that had no more than 9 bytes queued for output. Note also * that a kstream is used during output rather than a socket @@ -839,9 +839,9 @@ trim(char *s) /* - * + * * Parse_cmdline - * + * * Reads hostname and port number off the command line. * * Formats: telnet @@ -855,7 +855,7 @@ BOOL parse_cmdline(char *cmdline) { char *ptr; - + *szHostName = '\0'; /* Nothing yet */ if (*cmdline == '\0') /* Empty command line? */ return(FALSE); @@ -896,7 +896,7 @@ hexdump(char *msg, unsigned char *st, int cnt) if (j == 8) OutputDebugString("| "); OutputDebugString(strTmp); - } + } i += j - 1; OutputDebugString("\r\n"); } /* end for */ diff --git a/src/windows/wintel/telopts.h b/src/windows/wintel/telopts.h index 54d67cde3d..d8b6a06d25 100644 --- a/src/windows/wintel/telopts.h +++ b/src/windows/wintel/telopts.h @@ -97,7 +97,7 @@ #define FORWARDMASK 2 -#define SLC 3 +#define SLC 3 #define SLC_DEFAULT 3 #define SLC_VALUE 2 #define SLC_CANTCHANGE 1 @@ -147,7 +147,7 @@ #define XOPTIONS 255 #define LINEMODE_MODES_SUPPORTED 0x1B -/* +/* * set this flag for linemode special functions which are supported by * Telnet, even though they are not currently active. This is to allow * the other side to negotiate to a "No Support" state for an option @@ -155,8 +155,8 @@ * our "No Support" state to something else ("Can't Change", "Value", * whatever) */ -#define SLC_SUPPORTED 0x10 - +#define SLC_SUPPORTED 0x10 + #define ESCFOUND 5 #define IACFOUND 6 #define NEGOTIATE 1 |
