SVN-fs-dump-format-version: 3 UUID: cda61777-01e9-0310-a592-d414129be87e Revision-number: 0 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T11:58:55.428047Z PROPS-END Revision-number: 1 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.539204Z PROPS-END Revision-number: 2 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.546370Z PROPS-END Revision-number: 3 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.552105Z PROPS-END Revision-number: 4 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.558130Z PROPS-END Revision-number: 5 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.563716Z PROPS-END Revision-number: 6 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.569886Z PROPS-END Revision-number: 7 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.576315Z PROPS-END Revision-number: 8 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.581979Z PROPS-END Revision-number: 9 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.587551Z PROPS-END Revision-number: 10 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:45.593149Z PROPS-END Revision-number: 11 Prop-content-length: 127 Content-length: 127 K 7 svn:log V 27 Initial checkin: beta 0.43 K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-08T13:02:13.000000Z PROPS-END Node-path: putty Node-kind: dir Node-action: add Prop-content-length: 10 Content-length: 10 PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 888 Text-content-md5: 355167c207fb2ce1a2bb90eeadb7b798 Content-length: 1004 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN媁濪+橠O糄汥q團凢}橢qD乻侲q圙凟q僂丆咲qE乯僆m匜$咹侸僅侸僆俙僆/丗9侲俲咶乸孍乶慓1侴0E"D8匞1咼僙僄僃嶦乲D乂E4H丏乂E孌+岻億侷+F儃丂JE刞L凮H+僄咼奆乻僈*E匬I乄卲乑乂G$T E#Z哬O"丣乻丠乺侳億両丒FF(侹0DnL9L 丣I1丣D噡EJ H!丗 J I*丟)O嘪丟n丒嘺丟嘺H J侱E坬D侴G坵DG俁E坬D俁KG俔E坬D俔KG俬E坬D俬KGE坬DL塒G倀F塨D倀HDHE(F丣:G垀嘖丮侹8廍 G妡僅DG妡僅侷僆侳I+# Makefile for PuTTY. Use `FWHACK=/D' to cause the firewall hack #be built in. (requires red of ssh.obj only) CFLAGS = /nologo /W3 /YX /O2 /Yd /D_X86_WINDOWS /DDEBUG /ML /Fd .c: cl $() $() /c $*.c OBJS1 = windowlgterminallnetmis noise2 =sshcrsshdesmd5rsaand3sh RESRC_res.res LIBadvapi32.lib usergdwsockcomctldlg putty.exe: $(3) link.rsp /debug -out: @d: m echosubsystem:s >>23 :c hhlg: :: :ccico rc-r clean: del *exepchapilkdb Node-path: putty/misc.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 862 Text-content-md5: a84182fac8e9428fb65d495f26ede8b7 Content-length: 978 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN媈9旿匭僊獷g橤eDu僆m婨u揇9匛,Dc哋岺橧uDL乴奩桪圖<婦矱―嘐>咶E怚僰G僽DE!岶僙E僤奊僅匜f圖刬H僪F刋D?GE刪K侱僪孌凩丼丏〥卄塅卭咲5侴丼TF1G刡扙刼匟凮D僱F哖侱凩K刉Gn丟剕侳哴V刴L匴凢嘒Hn両@3H 僑哃Ic哻D刕DzJL僪GR両 D僱M8E墋僅塇J唂丏zF^D嘸W.DzD=凥擠G凱#include stdiolib"putty.h" /* My own versions of malloc, re and free. Because I want *to bomb outexit the program ify runemory,reliably callif passed a NULL pointer,do nothing. Of course we can alsoput tracintouts in,we need to. */ #ifdef MALLOC_LOG static FILE *fp =; void mlog(char *file, int line) { (!fp) fopen(_mem.log", "w");, "%s:%d: ", ; } #endif*safe(size_t !p MessageBox(, "O!PuTTY Fatal Error", MB_SYSTEMMODAL |ICONERROROK); (1}%d) returns %p\n",, p); p(trtr) else(%p, %p) null - no action taken\n} Node-path: putty/noise.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 2230 Text-content-md5: 3f9938a682917c7055bd6b1359652144 Content-length: 2346 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN3(綝G 滽Q匘cJQ塊z僁 瓼圚0D,咲0扝,丗KG 塇,丏扙2扙2D俁侲俓僅,丟俈廌7烡<怐/汥<淕侺G-僁俁凞倇D僇僊4僂侹D D#匛俌H-E丄廌E-F侤圱凧I倂並凧I傾凞僆琇P俤DF僇\匓D;K卌丏0G僽H俌L俬凩嘓=揌乽奃ME>凢]塈俲V卬D唓F<哃俲丠剉H嘥侳4咼4E5凟匟刼侶並塃扚塃乹孌-僂乹僄!侱奅乹丏唚岹KE丏丏匛*僁圕侳嘔/奆侤H%凢侤楩侤E'僂0I7侴T"G妅I卬G妅DE俌匤凥+D,侲丷匘僶J丠奨G1D倇E婽婩%咵傾侱傿D唓D圕両媟I卬I媠F噈侱乮丏丼僃媍D,L媝D噈D丼E刡E宩I,V侻H俿E=塅宖I7孌9G唍奅峠侺峷匥峫擠儃D$L俿E=E傾G學丒傾I奲塆嘠F侳僁8J倃丒僴F嶬丏巏I卬嘐0E<僁凟1E!G哣D唓F剎咲噉侲刡凥L,EF1匛!N*M7@RF俀嶧峷怽:G,僆巪匛憁FF奬侴E僁奬侳;D3D噈僈峅僃;E0D3G憑I:^弌^8奓乄奅垀嘖坙咶+咶'凞揤凞匱E塀僃0D乆凞$D 侳KO塶卌奅揹僉侤塅2婫/F擽慏 J妦丒揻咷攊G1F1G攊J卬G昈H俿M?丒攠D匧侴攟凥丏#GM昒F攟I卬F攟I晊D倇I?咵侴1僃廐H杶I卬I乨4G!匘塠孌圷侱F揟丗 圙%F'D乺僁僁梕凟=奅E塻E7凞5丗揱圛梋D凟塓!匜6F侳E媤G0F侳僇攍岴F攍E3G凟塻H&G咵E侳I晊G4F匘2D:V橺G4W檛D倇E僑丣E凥橭DR橿H橭JI歸D)/* * Noise generation for PuTTY's cryptographic random numberor. */ #include stdio"putty.h"ssh static char seedpath[2*MAX_PATH+10] = "\0"; Find the file and store it in `'void get_() { HKEY rkey;DWORD type, size; =of()if (RegOpenKey(_CURRENT_USER, PUTTY_REG_POS, &)==ERROR_SUCCESS int ret = RegQueryValueEx(, "RandSeedFile", 0, &, &); != ||SZ) '\0'; RegClose} else !len,; len = GetEnvironmentVariable("HOMEDRIVE"+-len== 0) { /* probably win95;n \WINDOWSGetWDirectorystrlen += strcp "\\.RND" }This funcis called once, at startup,will do someseriously silly things like listing diesgetskfree spaceacess snapshotn_heavy (*) *, int)ANDLE srcheedfWIN32_FIND_DATA finddatawin3]trcat"\\* =First&!= INVALID__VALUEdo(wh(Nex = CreateGENERIC_READFILE_SHARE |WRITENULL, OPEN_EXISTING,1buf[1024]lena,buf), & &&) break Hand_save 0CREATE_ALWAYS,ATTRIBUTE_NORMAL; writt ave(&Wrif, every timepool needstirringacquirsystemin availormbattuslightSYSTEMTIMEimeadjust[2]BOOL rubbis_POWER_STATUS pwrSTime(&A(&0], 1PowerS(&)) ;keypror mouse movnddcurrent perancnitocounter to. Itscan codeposipassed inultrawinLARGE_INTEGERadd_TickCPer(& Node-path: putty/putty.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 3344 Text-content-md5: 84a0ed0d9293f22ecab1afc2f3304c42 Content-length: 3460 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN璭 寈嶧塐OhDe扤eF團/僁婩奐J丟IF丣哋6丗嘕+慒僂 楨L俴僄倆丷凪俁(婭N,咲丣O俰塆L嘑凙廞)匞凢F(K 侳o凮刯丵)嘐凥FK 丏凞乣N刱丏N,凞 G処丷 凥丒卂P嘓'丷哛咹&丼 丩DS唘圥G嘗丱嘑'丏P匢%W 両!乀6嘑'侼 塂丮噕哊,FD&丒7M DK,F侱0凞孖,揋俆擠卹侻婩夿嘕廜奬E丣奺僅圗厏嘕奺侺E,咷婭凨奪僔奼G媖FK媖Y僁.K媖N(x) (dprintf x) staticfmtwa_lisgotconsole = 0; f (! AC 1}va_start(ap, fmvsapWFiGetStdHandle(STD_OUTPUT_HANDLE)flen), &dw, NULLa_end(} Node-path: putty/putty.ico Node-kind: file Node-action: add Prop-content-length: 88 Text-delta: true Text-content-length: 1727 Text-content-md5: 1eeb6033797eebd2e3781a4228a05e22 Content-length: 1815 K 15 cvs2svn:cvs-rev V 3 1.1 K 13 svn:mime-type V 24 application/octet-stream PROPS-END SVN檝卶嘊奃 奅 嘍丒 塂匘丒 丗(SP丒b僃fDq圖v侲僃DDDO侳/丟塂H;匞丠丗乢丟乄侳丠丠乬丗/侶E乢H丗圡丱#侼$僋侼僈匤D乢僂/D乷孏乄奊丟E3K侳)丠F侷侹乨圞儃僊 僋僋*丱9ODK儃E乢J儃丗丵TR咲剆僂)廤=奃擼卾嘚6丗_FDmQcF:岲嘓丗>扚嘊扙嘑扗塅嘕E9圖4丗嘚扚嘡扚嘨扚嘮燚3侳嘼E=D塉塅噁扚噅嶧噉岲丗噐嶦噕岴丗僃奝丟噝D圔凞奨丗奌丗 E#岴匘#塂奆D嘊D團D塕D奦DD慒D妔圖侳扚"岲1丒&丏7圖?E婫D圝D塚D媗旻*扚.扗2揇怐0僁 ED塂皅}Q嶶丱巊丱嶶侴E僆OH OG乢I廙QN巜侾N巈D弖P嶶[廙F%侴怢Z4丒怟[怲丏怟[4刓匽4D慞W5G 俇7I廙侲憆Q巓E/G俉丠抪G扞R5J抪W廞E抳\弇M4TD^.丒ZHY4乨]E恗x4I扖V5J晆U5H抸I `%@丗%G桾SI梐D>D>侱D>匛+E濪0嘍2慒梇I榑D協@朄 6 0 (@览垏wwwwxwwwxp鹛烫 腊 袄 梆话ww x嚮换话www 圾徎 疤糖 疤 ??儡鹗 """)))UUUMMMBBB999|PP焯浦昼惄3f333f33f3fffff3檉櫃櫶3蘤虣烫蘤蘤333333f333333f33ff3f3f3f33檉3櫃3櫶333蘤3虣3烫3333f33ff33f3ff3f3f3f3fffffff虣3f檉f櫃f3f虣f烫ff3ff烫3蘤3f33f檉檉3櫃3櫃f櫃櫃f櫶櫶櫶333f333ff蘤蘤3虣f虣虣虣3烫f烫烫f333f333f3蘤fff蘤3檉櫃櫶3蘤虣烫3ffffff!___唵枛怂膊鬃葺沣觋耨瘥狓 @  麁?囵還`0 Node-path: putty/resource.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 303 Text-content-md5: 355e758830bb28a0289005585629651c Content-length: 419 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN 5乷KD朌楧丮睪乲僑丣嘚乪刉乼匫凷丣凱G乹匟倉//{{NO_DEPENDENCIES}} // Microsoft Developer Studio generated include file.Used by win_res.rc // Next default values for new objects #ifdef APSTUDIO_INVOKEDnREADONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101COMMAND 400NTROL1000SYMEendif Node-path: putty/ssh.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 7176 Text-content-md5: 8287ad7cfcbef0e760042d87fdd7c094 Content-length: 7292 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN亖;1揗僋嘍J塂;揊X塈P僇]D~侶nK<僂L塂c丗嘔^桪c凱乫塅婹 侶乷両L 婰婹俕乁俽K乫丒D俹岹塋丗0H僜廘 F=乫僃j僷凞俹僕倀僂R刢俉剎L@JPG亁揊#両濰揋唚咼H!匘哤I淟J↙UI.扙盙D僄丏 Y磚侳!T積V蠷G噖JK0D癐H廫O F慭LE(H猵I擾O丏O丗#H+HI慴N憅G絲S.J4F瞔I K4丠禶P‵OF#L榏奃衭嘔榤Z裮F蔊L&硘侲-_誏F)L&噃D絲丏3侱0塂-塂唞僂膡圗乥^誏丟篭嘍>丒礙丱莀侴!MNK袶W蔥乊蕇H茿M縕O襅丏/EL"Q&G1H>K4Q&F蘔E>M!V蘪F4K LM N;奆"咷乑凞塅蔧D丆婦"圖$丏蔭丟!E丟朑 D"怐朎!F=奌踗丏,E&DFH躆塂踡D乗圗碯丒繸咲擜D!丏躆丱G婦杁D0FF箄侶輇丠3H猼D#孧D!D繰丟5N岼係;F載侳!H0侱輙IF襚HJ盋丠2EL盤I ^眀GD朰KE=U9F辡侲遲F遌F辸D罸E込DG匞祎F%侼迃D D郺匘$凟4丟郹F=D侱丏蹹DG&D*JD+凟処侱揃僁!侱筨KDG瞫H婦躠侷蔋G膠孒圖匩6慓6奅8G(丏凟匯>圞$E鈡D璟匤>H I&M酦圙躛H>丠 奅丠╕丒罛IDDD筨LO%ERN鮇E僓2NM 丯F0L鱞嘍鰎U侳杛D:E騤丒蹷L:L=J廣E[塰Y+G匑J襬INWF丟侶乄FF F:哤鵎I廯H%GI蠷O鮃U:侴8MN>U>H嘷D5M1D~L咵跾僁唟丠鸰VG噖D5N襆侱賟T罝U5M罠F T蚥M罠F爓SR羮M8M罠EU蝄M罠乊M罠乆0M罠丵蟍I!K礬D顂FR耈I侱(G:E丏裐刅鵏G丗:侹H!Q鹮凞丗>丟亐Z丠%GF嘜G2J亐}D鵤K亖 僈亖 FD#include libwinsock"putty.h"fndef FALSE #define 0 #endifTRU 1ssh/* Coroutmechanics for the sillier bits ofcode */crBegin1 static int crL= 0;2 switch() { case 0: ;Finish(z) } return (z)VR\ do {\ =__LINE__;:;\ } while (0VStopdo{; }V SOCKET s = INVALID_;unsigned char session_key[32];struct ssh_cipher *= NULL*savedhostenum { SSH_STATE_BEFORE_SIZE,INTERMEDSESSION }size_needed =void s_write (buf,len)len > 0 i = send (s, len, 0); if (i-= i += i;} }_readretrecv, elseret;c--new_h= (inbuf+ 1) & INBUF_MASK)!= reapbuf[] =++;; Packetlonggthtypecrcdatabodymaxlen; }pktin = { 0,, 0 }oush_protocol *ininspkt)()got, bigtoc, *p, ppadding[8]word[4]; 1(i < 4; i++ == << 8) +++,-- p8 -%8 + 5; /* and CRC . <= ? malloc(: re)f (!fbox("Outmemory" =chunk =>memcpy(p,+=-p->decrypt[pad];+pad+1= 36) {MSG_DEBUG/* FIXME: log it} , 1)pktrt(padout-5+4+[-1=<[i+4random_byte(crcrc32+4-4+0((>> 240xFF16283en+do_iniver[10str4;WHACK(&c'S' &&2)== = 2Hbrea} #1)1 || c'S')H-{ i'\0'; -1of()-++c\n'sprintf(, "SSH-%s-7.7.7\n",(strcmp, "1.5") <= 0 ? :strleni, jid[16rsa*keystr12cookieRSAKey servkey, keMD5Context md5extern3des! ! Public key pnoceived,, MD5I&makekey+8, &&j+i, &2Update,.s1,Final(, 32( > ? :verify(<^id323+153CIPHER_3DES+1,9*8)11,0; flagsree&; 14Esuccessfully enablfflush(stdou{ username[10po*cfg.("login as: ", 1 10:3pos827 \b \b", 3 pos2134_seedexit(defaultc' c'~< 4}\r spn(, "\n\r")stuff[2n, 999ent \"%s\".} 4, 4+; 415ss}9setA deniedStrange,%d"term10, i+5*4+i4, i4(rowscoli9)0 pixwidthpixheight, 0.b endofopconfuServer refused to pty312784ISCONNECT:nothingSUCCESS: may be from EXEC_SHELL on someerFAILURE*no is avail or in otodds. Ignor2/* EXITU 33:6/* * Callset upnnec. Will arWM_NETEVENTmessagesbspecified window, whoseprocedure shouldn call telnet_msg(). s an error,Also placanonical into `'/ (HWND hwndrt*ADDR_IN addr*a;FWFW1 =FWSTR23* Tryfind. (i) INNONE (getbyWSAGetLastE()WSAENETDOWN:"Networkdown"WSAHOST_NOT_FOUNDWSANO_DATAHdoesexistTRY_AGAIfound: unknow} (&a, h->h,antohl(a<2Ope(AF_INET,_STREAMAFNOSUPPORTTCP/IP suppresen)Bto l.sin_familtonl(ANYsbock*)&ddr_ERRORCremote(short)REFUSEDNETUNREACHunreacho e8)2" %d)) ialisaWSAAsyncSel, FD_READ |CLOSEPss ahas closor <0ash (WPARAM wParam, Ll5howhell did we here?!-5000GETSELECT(!:< 0WOULDBLOCK)any __10000can't happory re: 1but WTFndTze's POV: bufferlat/1,567(Sades)(_S} Bnb=ize Node-path: putty/ssh.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 563 Text-content-md5: a509ea6e47d5e26a94b4c51f7de62ed5 Content-length: 679 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN乻4滼僄孧*嶥漀奃Od奅1奦cD哘w匛W婾乢H.D亄凢m僕乚圝D嘨侶凞俠両d怭侼侾僁侲G奊 EE倈嘑L僜匧僱Me凞僰DTE1嘓K僈侳僌H塠5K.EmF匢僴PF=H凷匫c奍wV=H僀奊 E1咲乶PcF乶KG6Q"僆丵N6俥咶I%岶俕侳匯丟俔FqD厁E乼咲&丏1IF嘪團嘺侲噝L丵僺truct RSAKey { int bits;ytevoid *moduluexponent; }; makekey(unsigned char *data, *result, *keystr); rsaencryptlengthkey);rsastr_len(fmt(str typedefword32;uint long crc32(consts,lenMD5Context buf[4]its[2in[6MD5Init*cMD5Update*buf,Finaldigest[16]ssh_cipher(*sessblkdeSHATransform( *,andom_(add_nois *); Node-path: putty/sshcrc.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 4537 Text-content-md5: 5de39024b25f15fc6c2e2c63a29c9d6c Content-length: 4653 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN)$ 唡凟AF IC凞稤kL@F乮IC燚侼F"楳乚L侱丂B亀塂僛丏僛D僙丏僟丒僫丏僶慏僛D僶凘[乛僁y廌俴咵俇僂?岴俹僊乚D侤僇&僄倁D僕G/孍匔僁卙D侤P僇丒俹匢匵丗/嶥<匘丱凣4O9婩乕z@Y&D侤E2嶥丯嘍卪咲乄嘚員凢剓侱 D唋丗圵嶥唋圖唋塏怓丏匱D哋俁匔D俻團 J團O-E剒匜D唋侲E 丏 匘D剘M哢侱坽E{奆w塂0擠0O5F*E4S"俇塂匢妎N丒-丒哋K D厈侱唀奅 侲奵H夿丮哢凢俈D媣D D婡D妠D F*咲剋丒E孭F卽E;K塨奆孡F1D"E 丒俇EE咼E厏F妐匘匱L宭侲7MU(K丟僂侳岺L宮匘唋丗塟僁!匘乄怳唓@X(D倄N俫G俔圖俢嘐咲倀D剈侤]乗D怮D倄G廏侱妉匛奯咲*僅?丗侱;侾嶻丏D匘匯丵乚F圿D孮孍乂I抾k+K侱圖@唥丂C7E嶼侱4丣擧旻3僄.岴6圗6圗6奍%團楥嘑楶嘑榏G)F6嘖榡團楶嘑榏嘑6嘑楥嘖榡圗6圗6嘑#嘑橮圞榡嘑檍嘑橾嘑 團 嘖榡嘑5嘑榎嘑極嘑榺嘗榠嘑嘑 嘑橮嘑機嘗0嘑#嘑 嘑歺嘑檍圞榡嘑榎嘑極嘑楤嘑5圞榡嘑 嘑榺圗6嘑極圞榡嘑5嘑楤嘑 嘑嘗榠嘑榺嘑機嘑橮嘑#嘗0嘑歺嘑 嘑橾嘑檍G榗並榡丟F楶咶極嘑榎嘑漀圠檟咶 嘑嘑#嘑嘗>嘑橮嘑橾嘑檍嘑歺圠FF嘑#嘑橮嘑機圠?咶橾嘑 嘑歺嘑烶嘗=嘑榎嘑極嘑榺嘑漀嘗!嘑 嘑橮侱歨丗機嘑圠"咶 嘑歺嘑檍嘑橾嘗漢嘑極嘑烶嘑5嘑圠咶榺嘑漀嘑極嘑榎嘗=嘑烶嘑 嘑嘑漀嘗嘑機嘑橮嘑#嘑嘗檞嘑 嘑橾嘒檍G*F爕哃丟況F6咶榎嘑漀嘑榺丟L榡咶嘑#嘑嘑機圠燣咶橾嘑檍嘑歺嘒F9L0嘑#嘑橮嘑機嘑檍嘗淶嘑 嘑歺嘑烶嘑嘗漢嘑嘑榺嘑漀嘑嘗GF橮嘑機嘑嘑#嘗嘑歺嘑檍嘑橾嘑榎圠咶烶嘑嘑嘒沴哃嘒=咶嘑榎嘑嘗嘑 嘑嘒咶榺嘗>嘑橮嘑#嘑嘑歺嘗嘑橾嘒爔F橷F嘑烶嘗丟漈F咶漀僁8F榺嘑 丟L檟咶#嘑嘑機丟玴F哃淶嘒0咶歺嘒歬F爏F嘗.嘑畉嘑機嘑檍嘑橾嘗嘑歺D瀁僃烶嘑嘑丏侺嘑榺嘑漀嘑嘑 G L嘑機嘑嘑#嘑 嘗檞嘑檍嘑橾嘑嘑嘗嘑嘑嘒咶榺嘙/F)F嘑嘑嘑烶嘗嘑嘒漀咶榺嘑機嘗嘑#嘑嘑歺嘑 嘗淶塂%廐廬D奷侳奣匜D 凞1D梷S丏廙丣擧D媄凧擧塂$M礘侺礭J僁祅侷凞祅D扞侲匘礦E)僂%H$J侸両塃2嘕禴匘祅嘑磆J /* = */ COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or codetables extracted from it, as desired without restrictioFirst, the polynomial itself and of feedback terms. ThesX^32+X^2631110+X^8+X^7+X^5+X^4+X^0Notat we take it "wards"puthighest-order inlowbits "implied";LSB1, etc0(usually shown"+1")ultsMSB being 1 hardware shifgister ementa, whichis w'r(merely optimizit by doeight-bithunks at a time)sto. In oumeanstor. Whdoway? Becae calculaCRC must be transmittoUARTsarto. By storhe,we hlow-byosends each;ssionbyquianhuffloparRecep works similarlyconsists256, 32entries:angenerat run if;tosoirt m noobvious, bsy represenof/xor opera-ions for all combindatavalu-edby"updcrc"logicunsigned (bin zeroes). On somyou couldbabisembly-swap instru$edb8832- sclong crc32_tab[] = { 0x0L, 0x77073096ee0e612c990951ba076dc419L,706af48f963a535e6495a39dcb8a4e0d5e91e7d2d9889b64c2beb17cbd7b82d0790bf1d911db710646ab020ff3b971484be41de1adad476ddde4ef4d4b5583d385c736c9856646ba8cfd62f978a65c9e14015c463066cdfa0f3d68d080df3b6e20c4c69105d56041ea2677173c03e4d4b04d44d20d85fa50ab56b35b5a8f42b2986dbbbc9dacbcf9432d86ce345df5c7dcd60dcabd13d5926d930a51de003ac8d7518bfd061121b4f4b56b3c42cfba959b8bda502802b895f05880c60cd9bb10be922f6f7c858684c1c1611dab6662d3008d220befd510271b185806b6b51ffbfe4ae8b8d437807c9a0f00f939609a88e10e9817f6a0db086d3d291646c9e6635c011c6c616856530df2620046c0695edb01a578208f4cf50fc4565b0d9c12b7e958bbeb8efcb988762dd1dd15da2d48cd37cffbd44c64db26153aca3bc007d4bb30e2adfa543dd895da4d1c46d3d6f4f4369e96346ed9fad67884da60b8d44042d733031de5a0a4c5dd0d7cc5005713270241abe0b101c90c2085768b52206f85bb966d40ce61e495edef9029d9c99b0d0982c7d7a8b59b33d12eb40d8b7bd5c3c0ba6caabfb3b04b1d29ead54739dd277a03dc168e3630b194643b80d6d6a37a6a5aa840ecf09309ff90a00ae27d079eb8708a3d1e01f266906c2ff762575806567c196c3676e6b06efed41b789d32be10da7a567dd4acf9b9df68ebeeff17b7be460b08eda1d193738d8c2c4fdff25d1bb67fa6bc5763fb506d48b2364d80d2bdaf0a1b4c6034af41047a6df60efca867df516e8ee4669be7b61b38bc66831256fd2a5268e23cc0c779bb0b470220216b505262c5ba3bbb2bd0b22bb45a95cb36a0c2d7ffab5d0cf32cd99e85bdeae1ec63f22756aa390c0906aeb0720767805bf4a8e2b87a17bb12ba02d28e9e5d5be0cdcefb0bdbdf2f1d4e2468ddb3f1fda83681be16cf6b92656fb077e18b74775aeff0f6a766063bc1b58f659eff862ae6616bffd166ccf4d70dd2e4e048353903b3ca767266d06016f49694743e6e77daed16a4d9d65ad40df0b637d83bfa9bcae5debb9ec7b2cf730b5ffecabac2853b393324b4a3abad0360cdd706954de5723d967bb3667a2c4614ab5d681b02a6f2b9b40bbe3c30c8ea5a05df12d02ef8dL}; /* Return aofontenbuff(t *s,int len) i;val = 0(i i <++) (^ s[i]) &] ^ >> 8) } r} Node-path: putty/sshdes.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 11318 Text-content-md5: 1b3e5883a3b497a867d763f3e0e76c5d Content-length: 11434 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN佊繯梄擨GO-s岲=盕丮擡丯塂8怞慓嘓H乥F7G桬7匛$朌=淓僊E凣匘pD%U(FEH蒾J萅K蒧O'丣?I+丒%S癙G&D萀I癤J:EJ丣$I蕌丒I*J;GE蔤J.HG‐H萰H&丣/並:J薒D藊H蔛J薭DI蔵D瓂J葿HD薭J5IJ&EJI蘓E蘃l篛侶磍乑磚K8K 丟 O疘F8K痠G蛃FG蕀H▄丣僇F2JH蛃H蜫F0H E蝋OE H E蜶I蚞丩J蛃F&F J 並I蝭H螿E0IE蟝J螶J蜯I1J蟸FO)D秢I1丣+F蠤J)I蛃G衁F>I D衞HJ,HDJ蠦EJ衺I蜯J衐J2F袵OE衊JI裛F裻JJ衃J1I F!I衺J蟂J裬J9F襈J2J5J J#D襹凢E爕GD咲F婩T侤a)嘙 僁K甶丒*丗F腷僂J詀F許E'L詊F)IP詀丯 N訮並G=E-FG誅I詋ILL穐H誕I誵L誦GF誡^?L%F-N誳L訳IG認LH詄P L誹J翹N詏O%NX訰L謣L謋J認L I4[!L謕L詇I誋Q=O2J譛I謌OR譳R譇K3M詊LK7M豱U3H DKS]L鸕Z鷉D(O0両E.丗'侲H䙡D蔦Q鳧丗F䙡N^IEiMG亐+LSjG!IxE亐 L亐BO亐G銾L亐I亐|M亐G亖E亐 N亐nI亖M9GjL盬I亖1H亐*KvH]L萠IqL亐*L鵑`亗&K亖ZH亖MI亖T亐BX亖fP亖6O亖:L亖1I亖IO亗Jh亖1L亗-M亐%G亖ZI亐iSnQ亗L2TbL亖*N亐N亜,JzP亝 侴塂噉侽D凞)嘐沎E媨E 咵8咵塴嘍噖E婦.H亞7E亝l咵嘯嶥%奃K∣F甕F亣奃磝侱⊿凴F&E亣|奅磓D咷,H磘侱亣!僁-塂圸侱D亣/塂亪 侱亣T侲亣丟亣F嘍亪f丒磌D亣D圖亪侱亣Q侱亣丠亣凞亯侱亪)侱╒凞亪;丏亪侱亣N侱亣丟亣E侱亯F侱亪Z丒甤D匯圗亪丏亣K侱亣丠亣{丏亯@侱亪T侱產圗 E凢嘍-匟1D廎乽僂8侱#D坃JD亰2咲丏亞~圖滽EF1咲侱噖嘍(E亞]〦亱_僄&HD亰JE8侱D坃凞F亱,奙亞y僉丟R亣K亣qJ亴]K亣0F亴rJ亪I亴]Q亣;K亪'婦D亱_匜亴僁亶_嘐亴]丏亴>僁亪G嘍亷 並亴I亽TD仛F仒 侺亱I媥丏亹dG乼G 僁亼j僁嘗丗亹$匛仒;咹2匘侲媋丩'F E凣F仜丏亰eF亼YE坴DE匘1侳(僁;D9D亹fH仛p圖丗丏仒5圙仠G亸^俇亸s婨6奆仠D僁"D侱仜-E 慐仛d凢仢>両仢E丏亱s丏,D亞"D亹$嘕塟匛仠 匛嘵D仜:咲亞rJ仜N匜仦E仢5処仚vD亸JD哤D仦UD擠亴]J仌DD坒匘仢kF赯M仦sD亽i僄仧E鄌侲仦SD仧4僂媋P仦Q丏仦a丏仦a乊仦l丟仧丒R仧丟仧&丒+K仧3侱仢WE仢T侸仢G丗仩7両仩>侱仈 E亽iE仛dI侹仩g嘐3丏 I仒0H,@I仒YH/丣亼|R亽咵亽E僉亽#僁亽:侱仮0侷仮丷仚 k!U仚~婫亹7h仛L仛PH仯OX仛D僓6僂仛d乑仯}凞仌8G仢jD仢x丏亼]D亹z侱<僉亼侲仦LL仠^E淥怗仴旼仱jH匟 D亼OE仢5H亼|哋仌,丣仭sD仴[丏疭凞亝/N仴k乁仴zN仴QO亾tJ仸,侱仸N亾Sb仸+D仱婮昜I仹匛仦SD仹E両仹匘仹:丟仹@F亝.E仸g僁亽rF仹lG仢eG亹8D亶o凞仸hK仦Z丏昡D仦h丯仦LD仦AG亹8僁仦n慏仏匜仺H丠仺OF仧4G仧 "ssh.h" /* DES implementation; 1995 Tatu Ylonen This is derived from libdes-3.06, whichcopyright (c)3 Eric Young, and distributed under the GNU GPL oARTISTIC licence (atuser's op). The originalcan be found e.g. ftp://ftp.dsi.unimi.it/pub/security/crypt/.tar.gz.same terms. See README,COPYING for more inform. */ * $Id: sshdes.c,v 1.19/01/08 13:02:12 simon Exp $LogRevisInitial checkin: beta 0.43 6/02/18 21:38:11 ylo Imporssh-1.2.13.25/07/13 01:22:57Added cvs log$Endlog/ typedef struct { word32 key_schedule[32]; } DESContext; Setsdesc. izeleast gnificant bit of each bytegnored as pa.sc void_set_key(unhar *key, *ks)Ens 32s in l,rstorresultoutput[0]1].Pers efnon-zeroei must have been id previously with(l,r*, intlenssrc toCBC mo Lenbe a multipleof 8. iv willmodifida value suitablrinuingcbc iv constsrclenD using tr-DES311, 2233#define GET_32BIT_LSB_FIRST(cp) \ ((long))[0]) |1] << 8216324))PU,) do { = (;1 >> 8216324; }le (0)Acrialgorithmin everyrn book on ographyata , hllowing: Bruce Schneier: ApplC. John Wiley & Sons,4.Jennifer SeberrJosed Pieprzyk:: An Introducto Comput. Prentice-Hall89Man Rheee DCommunicMcGraw-Hi25/* Tgenerisbesk.h/* C (C - see detailskb[8][64]={C(numbeer FIPS 46) 1 2 3 4 5 6{ 0x0,1210, 1100881023310088188998898998930 },7 8 10 11 12 13020411114 15 16 17 19 200141133228920321 23 24 26 27 28188001440248D 333238 91404899A4098212238382222544004224 } }executprSPtransnib8, 0x 82424858472828 }Some stufatlocl Heavil /* IPFP *problemof a geometrandomfiddling. 0 1 2 3 4 5 6 762 54 46 38 3014 6 8 0 52 44 3620 4 58 50 42 30 2 2931 56 48 40240 32 33353793 55 4737 40 41434541 533721 5 951535594323 56 57961674125 9 1 hassubjectswaps 0 1 -> 3 1 buoddevinto 0 diffee mainckto reme t=((l>>size)^r)&(mask); r^=t; l^=(t<<; mobetw So l = r = becomes ( == 2ask0x3333)t 2^3^17 -- 6^20 7^21 10^1^254^28 15^29ankshintRid Obridge - he told me IP&coulddon15 xor,shifts5s. When I fly stato thinkn 2D rst got ~42 opsouted howuse :-) Iite. */ERM_OP(a,b,t,n,m) ((t)=((((a)>>(n))^(b))),\ (b)a(t)<>4)+28)L^= 1][(t)&0x3f] 35167240][(u246parbaecb.cregist,u;is;s = ks->ngs ro is*outsie looprequith*sp.hd* Onel laa 5% spepa sparc2to<71755.204@Serve.COM>poiis t=(r<<1)|(r>>31r=(lll 't knowwortheffor unrolinnerif ((i=0; i<32; i+=4) {i+0);i+2 }els3>--1-1l=<>)c, d, t, s,c =keyd + 4d47ple:-Fletcher (john_f@lccmail.ocf.llnl.govinspid,c,t, -ccccdc,((d & 0xff)00) |)| ((c4c&=7efc +& 1 c=((c>>2)|(c<<26d=((dd7>>= 1d/* a few lessI amlazy *tio investig =0][ (c] | 03)|7c)3f1001628)4d6>>150/* ai0213 465++tff)((ts48}iv0, out[ ((& 7)iv0iviv1len+= 8v0 ^+ i, =01+ id0, dddd0d33ekey1,23; eiv1[8],23[8dddd3_sess)&+82163memset(, 0,of2333_blkblk1, 3_cip3=,#ifDES_TEST _bufinnnninn(ac,*avFILE *line[1024], *cptkeyatakfgets(), stdin)8scan +"%02x", &!=fprintf(stderr, "1st col, %dne: %s",;exit(}i + 172nd2*3r&f (memcmp,! failed} #endif Node-path: putty/sshmd5.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 4210 Text-content-md5: d47275d160983e0412e047b6b22981d3 Content-length: 4326 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN繸恴弆DF峀現丣丯桲僁嘍$乯嘒乆I%丏)D8朌N丏q圖乆D塂PF俈侸I 嶦o匘俋両丏匜僶EFu凞乹滶D倂匛5H 丏4匛俕G丂丟丠奃慏欴N侱#奃#嘑 D#侱Y孠 D僿処匨孎凥凞&嶥僁lE凩D8F丠D乆凥+綣匘 咷b噇;丒噃俵;丒噃凧唍俆唞圖俼丗F5凢坺丣並匥丱'侹丱'匘孌#嶥塂僲M&奊匛;扙凟匑丒F卪D匒塃塃奦F 凢哤HD匟丗/L#嘍F咲E婲婹E&奜媙E塀奜媙E塤孠婹僄媈L媙D孶F媫僅=G匳丟(塂僶E匜D咹妕D卽DH N%F匳W7丱&F!凨峺僅婲G丟孒両寏僃奻D哯D婻僊孨F媙匫孫凞嘊E侱1婫圠宔岶.僁凞嶫Q宎侱E塳丟孒D嶴侱2丗僁:丏圖)奃9H嶬圖慐,処2D巌哊'侶嶵凟/丏嶴凞/丏巌E 丗恘D婻塂妕丒丗1孫7丏慖MH媀丠D慖僁廻DD弆丒D婻丠6圗.匜J&D奼F揅P恡J1丟刧咺岴凞H廢E奼侼巑K丣1D奮DE F.侱1E怢D妉僅孍刲丏俉E揇孌怘D剘侲揼匟*NK昰凟;侸1FK杚G卌D妡DK侴揼O+E僅梉I-匛 侽#D巌F2E噆侱:嘗侲楰J朾匜5JD抪僁=丏俧憀E榵僃)D丏+F!E凩俁,I抶咷揅匞榲D楲I!TK>凥2I楥匛丏倃丗攛EH H$U坆I侴G孴G2^2丏橝K宖D檏D%a憅X沜F丠HE媆a;凨淺Ea渓並淺乪渉侹淺丠渉JE+D怳侱汦侲丏 丏M婨桬丏哱岲=E乗僁嘍奧咲 匛怴凟倉D搘僅唒朌'侱 U僃%塉9丣咲K焋丮侳焂J9並D焂侱,丏圴H丗6孒俒E奒I丳L6孎焭凟損僁凞廻丣丟旹>匛燙H乊E瀉侷7I爉僁侾僁卶圖怣D<凟C丮D杣H'侲凟僄損K匯E!EE哅D9D僿圙揼僁H僃嘚%o僂7G婳凞丏怓G侱:FED 侲宷僁咷!凞T唜ED D H僂H巃丟丟+丟丟+丟侸E僋 丏媈廏L並D&F咲汸係FF 侱D婽I丒丗婽)O丗坋丗坒&丗坒丟7噁丗噁丗咲d(丟D刦丟噂丟坒G咲/e㎞G6坓H咹╞N丷狹G奝丵G婼琀PヽG6嘍DP琄OG孲2OG坋珽H﹔坒瑈H 唃-G6坒璫G=坒G6坋瑈H噁.G 咲d璭H坋珽G坋瑈G═坒.H猑嘓璪N4乆瓁奞1丵G 匜丼W匛猭丠1LP?H6婼V'坋G6嘍'c矺H═匘eG坓4G坋H璗咲c矺G坒礡G咲>d6G=坋H猑嘍&d矺G咲眗dG嘓穂N4乆咲磄Q丵G═嘍癟Q璮D W;咲癟Q珿丵H凟丵矺R笷I猑噀筭G嘍硙dI﹕唂篞H)咲╞c H 咲b筳H竘嘍礠cH噂&G噂糧H6噁G6嘍&cH咲c篢G=嘓糧FF媆凣F媧凧D僇D僂/* This code has been heavily hacked by Tatu Ylonen to make it compile on machines like Cray that don't have a 32 bit integertype. */ /* implements the MD5 message-digest algorithm.e is due to Ron Rivest. waswrittenColin Plumb in 1993, no copyrightclaimedspublic domain; do withwyou wishEquivalenavailable from RSA Data Security, Inctested against, ande,excepneedinclude two pages of legaleseeveryTmpute of a chunkbytes, declare anMD5Context structure, passtoInit, callUpdate edbuffers fullthenFinal, whichll fa supplied 16- ar/ #"ssh.h" #define GET_32BIT_LSB_FIRST(cp) \ (((unsigned long)char)[0]) |1] << 8216324))PU, value){ = (;1 >> 8216324; }le (0) voidTransform(uintuf[4], co in[64]); Startaccumulation. Setcoun0mysteriouinitializants(*ctx) { ctx->0x67452301;0xefcdab890x98badcfe0x10325476; its; }cto refleccatennother,*buflent/bitt =if (((t +)l< 3)) & 0xf) < t) ++; /* Carrylowhigh+=9(t33f;B alreadyshsInfo->d/* Handly leading odd-sizunkst) { *pin + 64 - memcpy(p,,;return; } t,buf-}Process in 646464re wrapup - paboundarpattern 1 0* (its ped, MSB-first)[16],Cnumber mod= Fofx80is safe sincr always atne free*p++80641 -ad ou56{ Two lot: blockset0unNown560, 56) else - 8Appengn566 + 482123of))Is's sensitiv}fndef ASM_MD5foure funcs - F1optimsome/* F1(x, y, z) (x & y | ~z)z ^(y ^ z)))2F1(z, 3^ 4(xzicentral stepMD5STEP(f, w, z,, s ( wf+ w = w<>(32-s)+= x of, taltan existhash*16wordnewconvertsintforroutineextregi 32 a, b, c, d, iin(i i ; i++)in[ia =b1c2d3]F1,n+ 0xd76aa478, 7de8c7b712in242070db, 1a3c1bdceee, 24f57c0faf54787c62a6a83046137d4695018698098d98b44f715bb11895cd7b16b901122fd9871a679438e9b4082261e2562, 52c040b340, 9265e5a5e9b6c7aa, 20d62f105d024414538a1e68e7d3fbc821e1cde6c33707d64d50d87455a14a9e3e905fcefa3f8676f02d98d2a4c83fffa3942, 38771f16d9d61de5380c, 23a4beea444bdecfa6bb4bbebfbc70289b7ec6aa127fd4ef308504881dd9d4d039e6db99e1fa27cc4ac5664f429224432aff9b9423a4c93a255b59c38f0ccc9eff47d5845ddfa87e4fe2ce6e30143144e0811a7537e82bd3af23ad7d2beb86d39+= a+= b= c= d#endif Node-path: putty/sshrand.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 2577 Text-content-md5: c0c75f9434b6cd5988c0c22d3bfd4ba7 Content-length: 2693 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN2奯&oEZ團n塒Y區n丗揇丗僅濪慓丏岶丏婮.F岲乗D俇D丗廌乹G"匜J乤婩^嘍揑丄D4僄俼婦俴圖K俔凞A咼僲燛僫凟圖僿僂俢F7廎僟凞僜凟係D圖僿E_凢丂廌刬嘒]GF:奅5EF乴G僕丏乻M=塂丣&丏8P#廐丩侱亇圗G俔F匘D,D侼J)K俔DEE*圖奃僁傿丗7E#僂僁DE朏噝匞塂嘷L嘾嘗噚嘑 僌凟&僊,凨乗ED嘸孌侱噝孎刉丠圶侲D倀G僈係H(丠"乚塋丒塱E噋K:H(E塈侱匬 D丗丟XF 匛_G|G#D倀嘦凢唖G塋嘑妡匤噇丗俢K&丏圡婫僎婩匟噛];嘳僄0乤5桵婫俉 丒.O婬凢;丗塎U媇DH妠F;S岮F妡僋奡D*EnHG 匤丏坬侴 丟:G 咺塱V嶼E"咷塋PP奪D;D噝@AW丟廜DD9嘐凱E俶扗俋朒8婬 E=扜8丩峕F巜丯DE嶿F巜E:N2圖僤圝俖M-D,侲+婦嶧倊F 擨D卾凟扐E嶬D E乬侲抯F巜凞倂嶥僀D払凨奃匘刵岴5塂5両媅E嶬G慓FG慩E嶬E:H>丏DH6G俁E塂扵E嶬D凱E5H"丗僟E揜丏$G倆丗倃F卼G團G攅D 咵抯塃EED卾僁0侲5E搖咲揷E攡丏嘥丏奊昺僂5婦乹圗怾M 侶搝E#僆圵丏朚G宂D&丏6僂媂G2F噛匜僫丒I擧F"G7F旲FI杶GH杶侳杶E#丗)僌慦H嶼丟慱塆巜咾 F媍D岮咲塺P杦凞扟I擧D0I杶丩桭E杦MH慉F"S8匛榥咵擯I/G@F桰\侶巚D6侺峍K憂DDD3侲剏D揤匥橴JI攖H8D$侳昳扗恏F4N]x6I(F峃G慩M岮丒"G7P奤Ei@V奺I圶G婨G淓R媁EG媠G淓E峸X漑H/W漑M孲Z= (-) memcpy(b +, p, ; p +=; -SHATransform((word32 *), b = 0}; }block/of)digest, j, k0* Chunkcode are blatantlyianness-dependent, butas it's allanyway, WHO CARES?/,Make twoses over(i i < 2; i++ /* * We op CFB mode, repeatedlsameto. Bu're also fiddlwith-so-far, sis shn't be Bad oranything./Ebackwards,albeforecorresponhopats willmlpredictablwayround, whensubseque..j =;)0 ;* XORi/ kk <*; k++) k] ^= +j))[kMungr unrevealed firstiStickresult = } svaluee'some extra bizarre)inimemset(&0));to startFor,temporariae, rathancs} if >)[++]**len=+len/2 Node-path: putty/sshrsa.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 3436 Text-content-md5: f71d39341da175d27d6b697831eebefa Content-length: 3552 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN緓(8矰$匘塅―匢o嘔[圖UJ[匛lL&働4凞lL〥丳亃怐乢侳q岻?Jx僁亀D N孖o婩匟嶩処孎 塃1侷僱嘐6圖僛圙僾僃6侲俵塉 咵丗僾揊5咶僛丏剈丗僾D)僂孖刓孏I刓侱丣 侲咶)丒3丩刓侳刾DF刔嶪o匟區H匶丟5哠匢/F6丒咹I8L凲 P匭Q!Q哤HHG僡咶2凥僫H僡婩噖婲亄丟D&廌僲婦TD圲D侴噕F僾F:侱匩M傽嘝僡D侲匨L*僅乄僫丗僾O亄僉丳D&丏7丒圦匞墋孎僾凞 J9岲咶奝奞僅奷丠妋丷妚侴奺丠妋丼丟奺丠妋丟墋G坾丵僆塅両僟侸匰僫奆凴E坉F*咲匤H:E侼宒侻墋婦僫E塇#F孌丒'D奜K乀+丳岪E'J+G島丏坙F孌F奭僆岰丗(凟'D峆G0R峴G+丗孌E媊G夿丗孨G宬F'G9E哸僇宂O侸塃@L傽宍丂峛G塇凾c巔JN5俇/O僫N孫俲宍EE,両峃DE8F僾EF換D*GEF%丒P塵丒8I(匜=俁両E9G'D峞DE咵抰E圦E匷塆宍E圦I IGE垀丮圤丏攋侱T侲揱F奦僑攎刯丳2D揌F旻D攂侼F攝匥宍RO&N4D揟DTO嘵/嘩G僡咷噇G桲凥宺H梚侱擣Y梬O僸凞楨咲楪丏働G&e宍J巗G桲N嘔島FD8JOE橳匟坅M5D梡K橦E E X擩F圴E梡丠F坉僁丏塁E宷J檣僂橽D歏侲歏E歾GE楺E丒歿丒巊丠榅侲歿丒巊侳宬D梡D"D&FH&D0D揂E楺圚榅侾攑E4D宊E業I!DD梡丟檒丒H"D&僁丠桱匘,M淜H.H"F揳丒&E淟D*P渘O巜E4J&G;G9X淒E1R淾H汧F揳I"K G汧KGK H2F9a巖N榩R傽丗-傽h榳嘦檅乼檟R"O>ES歊N@i歴H9沢H&N*J漸K9rNF*Q(@fJ燶僂?咼(F僓孌俒匞0F O咺塏OD梥D"M 凥奝D價丠塭E億丏G杚D(侴歐G刄G D侼橩I4G巪G4孡歡丏咶侴凲丩丠橩E搒D丳J僁歓D 嘒)E歐僃╝D旼F˙嘙圤H▄凟咲坙F噈両擿HG凞)G圲侱咲'怓4M5丩6E:H橸N'丣RD╝侴I?塂淵F0塃猤N渨T 僄0F宬E:H濷G巔H.匘%丏/H揧H.G桲F玼丠搊G*僄僂僅奦J噑Q&働噠凥?F G僽PM濸僇玨H濷圖"丒>E╝丠琟F"G噖G僃坖H刄DE/丳D5侱﹛N璫丏G眆I桲両G盡IUh #defineDEBUGDLVL 2 "stel.h"stdiolibringsh.h" typedef unsigned short *Bignum; scZero[1] = { 0 };f d TESTMODE ||ifn10000 #endifdebug(x) bn#x,x)int level = 0;voidchar *name, b) { i;w = 50--strlen()-5*b[0]f (>=) returnw < 0)0dprintf("%*s%s%*s",, "", w)(i= i>0; i--) %04x", b[i]\n}msdo {if<{", x;}} while(0)enter;+= 4; leave-elsenewbn(ngth = malloc((+1)*sizeof()!b) abort(); /* FIXME = bfreebn((bmsbrjn; rr breakj = (i-1)*16n = n & 0xFF00) j8, n >>= 800F440C22211jadd1r2esultlong stuff(">addr12) = 1 ;; i++i <= r1[0+22iFFU> && }(" n("greater1rr2 }1 <4<< 8) + *p++jj<2; j 2wyte(w+7)/8-> +15)/16word bn[jw = ppoat keying, second timewb =(b-i) & 1w-i/2] |=<<8expon=1p -} rsaencryptkey1, bkeymemmove(+-ata2 <-orandom_(= 0+1)/bbbb2>> rsastr_md, exd =x4 * (exmd + 10fmtstrle0sstr+len, "ex+str[len++'/'md\0'#ifNODDYp172693 10177p1 33 13P1[21,};2233bigmod[54,32768UabcOneTwoin(P1, P2, aaa, P3modOne2bbc3cTwo Node-path: putty/sshsha.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1691 Text-content-md5: b69a40d3ca1f7a403e60490d00874be3 Content-length: 1807 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN睭厃FD現楪E,F桪婦(GJ岹]丗D|廎_‥1J7廌_I 丩僆+V倂J侭凬侾丩F$匛D(僂;F4J侭凬侾亁俖凟侾L乯擬廤倂e8侱別坙剄Q侱別坙剄Q僢侱別坙剄J-H 塅2奊=F塃'僇燛E僌嘰丏嘵圝D噈F噋侷並H両O嘊僂侲濪-咷噓婬坬E!僂凥侱=E嘍匘乹丠慖塯D侲 G塯嶩塃刄K婩E僔丒嘡侲E_G奝揈丂丒)E奰G妢G3凢塷咵奾並"丠.並"丠.並"丠.並"丠.嘑夽F婫塮僆奼廌丱丏坋侳侳婨亊咹I坒N塇夽D,侳0J寉侻P乀#F IP乀#I FP乀#L丷,乀#_E圫o'乻峎乻 乻?乺巗乻"乻峍乻 乻>乻巖F圧h'F嘡H侱塏h峓O揫乀搆XO揫乀搆X嶴O揫丗搆_宼匭 俆搆P7W旸乨搆W旸乨'W旸乨攃W旸乀搆g4亄昞e搄W旸e&W旸e攂W旸Gt&亄昜亄亄朣亄亄桲亄亄楥亄亄;乫匭 乪昜W瀠eW瀠e朣W瀠eW瀠e桲W瀠eW瀠e搄W瀠e&W瀠e攂W瀠e檞V瀠亄 亄烪亄亄燖亄爘亄8亄亄0亄乫匭 乪昜W&eW&e朣W&eW&e桲W&eW&e搄W&e&W&e攂W&e檞V&亄=亄▂亄5亄﹒亄-亄猧亄%亄玜亄丩怗$HK%D丗檤K:D丯眑D 凬眑D>凬眑D巖/* * The following code was taken directly from drivers/char/random.cin the Linux kernel. */ #include "ssh.h" SHA transform algorithm,ritten by Peter Gutman,and apparenpublic domain/f()-functions. define f1(x,y,z) ( z ^ ( x & ( y ^ z )/* Rounds 0-192x ^20-33y ) |x |40-5460-7Mysterious ConstantsK1 0x5A827999LK26ED9EBA1K38F1BBCDCK4CA62C1D6ROTL(n,X)( X ) << n>> ( 32 -) )expand(W,i) ( W[ i & 15 ] = \ 1,^(i - 14) 83sub(a, b, c, d, e, f, k, data) \ ( e +=5, a ) + f(k +, b 30 voidT(word32 *digest, {A, B, C, D, E;Local vareData[ 16 ]EedSet up first bufferlA = [ 0 ];B1C2D3E4memcpy(, 16*sizeof));Heavy mangling,4-rof 20 itera each., f1, K1, )E,123A4678911111167892, K2201234533333333333, K3455555555554, K467777777777/* Build messageAB+= C+= D+= E; } Node-path: putty/telnet.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 8925 Text-content-md5: e3f5ef0291e770c1325d4abe3c4fc74d Content-length: 9041 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN仛m5旿匭僋嘍J塂P揊m塈e僇rD侶汧6侶s丵圗乤橬亄凟乤嘐V#丗丒乤嘪侽嘓俷僕侽哛乤奞+凢傽僁僐丱僔Is僂僃G(G慏xJ亅僅丣&F-僄凘嘡凢丠乥刡塋亄嘐乤DD凩凧咶乣亄匜E乫僂慙亄團>匧凨侶丳刡燣凨僄丳刡僊凨侳丵"D儀扙匧凨匛噠Q刟丒G咹L凨僂嘝俀凞儀S坄凢坵丳刡丗咲*奃侽凪 廌乥匜!僉&H塻咵僼僉亄G塼匛侤侱'DDE3S7匘乥匘坉圫7咵朚卬H妔嘍乥匘/丩坒H婽凞乥僁?D'U7凞乥咲0圗"凞*働2H塻嘍乥H僔丏丠 F凢僓嘯寃丼婣K'匛P寋奜)K'匛.P寋扢坒L$僂奛^8b 匛妦P寋坆 丏/E,P寋咷[嶸丏巖E媍] a 丏E搇F"DF漸侳"侳瀐F&IF昑FD咵D璥G〢圙猨D.僃G玆匢玸僃JE僔璂I甗S玡J 並玒D>匨G甠H甗凣璹D刱I;俀丠>F Ta瓼侾甹侺璌D>D甤M*丒SF癛ME癛丣癛E>D瑆H疎K癛U痀O僁猇D*GD侳僃FH"E D5僃圗岴僃&凞滾D凞僁 E瞯僂瞺咶&H 侱瞺侹DF0E圙瞜G&G*G僂僔D睶R瘄DD猇D癙YN*咵痬僁>圖>僁碯丏>G=F睧H>凧砿G奆 G*Q奍M-H"E滶侲#D滾I凩祄F僇僂丏I)E I祅P Qn礐E珅G瞲侸.K滾E-侺HU侱$R*K檜刄&L爄E玸圖?扚H楽侱?凞 侲:凟塗侲D塃竤僑礎I穘係檓丠〆侶﹏G8Q眗僁塦@J秗K檜D穒Fゞ両祊HE玸JFS 丳篨J祒W筩D咹刟L-侴碔L嘠!D#D-丏D9塅玸嘗穙GD E糝僁侲獻E'咹糘E#I納僁則I凨 丠凲礐侱丒唙G疐G FD0S絛H\0JG F*H*m絁O D0P8H(J綩L絛丯璬嘐稵`糛侤O約J禥侾箊d絔Z繡nR ^緔]9K痝侲-匘#咲卥丩僂窸丏耝侱倃G奡DH3僁咶丏侱媔凣3F3K8N瞫E矨丒乑'G咹丗僑N獶P7岹F榩塆磘F 丟碔HF猅H"G M-丗糑F猏D丏糶F猶E碤E漀II納E 僁D婨嘍$E 僁睟E羓S碢侷磃M-I臰丟舩G歠G臰孨臙G臰D珺僁'僌臘I臰並碨侳舕D繶P磜僅芿I硉G咶6丏丠芿H睯F7侴M2侳瞋U芚H硉丟荢D芿F縐PT+嘍?咵荂G絛S腷D@S膠D-r臨D_ E2D珺侷莣D-塂凞>M蒊D苙咲糶O7奅P蕇咲蔿丳K芿F蔙I苩乕苸丵<乛Dl>E#H莗僎^TQ菿刕萛K爄丼萭K篔凞.F猶嘍=H猏E糒D 丏糶D8cE睞EJ疌G睯H侻+侳>丠砠G腦\H礶F猅WD紎E糒D臙匜榟F蟘D膁E4D)H/D繷F両 丏繷G縐P蟸ING泇E,丏乤D僁択凞坉D凜僁$侱泎D孶E2丒衞凣玆E)J蟶D糓F2GF蟘乁丵FI縒F2G泇O袽M蠫G裪K衈G緼K蝆D衕K褅D蟚H衜匧#[F衞侱倃圝UPK緼^臹F猅_ E艻G觀D D臙G蟯G觀G玆丗E蔔丏>僁襎I訯E.丏匛苮E詃侳襌EE祎FGK訿僊詌SFK緼ED臙D僒訷J僉侻-侻 丩 I:H;H誽_?M觓G I苩E詃Ve荄侷蘔N丟襃凞瞺僂萈丗矼匜萚Y M萠L眗GD膁慒豼FEED豾DF侳D豾婦E3両貃処G;H豰J#F<侴D塟\P7丏睟Z,X皍D盞侶L貿G納F膆G豱E羑E"F貶G羑E蟟D4D淿侽貾D0D貸D蔏Y貿F6H縓E1僑跾G豾L踤F診E碦侴%F丠7丠F襅I凟綯I踷F跶G砙P 丒衐F#T軂O踗H觘I絜I働&働貾FU踤D W輙俇踤DU輙DV=X!DU踤俇輙侺踤X'D;嘍<丒萈丒踭丒 W軭DG羑N籐F丠芿^'T僔/Ez郕俇/D|#WFz郕侴羑H螱D6HF珸HPG3W鄇G3P&WI=P F僑凞匒D0K膤丒D婨J蟶F 僃HE婨丏4F"H鋒F鋌D蔝G猶G F璮匞E猌F銷D0G 両)E銷E綯H)F鋌D蔏両猶N鋌GD錻E婨丯鋣D襂K膤両6J鋓E:E&F,DV侲遰丗軺嘐翭嘐6\軥I=M&丏D鍬EN+丟-嘕侱EG塪IE+N胠D稭`踀O軪K眑D1凢孋D 凟丒H0咲!嘍*D鑠婬<丏鑪嘑鑨E圙杒丏 侱鑠G杔E咹婦門D鎩侶5圗鑟丒漘奌<丏擰D嘍咾H"塂锽D剏凟匘諁D*僁'D陎丏"丵DD'塂+F D陎F凥:丠H"D6孏磚FD陎D侳萬I*侱竒G4J1G衭丏窾D陎ND糓侱$丏D雞丒隴丏跧J皔D丏繮D雗僃簈F霻嘍陎侱諁K靏DGH婦6丗2K腷孖嘍塗匩罵扞嘍0H丏陏凟匯 圞韗E領D匤 嘕韘M侴F4H 揈靊丒婦凟錣I隭侳颸F謒J褅O飐僃 D$嘍H霵D隠侲E餎凪GG5E隟E歏N(匘I丱霦D=F嘍奆 I?F篺L丆D_鞞o韈I韈婮韘咵D饁DDDEQG)丼7丠$D"塂3丒蠳僁IE丏7丟丠D7咲燢丠僆飂丠砽両&N(丏窾侲昳丒雝F闟K"D雞婦?F1G(H鬊F鬬E鬶D飤匞僄馟I鬬G餚D魒侺馞丏窾D驦H礢DIE魀僋颾僃靗F6匘跼@O駂QD0X N(丟奱E奫E8^,T鬷D8Z 嘍騙K馟H奰@ 5I韈婮韘G鰙D-G箊O奤韘侲翧D榳ODR鵏咵奩D$W騩G奰\鯳D糓凞:僅鱵F6K0婦 奃 僃 匑t鮛N鷈f鯳丗(丣$E賆O2D簍P籿乄2J=M4K*D鍬V8L糛IK#J1丗匜黰O霧G8侳mJ?K=F獄I鑛丟坅乀/GG漗丏鷃E阩I)D鑠丏乸僁匛*丟(F4MD+J扚l丒sI礱H琜M4僅3X馧K僂圖僂翭丗G漗匥:D鞧圗鮧丠亐侲H亐vY亖 O腎M亖 D7H亖O腲G 丠琧凞驦F2G體僌 僁9Q鞧E峂璫侼亗2丩咲卝丟4HH亐v匛亖5M鞬K丏亖(I紎S>L亙&丮侱倃凞 侱侲哰侶9D糓I蹽H紎E1並<匞BE驦嶦餓E+H亐v乊亙4O誩丏鍬R4D亜+G躌P賥E2D瑼両亖,丮萬F#丏亝UH紎e亗丠訮H丣稝R/]亞咲%H芿N]亝VT亞@a亗5乛亗W俌亙4X亝sEG膠[玒G0L痵Y亪6E/僓亙bI亙{K痝I亝sMFL亜D僁亙"U鑛侳抌DWLME琹ZG3H難E1N*僃磇丏銁丒乕亰}侶亱侲D亱+_馡H璲E亐T9D D趀G丗 EDG玆K渘O皔僁9M亴F疌I磠咲亖NL%G亴!D9乚亴CJ亙YH>Q亴NG鉾侱亱D*僆F疌_鑓ED婩丗G杔凣哯亰=IXD亐'U蜪\馡EEG篳並L璲e臹D-H亸_E塂E蔛E亹咹亸_E薞僇亹両亹AN亹2並 丠.P磜丟鰾]荓D-嘓瞜O皔E亹嘝皒D亹&Y亼?乕亼Y丏;W I鑛丏亰G E閅侲E闡V亰AG亽]丗 侹亽]Y_亸P亱yK碢M腒L亾H咹碵凪磟僅鄍N仈僆仈E唄g仈#侷仈俬仈[丣仌乬仈#侷仈俫仈#僆仈僩仈#E?J仈D園h仏-丣仈乬仈#丣仏 乭仏,D坰I仈D坰h仈[侸仌俰仒両仈D)h仐OD僉玒M玣G+G0侲>G2D躦M亣 P豄凞仚PG$丟仚zH〡K$FJM仛#E綡M仛4僋仛DF亽]D)#include stdiolibwinsock"putty.h"fndef FALSE #define 0 #endifTRU 1 static SOCKET s = INVALID_; IAC 255 /* interpret as command: */DONT 254you are not to use option 253please,W2I won'tILL 251illSB 250subnegotiaE 24end GA 249may reverse the l EL8eracurrentC7characterAYT 246ther AO 24abort output--but let prog finishIP 24rupcess--permanentlyBREAK 24breakDM2data mark--for connect. cleaningNOP1nopOR3of record (transpamode)ABORTASUS23SuspxEOF6Efile: is alreadyd...TELOPT_BINARY 08-bitpatECHO 1choRCP 2reSGA 3supprgo aheadNAMS 4pproximate message sizTATUS 5give uTM 6timTE 7remotetrolled missandNAOL 8euwidNAOP 9pCRD 1CR disposiHTS 1horizontal tabstopD 1FFD 1formfeedVverticVLLFXASCII 1extended ascicseLOGOUT 1force logBM 1byacrDET 2entry terminalUPDUP 2supduptocoOUTPUT 2NDLOC 2locTYPtypEOR 2rUID 2TACACSr identifiOUTMRK 2numb3270REGIME 2 regimX3PAD 3X.3 PADWS 3TSPEED 3spFLOW 3flowLINEMODE 3LineDISP3X Display LOLD_ENVIRON 3Old - EnvironmvariableAUTHENTICATI7uthcNCRYPT 3EncryNEWNewEXOP-s-lisQUAL_ISisSENDNFO: inalof ISBSD_VARLURFC1CR 13LF 1NUL 0iswrit(x) ( != IAC &&CR ) *telopt(int) {if (opt == ## x) return #x; i(); i(RCPSGATMTE)OHTFFVVLBDEORUIW); #ui""; }void telnet_();ruct Opt {nt; what we initially*/n-iquesto iack, nak;+veacledgecenum { REQUESTED, ACTIVE, INREALLY_}e; }o_naw{, , DO};toenv,n= {we_sgaSGAhey*opts[]&,&,L#if 0in_synch;b_opt,lensb_buf == 0;B_DELTA 1024ry_e while (outbuf_!=reap = 0) +) &MASK<}s *buf,unsignedbuflen--new+ 1[*p++;; }()cinIN)[logercmd50]sprintf("%s:\t%s %s",er,(cmd ? "" :ONTONT" :DODO "")logb[3]; b[0IAC; b[1cmd2b, 3("client",deactivate-> || ) o->,&& || /* * Wy only have one kigoat ae.This hwho cares/ ==? :ref.;_rec*o"server(; *o; o++f ((*o)ackcmswitch c: ; *o } } elsena /* * Ifreach ,waswrecopth. Soaatack.:)_2048], *p, *q, value, e:1logof(cfg.)+8SB3strcpy(b+4, 4 +lennn+n+2:\tSB ", IS 0;[n]; n++)[n+4>= 'a' <= 'z' ? + 'A'-:560b+4\r\n:: ; q = q, %s,rfc_erR * To gusenf ./ With isin doubt*+vare'\t')*eluenam'U'S''ER%s,n==6stuffTOPLEVEL, SEENIACNTSB, SUBNEGO_CR }o_1 &&IACc;!)b, 1CIACDO)NTSBSBgnore _y_!cONTDOSB_add>new+allocm -h,of(a =ostntohl(a <= 23Open e(AF_INEOCK_STREAMAFNOSUPPORTTCP/IP)}{ BOOL bRsetsL_OOBIN,)&bb}Btol.sin_familytonl(ANYs(b*)&ddr_ERROC(short)CONNREFUSEDNETUNREACHuno routWSAASel, FD_READ |FD_WRITE |OOBCLOSEIi SSYNCH =Pa0hlosor <0a (WPARAM wParam, Ll256howhell didget?-5000ETSELECT(!=:recvuf)< 0SAEWOULDBLOCK 1)any _o_10000=0cahappinor }iioctlIOCATMARK, &i)2i;1:};1, MSG!-3: WTFndiac{,}crCR *p)q, p-q! ?r, ofrom's POV!cols >> 8& 0xFFrow6789 %d,%d"<< 8) +56Sal(_SS_AYT:AYT;2);BRKECECLLGAGANOPNOPOOIIORORF: DMBackbize Node-path: putty/terminal.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 14596 Text-content-md5: 7371101239d4a3ea5a06506354c6daeb Content-length: 14712 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN偂?8朖匘M僋‵n岲h朩Q哃l僁~嘺刅6D乼卋乂6奪凩l漘乑ai俢刜?僁D`俙 嘖3QQ嶴l塃丳凞僃朎g侷匵凞倀嘐丏3D丒丒凞匟峎P廍哶両僄1丟S倄JD唝E唂丟哾M D唂丵N嘑噄丮:E俀E噄僌嘯圞m擮嘯匛圴丱iD圵E圕P哅'F 乆?僋嘍;侳僒D刜嘖哅'廍;I圕W咵僂哶岴嘒圗侱剎咷3侽嘯僁0D婰丗婹侳婹F圵E媌D坅F媕僃媕ED9OK橤M奡J'凪欱EP:D渂I?G凨8GGMD;MHNOE&丒丏,F爗NPJFLE圖卙PD卙D 凞&E榣D"D(I*D唂匟欸OY僃榟DD8FDF僄D咶&丒両G#D峇E&侶/D峇EˋF;ID峇J奓(凞丳侱D奼\Q3H+E汭F:FD$圚*丮=丏*G(丒卆G)J8H㏑丮≒L﹞G*E 丏乥〆HG㏑F焜匛UD7EH汚僄丗;僆&僂沺E&丠?N﹎F%H,T玡僂D2E 両=丗℉丠/E K狦E玗FD7H匘歷F%丣╜侴凨$丣琩僄琿H+N&QL6E琫E琄丏狶侳侲"I獅F+侱EF琻僄璮OG﹠咶'丒G2LF瓸侲燲僅G9丏 J,yN咷丩>E琗JF丩?N沢F両L秔G#H7I丟 E珻G禕D歷G稟H7P歛GO HG(L$G#G漦F!H祊I*G╔M≒P*UO\凣3S楬P(F塗H欸D筙GNY丠!D"G)GE筣I╧JH)H2I癵丏狶侳癗I丟琠丒眆E凧簆F歗ED簒JDGG.E漘G3I稫E婰EE稯GI0丟:H歖丗籎D秞K籘F噅丣EF籎DP丟D7FI.K籘G!J渄F淺F糑E渋K籘D7丠=H媌F糑G7OE坅U穣G"GK籘G JGF糑FL籘D=H漛IL漌H!J0I嘍D僁7婹;E緓匨欱D"F凞F僁疉F╩D6L(侲梸H汵H礍丒絥H:D,I縲E2I縲D,岻緾E侷焴I丒橦K凴業LMD噂丠)侱縭G2丒"N獼F;丟橫J;P*侶汣凢璯丟6V罯N羖EL婩僁奆咲7D匬D耫凞K繳F翭凞檈丟檌D'僄I匞D%俁業丏5丣&丱YD緍丵X丩E緍丒%侱∕H扡圠J$F繸GD8僂圗癹FD丳孌E:僁膖咵腪E淐侹聉D丳凞 嘍僅K侾FxS9F繸E筗僁F*僇舿EF*俉G弒IK弌D卙丒丏H痸G丗璅丗NK芼HGD罳F舼凩D獴侱2H"F璅D礫侷莁E<侶DE%D%DE!匘*丏宬圙G舘D'凥3僁膖丏羜宊臔丏G痚侳NJ/丗罶N疌F-H,E丒簅H苉G獵J蓆K6僑K.L蓋D秏ENF莧M蓈K>RF泘N蔏G蒩咲-I丠弐FG芓J蔾IQ E莧K J薊僈薲PF%H丩苂侴JKF薥D蘺K+H琤I蘢侴莦F琫L藽L蘭DI蘢LF畊G.DX蘋Dm蘭DU P G虶DQ蚑J痁m"P薣L薒z薻@o1DW$M蘋U蘻X虷U"@^蚡U衶Q蚼[#P蝚Z裀K?Q-丟G F丩詍D丏僂咶觍G R業F?D 丗*丗*I訰L丟秎D歷KES9E墌EE誡D LH0両歲G4G貵D秞G籣G貵P4H賘G漜FHH4ID&H焴II稫F,DH籬G4E赨I>K唂丟漜IG趡K*JG賬N0K繡丏孍DI腍丵萭丏塏侲膢F萳F舿D凞凴業OE凣読D緍咶*匢欶P*D扨塉竓HE躊F蔧G H?丣貿FDH3丒+丟8J;K2HU軱E&P8J丣躘丵0J禱丟躪K J轜Q肎JFH瞙D=J侶侷侽KE!塉緂丒丗%D趇丟躀僅腫侱F E,丏凢丟腵E遰IL榯匜誠丩筧侱濩侶!処=E H㎏M丏=K僃0H軧D獃H-J軧E8P醆DW迀D倀丒辸丩;DH蔤IK雥GE錜侷霯丒霽F>E阺H5僆丮F$KV鮺乁鮞丗鮴N鯞Z鮀丗8H稬E鮀T@M鬉E鮜O丵鳨丯6丏驟I譊KG:I噊D昷I燘J髚I秄G3L骙働鱯TT騰H廬F鵙U騉丒騡D M骙F鵙G:I5F侱:丒+F鱑丒+N3G稤T骩D,HU丱亞FD豩J丟F両'T騉丯亞FH豲Y亰EH淛@@騮丒騡R\乄亱t]亪丱亣僁預嘍凟梸@丏鴑乨亴]僅亶b鱑@ 鴓NT騰T騉丳亰|F奦凞H乗亶I X D髆Y'P骍G髒t鵟j 丯亞Fl丏駿乊亰b乂亰|RE亶L @L鱱丯亞F岺3E匛 V鮠D#X亰丱亞F凞G仈eK鷑W亴V亐qH%\亖I亞$G麵I亙@亜/両亝k両亝k両亝kJ亝RQ鳻J亜LJ亜qJ亜Y両亝k両6J1丒鯪E孍N黰I峼I1丏 M鯪EW仚SF鱙E汵V仚TD亐&侱亗U仚T匘仒CH XT騉両6俈仚0^仛P鯫l仛d丒騡L鯻Hl仛d丯亞FE?凥=D仈gG釪M唦侲岯K雥凞仢@B亱1両亝k僋仠X刢仠h丂Z仢 両亝k丳仢q嘑0Q仠qX仦'F赪@F仢 O亴\E?僛仧"W仢 @L仧TO亷KR仢|D 丟亰F?丂d仦乛仠S\仭V@[仢 両亝k並仢qD仌*圖<侳G仭aS仢 D〨J仩gE燲亽丷仌丏/D亖P仱H仠|丟丠諼D礷V仦'E仱+G仛D義H仴3D鎤丏9@@仱=両亝k丷仯n丒仮kD仴E仴丏 丏亗DI亶K仚0俀仜1T仜LS仱乚仴W@仴;丱亣E跱GI侱頨E仠qQ+E E糫O仢E仴DE&I㘎凢㳠M仛IH5塈仼t丗仴y| F亪)乀仺bE*@r仺}F=@[仼v丯亞FGK仠kL5X鴟H仧TI亼僄伜奊>孍亙l咷伜G0E伜D伔9M秗P!T騰W亽+`伓v丷仌奃&H嘩J仼I伓7P癵JI琞両5M伔s丒仼8GI霳Q亱G麵G伒;HqV>I亐wI伡r丣伡|奅6Q伣丟凷伣9丵伣MD翺丒*H伣cH韊H亞%丟伣W僊伨$G仈dW伣h匰伣9丵伣MR(X伨h嘢伣9侷伨AD詑]伣Z刓伣z丟伨K伩vR伨(U伬X伩丟伩K伩vb伩*I伬Z伩T侴亝l侶伭f丠伭fEI伭\H亝)I亝3侶伮丠伕NE'匘^伬V侴'S伨hL伡]塅咵亣M亐sJ伮丣伩pF麶丂D伮6H濭侷伮dR伨H伭e丠伭n丠伭w丮伮丠亝)丠亝4丠伮 丮伮)Dd伮:乯伮_並伱 乣伱丷伱7@D伵H濭乀伳H⺋\伓z丂I亰2丂w亰|丷仌凢凥阞侲仧E伣cP鎉F3Q伔s侴伆\LU伒丯亞F圗"匘仭CG7I亰HL伡D醄S伔sH伖OYH>L伖T酖乀醃b䏝D;GL鈊凲逳Z亐PE8U X伋3丳亰|D踇J伇.I緃E弤G伒;\伈:[仼"L伖丗驟侱仼%I伒Q嘙伈]僁佂K侳佂O僂侱7侱覫F伓;Q伋丣佂T伓zX仌\D怚J霽F亰a馾両8FK鮢H亯E嘕 刌亰乻佄qD&僙7MF/丏亖t丏仢dG亷um佄wGU亙Pj亖H亪fG亝@EK伓j@仏+O伆!婦2H実Y亪U侱佇lJ巁\2乗佊g侴塦侴佊{D鎑丟伾HG 凥f亙8H仾I丱伾d処佋pU佋E佅{H佈<\@g仒EN鯞N仛8丱仛QW伂*丟伖e塃亞,E萞侲佁:F亪>D 僂亪?E阩F佔WJ亪K僆;D伜~N伒丗廔侳佌 T侱伜RE耓F>D D>丏+K:丏伜I圗?E=僂伋fF咲D鋁E伖w僁#丏綷D縃D侁+僁丒'奞;D僎肰丵胟I!G H)G琄丒狶O丏覫僁逳咹"F侁7並遌丒丏佖F榟G飖E萮E 匘佦D9凟亗|匜侁D詖圖佋m凣侀ZH侁E佦 F侁E錶d楬DH誮侶侁僌G扥僂亰UD赿R伿?F哷侳仩gH瀢E嘍 Hr丒圖5F咹`僁侇"H"丒瑃F G侇G伩TG畃E佈8I來=J歎L9H;M獽J篋G狵N琗E E瑀並F琂G璻両瓃丏#J琡P乪J僁佀 L瞜僂仌C塇伱僉0侲E F丗佮\Q侇K僆侌0凨侇b咷鱑丠伈H仴vM,DF亗[凟亯*嘖膄M侅]H丟丠侎9僁*F亗3廍3侴G萳侱匓H侎9嘐伋g丗膎D凟伜 塅仴侲宻丣侎9咲豩丏'匘鋒D顯G亙v侊H蚇E%s侊MLE侌M 僇飔侴鷂ED*H盙E侌L匜萖DEE+F∕K侓9D蘚I仴b僃侌_D'E峆F伭Z]侱1F佢^H(僃亼匛匓G侢J倎侹D佦}凞倠j匘翵侳倠p丗*丗*H誦X躴侲耟K侽#並丏倛侴慗D倛9丒倢d嘑MG憊D侟1G慦F倣F抍F倠3E耟F倣E?丠們vM門V倢_丠倢u凞侀H倢u凢伡lP倣G倣DN倣u丠倖u侶倝TO倣H慲I倣H倠W倣-I倠0H們FD佖]J倠6I;J佪 [倢bD慲処個I倢b咶倢q丒倢x嘑伡lJ.F佅H倣GH倣-J倣4G侟H$E倫Z倧nD慲JH佅F憀J琣F倠E耟DH5G倠FI倯%侲仹O値uG倖VK佪R倯EE値mH佈IU値UJ蚦F倫丵倫#I倰'H慲H蒩Y値vS値WL倯FF抍RM倣4P倠)G倣-F倧N倛kT値jS倱8F倱 G倱Ro倧"僋倧nE9H倢uH倫H諪J倰nK倰FH倛qK亖V僁亰B僁遲丒倓(G匢D侱阦凞{L亗処侢{匘 O亙 OE苢H Y倕)J倯xO倕JH侌PG侖aE廧L伓jS倐E倲KE値n僂I伨-K佽0E伾rF訴I/丒們,K0P倰H倯I倱UQ倸jL慔Q倧0H倢c匜倣q侶倢zE値E倹MI倣~E倹MJ値FD倳XE侲巉侲凟侙Y咲倳X匛佀1E1僆倳 G倴凣倸iD苢D倕>G倹O倛#D倻7丏倻,E佪qS倻iF侕>Gn丏倛-F倻\D倻x丯磛H侕>圖佽EF芚K磟丠倶|F倛eM佂r咺倷,b倽$E倽b倽II;N/侺伿7丠褺K倷^K倸D亐EG佽0並倻D丒餜N stdiolib"putty.h" static unsigned long *text; /* buffer of on terminal screen */scrtoptopworkingdisplayedbscrollbackcposcursor position (convenience)rewantwe alon alt.char *selspacefor buildelecs i#define TSIZE (sizeof())fix_ do { =+_y *ls+1)x; } while(0)curr_attr, save;int,xdmarg_t,binsdec_om; DEC origin mode flagwrap,ninsert-cse0 or 1:chsetcswithrvideoglobal reverse set[2]; /* * Ssettingsheernate. altyominsb;ARGS_MAX 32max #esc sequ argument_DEFAULT -1f an isn't specifieddef(a,d) ( (a) ==? (d) :)esc_args[]nqueryOSC_STR2048osc_strlening[+1wtabsMAXNL 5nl_count_heuristicenum { TOPLEVEL, IGNORE_NEXT,SEEN_ESC,CSIT_GLROPW,INGMAYBE_SHASH }eNO_SELECTION, ABOUT_TO, DRAGGED }SM_CHAR,WORDLINErt,endanchoshortdness[256] =0,11,2,12 2324567/* 89ABCDEF}sel_nl[SEL_NLInl prototypesvoid do_pa(Con,)erase_lots (inswap_update_sbar (deet up power-_on ==0; =if (rows != -1) - 1else { ; (i i < ; i++) [i(i % 80 ? TRUE : FALSE)}om =fg. == =_01ATTR_ASCIIpp__keykeypad2561); ,0}For_ ctxtget_ctx(txctxfree; Same as), butexfunpwr);CleaclrsbInitialiseinitNULL= a given newlinesnewalt, j, cc && return; nothtomalloc (+**+=; INVALIDalal)) s,*abs)>0> 0) +<>xSwapttt&&-=+Mto, clippaundaries. Wmaynotto:is 0to, 1isw _passing_2e_beoutsidxyx||2<>byverestorSGR E a large por:,thartsreof_onl_beginto_enpos, *end-++!)! < ++or deletesie. nifsired-inschndi(n1 : nn >,+, mn--pos[m++nToggl`' `'' indicateis aprivona normal.)t) swit c1:appl break380/132um rst_rete ? : 80,567uto44ProcessOSC: titlicon namdo_os)]0 = '\0'0:1ingf/* farough:ame0 meansboth22ylyk i-memory. T bigmachin pescapes..ouust ())#ifdef LOG FILE *f!fp) fopen(log", "wb"utc (c, fp#endifdolevelc'\005': ->s("\033[?1;2c", 77':eep b--0161330233CSI5Or4nyy++t-1!]old}default' '0234 WRAPPEDc || (c0x7F:} Thisis virtualdenticoexcepthahpip*_if_seslash,it'\\'/*45goh.. ':omir?[e CSI']m(houl GL)R7 (8=>Dxacequivalto LECR-MindesZ65c#ESC # 8 fillsEs :-Het a01289<-10+ c -;++?Aup N -, 1)Be':down+Caright NlefC0FG`horizontosdv(?0Hfzso 21Jof > 3!!(i & 2)1KL@Pn63printf (buf, %d;%dR"hato hi lg3 r2, bo ? = I us kbplacednewlynedarea. Appanot: VMS TPUs overmgraphics r i1enable bol|BOLD4r(douUNDER7REVERSE22&= ~2230312367oregrFG - 30) <= 7 1] * 16 +23456'8 |} ||>) ommy sufficilik-optime o.degosimilaritycmpann(*a= *b++nGa. Outnoiadon'tWM_PAINTponsy_){ ourrvch[1024ohas_focuCTCURSPASvi=,+id[id((*d ^ rv ^= ?) |(i==&& j==?We wperform,ydid nasty tendencyauodprogramaeconspeed-crimo.'ll leill aleds(jkeep_t &j-ch!i, ch,,=jch[Isoi fulmessaglrj,,t= l / font_widtheft; jAttempo;enoatilatin0 re(rel:+&& (q[x2qpq? q}smaxiwhose `' ha s*p==&&pp-,} e (M_Butt, Aael+ xbMBaA_CLICK=(2CLK3CLK? :) ||EXTEND!RELEASE)/!|| We'ompd nransdatalipboqq-nl!((> & (*q++nlof ,PASTE==t lip( **) &, &leata, *q+!-!memcmp()q, p-qr"p}, Node-path: putty/win_res.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1253 Text-content-md5: 2b9d580516f74aba08c19ee4ab7c0051 Content-length: 1369 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN4/*烸I岲E僉/丒<僂E凪N咶b凴k両~丷k両~丷k両~丼丅丠丷k両~丷kG乺凪N僆_凪N匟_僊N咺侷Nj嘑_僉/咷侷匧/侷AH傾L僇僉;Lj丠H僝M)匟僙P僡丗俖L儀L>孮9F刪V儀咾刴LG!J3L$D!侹刴L丄G匸咲僀L乛H匸侴6L亄嘕刵LG2僁匘侻4G2G8侻俀H唋僃唚O剎E5侱侻 G&僃6丱2嘍哫凪刐匞刵Q9E僓 E僇M.凧刵M匫F圴匛 M卨F圴僄哬M 咼刵M&F-J坹M咰F-匯哰凥Q唝D匘嘗PD凥 O,僇N嘢E奫H%E噉P妋H夿凪刐圖坾Q9嘨 丏 僂P/匥M匥8M卨F'J哣M 匥8M&F宎J哣M咰侱-J刵M哷FI哣N唡匤刴N圖峎Q3僅刴R奻D圦D嘒 R>凟 O孴凞&丒 丮刐僉N丣杔僉歿Ey N>丱渏L沄丣O#丂r3N扺怓凢匬塆杴H擭G沰N扺孹匞'\9欸4團杶丱G&咲婨G匧婣N擭G寈僄 匢丏/匱婻F8F怐E沘侴奌丩"匟 匨=俍DK丏扞QD憊嘍*嘔 侱L>D3XDK丯G&処D乯L*G2F婽L塈匘乯D>丗丣俷H%凞.圗匘.塂E丩丒媞[*D咶択奊杕D圙婮j匘+孍 僂並僁G'K漬aH"僁坽L-凲V奛凞唍匛 匟杔D侱殀乣漡丂y3H爂塃D%僉G2R婽D,F怐D D"D6]媨I匬LDY>GD D沚b〆D僁焅匢2匫 X>僈e゜擧匧0N擭G&丟H&侺 D俶E巂S〤僄怐僁奜E+]媨凨珸I擝DE俶IP琫丟狾D猌D猌Da怶EI悀丒圦D僄哯_!侴慍E侶慡D#W慱凥憍E処侱J卍H玴怑J L EJQ-僇痭僄猄Df峘僇痭侲-D=J:P 丂乶@mN$丂+奐爚刯擟H4侱僝揇歚H杔DNi匟礛G礵I礫F礥L祂凢焳W昮丠咺 僉O+K恗DI悀丠,俆.J%U?DE#匯.丠岯ED峊ED稬R疎侳P凟匱琞DGD1侱D猇丱硄@sN扺桪咶&岹峚[塂 丏奃)F篰咷燡H,O秔E篧H侾U*侷悀E漨丏簊D峝`G&侶侷 僃D昣M!I糞凟 DM糺G&丏爎I糝IF糳D竫X糿丮M紼G&僅6侷E糳丏峐X糿丩N[嘍 D糴E丒6J硄僗sDFE 丂I凜咶8傽B乭D絥E疈K卌J恗丣E漣D丼&]瓸J F俕WsDED竰傽I凜H侽r乮侷!D璯丏媞G卌N籒侲僜丠>N僅丒GD峝侷竱KD侷岶 D僂$丗E8I肕M!D爃ED篎揊咲圗!侱疉DD疎R肙咲.丒胕D孎 廌珇FE膒G峚DR肙嶨,僂腵凞D舲H匘乢侱 E%丗臥D宍H羍Q肞FD.H%凢臞EG僜F丒胕丏侱丏腯F臥DD羍JK肰婦 嘍荄僁婦胕丗LGD猇D6D羘Q肞D 侱膆僄膆E凬奃?嘒DGR咵D舲匜凟胐D丒 D萾D*S!塊胕匜 E&E1F9G蒵嘍珸侶EW芀侱DH莗丏荳凟丠胋O莣D侲媞E肏JM蒍烡紏嘑蕍H簅E Q肞‵D哋EDR薠岴哛婦G薺咶蕍G&ER薠僁緎嶥怓蕍G E S肙慏橣蕍G萹ER薠扙E"廌蘞G1G8E粂R薠匛8G僂蝵圗丅侳塏僄D緘D蝐E琖Q肞凞E蝳奃=侱焲僁"D丒蕍EE9U蘴匜D?E蘏I侲蘏侱?FH蕓E峏W蝜凟侻3F蕌E媣E瑿JE<#include #define TCS_MULTILINE 0x0200 "win_res.h" IDI_MAINICON "putty.icoD_ABOUTBOX DIALOG DISCARDABLE 140, 136, 58 STYLE DS_MODALFRAME | WS_POPUPCAPTIONSYSMENU "About PuTTY" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTT&Close", IDOK, 8248, 14View &LicencA_LICENCE, 6710, LTEXT " Beta 0.43\n\251 1997-8 Simon Tatham\nAll rights reserved.",6, 96, 24 END180, 216ConfigurationOpen6,, 44&CancelCANCEL3, , NOTTABSTOPCONTROL "TAB, L"SysTabControl32",, 3793RECONFRecApplyPANEL06, 3663HILDVISI|BORDERHost NamC0_HOSTSTATIC22, 8EDIT112, ES_AUTOHSCROLLor0_POR131412 #ifdef FWHACKRrotocol:RO29, 77RADIOTelneROTTELNET0,GROUSSH/hackSH4 #else83 #endifStored SessionsSESSIS61, LBS_HASSTRINGSLoadLOADSavAVEDeletD1, 97CHECK" Window on ExiCLOSEEX14701Ac of Backspace1_DEL-H (ASCII 8)008?12712, Home and EndHOME5Standard (ESC [ 1 ~4 ~)", TILDErxvtHO wRXV5F1 through F5FUNC657Linux[ A[ ELINUXInitial statenumeric keypaKPNormal (dependsNumLockKPNORMALicO P etcAPPL11cursorsCURDCURO52Auto wrap mode ily oC2_WRAPMODEC Origin MDECOMAvoid ever using icon titl2_WINNAM2Termincreen dimen2_DIMRow2_ROW24, 90422Colum2_COL595d linesscrollb2_7FontChange...HOOSE56andlof VT100 drawcharacterV1 has Xs encodingXWINDOWSUse fin both ANSIOEMsOEM onONLYPoor man's(""+""-""""|""PON3-type str3_Tspeed-lousern3_LOGLOGEnvironment variable3_ENVVVAVAR5, ValuL82, 55, USEAdADRemoREMO10NVIRON interpretBSDBSDRFCRF54mouse butt4_MB(R pastes, Middle extxtermXTERC class4_C496PLESESto2, 78, 26142Bolded text is a differcolour5_BOLDCOLOUR,ttempt to cal palettPALETT5_5_0Re5_109VALUGGBlu5_6B5_CHANG5LOG9NegotiLogN5231OK2py "20 cGary S. BrownYou1hereby granted, freharge,any pers10obtainathis softwarassociated docufiles (the ""S"")deal withre,limi,,ifepublish, dibute, scenand/or sellitomitwhomis furnisho do sosubjecfolloondi1The abovenoticshall b10edrstanp10HE SOFTWARE IS PROVIDED ""AS ISWITHOUTWARRANTY OF ANY KIND, EXPRESS OR IMPLIEDINCLUDING BUTLIMITED TO IES OFMERTABILITY, FITNFOR A PARTICULARURPOSE AND NONINFEMENT. IN NO EVENT SHALLSIMON TATHAM BE LINY CLAIM, DAMAGOTHERWHEIN AN ACOFACTTORTWISE, ARISFROUTNCONNEORUSDEALIN Node-path: putty/windlg.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 13358 Text-content-md5: 22b95992a611e83c1d707b9eebfa863e Content-length: 13474 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN偍m旿圧僋嘚匭Q僁J塊|僋 嘍 扞6匯?咺乁朏E亁烰8F廐亂D俆両俽奃I婫倄匤5O俛汸7塅僄俲奅咶 E'奃$僂凢奃E刉侻刔丮刔丏刔侱(H刡両刔丩刏凟刔I凷嘑0丒凨E咵丱匱D僝奅俲丒凥卛協凞哋匱岻0侲'丒'D匷D卄僃唓塏9侤T丒匘匞噠侷匭D俆咷侴汫協丗)両0丒:丱園O匱圖G匸咮D哹r唖汮匟$嘍僂墋F 僁$僃婩乀塨乊墂D俆m欸奍D俌奨乨塼僂婦侶F 侲凧D(E?凣媇F?G僄:D凱僁刉D倇E 圴+丗孧E3丏扙 D孧D2F夾E凨嘍奨丒#E;孌僣J丼媜^妕E峢D俆俆?E峜Q孲J媊D坸|宩匥婹^*E丮巔D刕L岺E?凞(僃?F咷E僂D孧奊孈E侭匜?F怟凢?E淛8廞俛D侹D3NJ6M:嶨嘒7匨#丗?E墄塂侹僈恊侴巬匛俋僄奟G憍凢?II憍丟抐I孍墂嶪D*F%僐6MI$丏*F.R1E凨匘丟搎I倄FE(IG!凩揰H巪D妐侴搎岺抏D凱K丏塻L擿廍丒 N擾塆&僅0M奆丗昋G昽D刉奅孏:F唚P5E擠匘攔侱)丏擡嘍0G4M婬%凞孧_杋匥 丏;G杋僂咷媊D)擠扝塃(G梠D2G凚両匭N丒,D哤丒哹E凮丒刉丒刔F楾並榌凟婨凢區侱卐K極侷榯D楧侲G榼丟丟匱G榽丠卐F業凞扝FQ 丗梡丗攑働+M凨"凞 J杋M擾僄檟G&凥梠V>凟恡嘓%塃X=塇>婬桸P欴圗憐凣&丏泎圵歱嘍憑咾匛淎b匟>D淨丒渵W歱嶩 D慶丏6W歱孒%哫嘖漥圶,僁"処D+D 侲濵W歱D匢濺僛瀐匘攔E)E0W杋侲攓D)僈烝M擾D焂匟>D焏匵D焂M/D焏P丒J嘐G焆F嘍;O俀係昛E"D]+圖G焆丏D#丏T侱僗僁D俆DN圝.丏J橿E嶨E孻K9H奞E#DE>G榲丗凟侴濻G8侲 乧 RF)OF晍Q DPE Z瓇OH+pb:E粃z繷L糛凷#乊7K$I\6b8丂G羃L羂}聉@Q耺n羑Q6@I脈乆DD梮k^>僘綷G乤FD D.\JOI榼E檆H晐K7塅J.e慐-凢嶡丟莤咺#嘒攛D F縌凮莂G莡岾攚侱F侱&JD#怣莕圗;E晎岲E1丒7O F孹奌$旼GG FF 凣莇嘓?朎;匜>丗俽侲 FD唎侼蒼扝蕌D係丏1汥O塇蒧侱婡丗6H匬E蓆匜 M2G 丏 僂 F?H圠G蕍丗+J蘁O嘝W+N蘐F.J蘁W萺卌 f-j蒧@\蕍X咹匘(圚6圙蟝丠@u"O傾k&I圖蘰D蛌咶2G菮I圞婨 旽4凥侴:I蚉H圠S袰D擲s藺P衟@C孈G j蒧僃2僅?D-凟縵I詊孏評僁萒@蜧V傽x螧G蘭^M唒a/凢憏^ E>@Z/両莃僆>嘍蔋L)J貆KD.W鎞U D.R"L銭E鏵OJ颕v踁@]c2N4慏錐凥鏥嘑<扝鏥奅;凢<孭嶧I3塅9並薥D=俲阨傽Y躵@\D刕E刣乵韐KL頕@俉 L.G蕍R覱F莡D"I5G蒃Y7園Gj蒧[赯圝僈NF,HF;H _赩婯鹠DKL,H7HH鸈I鹴a鸖凩鹸D黣匥MH7I黸H鸈I黣a鸖凞丣齊咾J淨H7I齣H鸈I齓a鸖侻齖俇齦FH7HH鸈H﨡ce躽E2d釫L鶣U藃IK鸋G.J躝HD2S%_軲HE輚L&L亐CI鹴S亐F&G仏匘楧E仐匘滶H仐F嘐M仐3丠仏dO亞8奓圚E仐咲仐D亷#D1侲!I仐7丏蚐僂擬仒僉仒P刐仒_咲H仒`嘗仒A丏蒩圖橤仒AG峓侲仐凞"S竒M仛K鄗M仛乄仛!J峿H 僂?丮巐丏H仛pD莡凞亜cD莡J仜匘焂凞亯7H仛p凞亼c僂仚_E仚eE亷T丒仜T僂亯!侱霷D轞侲蓒侴亯/咶仜f咵仠 I 塃仜9凣I仚J竔O仛P竤G H亞9H仛MK仠qJ峿J仠G仒 丟仛H仐x丠仒I輚L亞mL仏]EV亴Sv亴h]阷L亶9M躙K亷-T仦kD亷TQ仦kGG.L亶\刜亹4J亶;僊亶iD2`亹3I亷/G仧sL亷1e仩D亷TJ仩0I亷eKP仏1丮 @R#丒%@凧亱CK]仮|K亱BL桭\仮|僇亱CK5丮6D扝NMF]匰蔉侹)H贏E侱G奟凩\鷐咵E仴Q侺齫K歟F,G仴^F;G仴R@HH仯i鉐D仐7YD伨F匥亶UNF,I伨VF;K伨FK仱K萿咵籔廌a伌!凩婩伆+I仴 D伩.GSO3D錨侲LF扚.D伬vH嘐噠D伈P凞仧s僁刏H伬|MF蕄n伩LR仱uI仴 G伅LN仭yK伨FM躙I伨VK仧3O伨j_軲I伨VZ仏1D伩m丟躗FIG軪H伱lY.G伱PG仏L萀H伒kE萡P伄 G伋zE'I伇)U伬"D伇hD仠.j伩P僆&侲伌fGT伬;JK伭0F萳G伵Vf伩PJ鎗M伌PJ伌er伬Nj伬~Y伭&c伅qS伷匘仠G伷2G伵0P伆5E伓iV遧@`仭F(@H鶀X亄HG籔I 圗汳I D簓M伿 K伿DW伿L伿=僃淍丏E竅F伿hH僂亷#匘伿J佀E伿 J佀丗1H佀*O佀 凞歖K佀GO佀 咺佀RF佀oO佀 僂瞉I佁O佀 僁仐(I佀RG佁3O佀 僇佀QD佁YO佀 僂K佁sF佀 F/G學L亄D#塇伾zD鐺G萅係佂@E佂@b佂>S佂Ft佂eM佂@B亯[丒仒D俆\佅咷亰&N"H仱H伱pXH ND刕J佂/俥=乀蔈H仱J伭~JG伮 h佇JJ IX8咲佂BL丒b亱T僔佈uDc佉乂佈uD舲I賂@D L佅@Z鬋丗伱sP佇#_軲L佅E伆oa>K佇gD鎡凮鞶P佇#嘑\佇F琻P佇6i佇Ei伹aO佈 H伇"E琽V佌H丷佌_E処伳v@D佒W伷)`遧I佅W@WK"b佋TG佅YZ仏1F佇g]伀&J靘XD靘僄2M軧l佌 K$NT佔H伳:D伋丏賗丏伭丏*E伋`D佦3丏佦:僁&ZV佈rFK顲n佉G7d佨 T佉pE縆K佨F_佖F2@U伀&G佂F仏ME侱3H佫 F孏咷僠汫驧@佢B俉仛wF仦俆仜E佮嘍佡%G F佭o匛螼D亼cF佫0G佮;凥萭僃佌FO佦zR+M伹QD佮I仜M奃仜f匘蓔H伒jF仠2E螼凨伅6Q佮oE仧D丱厈侻佮[咺伆oQ+d佲 凞;D佲/W佲4乭佲L侾佲ut佦TH伹J顳^併KZ佨-p佷Z佨lR佷@i伻IDD琫侱塂覹侴?両嘑佹0処佹7E籕E亯M譿丮鵷丮亪L丒佹gJ仭z丠伔y丯伣$並伾 侷G伂D覹侸佹6I佹cT裶E丂侳佺Y佺u乣佽乣佽乤佽Q乣佽乣佽俀佺JD S佺b丣佹lD佁~H鵸D佁~HF侁G琝凟侁,H伣&F竅E丏佺JL萾D佹#侺丵E佺kD嘍伬丏伩:D佂K萿F佹)侼乭F侁nF侁wH侂Q覥坉 ^!L侂sE#F佹1G嶡E佺[凢証D侅7両G莗q亯S丣伇i塃騏F E驧E6奌伌侴/咷袸H仜D仠.丠訫丒;圖佌WQ來kD莣僁凣袶H鵃匛仏e圗侇=丗侇C丏侇JE侇9僆%D侇5咶侇>僃侇HD侇yE侇SF侇mL侇]H侇U丟侇KD來=G侊 D侊%僃佂^G伮 E侅IJ衯N來J佫LE騏僁処來-岲侊wIF蒛N來DF莈K酼凥仜M F佹1J擡佱UD侌u僂丒7侷侅9僂伂嶩侌侲亗E佈咷侒=K Q蘙匘仧Y5D侌KE霼E侇e塆蒃僄亶c侾佢0I侌 D侌}G侎3奡侓xD侇侳亱H.F侅I侾)H侓(}侎[丠侐乥侐!亅侐D乨侒E侖s@q侒*G侒,G侓!]侕CF來圗侓"侱亼aH來.N蘁G @Q骃僆侐^N褸F咷W伋nT丏H亜5Q侜TT侞c蘍V侞,ue侂S乤"匩侅QK侌 哃佂E-G侎cG僇H.僁仢EJ薦D佌WT9侸価E9匛騏J佹lF侐.僁騀丏錎侲騏G/匛侢 D5丏2D伣'圖匘騷僁匛錍丒侢 侱7侸侢d丏騧塅騪E侚b侌1V侕-侶琸J佹QF侁\僁仢EO譾H侓pE侎cD噡G丒<侷侕 M骽F侒@KE侒}D裶匨!並丟侞;丩価#F.m価M咶 X袰I裚\裪E倎MJ Q髐M!W2V仭$O侂QY鵅H侒QF佽J丼F佹!D搈G侓)W萺丒佹*c侟Cm伾4I価6Lz倐hN乭H佹'U們4_侭O伾SH亝z丏伒/H(咵綤DE伷5僈亯9EFE恷M6R2I価HL倕D侙凥薔l値G値pJ倵IG H倹wD侇F偀nE伳-Q倛'塈 U倝`D個!E岺丠峃I個E倲侳倝H倸>E伃xM倠 P倽G倸;F偅}G奟G偂OF倞K佒yD偁S3MG峊x偂\D騝M偄5K偅zJ倿侲倿\侲伇M僁騩E倿,丟偄3L偅D偆凞'G偆!僐偆(凞@ 偆J丗揢H擡E倽J倴Q#include commctrldlgwinsockstdiolib"putty.h"sshwin_res #define NPANELS 7MAIN_RECONF4 static const char *str = PUTTY_REG_POS "\\Sessions";void get_sesslist(int allocate)*negots = NULL;n0, negsizeHWND logbox, abthex[16] = "0123456789ABCDEFmungestr(in,out) { candotwhile (*in if == ' ' ||\\*? %<> '~.' && !)out++ ;((unsigned)>> 4]& 15} else*in; in++; 1;}\0'return; }un%in[1]2]i, j; =- '0'; i -= (i > 9 ? 7 : 0)j2jj(i<<4) + += 3wpps(HKEY key, LPCTSTR namevalueRegSetVEx(0, SZ,, 1+strlen()iDWORD, (CONST BYTE *)&ofgdefLPle typlenkeyRegQuery&&) != ERROR_SUCCESSstrncpy,; val[len-1}*i (!) *defvaldef struct*posntempdataspace[2048]; } DTemplateHINSTANCE hinstsave_settings sectiono_hosisubkey1, key*pp = m(3*)+1)pRegCreateKey_CURRENT_USER,)!=pfree( Clos (, "Present", HostName", cfg.;ortNumberporProtocol", PROT_SSH ?" : "telnet"OnExi!!c_on_exiTerminalTyptermSpeeds{ buf[2*environ)], *p, *q; buf; q =q qc=,\\') *p\\\t'=c},} *EmbufUseruserRFCrfc_BackIsDeletbksp_is_dXVTHomeEnrxvt_homeenLinuxFunKeysl_funkeysApplicaCursorapp_cKeypakScrollbackLinelDECOriginModdec_omutoWrapwrap_modWinAlwa_aWidthdthHeighFofonIsBolisbolVTvtTryPalettry_poldAsColou_cfor (i=0; i<22; i++0]2[30sprintf(buf%i2, "%d,s[i][0]1]2]MouseIsXmx56=32256Wordness*j=i; j=0x210x7Fi :SGET INSERForegrou " "BlackRGreeYellowBluMagCyaWhipermanent, 5URPALETTi]55_RVAL05_GB,OUNT&& n!=21-- ;SEL(3*5*2- ccustom{0}; /* zero initialisersccccInstancpCustrgbRRGBC_FULLOPENC_RGB(&cc (& 0xFF>> 8216mareconf, ps[]DLGPROCproc,,,,,, }id0)123545)""SSH"p[1, 2, 3 p[icMainDlnumsg{/* centreECT rs, rdhwesktopGRhw, &rs)&rd Mov(rs.r+ rs.lefd-)/2bottomtop-toptabtrolTC_ITEMHEADER_TAB tab.mask = TCIF_TEXpsz=s[[i]TabCtrl_Insert&tab/*Indir0]].);Longage, GWL_EXSTYL)WS_EX_ROENtFocusNOTIF(LPNMHDR)->cTCGetCurSel(Fr i iiensure fstEndC #if 0#endifmsgOK * If isind Listied, we t a prof to hnimitLprecedinghwi]]_okLONG(,)}C_ABOURfbuflenret f dorRegEnumi++,+ sre+len[ counts as one} s*++sfe} ig (up_cfgcopy),!reo_logtrin>=+= 64 ()showOGhowSW_SHOWaverify_sshRSAKey **dr/**mainto.rr_) fatalbox("of memoryfmtNow read fromregistrysee what itsays|| !sh&was uohecache\n""i. Therethus no waytellremotisyou think i. anyway?ProblemWARNINGYESNONOMORE_DATA=mp"This's did! Somemay bimpersonamioussaltly,chadusloppy sysadminReplacc?: SecurWarning Dowa adharryingNew Node-path: putty/window.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 18969 Text-content-md5: 3ee3a0ac68c7c117fc3ed79bd9da1cf3 Content-length: 19085 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN偭5瑀旿圢嘚匭<僁淔岶i孞塊(嘍8Ig慚丵嘐乪丮丵僆亄丮丵咲僊丵匛僌僄侹丮丵咲俤僎俶僂丵俶塓俶侲侺俁;丗僋N乯D倆侳僋ND倆僂僌NE倆嘚8E倆丗僋N俁D倆丏僐俵凞刲R僂刱R 侱1侼:凣俤侸丳淪匷凩卶碋哊侺%岶哅嘓哠侴唦旿哰扗3O)卄=匟嘍L%孏嘕丳孞僒E:匤乯E:奐I圥凧E:凧8HE圲J俁L'DJ俵HD丠%丏:丒噠僆哱嘍刯D圲塅咷D:孴墈凞坣丒奟G/侽9D-哃.丟僅%D岺J墇孖哱匟婩僉婲怢2I=圢岼4僆哱孍9僇FF 僁6匛寏僉-桱%凞哠孍妜匞L宬僁岴 匞5凣嶨怓嘑D-匟F嶾I)D刯K嘍 咷嶳嶬僄'丏峔淓嘩咲圙弌塃嘍汧両嘒'昜怗W廋H弞丗怴岲廬圚P弝_媂)璂G5凞>匘%E巜扗GE巜僁;圖凞峃丟丒巜僃嘍匛廟D拀凥岼燚揟塇廲圖廯擠怷丏 僁塃廋D K揅凞E擴D奃搊凢5丗廈P憍H,丟攌塃攓G擧丣擯EF K丟岲扚丮I昗嘍扐D烰凞扐旸%丗嘗僁侶凮&@i凣廐H獂N卌E&丟丠僅獂F廠F%]嶨甌匘F甎哸4奞'F嘍揟咲琈丠*侱攋嘍>圗甞匤痷侴痺塅F痐凣(E%侱僂沜D%丏璸F;H癈丏爎D-凟凥獂揘燡JE%僂.F渘D丏╫D:U)丏丟6塇盽丏D攟D揟E盵侲:侱H獂J9H8DG眥HE盵I擰婱廤凨9團睧G'Q廐F瞇E峿L慠E凢侶K&僈寈D"HJN睸E峿侲瞹L5嘍搃僅!D砽H.V両*咲F#圢盌匘琓D揦F 僁燵G僈G.J Q侲凞孶侲榮O'G孌E團碋G宎D梩丯G1G<峊&K碶G5丏咲盄凢秎奞盌嘒烲ED焮H獂H G+E>僂璱D稟圖哊僆 EU淐咺擰D揦FD積ED%L穇丒穕侱丏'I倄慿;媗竬E2圼竬S穛g?嶥杫俵竬丏廣F篊僲竫塂 l竬嶥盄@U筰E4D竔丏=Gl竬侷糬丒$l竬丏籺坲糴DD筧侱穉c糵{D穢峬籈僇DU竬F穔匘K窼丏咷嘑4D抧俈籈F穔M窾G乛D筧奪Y穔乀穄M窾G亁D籾凢6E竬_G塂)kE匧F糬僃峿X碊丏肬侲峎K.丮盓D繬HF獄E峏U禪D礵G=僋盌僆EE媓M>M嘪H 圖爎團烣HD擩DG碊丒L膚H G揻僆璴丒瞇J*F廈圡艸HK 丩GE 侲侱―凞礷侲╓侱朇僁D晍FI?匶艸凟甧D甗丩FD舑UE憒Q*僁-凞朄嶨DF塻侱咶焀J葂L5咶臟KD0丯J0N憏IX淐奃爅匢舑G-凢唥匘D侴E〦H#凣D 丗粇丏*D嶹丟丏>E婦凞礿K蔊圖侱磟僁乢+GG萒L峘凟薼侲峸擠〥 塃蘙凢%G蒰L萛侳萯H萈D;凞眕G塂燵D爒H+凴丒荘Q.丷丏0Q.侶$I9K碶N蔏R薆R嘪R薴嘒<両0H萹僃G蒾僅嘰E梜D%E?嘍!旼婩I擰I臟E僄+丟-E2D丠*F臟岼 丣丠*G婩匛瀥J蟟E%G怳D$僅-K衑僁-丒爍HG衈F萛E$凧I丼D"侳*QD楻Y裀H蚏S虳]G蛗R蚽]凞爎岼.J7F丟)J,I萷D0E袺咺:E螱僈稩嘕9DD觹T觀P烵GI蟎FF訰I稫I'圚丏蝫MJ:L萛N=G歓G,丏峹G婩凲JS虳X誤D蛗G F決僫Z誎E訰X誮S謑GI9K‵DI≦D杊塂僁(丏,塂>FD朅匘譾D侱5匛=嘜E磍IJ╨D〧H侱>凞僁F匘蔈丗D6F丗丏硆G&F團豎丏峆D僁璸僁D6D扐侱扵EV豥匘峃_貆G%GD*圛賘D扐侴侲"匘扐僃豎丒 D磂塒豟D(塂丒賟D;丣豴DDE僄F?H礰E D+F.匘琸圗K買S蜝K噠G岼嶳凧嶳E僄G蝨J嶳嘍丏躢D6S蘭I萮H葃N燶HD噠侱6E覺K躣匛圱D萗F躵G軱D焋E J沨Q軦嘍N軾E軸G燤Hh孖G=F丏I-HF%凣稩僆込丟嘔=匜 I 侱QH=嘕 怚 F(D噠丮蒳侲踜凟凢<並:丒,匛肊M躣I稫G3I坕]郂僇 S丠"E侲/P,P*凞踑g郌F塢\醟UK.丣)MYE)F4D#S郂D6K郲O EWGD詇}$K G,R醟Z,J塁X銨J鉬KD輜E轏IDO&侲4GK&G,O5J塁JF燤丏賙僄舖J蝭M1X$E*嘗D鎂H礘L萛Z'圝袳K萿僆)F觀H焀E螱K/G8嶧鏞僉覫丏釽丏酅E 丗覺N咷*GHE.僁篒丏D9G妢I鐶F鑑丏3丒*H鑏丗7G?D F謒H鑑K 侲鑦K#G蹹ET鐹M.W詌IG蹹N鄅丏 LF?哤釳F/LI錎O)E錮F廈O﹋D坣丯葿H葁OHW釴F8Y&H錎N#Z隡E梜Q陏W(E覺L.K\#FGJ﹋J﹕z雊Y(侻阘僝霯R廐丳"G"E贏丏E咷慏I9E跱匘扐O踒僁籆H慍E轟E疧凞苉J1D?丗#L矦L酓K#O萗Gb萶K葁KE3嘍両EE蹳F峈丩蝍c丣嶳f丟`GR甀嘕甞奨甈I畐両F3D禟侻孴丗峈丗峈両蝍僆僁J艵F禣侷9侶6E覺JE EE 嘍 咶N骃E髄E骻乊髆EE骻F骯並 H餏IJ侺驠H1PH骃丩 僂 F礹侷孊丏騳丟餏I1E烳M!L騈X-EF咵侳廔H\唙HM躍K&咶丗郳M藃K鯰僁揦V鰂侲餦F蔯丒+G鰂F藄嘒 H僁篍岲,F J鱒慗艷EJ&N鱬岺?F唥G)E鱔K乑丟睲凞繲H1E9G鱥L鳸G亁E鴋I鳻GG鴋E楨D匘墆G=奅咺?奓颲丒鵲N!J燶F鑪F唥D骦K)F覺H昋I昘D蟳F)D(丠朣孒J鶰G5奍鶰丟鶰朌鵳L2E>F睳嘐H疺丒G鸞扙 GH鹹團榬侲 HJG轙凢朤侳9凣黬G濻凥黵D瘇E匟黵丠黵N+H黵G揙FE萿H梍D袻E揥G1僔梬G黶E訳HMY!D?E*H齉E E揦僂I侱蔆E&E礼P榁F榞D詇H9M睳侴1匘梇K榶F歔D臥D漀G7L=ID鮉凟黃EG廟両)丟歎F疘P疭D癊侱肒丏1JE亐+GP亐8丒*M亐9侶 D-F疘H亐0並亐yJ亐.D亖HG4GD*侶芔F廠DL訫F?匛3E7N亖DE侱痎G%H齂H鸉[榥YF,G鴋HH%F1D亗J乀G8H7H萒V萚U萷YL9x.E亙'U﹋F亗cMF鹹N(M覮PK亜{O臟K)K亝2PJ亜ZP亝SI hE亙'咲DM#H鉬c馱F⺧\I#L亞tW KF⺧d_1I亗c侱6侴亗xG覻GD鏹G膤H⺧G歖D丗D塆F硃丣砶P亙yRE侳G鴋E 匢亝ZU亗H僉亯&匼亯7G倆丟 凞僁倉俋亯q僒亰 僙亰#E2T亰 E2Z亰#俆亰 俒亱乁亱+乑亰#俆亰 俍亰#僒亰 僙亰#E4U亰 D5[亴Y乁亰 乑亰#乁亴A乕亴XDU亰v俒亴X僓亱+俓亷+乂亷H乂亰#E匧K鴋丒+U鴛乄鱣咲凥騙孍H2並2丟凾亹G[G亸l僋K亹圖^亹 Fw亹2乀亸mD亣E礹匘 D.僁螹D9嘍G訰@]亹 G亼sQ亹pl亽F @f亼 乴亼tF亽+F亽%E亽 @g亽1G仈Hi亾T仈u@l亾\凟 丣侹礳凟蔿DG 丒5侲:F E 婦峇丏時凟僉<[蓃D亹-E仐q嘍+H亹D亗K(匟亹hD丠亾F仒iG仈HF亪,E M騡K亪I仒UJ仒_E亗~F$F亹K汮Q仚!G亼sH仚9i亽N汮\仚qQ仈uL亝qJ$嘺亼乣亼;丩鬠L'N鬱N仜HY鮂YK 僋鰘G1KF 匘G鱺D匛㭎\鱥I仠cD仠*D莂K鰘L僂觃EU鰘Y凞亸-G仚E仢p咺檉F嘍-H獃If観H鉬XK亗=F亯_G仦E觧僂仦E玈L仧侳齵J仧EL仧FH亪S鏐N烵嘑8j仧Z團瀤D亹-僑仦乑仢V哃仢sE鯰I 僅仚$丠1M僄楥E鵃侷眐I鳥塂厃婫仭@H鱒侱-丠亯SM睳僁,I;丏抁丏9侴篜M亯;丒謔D揑V仮嘍嘑嘑亐%M仮HDK廐FF仮$F&匥G U7P両攊K8F F亪-H丏榥嘔P仯tE丠P FL仮)E仱,丏9嘍攟I仯RD仴G峾Q慪K颲I>T亪3H仯?僂$侳仮BG亗AF詅Y咲3L舠G8M#OV仠p凾仸#H仢Pr仸>K協J仠*G鯻E8Z仠B丏亪=D3D卬D仭Y仠m匘鴊K仭N駕D餵D 凞鑊E亽7D$侱 丗仺]丗 D亗I锳D癗侷侴?KH仦 I侸侳珁N#F仺yD仺eR侼亹丗仚!侱D仼^H6D仼乀 K仼uG)FF仾 EE豴F伬丏伜cF.G唈E伬lE賙咵僅侳丏伱&両晐圖磣E豤D丟-F伱僁2E:G蔩丏>D伵A丏伵E丗踲E3僂伵ED1E伵E侴騴H騴丟橽D伵EF峈丒調F伌HI凟伷HI"塉嶳丏伹9丏伹=丏仾rP蝞僄8僄&G仼!D伣0両伹vM巓D伜tD伷僁8嘑鶣F伻%乀隣H㏎塅衴D伳[E伻%侳伻+嘙$E伹VJ$_7F伾侷塛Q礙岼伵aD+DD 丏峯匘荴僃仒HDI伵b匤篐匛D伷岲伣xH孌趎L僃伾両塛IP萖D伭WO萰D伵ED镵丏殅凞H佀D丒佀M侳擯丮藊E仭G僁伾hD伾mD峸G伀R匤%楧佁匜佁9凬佁C圖佁4慐佁9凮佁B滷佂#僋佁w濫佁9凬佁B滷佂W凬佁w滷佁m凬佁B塂佁i圖佅匜佄w僋佁w侱佀P揇佂|丒佁9凬佁B匘佄孌佂|匜佅a僌佄KD佁D佄%D佅D凞佄bD佄%D佂丒佁9凮佅凞佂C凞佅P凞佂凢佂W凨佁wF伒SF佀F丮佁丮丠佈匢伭JM.P伻!匨佀G侶朢D'僁伿丏烪G.凟伱cF9凢伬:凞F伳'g佀%D擪侱亝 J佈X酓侱佀N匛佀N侻鬐P伻!E伔e侻佀R佀p侱佉D丗佁 E佁I慏佋丏佋 D佋丗佋 D佇j僓佊d哃佋F佋D佋F佂D佋丏佁Q嶨佋凷佌 D佋1D佌塅佋bD佁'僈伩D I贘M佉 嶧佌g匟伱R匫贓匳佉(O佉BH?J鈓L鳴凢H3W佀%E伅IN佀D乀佀S侲佉}F仧F佀F丒佀M匞佔V鴡J6JJ$G鴋S伾B@W佒pE佈 D佋O[佈.両伭JR佔`侱颵D伣\@X佖(H佊ym佡M.丒楯匨伻$奌佢t匞餏俈佢d丱佢{丮佦 ]N伻#D#D亗}N伾BJ#X%Q佦hE坕R佦}I坕J L伻%咶蟘D伾丏F佢b侱佪 E佦G伹Z\釪H㏎Z佦i丏E佒qD楰H7僄E佦I佪q丠佪{Y鏐E伹VH餎丗鏷E伝+H鏝H碈匧佫G丮佫T丏踠F仧処D鏹丒亸H伮 Z佦JF"W佪HE5O佫w奃佦丱佭D伔 S佭$JP)E坣W佨2F佭jQ鏒G4婨辴丗4嘑伝BF佭丟I.丏 丏皉E佱)匥亹J佱/QL伻%僆伻4侱 侳躀丏佲僁9D佲丣佲(丗佲(丟佲 丣佲(丟佲>丣仾rE沜G佲#丣佲PH佲v丗佲丟佲l丣佲丟併 F佲_F仼-E沜j佮mH7僂仩凟贔G仧D╔丩餏F咲9G伱*丟侐I佹/丠侇H伬D晆侳伳D赺僁仴E豵E個r侲佷O侴侅jH侇侱穈圗倎侱個uF伬M丵侕CG侕 両侇G伱cE侐Y匘K*L侀)D-D佖|L侀)乀倐{丠倐{R礘僂侐bL侅ET侐8U侀E佮hE 侱盻E佹D伭e咼仭 S侖G黳I們D侹穧丒梖I侒@G佺侱伻(D倓6[侟xW個1侷侐D匛侊E伣tI蔤O侇,K們d侲佺K丏奜侇D侓QH伬gE們E.K倎F晐E伱:丒譙丏佒5F佉.E侇XF伷/僁佉0侴伣C丟咲丒+F.凟來5E們FH倕{咼琤F來#K佽UH伩iF佽nF倎j丒伳F丟琜J倐F鯴丟佹|H抌R侌/丠倎*G-K侌SH侌9丯倛H侇侱佌n僃.H侌9僁倖N倛丒倛T匘伩+L倎僇佺1E祅D佉0丏蜯丗.H伈 H倖F丏嘆並琩DZ侀(塊伕/O倫_乬倫o丏倯K伕eO倫_乬倫oD俌倯c乬倫o丏倰%DR鱥D侂M乬倫o丏倰%乊倰q乬倫o丏倰%乊倰q乫倫o侱倰%乊倰q乬倲丏倰%乊倰q乬倲D倯並伔$P倫_乬倲D倯]乑倯丣倫n俌倴J倯5DU倰t処倫o乄倴g凞亴vH倴^W倴g匤倵X倴A僆倵)X倴fE亖iI倵)乄倴gD侁XI倵)丮倴gN丏倧凟來#侳倵*凞梛F倵*侱倱5D侒A]侖:匜佹匘佔OD倯c倢^D亣D倧>匘$D佦iF倫?G恄H倷丗佮gX侖:J倷丟倷)丣侟kD侙'd倷GH佒T^倷僄倷3l侌 丟腦僄E來#僂伒$D侓QG侓"侷倹vD値2H侇E咼侓aE伮D侎 凞倞&G個U僌伿u`倫ME亹pX侖:D侒%丒 E侒/H倸<侷侟k俓倸QK倵@F亸tp倻y丣倽*乫倽5E伃s倽_丣倽*乫倽5D伀Ks倽_丣倽*乫倽5E倻2_侖8俉TR伳l丒伵+E3K%G伷zD*I峔D(D仼aL伆G巟K砤H蟰塅偂G偂!僂4M寈F偂J佭1丱亪E佭lR伆 H偂iL偁iF;Z偁|L亪vE佹aK砿f偂6I偄dR偂gz偂z僁萟E倗c丏觭E峊D&F偅z並鱇O9E偂PW疜G偆&~痜G偆&J(I偉E8E偅uF3H偉G癑D偆 K偉/E癩E偆I佫V`癷G僅伷_I伜dT9E伜tD3D侒AT蝬E伅IDF伜CI伆`觍G-I躓HNG-FH偁iJ伝;K伷_I偆N偊iE伷ga-MQ詌D偋IQ騈D倗UH亝g丏仮7E偅p丗偅z丗偅z丗偅z丩H覷T裀丣裡D盻Y偍|H蚏乗偐G蛗E鬭X偍}X I佪qO誁侱偍_丏偊O侶觕HD偍sE辴H丩I*N偋M偑N偑-H偁io偍AQ藊E來R侲歾丒蘋丒蘙丒ED(丏-E蘕丒DD丒2侺8E蘃丠蘥F佺|P偍>F偒f僁偍XG偑4J鼵F偓_E倶y丏 Y偓LD桽R偓gH覷V伜Z侱偔 侷5G亜{WP伝;N餓H偍AF仮5T蝄K鎛\3L偔6Oh裑]偖z^]偖z\襏]偖zL亐t@i3IM@b諥O佈UO偔:~偑9G偊=L伜du偔p凣E嘍侱*I伹I偊FyD騘DG-F偝RD倖pHG偝vD佽EE鶺嶥甞E偞,D甗DE伮 D鑤L偂nH偞E偔D/H臙E=F偞E侒両偞^K偂oD偞uO偞f僂4F倖pF偝XJ佭-丯佈.僂偞t匛偑!G偉F偞侲偞uL偟b璫DG亖PI D佀團佺5K亪'匢偠LE伓丒F偠O丏偞凞D亖@I偟 F榣M偠fL偋F偞丒偂O偟c偠G迀D伻nH偁iE伜dK偝M侳偅z並偝bH>O偝nR丗齉EJ偞_]偟qD亸yN偢@M偞hJ鬗S偠DE揙J橳J偣 FS偠zH伇R偡I伜oI偢bE齋E佸fW偞|F佔 G橰F礼F伭bG偂@丣:H偞iN仴yK侌$E佸fJG偤WF偁fF丏蔤丗佉H偦M僄伵ID>F偂(K伷KD凞9丟餯侳偅zD蔤G伹E6G倫\H-H佹 奌躻丒*匜倕H丏倞&丒偧"G偡*丟偉!DD蔥丏偧[G1侲偧~G偨F偓FF伌"E4H伌G伒G伀K伹F伌9丒偧[N伀J丏%侴偧-O伀E偡PEN膚侲偧a丗偧sN偩 D伋9G伋9I偦*丏睻D伱zG仐L僂倹r嘍佺WE仯HD仱5K伷KE偪僄偄9匘倻BG倫\圖-I伳0E侐v僁?H偪5E偆丏 侶佱j丠睸G侐vE偪*E榽G偪6処偫 Q仱dG侐vT仯@X仯ZF侲仱I偦*僁,H伷N凪H廐D偭H矯#include commctrlwinsockstdiolib #define PUTTY_DO_GLOBALS /* actually __ globals */"putty.h"win_resIDM_SHOWLOG 501NEWSESS2DUP3RECONF504CLRSB505SET6TEL_AY507BRK8SYNCH 509EC10LGANOPBORT 51OI 51SUSPEOREO51ABOU20WM_IGNORE_SIZE (WM_USER + 2)CLIP3) static int WINAPI WndProc (HWND, UINT, WPARAM, L);TranslateKey( wParam lunsigned char *outputvoid cfgtopalette(init_fontsextra_width,height;FONT_NORMAL BOLD UNDERLINE UND OEM 7H [8]enum { _COLOURS,SHADOW } bold_modeUND_,undescenN 24RREF colours[HPALETTE palLPLOGlogRGBTRIPLE defpalWND hwnddbltime, lastactMouse_Buttonbtn_na*icon; inMain(HINSTANCE inst, prevSTR cmdline,show)app[] = "PuTTY";WORD _verSADATA wsadataNDCLASS wndclassMSG msgguess = MAKE(1, 1)f (WSAStartup(, &) MessageBox(NULL, "Unable toialiseSock", " Error", MB_OK |ICONEXCLAMATION); return 1}LOBYTE(.wVersion) != 1 || HIv is incompatiwith 1.1WSACleanup(/* WISHLIST: maybe allow config tweaking even notsent?InitCommonControls * ess the and ./{ p; doaults p =; while (*p && isspace(*p)) p++/* * An @ meansactivate a saved ses./ *p == '@' (p+!*cfg.host!do_(0} } else&&we've been giacontainhex value of a HANDLE for a filmappobject, which we mustnct as afigilemapC*csscanf, "%x", &)1 && (cMapViewOfFile(, FILE_MAP_READ0,sizeof())cfg = UnmcpCloseHandq = !*p) *p++ = '\0'strncpy (, q)-[port = atoi(-1;back =protocolPROT_SSH ? &ssh_end : &telnet.style =lpfncbClsEcbWndhInstanc=conLoad(AKEINTRESOURCE(IDI_MAIN)CursorIDC_ARROWbrBackground = GetStockO (BLACK_BRUSHlpszMenuNameC=Register (&avesfg.term_G some. This getsupdated r, sodon't recaro much. Howewedo wan /ecorrespondlargratheasmone.. = 10= 258, =+l* row{ RECT r; wDesktopWGetRw, &r> r.r- r.left)bottomtoCreate (, WS_OVERLAPPEDWINDOW |VSCROLLCWDEFAULT,smultaneousct{} ? : =CcGetClientcww - c+wwRe, nowkhat__itto bSend0SPos SWP_NOMOVE |REDRAZORDERscroll barINFO sisi.cbS=sisi.fMasSIF_RANGIF_PAOSDISABLENOnMinaxowsPoSetSInfoSB_VERT, &si, FALSE upne;msg[1024]* =->sprintf(msgopen:\n%s", RROROK} : set_titmsgeinput buffersinbufheaoutephe m h_NOTHINGBoubleClickTim-rol ops onystem menuHMENU mAppm, MF_SETORTELNETpEND, "Are You There"BRK, "Break, "SynchEC, "Erase ChaerELinGA, "Go ANOP, "No OperabAOOIInterrupus"End Of RecorEOFPOPUP() p, "Tanhow Negoti}ew S, "Duplic, "Changtlear SEReset Terminalut Fly! uppalhas_focu(GetForeUGet&Dispatch!ou / idlmedoull!Peek, PM){ i; (i=0; i<8; i++i]Deletesfree( ) random__seedmsg.; } pyfromu o.is non-trivbecaindices dient/onstww{ 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, , 2, 3, 45, 524ww[ii].rgbtRew][0G1B2]HDC hdcChdctryviceCapdc, RASTERCAPS) & RC_oc(*-->palPalEntry+*ENTRYx30Numi i < peFlagPC_NOCOLLAPSEPSelectpal Realiz Release,iRGB(forwill needere s many ass few Wso: - checkif nearyverifaisordinaryoengshaifunder (manualbyof drawcanb a pinch) OEM/ANSIb,basshiftOEM-onlyTEXTMETRIC tmi, js[5fw_dont,is = FWDONTCARf(i,c,w,u) \F0, w, u\c, OUT_RECIS QUALITYFIXED_PITCH | FF)vt!= VONLY(,_CHARTRU=||OEM,=UN#f f j = 4? 5 : 4)+j]GetTextMetrics&tmi04tm.tmHAveW+ > -]] || ;&&OEMTtare\n"s. UsnstMismRrequesthwhACTIVATCOPYBITS |} (bxyf (= b - ->->->/2; <(- wewWMSZ_LEFTBOTTOMTOP+= ewhTOPRIGHweh_MINIMIZEDRESTAX#if 0wve fixeis w,} #endifh SB:(-1SB (0, U/2THUMBPOSI:TRACK1CH)!get_ctx > 0ColorQUERYNEWEY ckeysWdosiit disassociatesulsparked iocca. eae pcWin32 tune _our_rol2llenNthelesspdealhouly crop Sophuspmacrooeuvrreadyp&cDefDraw aiatcotittributerfidt`'do_ct,llongfg, bg, tnnnctxx *y & _ACTCUR=? 0x200 :^=CUR_XOR|=Map high-halforoximISO set.s mis0xC3 (Atilde)0xCC (Igravef (&>xA0'>SHIFTnbBBREVERSnnbgnfgbSSetBkbMOPAQO,TRANSPAREN en(PS_SOLIDfMoveToE+ T+len*PASPOpt 0].14x23+y4y1223]Poly5 a)?af ASCIIdRsof byusedpue[256reESCALT wedim0x1Bet heboarde,we'aimesrtlreGetKS(-PgUp,DnAlt-F4products:thoseVK_]80)VKNEXF genertrategyo seemapayitselfuchlikeselvfails. But firstesksdo but g m7F0x08BACKbkspd7F08-S^@00)t CONTROLSPACIpabefoharie-empt lotuff,NumLifapp_sreHto ensdoesiperceKPlus. Iretma Lelor diNUMLOCKS}>> 160x1FF 0x145: ()\x1BOP");3Q037R4w8x9yASBCuDvE:+^[Ol^[Om) ?m" :Fq5012p31MBdovele effb,al. NalLTha _after_aborbefalLRAttchoAsciihrrchOKhad a Wtur various('givup*ock, P/of cbuckybwo.26^^1E)Min_F). SDOSdtbrmb quo ^\C'2610xBDFC,do ('[' nn '~'nteger decimal nnweirds .ux VCs replF1F5[ [ AE. rxvdo __eH(1~4~)HSC O ve1: ? 23 : 1243134658569773188299202123HOME1INSEDELETEND56l_fun&&>= 1<=[[%c" + 'A_home4?H%d~Nrem(ar5.reasonLEAR...cOA[ABBCCDD[G01+strlen(str!sbatp} _nrgbngr,bSe,[2{26453 2n],8Unizwrit * (GMEM_DDESHAR(mem( *)) [leUnOpenClipEmptySD(CF_F*p*!* `'s`'to'misevtomin, max, m(to Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1b3e5883a3b497a867d763f3e0e76c5d Text-content-length: 969 Text-content-md5: 531d4ee38915c9ed70d8fb73d3d8ebbc Content-length: 1008 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN佊佖0"'僎-(僎q(伈I燝2 1999/01/08 13:10:15 simon Exp $ * $Log: sshdes.c,v $ * Revision 1.2 1999/01/08 13:10:15 simon * John Sullivan's patches plus more fixes: * - Stop using the identifier `environ' as some platforms make it a macro * - Fix silly error box at end of connection in FWHACK mode * - Fix GPF on maximise-then-restore * - Use SetCapture to allow drag-selecting outside the window * - Correctly update window title when iconic and in win_name_always mode2 1999/01/08 13:10:15 simon Exp $ * $Log: sshdes.c,v $ * Revision 1.2 1999/01/08 13:10:15 simon * John Sullivan's patches plus more fixes: * - Stop using the identifier `environ' as some platforms make it a macro * - Fix silly error box at end of connection in FWHACK mode * - Fix GPF on maximise-then-restore * - Use SetCapture to allow drag-selecting outside the window * - Correctly update window title when iconic and in win_name_always mode Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: e3f5ef0291e770c1325d4abe3c4fc74d Text-content-length: 50 Text-content-md5: b621bce4cc8aea4a0ff6457f7fae93e3 Content-length: 89 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN仛m仛t 6#訨 e = cfg.environmt Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7371101239d4a3ea5a06506354c6daeb Text-content-length: 204 Text-content-md5: 8aa67ffcceb11235783dabfeb7dd0333 Content-length: 243 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN偂偄*侞n,侟n擮倢3 && j=rows) y = rows-1; if (x<0) x = 0; if (x>=cols) x = cols-1; Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 22b95992a611e83c1d707b9eebfa863e Text-content-length: 549 Text-content-md5: f0eb7d8fd45b024e387be59f14305890 Content-length: 588 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN偍m偐J1僨梄R梇+皁嘐仱4伂!7伅6髈伌~ char buf[2*sizeof(cfg.environmt)], *p, *q; p = buf; q = cfg.environmt char buf[2*sizeof(cfg.environmt)], *p, *q; gpps (sesskey, "Environment", "", buf, sizeof(buf)); p = buf; q = cfg.environmt char *p = cfg.environmt char str[sizeof(cfg.environmt p = cfg.environmt; while (*p) { while (*p) p++; p++; } if ((p-cfg.environmt) + strlen(str) + 2 < sizeof(cfg.environmt p = cfg.environmt Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3ee3a0ac68c7c117fc3ed79bd9da1cf3 Text-content-length: 950 Text-content-md5: b6a57dd47f8ccde21c27e9545a38fa08 Content-length: 989 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN偭5偯F=唊亸^丒a亹7亊亽f亊仌;W僿仐亞[仜8偂y偅1 #define X_POS(l) ((int)(short)LOWORD(l)) #define Y_POS(l) ((int)(short)HIWORD(l)) case WM_LBUTTONDOWN: SetCapture(hwnd); click (MB_SELECT, X_POS(lParam) / font_width, Y_POSX_POS(lParam) / font_width, Y_POS(lParam) / font_height); ReleaseCapture(); return 0; case WM_MBUTTONDOWN: SetCapture(hwnd); click (cfg.mouse_is_xterm ? MB_PASTE : MB_EXTEND, X_POS(lParam) / font_width, Y_POSX_POS(lParam) / font_width, Y_POS(lParam) / font_height); return 0; ReleaseCapture(); case WM_RBUTTONDOWN: SetCapture(hwnd); click (cfg.mouse_is_xterm ? MB_EXTEND : MB_PASTE, X_POS(lParam) / font_width, Y_POSX_POS(lParam) / font_width, Y_POS(lParam) / font_height); ReleaseCapture(X_POS(lParam) / font_width, Y_POScfg.win_name_always || !cfg.win_name_always && Revision-number: 13 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 36 Remove buffering on malloc log file K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-15T11:27:36.000000Z PROPS-END Node-path: putty/misc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a84182fac8e9428fb65d495f26ede8b7 Text-content-length: 101 Text-content-md5: ab578a31f34832dd9c50050f61d90546 Content-length: 140 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN媈 O儀O嘋 { fp = fopen("putty_mem.log", "w"); setvbuf(fp, NULL, _IONBF, BUFSIZ); } Revision-number: 14 Prop-content-length: 130 Content-length: 130 K 7 svn:log V 30 Fix breakage in window redraw K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-15T11:28:11.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 8aa67ffcceb11235783dabfeb7dd0333 Text-content-length: 80 Text-content-md5: cf2e61ceda90b5e1af8313160e6b3853 Content-length: 119 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN偄偄 7侞r侟%i < rows ; i++) for (j = left; j <= right && j < Revision-number: 15 Prop-content-length: 116 Content-length: 116 K 7 svn:log V 16 Remove CVS logs K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-15T11:29:55.000000Z PROPS-END Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 531d4ee38915c9ed70d8fb73d3d8ebbc Text-content-length: 28 Text-content-md5: 5da3d9e974848bfd8043919fda2fef11 Content-length: 67 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN佖0佄梬伈 Revision-number: 16 Prop-content-length: 184 Content-length: 184 K 7 svn:log V 84 Add SSH don't-allocate-pty option, and corresponding LF-implies-CR terminal setting K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-15T11:30:40.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 0014803eca76e14dd0f47f9961d4a7d1 Text-content-length: 62 Text-content-md5: 4d31084c751cd393d5377f5b9946a782 Content-length: 101 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN璻(#% 朜$SSH options */ int noptylfhascr Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: fd473bbe14e683774861c59aa52fe14e Text-content-length: 1644 Text-content-md5: a6c1d45dc37f602f183b1518b8446600 Content-length: 1683 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN亗o亝(孋玡爇玞3;觭乑亖 return 1f (!cfg.nopty) { i = strlen(cfg.termtype); s_wrpkt_start(10, i+5*4+1); pktout.body[0] = (i >> 24) & 0xFF; pktout.body[1] = (i >> 16) & 0xFF; pktout.body[2] = (i >> 8) & 0xFF; pktout.body[3] = i & 0xFF; memcpy(pktout.body+4, cfg.termtype, i); i += 4; pktout.body[i++] = (rows >> 24) & 0xFF; pktout.body[i++] = (rows >> 16) & 0xFF; pktout.body[i++] = (rows >> 8) & 0xFF; pktout.body[i++] = rows & 0xFF; pktout.body[i++] = (cols >> 24) & 0xFF; pktout.body[i++] = (cols >> 16) & 0xFF; pktout.body[i++] = (cols >> 8) & 0xFF; pktout.body[i++] = cols & 0xFF; memset(pktout.body+i, 0, 9); /* 0 pixwidth, 0 pixheight, 0.b endofopt */ s_wrpkt(); ssh_state = SSH_STATE_INTERMED; do { crReturnV; } while (!ispkt); if (pktin.type != 14 && pktin.type != 15) { fatalbox("Protocol confusion"); } else if (pktin.type == 15) { c_write("Server refused to allocate pty\r\n", 32); } if (!cfg.nopty) { s_wrpkt_start(11, 16); pktout.body[0] = (rows >> 24) & 0xFF; pktout.body[1] = (rows >> 16) & 0xFF; pktout.body[2] = (rows >> 8) & 0xFF; pktout.body[3] = rows & 0xFF; pktout.body[4] = (cols >> 24) & 0xFF; pktout.body[5] = (cols >> 16) & 0xFF; pktout.body[6] = (cols >> 8) & 0xFF; pktout.body[7] = cols & 0xFF; memset(pktout.body+8, 0, 8); s_wrpkt(); } Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: cf2e61ceda90b5e1af8313160e6b3853 Text-content-length: 92 Text-content-md5: be414c08459648fd1aa07c78c59d9c37 Content-length: 131 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN偄偄X?鵝Z亶q仹e2 if (cfg.lfhascr) curs_x = 0 Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2b9d580516f74aba08c19ee4ab7c0051 Text-content-length: 72 Text-content-md5: d3bfa36b5c6188604b5e23102c1c9d59 Content-length: 111 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN4梠-儃2#define IDC2_LFHASCR 10183_NOPTY 1018 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2bea44bb3f01ece9b7b9fd40b478a6cd Text-content-length: 544 Text-content-md5: 2e983ffe0a1a509a02a4476791828be5 Content-length: 583 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN/襂儃;$<.9L6瞴4AUTOCHECKBOX "Implicit CR in every LF", IDC2_LFHASCR, 3, 33, 162, 10 LTEXT "Terminal screen dimensions:", IDC2_DIMSTATIC, 3, 48, 162, 8 RTEXT "Rows", IDC2_ROWSSTATIC, 10, 59, 32, 8 EDITTEXT IDC2_ROWSEDIT, 50, 57, 30, 12 RTEXT "Columns", IDC2_COLSSTATIC, 95, 59, 32, 8 EDITTEXT IDC2_COLSEDIT, 135, 57, 30, 12 RTEXT "Saved lines of scrollback", IDC2_SAVESTATIC, 20, 74, 107, 8 EDITTEXT IDC2_SAVEEDIT, 135AUTOCHECKBOX "Don't allocate a pseudo-terminal", IDC3_NOPTY, 3, 19, 162, 10 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f0eb7d8fd45b024e387be59f14305890 Text-content-length: 395 Text-content-md5: 48d39bacb6c8014730fce9491414bc34 Content-length: 434 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN偐J偖2T)歜欿攡<.#:-亱=Q佋@亾N乬仸8仼8W3n伻|闎伩NoPTY", cfg.noptyLFImpliesCR", cfg.lfhascrNoPTY", 0, &cfg.noptyLFImpliesCR", 0, &cfg.lfhascrCheckDlgButton (hwnd, IDC2_LFHASCR, cfg.lfhascrLFHASC cfg.lfhascr = IsDlgButtonChecked (hwnd, IDC2_LFHASCRCheckDlgButton (hwnd, IDC3_NOPTY, cfg.noptyNOPTYnopty = IsDlgButtonChecked (hwnd, IDC3_NOPTY);Sel Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b6a57dd47f8ccde21c27e9545a38fa08 Text-content-length: 135 Text-content-md5: dd156cc03dc8aca47cbae23fd111b265 Content-length: 174 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN偯F偯Fl亹Ml伈 亼9 click (MB_SELECT, X_POS(lParam) / font_width, Y_POS(lParam) / font_height); SetCapture(hwnd Revision-number: 17 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Remove /D_X86_ in Makefile to allow Alpha builds equally happily K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-19T16:09:04.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 355167c207fb2ce1a2bb90eeadb7b798 Text-content-length: 20 Text-content-md5: db2cf122b21c96f133a9f11b6db1c79d Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN媁婳 !.) Revision-number: 18 Prop-content-length: 139 Content-length: 139 K 7 svn:log V 39 Update version number for 0.45 release K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-22T09:34:42.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2e983ffe0a1a509a02a4476791828be5 Text-content-length: 22 Text-content-md5: e504f65c657f0e370bb15379195a2d51 Content-length: 61 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN襂襂 ; <5 Revision-number: 19 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 49 Fix double/triple click, and improve drag select K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-22T09:35:08.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: dd156cc03dc8aca47cbae23fd111b265 Text-content-length: 806 Text-content-md5: 93258cf73e6385b0d3f3017fd9218e07 Content-length: 845 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN偯F偯iC匲 A.歎鮙乸e亼mF仌}Sq仈仌Fq仐仒K仴_仢gnt thistime = GetMessageTime(); if (lastbtn == b && thistimethistime#define TO_CHR_X(x) (((x)<0 ? (x)-font_width+1 : (x)) / font_width) #define TO_CHR_Y(y) (((y)<0 ? (y)-font_height+1: (y)) / font_height) case WM_LBUTTONDOWN: click (MB_SELECT, TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))); ReleaseCapture(); return 0; case WM_MPASTE : MB_EXTEND, TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))TO_CHR_X(X_POS(lParam)), TO_CHR_Y(Y_POS(lParam))); } Revision-number: 20 Prop-content-length: 177 Content-length: 177 K 7 svn:log V 77 Improve drag select (dragging outside LHS doesn't now select first char too) K 10 svn:author V 5 simon K 8 svn:date V 27 1999-01-22T09:36:21.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: be414c08459648fd1aa07c78c59d9c37 Text-content-length: 129 Text-content-md5: 1fe77645c195b4368c61789055e369a6 Content-length: 168 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN偄X偅9 g倣`g攔倣f{ if (y > 0) { x = cols-1; y--; } else x = 0; } Revision-number: 21 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 66 This commit was manufactured by cvs2svn to create tag 'beta-0-45'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-01-22T09:36:21.000000Z PROPS-END Node-path: putty-0.45 Node-kind: dir Node-action: add Node-copyfrom-rev: 20 Node-copyfrom-path: putty Revision-number: 22 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:46.497569Z PROPS-END Revision-number: 23 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:46.504803Z PROPS-END Revision-number: 24 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:46.512676Z PROPS-END Revision-number: 25 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:46.520960Z PROPS-END Revision-number: 26 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:46.529186Z PROPS-END Revision-number: 27 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:46.537270Z PROPS-END Revision-number: 28 Prop-content-length: 223 Content-length: 223 K 7 svn:log V 122 Added automatic version distinguishing code, to differentiate releases from nightly builds from random development builds K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-09T15:18:34.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: db2cf122b21c96f133a9f11b6db1c79d Text-content-length: 767 Text-content-md5: aadae578a14ba9ddf8a6ba4f623b4ed3 Content-length: 806 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN婳巈*匢}h{Anc儈E儈d;卙乺f奰# Can also build with `VER=/DSNAPSHOT=1999-01-25' or # `VER=/DRELEASE=0.43' to get version numbering; otherwise you'll # get `Unidentified build'.PUTTYOBJS = window.obj windlg.obj terminal.obj telnet.obj OBJS1 = version.obj RESRC = win_res.res LIBS1 = advapi32.lib user32.lib gdi32.lib LIBS2 = ws2_32.lib comctl32.lib comdlg32.lib putty.exe: $(PUTTYOBJS)PUTTYOBJS)d.exe @link.rsp link.rsp: makefile echo /nologo /subsystem:windows > link.rsp echo $(PUTTYOBJS) >version.obj: versionpseudotarget # Hack to force version.obj to be rebuilt always versionpseudotarget: cl $(FWHACK) $(VER) $(CFLAGS) /c version.c win_res.res: win_res.rc win_res.h putty.ico rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400*.rsp Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4d31084c751cd393d5377f5b9946a782 Text-content-length: 66 Text-content-md5: df2fce26410fbdb5c70d45ba7e69121b Content-length: 105 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN(甞 -猠僉猏Exports from version.c. */ extern char ver[] Node-path: putty/version.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 226 Text-content-md5: eeaaf3b0bbb907c5b622209d68cf35a0 Content-length: 342 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN!.)礚"D/G+咶$怐 淓=HZ嘖O嘝b嘒G'G侾b燛咵/* * PuTTY version numbering */ #define STR1(x) #x #if d SNAPSHOT char[] = "Development snapshot "); #elRELEASEReleaseseUnidentified build, " __DATE__ "TIME__ndif Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d3bfa36b5c6188604b5e23102c1c9d59 Text-content-length: 121 Text-content-md5: 00adaac14319a2620997e10d1514b4fb Content-length: 160 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN梠) c僿c揙 1 1002 #define IDA_VERSION 1003 #define IDA_TEXT2 1004 #define IDA_LICENCE 1005 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: e504f65c657f0e370bb15379195a2d51 Text-content-length: 337 Text-content-md5: b4b0fa83183b065f145df3eda3f21a1e Content-length: 376 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN襂褿.M亇:崀腒D_ABOUTBOX DIALOG DISCARDABLE 140, 40, 136, 7052, 48, 14 PUSHBUTTON "View &Licence", IDA_LICENCE, 6, 52, 70, 14 CTEXT "PuTTY", IDA_TEXT1, 10, 6, 120, 8 CTEXT "", IDA_VERSION, 10, 16, 120, 16 CTEXT "\251 1997-9 Simon Tatham. All rights reserved.", IDA_TEXT2, 10, 34, 120, 167-9 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 48d39bacb6c8014730fce9491414bc34 Text-content-length: 87 Text-content-md5: 8d5793700614063c314293cea1c4d496 Content-length: 126 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN偖2偖c:T侢o佪:衳 SetDlgItemText (hwnd, IDA_VERSION, ver); return 1 Revision-number: 29 Prop-content-length: 164 Content-length: 164 K 7 svn:log V 64 Fix various segfaults and heap trashes. Thanks to Andrew Mobbs. K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-09T15:39:08.000000Z PROPS-END Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3f9938a682917c7055bd6b1359652144 Text-content-length: 75 Text-content-md5: 6c25c435d1caaef69c55d3fec5c1fdb6 Content-length: 114 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN3沜0嶲嶲塒慶 != INVALID_HANDLE_VALUE != INVALID_HANDLE_VALUE Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a6c1d45dc37f602f183b1518b8446600 Text-content-length: 67 Text-content-md5: bc60054c910b5809b643a6dc237eea1a Content-length: 106 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN亝(亝, ,%鏪滿+4) : realloc(pktout.data, biglen+4 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 8d5793700614063c314293cea1c4d496 Text-content-length: 28 Text-content-md5: 83aba6272bfd47c44522e3707e7a0e67 Content-length: 67 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN偖c偖O3們 玍 Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 93258cf73e6385b0d3f3017fd9218e07 Text-content-length: 39 Text-content-md5: faa2c0d8294319c3b728ff203f97359b Content-length: 78 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN偯i偯{ 偍沍偍if (hwnd) Revision-number: 30 Prop-content-length: 180 Content-length: 180 K 7 svn:log V 78 This commit was manufactured by cvs2svn to create branch 'ben-early-mac-port'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-02-09T15:39:08.000000Z PROPS-END Node-path: putty-ben-early-mac-port Node-kind: dir Node-action: add Node-copyfrom-rev: 29 Node-copyfrom-path: putty Node-path: putty-ben-early-mac-port/putty.ico Node-action: delete Node-path: putty-ben-early-mac-port/noise.c Node-action: delete Node-path: putty-ben-early-mac-port/windlg.c Node-action: delete Node-path: putty-ben-early-mac-port/version.c Node-action: delete Node-path: putty-ben-early-mac-port/sshcrc.c Node-action: delete Node-path: putty-ben-early-mac-port/win_res.rc Node-action: delete Node-path: putty-ben-early-mac-port/sshsha.c Node-action: delete Node-path: putty-ben-early-mac-port/sshdes.c Node-action: delete Node-path: putty-ben-early-mac-port/putty.h Node-action: delete Node-path: putty-ben-early-mac-port/telnet.c Node-action: delete Node-path: putty-ben-early-mac-port/misc.c Node-action: delete Node-path: putty-ben-early-mac-port/resource.h Node-action: delete Node-path: putty-ben-early-mac-port/Makefile Node-action: delete Node-path: putty-ben-early-mac-port/sshrand.c Node-action: delete Node-path: putty-ben-early-mac-port/ssh.h Node-action: delete Node-path: putty-ben-early-mac-port/sshrsa.c Node-action: delete Node-path: putty-ben-early-mac-port/sshmd5.c Node-action: delete Node-path: putty-ben-early-mac-port/window.c Node-action: delete Node-path: putty-ben-early-mac-port/win_res.h Node-action: delete Revision-number: 31 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Replaced ICON line which was accidentally removed *blush* K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-10T09:48:15.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b4b0fa83183b065f145df3eda3f21a1e Text-content-length: 102 Text-content-md5: a93e75f686d02bd4162941233131171b Content-length: 141 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN褿襢MMMC? >I_MAINICON ICON "putty.ico" IDD_ABOUTBOX DIALOG DISCARDABLE 140, 40, 136, 70 Revision-number: 32 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Attempt to fix problems with version.obj in some nmakes K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-10T09:48:29.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: aadae578a14ba9ddf8a6ba4f623b4ed3 Text-content-length: 64 Text-content-md5: 62cd2e9ebecd611a77539893cc809532 Content-length: 103 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN巈 +(>' cl $(FWHACK) $(VER) $(CFLAGS) /c version.c Revision-number: 33 Prop-content-length: 170 Content-length: 170 K 7 svn:log V 70 Improve nasty version.obj hack so it doesn't actually do two compiles K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-10T10:30:17.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 62cd2e9ebecd611a77539893cc809532 Text-content-length: 46 Text-content-md5: 6f1b43fd8b4cd184fc3da87a31aa02a8 Content-length: 85 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN )>孲@echo (built version.obj) Revision-number: 34 Prop-content-length: 240 Content-length: 240 K 7 svn:log V 139 Add DeleteObject calls to go with the CreatePen calls in do_text. Should fix a fairly nasty-looking resource leak. Thanks to Andrew Mobbs. K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-10T11:11:11.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: faa2c0d8294319c3b728ff203f97359b Text-content-length: 473 Text-content-md5: bc5797a09917f80e479590f02c61d3ba Content-length: 512 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN偯{偲&%伈aS伈j佲r佷%$輐佹; #if 0 /* we have fixed this using WM_SIZING now */ int ew, eh; #endif HPEN oldpen; oldpen = oldpen = SelectObject (hdc, oldpen); DeleteObject (oldpen); } if (attr & ATTR_PASCURS) { POINT pts[5]; HPEN oldpenoldpen = SelectObject (hdc, CreatePen(PS_SOLID, 0, colours[23])); Polyline (hdc, pts, 5); oldpen = SelectObject (hdc, oldpen); DeleteObject (oldpen Revision-number: 35 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 61 Cause irritating ? markers in cvs update/commit to disappear K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-10T11:13:28.000000Z PROPS-END Node-path: putty Node-kind: dir Node-action: change Prop-delta: true Prop-content-length: 67 Content-length: 67 K 10 svn:ignore V 35 *.pdb *.ilk *.res *.RES *.pch *.rsp PROPS-END Node-path: putty/.cvsignore Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 45 Text-content-md5: 91d2c7f274245107dac3e76f09767869 Content-length: 161 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN$ 滵 *.pdb *.ilk *.res *.RES *.pchsp Revision-number: 36 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Revert to using WinSock 1 - the upgrade to 2 was a checkin error K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-11T09:07:20.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 6f1b43fd8b4cd184fc3da87a31aa02a8 Text-content-length: 24 Text-content-md5: 635a7f1567c7b32b87db19c2297fff41 Content-length: 63 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN 剓剗ock Revision-number: 37 Prop-content-length: 225 Content-length: 225 K 7 svn:log V 124 Use SetCapture() to fix the problem with double-clicks on saved sessions carrying throuh to the window below the config box K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-18T10:39:23.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 83aba6272bfd47c44522e3707e7a0e67 Text-content-length: 555 Text-content-md5: 68b03e759a938bcf531b0db262fd1eae Content-length: 594 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN偖O偘 *僺6\>慣桿輢S伄{b顉 鱥#侅,static HINSTANCE hinst; static char **sessions; static int nsessions; static int readytogoLBUTTONUP: /* * Button release should trigger WM_OK if there was a * previous double click on the session list. */ ReleaseCapture(); if (readytogo) SendMessage (GetParent(hwnd), WM_COMMAND, IDOK, 0); { readytogo = TRUE; SetCapture(hwnd); } } break; case IDC0_SESSDEL Revision-number: 38 Prop-content-length: 174 Content-length: 174 K 7 svn:log V 72 This commit was manufactured by cvs2svn to create branch 'ben-mac-port'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-02-19T15:05:41.000000Z PROPS-END Node-path: putty-ben-mac-port Node-kind: dir Node-action: add Node-copyfrom-rev: 35 Node-copyfrom-path: putty Node-path: putty-ben-mac-port/window.c Node-action: delete Node-path: putty-ben-mac-port/win_res.rc Node-action: delete Node-path: putty-ben-mac-port/terminal.c Node-action: delete Node-path: putty-ben-mac-port/win_res.h Node-action: delete Node-path: putty-ben-mac-port/Makefile Node-action: delete Node-path: putty-ben-mac-port/ssh.c Node-action: delete Node-path: putty-ben-mac-port/ssh.h Node-action: delete Node-path: putty-ben-mac-port/sshrand.c Node-action: delete Node-path: putty-ben-mac-port/sshrsa.c Node-action: delete Node-path: putty-ben-mac-port/windlg.c Node-action: delete Revision-number: 39 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 48 initial, pretty much as generated by CreateMake K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T15:05:41.000000Z PROPS-END Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 955 Text-content-md5: e7832d3559dc44a67ac9550a5d120b5f Content-length: 1075 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN揨,〦F 慒DE$匛:咶CE$E:嘐C慐:LL|僠 俙,E俔 僟 卄,哹;僢;刢俠;俙僌哸僽咷 嘐C睧丩J嘍匟剘凟 扙嘍QE擣團塆厏奊卻侶卨僄厈僁 凢厏圝 丒*僑哋E丮U唂EXE8XE俔XEXF'Y噐D僋XE價U唂HW圝H;咶$凩侱哢H咲嘐哋凞Z凨4D哖M$F7團7嘑塹揌唂凧嘕唂K#僁#J唂L圱奞員奞圵妎匘妌[ T乧凾媉丣I;G扽H;W宑# This is the Makefile for building PuTTYc OS. # File: .makeTargetSourcesbjh21:putty:foo.cmacis.rsshsshcrsshdesmd5randsashtelnetrminalCreatedThursday, February 18, 1999 06:11:49 PM MAKEFILE=ondoB = {} # blank to avoid res when is modified Includes Sym68K= ObjDir= COption {} {} ects= "{}.o".o" 哪 {} } Link-o {} -dt 'APPL'c '????"{Libraries}MathLib#"{CComplexStdcRuntimeIntEnvToolLibserfac Rez -append {C} Revision-number: 40 Prop-content-length: 160 Content-length: 160 K 7 svn:log V 62 Removed windowsism: now uses fatalbox rather than MessageBox. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T15:24:15.000000Z PROPS-END Node-path: putty-ben-mac-port/misc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: ab578a31f34832dd9c50050f61d90546 Text-content-length: 157 Text-content-md5: b120e33b85bcc1221b9f79a3e30c8d60 Content-length: 200 K 15 cvs2svn:cvs-rev V 7 1.2.2.1 PROPS-END SVN 8乺咲俓./* $Id: misc.c,v 1.2.2.1 1999/02/19 15:24:15 ben Exp $ */ fatalbox("%s", "Out of memory!"); fatalbox("%s", "Out of memory!"); Revision-number: 41 Prop-content-length: 121 Content-length: 121 K 7 svn:log V 23 get line-endings right K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T15:28:27.000000Z PROPS-END Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: e7832d3559dc44a67ac9550a5d120b5f Text-content-length: 2670 Text-content-md5: 19d2fa70767243adfd9e290631bcc4fa Content-length: 2713 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN揨擾擾擾# $Id: PuTTY.make,v 1.1.2.2 1999/02/19 15:28:27 ben Exp $ # This is the Makefile for building PuTTY for the Mac OS. # Users of non-Mac systems will see some pretty strange characters around. # File: PuTTY.make # Target: PuTTY # Sources: bjh21:putty:foo.c # bjh21:putty:mac.c # bjh21:putty:misc.c # bjh21:putty:putty.r # bjh21:putty:ssh.c # bjh21:putty:sshcrc.c # bjh21:putty:sshdes.c # bjh21:putty:sshmd5.c # bjh21:putty:sshrand.c # bjh21:putty:sshrsa.c # bjh21:putty:sshsha.c # bjh21:putty:telnet.c # bjh21:putty:terminal.c # Created: Thursday, February 18, 1999 06:11:49 PM MAKEFILE = PuTTY.make ondoBuild = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified Includes = Sym68K = ObjDir68K = COptions = {Includes} {Sym68K} Objects68K = "{ObjDir68K}mac.c.o" "{ObjDir68K}misc.c.o" "{ObjDir68K}ssh.c.o" "{ObjDir68K}sshcrc.c.o" "{ObjDir68K}sshdes.c.o" "{ObjDir68K}sshmd5.c.o" "{ObjDir68K}sshrand.c.o" "{ObjDir68K}sshrsa.c.o" "{ObjDir68K}sshsha.c.o" "{ObjDir68K}telnet.c.o" "{ObjDir68K}terminal.c.o" PuTTY 哪 {ondoBuild {Objects68K} Link -o {Targ} -d {Sym68K} {Objects68K} -t 'APPL' -c '????' "{Libraries}MathLib.o" #"{CLibraries}Complex.o" "{CLibraries}StdCLib.o" "{Libraries}MacRuntime.o" "{Libraries}IntEnv.o" "{Libraries}ToolLibs.o" "{Libraries}Interface.o" PuTTY 哪 {ondoBuild bjh21:putty:putty.r Rez bjh21:putty:putty.r -o {Targ} {Includes} -append "{ObjDir68K}mac.c.o" {ondoBuild mac.c {C} mac.c -o {Targ} {COptions} "{ObjDir68K}misc.c.o" {ondoBuild misc.c {C} misc.c -o {Targ} {COptions} "{ObjDir68K}ssh.c.o" {ondoBuild ssh.c {C} ssh.c -o {Targ} {COptions} "{ObjDir68K}sshcrc.c.o" {ondoBuild sshcrc.c {C} sshcrc.c -o {Targ} {COptions} "{ObjDir68K}sshdes.c.o" {ondoBuild sshdes.c {C} sshdes.c -o {Targ} {COptions} "{ObjDir68K}sshmd5.c.o" {ondoBuild sshmd5.c {C} sshmd5.c -o {Targ} {COptions} "{ObjDir68K}sshrand.c.o" {ondoBuild sshrand.c {C} sshrand.c -o {Targ} {COptions} "{ObjDir68K}sshrsa.c.o" {ondoBuild sshrsa.c {C} sshrsa.c -o {Targ} {COptions} "{ObjDir68K}sshsha.c.o" {ondoBuild sshsha.c {C} sshsha.c -o {Targ} {COptions} "{ObjDir68K}telnet.c.o" {ondoBuild telnet.c {C} telnet.c -o {Targ} {COptions} "{ObjDir68K}terminal.c.o" {ondoBuild terminal.c {C} terminal.c -o {Targ} {COptions} Revision-number: 42 Prop-content-length: 164 Content-length: 164 K 7 svn:log V 66 Initial version -- most of the Finder resources and the fatalbox. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T20:52:58.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.r Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 2451 Text-content-md5: bc3d40f14b8975056ff23e8cc7115b0e Content-length: 2571 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN糝婤嘐MD7㎎C丒M婫=橢M咲0嶩DH>朏>楳丱圫乨7D乻嘍凞侸咵係僁r凥俢僂侷揑俠丏 凢侶咲#D'婹7I丒倅凧僒圗俠N凞'係乨廌'咹俢圗8丳I1乂;塃僗H刪凟則丒剒D乻V乀乧D*扠匘則D卨Q剕刌5F?D倂E匭奃唊D乻E8D8H唜丗匟G唜D卨塅 r唘丠匭D汬丩刅丗8J丷E唒T6侱侸孌ELE侷僃坄孍坱凣坿僃坿匤坥凧G両2PLI梎L梤Di梎並梣J梚V桮刬 僅梊d榤丟 `楢H桸cG梱R檏R桽F檆RE榑侳9G業E歑T檋團;丗歒F榓U歰哸 丏凣歕JH+c!俆匛沖_P歋KT歯I渃`;GH9_>N桸嘩檉塃:I漮bM檆Q檏僗瀊P檏F4VR#W橵丷IY#L)FDIKO焄HP燖@@W檦T燳k=kY橳F P乕*E%aJ'L檈T梤H梚G\檣M5J@W 乂O6q凾@C乀@H>P)@AW}6O `:`橸M4K梂[:E╚凱 SN`7E.D 両ヾ丒G俆 Q=Y㎞凢>侤B﹕G,TT僨G>PD丼T僨E丼PH乫H7侱)PF亅T僨G亅凣僑D)咹G倀丗僒奅)揓區匞圚奆僒孎僒H"孠僐塅=朒7E>怓僃僂哬凣僑嘔嘋匘乫丒>哃噆G僑廕5咵厀/* $Id: mac.c,v 1.1.2.1 1999/02/19 21:35:12 ben Exp $ */ /* * -- miscellaneous Mac-specific routines #include QuickdrawFontMacWindowenuTextEditDialogstdlib.h> /* putty.h needs size_targ"" QDGlobals qd; int cold = 1main (argc, char **argv) { /* Init DrawGraf(&qd.thePort); Manager(TE(nilCursor0fatalbox("complete"); } voidconstfmt, ...va_list apStr255 stuffstart(ap, fmWe'd like to be a Pascal string[0] = vsprintf(()(&1]), apva_end(Param(, NULLStopAlert(128, exit(1 Revision-number: 44 Prop-content-length: 213 Content-length: 213 K 7 svn:log V 114 Now ignoring various Macish things too. (Is that how you spell "Macish"? Or is it "Mackish", or even "Maccish"?) K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T21:38:05.000000Z PROPS-END Node-path: putty-ben-mac-port Node-kind: dir Node-action: change Prop-delta: true Prop-content-length: 97 Content-length: 97 K 10 svn:ignore V 65 *.pdb *.ilk *.res *.RES *.pch *.rsp *.rsrc *.makeout .AppleDouble PROPS-END Node-path: putty-ben-mac-port/.cvsignore Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 91d2c7f274245107dac3e76f09767869 Text-content-length: 77 Text-content-md5: 545c2596ac03f388ae41530fbc5542df Content-length: 120 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 PROPS-END SVN$BBB*.pdb *.ilk *.res *.RES *.pch *.rsp *.rsrc *.makeout .AppleDouble Revision-number: 45 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 38 Various cleanups, mostly Mac-related. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T21:39:25.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: df2fce26410fbdb5c70d45ba7e69121b Text-content-length: 585 Text-content-md5: 7b4b53cfc018f3c00bcf534c6b1f79fc Content-length: 628 K 15 cvs2svn:cvs-rev V 7 1.4.2.1 PROPS-END SVN甞睩5c俛丠 a哾uv恱媝憁漒乲焇#ifdef macintosh #include typedef UInt32 DWORD; #endif /* macintosh */ #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0#ifdef macintosh typedef void *Context; /* Temporarily until I work out what it should really be */ #else /* not macintosh */ typedef HDC Context; #endif /* not macintosh */ #define SEL_NL { 13, 10 }#ifdef macintosh char *(*init) (char *host, int port, char **realhost); int (*msg)(void); #else /* not macintosh */#endif /* not macintosh */onst #ifndef macintosh#endif Revision-number: 46 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 58 Don\'t bother compiling bits I haven\'t got round to yet. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T21:44:14.000000Z PROPS-END Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 19d2fa70767243adfd9e290631bcc4fa Text-content-length: 310 Text-content-md5: 25e20450421ffab49bc1ff31db2b69b8 Content-length: 353 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN擾& / 丵+塙 圛# $Id: PuTTY.make,v 1.1.2.3 1999/02/19 21:44:14# "{ObjDir68K}ssh.c.o" # "{ObjDir68K}sshcrc.c.o" # "{ObjDir68K}sshdes.c.o" # "{ObjDir68K}sshmd5.c.o" # "{ObjDir68K}sshrand.c.o" # "{ObjDir68K}sshrsa.c.o" # "{ObjDir68K}sshsha.c.o" #pTTY' ## Revision-number: 47 Prop-content-length: 118 Content-length: 118 K 7 svn:log V 20 added SIZE resource K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T22:06:36.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: bc3d40f14b8975056ff23e8cc7115b0e Text-content-length: 496 Text-content-md5: 10c2802076e00c93c969f8bce651b6a8 Content-length: 539 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN糝 僕-*3/* $Id: putty.r,v 1.1.2.2 1999/02/19 22:06:36SIZE' (-1) { reserved, ignoreSuspendResumeEvents, reserved, cannotBackground, needsActivateOnFGSwitch, backgroundAndForeground, dontGetFrontClicks, ignoreAppDiedEvents, is32BitCompatible, notHighLevelEventAware, onlyLocalHLEvents, notStationeryAware, useTextEditServices, reserved, reserved, reserved, 65536, /* Minimum size */ 65536, /* Preferred size Revision-number: 48 Prop-content-length: 119 Content-length: 119 K 7 svn:log V 21 Now with added menus K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T23:03:29.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 27a1787d7c3b4dfd0132cb330214ffc8 Text-content-length: 309 Text-content-md5: 512b32a56cae9a77d831cbb52e25c921 Content-length: 352 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN(倇+>!乕侼匷/* $Id: mac.c,v 1.1.2.2 1999/02/19 23:03:29Handle menuBar; menuBar = GetNewMBar(128); if (menuBar == NULL) fatalbox("Unable to create menu bar."); SetMenuBar(menuBar); AppendResMenu(GetMenuHandle(128), 'DRVR'); /* adjustmenus */ DrawMenuBar(); Node-path: putty-ben-mac-port/putty.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 10c2802076e00c93c969f8bce651b6a8 Text-content-length: 541 Text-content-md5: 9dace4ff23e3a1740ca8903f5a13d688 Content-length: 584 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN胘  -僕僛3/* $Id: putty.r,v 1.1.2.3 1999/02/19 23:03:29Menu bar */ resource 'MBAR' (128, preload) { { 128, 129 } }; resource 'MENU' (128, preload) { 128, textMenuProc, 0b11111111111111111111111111111101, enabled, apple, { "About PuTTY", noicon, nokey, nomark, plain, "-", noicon, nokey, nomark, plain, } }; resource 'MENU' (129, preload) { 129, textMenuProc, 0b11111111111111111111111111111111, enabled, "File", { "Quit", noicon, "Q", nomark, plain, } }; Revision-number: 49 Prop-content-length: 157 Content-length: 157 K 7 svn:log V 59 OK, so why did I think a fatal alert box should be silent? K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T23:41:24.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 9dace4ff23e3a1740ca8903f5a13d688 Text-content-length: 71 Text-content-md5: 3a59c57036af69fb109a82fcf01f94e8 Content-length: 114 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN胘胔 1繾-俉/* $Id: putty.r,v 1.1.2.4 1999/02/19 23:41:24beep Revision-number: 50 Prop-content-length: 343 Content-length: 343 K 7 svn:log V 244 We now have an event loop, albeit one which ignores everything going on around it, then proclaims itself to be bored and leaves in a huff. I suspect this coulbe be turned into a satirical comment on someone, but I can't be bothered right now. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-19T23:51:21.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 512b32a56cae9a77d831cbb52e25c921 Text-content-length: 601 Text-content-md5: 2143070ace79db19065a1a3c3171d8d8 Content-length: 644 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN寀3乬+-1乕2噆/* $Id: mac.c,v 1.1.2.3 1999/02/19 23:51:21limits.h> #include #include /* putty.h needs size_t */ #include "putty.h" QDGlobals qd; int cold = 1; static void mac_startup(void); static void mac_eventloop(void); int main (int argc, char **argv) { mac_startup(); mac_eventloop(); } static void mac_startup(void} static void mac_eventloop(void) { Boolean gotevent; EventRecord event; int i; for (i = 0; i < 100; i++) { gotevent = WaitNextEvent(everyEvent, &event, LONG_MAX, NULL); } fatalbox("I'm bored. Revision-number: 51 Prop-content-length: 243 Content-length: 243 K 7 svn:log V 142 Use different window procedures for the About box and the Licence box. Should prevent the version string masking part of the licence text ;-) K 10 svn:author V 5 simon K 8 svn:date V 27 1999-02-20T18:12:47.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 68b03e759a938bcf531b0db262fd1eae Text-content-length: 134 Text-content-md5: cf05ea7ef155db67a59d9a3485d74199 Content-length: 173 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN偘 偝]蜰N蝫裏匸蛈佨K覷LicenceProc (HWND hwnd, UINT msg, return 1;} return 0; case WM_CLOSE: abtLicence Revision-number: 52 Prop-content-length: 197 Content-length: 197 K 7 svn:log V 99 We now have a fairly minimal Mac application. I'm about to try lashing in the terminal emulator... K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-20T22:10:34.000000Z PROPS-END Node-path: putty-ben-early-mac-port/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: bc60054c910b5809b643a6dc237eea1a Text-content-length: 619 Text-content-md5: c6678c65c325fa84e90733bc65a7c2a6 Content-length: 662 K 15 cvs2svn:cvs-rev V 7 1.4.2.1 PROPS-END SVN亝,亣*;"|凚 =圗丮塗 嘽漄3玹玁璲譈#include #include #ifndef macintosh #include #endif /* not macintosh */ #include "putty.h"macintosh static SOCKET s = INVALID_SOCKET; #endif#ifdef macintosh static void s_write (unsigned char *buf, int len) { panic("s_write not implemented"); } #else /* not macintosh */#endif /* not macintosh */ #ifdef macintosh static int s_read (unsigned char *buf, int len) { panic("s_read not implemented"); } #else /* not macintosh */#endif) : realloc(pktout.data, biglenunsigned(unsigned char *)(char *) Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 1fe77645c195b4368c61789055e369a6 Text-content-length: 85 Text-content-md5: 441aaa0a6d9976fe257d5414593bdd52 Content-length: 128 K 15 cvs2svn:cvs-rev V 7 1.5.2.1 PROPS-END SVN偅9偅fAA偅%#ifndef macintosh #include #endif /* not macintosh */ Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 25e20450421ffab49bc1ff31db2b69b8 Text-content-length: 298 Text-content-md5: 0ed594531882e9d29ae16257faf394fe Content-length: 341 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN&< 噠/乂 塼'# $Id: PuTTY.make,v 1.1.2.4 1999/02/20 22:10:33putty.r macresid.h Rez putty.r -o {Targ} {Includes} -append "{ObjDir68K}mac.c.o" {ondoBuild mac.c putty.h macresid.h {C} mac.c -o {Targ} {COptions} "{ObjDir68K}misc.c.o" {ondoBuild misc.c putty.h putty.h Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2143070ace79db19065a1a3c3171d8d8 Text-content-length: 4956 Text-content-md5: 1125026b111b15305678fa2d91475bf9 Content-length: 4999 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN寀癶')乗+1s俙.*僈)Il坈燰1奃/* $Id: mac.c,v 1.1.2.4 1999/02/20 22:10:33#include #include #include #include #include #include /* putty.h needs size_t */ #include "macresid.h"static void mac_event(EventRecord *); static void mac_contentclick(WindowPtr, EventRecord *); static void mac_updatewindow(WindowPtr); static void mac_keypress(EventRecord *); static int mac_windowtype(WindowPtr); static void mac_menucommand(long); static void mac_adjustcursor(void); static void mac_adjustmenus(void); static void mac_closewindow(WindowPtr); static void mac_zoomwindow(WindowPtr, short); static void mac_shutdownmApple), 'DRVR'); mac_adjustmenus(); DrawMenuBar(); InitCurso;;) { mac_adjustcursor(); gotevent = WaitNextEvent(everyEvent, &event, LONG_MAX, NULL); mac_adjustcursor(); if (gotevent) mac_event(&event); } } static void mac_event(EventRecord *event) { short part; WindowPtr window; Point pt; switch (event->what) { case mouseDown: part = FindWindow(event->where, &window); switch (part) { case inMenuBar: mac_adjustmenus(); mac_menucommand(MenuSelect(event->where)); break; case inSysWindow: SystemClick(event, window); break; case inContent: if (window != FrontWindow()) /* XXX: check for movable modal dboxes? */ SelectWindow(window); else mac_contentclick(window, event); break; case inGoAway: if (TrackGoAway(window, event->where)) mac_closewindow(window); break; case inDrag: /* XXX: moveable modal check? */ DragWindow(window, event->where, &qd.screenBits.bounds); break; case inGrow: break; case inZoomIn: case inZoomOut: if (TrackBox(window, event->where, part)) mac_zoomwindow(window, part); break; } break; case keyDown: case autoKey: mac_keypress(event); break; case activateEvt: /* FIXME: Do something */ break; case updateEvt: mac_updatewindow((WindowPtr)event->message); break; case diskEvt: if (HiWord(event->message) != noErr) { SetPt(&pt, 120, 120); DIBadMount(pt, event->message); } break; } } static void mac_contentclick(WindowPtr window, EventRecord *event) { short item; switch (mac_windowtype(window)) { case wTerminal: /* XXX: Do something. */ break; case wAbout: if (DialogSelect(event, &(DialogPtr)window, &item)) switch (item) { case wiAboutClose: mac_closewindow(window); break; case wiAboutLicence: /* XXX: Do something */ break; } break; } } static void mac_updatewindow(WindowPtr window) { switch (mac_windowtype(window)) { case wTerminal: /* XXX: DO something */ break; case wAbout: BeginUpdate(window); UpdateDialog(window, window->visRgn); EndUpdate(window); break; } } /* * Work out what kind of window we're dealing with. * Concept shamelessly nicked from SurfWriter. */ static int mac_windowtype(WindowPtr window) { int kind; if (window == NULL) return wNone; kind = ((WindowPeek)window)->windowKind; if (kind < 0) return wDA; else if (kind == userKind) return wTerminal; else return GetWRefCon(window); } /* * Handle a key press */ static void mac_keypress(EventRecord *event) { char key; if (event->what == keyDown && (event->modifiers & cmdKey)) { mac_adjustmenus(); mac_menucommand(MenuKey(event->message & charCodeMask)); } } static void mac_menucommand(long result) { short menu, item; Str255 da; menu = HiWord(result); item = LoWord(result); switch (menu) { case mApple: switch (item) { case iAbout: GetNewDialog(wAbout, NULL, (GrafPort *)-1); break; default: GetMenuItemText(GetMenuHandle(mApple), item, da); OpenDeskAcc(da); break; } break; case mFile: switch (item) { case iClose: mac_closewindow(FrontWindow()); break; case iQuit: mac_shutdown(); break; } break; } HiliteMenu(0); } static void mac_closewindow(WindowPtr window) { switch (mac_windowtype(window)) { case wDA: CloseDeskAcc(((WindowPeek)window)->windowKind); break; case wTerminal: /* FIXME: end session and stuff */ break; default: CloseWindow(window); break; } } static void mac_zoomwindow(WindowPtr window, short part) { /* FIXME: do something */ } /* * Make the menus look right before the user gets to see them. */ static void mac_adjustmenus(void) { } /* * Make sure the right cursor's being displayed. */ static void mac_adjustcursor(void) { SetCursor(&qd.arrow); } static void mac_shutdown(void) { ExitToShell( Node-path: putty-ben-mac-port/macresid.h Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 450 Text-content-md5: 74340b8b4bb7157ebb7183ef2625d2ae Content-length: 570 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN剎'DK朎@YDoDb侱=塂_D旿O*嘐丅I乄侳乧並丗僂,僂乣侱"K.塂D乼R凞乨J 嘐嶥LW丩燜俴L 咵丯#嶮:匩乪丠*侸F)Q侺G#奐2孞2H凚/* $Id: macresid.h,v 1.1.2.1 1999/02/20 22:10:34 ben Exp $ */ /* * -- Mac resource IDs This file is shared by C and Rez / Menu bar#define MBAR_Main 128mApple Fi9tem/* miAbout 1ClosQuit 3Window types ()wNone 0 /* Dummy value for no wDA 1Udesk accessoryFatalw29Licence 2Terminal 130131 Node-path: putty-ben-mac-port/putty.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 3a59c57036af69fb109a82fcf01f94e8 Text-content-length: 3206 Text-content-md5: fe93bbe0362581ae3a968fdc3e09979c Content-length: 3249 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN胔* 榋両籹c^並#丅t縚罦搎/* $Id: putty.r,v 1.1.2.5 1999/02/20 22:10:34 ben Exp $ */ /* PuTTY resources */ #define PICT_RezTemplateVersion 1 #include "Types.r" /* Get resource IDs we share with C code */ #include "macresid.hMBAR_Main, preload) { { mApple, mFile } }; resource 'MENU' (mApple, preload) { mApplemFile, preload) { mFile, textMenuProc, 0b11111111111111111111111111111101, enabled, "File", { "Close", noicon, "W", nomark, plain, "-", noicon, nokey, nomark, plain,wFatal, "fatalbox", purgeable) { {54, 67, 152, 435}, wFatal, beepStages, alertPositionMainScreen }; resource 'DITL' (wFatal/* "About" box */ resource 'DLOG' (wAbout, "about", purgeable) { { 0, 0, 120, 186 }, noGrowDocProc, visible, goAway, wAbout, /* RefCon -- identifies the window to PuTTY */ wAbout, /* DITL ID */ "About PuTTY", alertPositionMainScreen }; resource 'DITL' (wAbout, "about", purgeable) { { { 87, 116, 107, 173 }, Button { enabled, "Close" }, { 87, 13, 107, 103 }, Button { enabled, "View Licence" }, { 13, 13, 29, 173 }, StaticText { disabled, "PuTTY"}, { 42, 13, 74, 173 }, StaticText { disabled, "Mac Development\n 1997-9 Simon Tatham"}, } }; /* Licence box */ resource 'DLOG' (wLicence, "licence", purgeable) { { 0, 0, 300, 300 }, noGrowDocProc, visible, goAway, wLicence, wLicence, "PuTTY Licence", alertPositionParentWindowScreen }; type 'TEXT' { string; }; resource 'TEXT' (wLicence, "licence", purgeable) { "Copyright 1997-9 Simon Tatham\n" "Portions copyright Gary S. Brown and Eric Young\n\n" "Permission is hereby granted, free of charge, to any person " "obtaining a copy of this software and associated documentation " "files (the \"Software\"), to deal in the Software without " "restriction, including without limitation the rights to use, " "copy, modify, merge, publish, distribute, sublicense, and/or " "sell copies of the Software, and to permit persons to whom the " "Software is furnished to do so, subject to the following " "conditions:\n\n" "The above copyright notice and this permission notice shall be " "included in all copies or substantial portions of the Software.\n\n" "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, " "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF " "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND " "NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLE FOR " "ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF " "CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN " "CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE " "SOFTWARE." }; #if 0 resource 'DITL' (wLicence, "licence", purgeable) { { { 13, 23, 287, 277 }, Picture { enabled, wLicence } } }; resource 'PICT' (wLicence, "licence", purgeable) { { 0, 0, 274, 254 }, VersionTwo { { LongText { { 16, 0 }, "Copyright 1997-9 Simon Tatham" }, LongText { { 32, 0 }, "Portions copyright Gary S. Brown and Eric Young" }, } } }; #endif Node-path: putty-ben-mac-port/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: b621bce4cc8aea4a0ff6457f7fae93e3 Text-content-length: 168 Text-content-md5: f8b180987bb109ff14131d623951101e Content-length: 211 K 15 cvs2svn:cvs-rev V 7 1.2.2.1 PROPS-END SVN仛t仛X 仚G-#ifndef macintosh #include #include #endif /* not macintosh */ #include #include #include "putty.h" Revision-number: 53 Prop-content-length: 431 Content-length: 431 K 7 svn:log V 332 End of a night's work. Not a very useful state, but this is my branch and I'll do what I want with it. Anyway, made a start on a Mac display for the terminal emulator, and the enumeration of the global variables that will have to die. Oh, and the licence is now in a TEXT resource -- I just have to work out how to display it... K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-20T23:55:55.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 1125026b111b15305678fa2d91475bf9 Text-content-length: 149 Text-content-md5: ff62c4e8bb24e3e77561ab18c69736c4 Content-length: 192 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN癶盦y7+嘪/* $Id: mac.c,v 1.1.2.5 1999/02/20 23:55:55static void mac_newsessioNew: mac_newsession(); break; Node-path: putty-ben-mac-port/macresid.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 74340b8b4bb7157ebb7183ef2625d2ae Text-content-length: 111 Text-content-md5: 545ff3006e10e2b997f11f9b1c35fdf2 Content-length: 154 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN剎 Y0俥/* $Id: macresid.h,v 1.1.2.2 1999/02/20 23:55:55New 1 #define iClose 2 #define iQuit 4 Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 7b4b53cfc018f3c00bcf534c6b1f79fc Text-content-length: 472 Text-content-md5: 8b27694ddde42b4466996d3ac82df3b5 Content-length: 515 K 15 cvs2svn:cvs-rev V 7 1.4.2.2 PROPS-END SVN睩 傽孧傽孠struct session { /* Display state */ int rows, cols, savelines; int font_width, font_height; int has_focus; /* Buffers */ unsigned char inbuf[INBUF_SIZE]; int inbuf_head, inbuf_reap; unsigned char outbuf[OUTBUF_SIZE]; int outbuf_head, outbuf_reap; /* Emulator state */ int app_cursor_keys, app_keypad_keys; /* Backend */ Backend *back; /* Config that created this session */ Config cfg; } Node-path: putty-ben-mac-port/putty.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: fe93bbe0362581ae3a968fdc3e09979c Text-content-length: 342 Text-content-md5: a09c6511dcad4ef76d44a3eed6908cea Content-length: 385 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN*"10-EN纑儅?>搗4/* $Id: putty.r,v 1.1.2.6 1999/02/20 23:55:55New Session" noicon, "N", nomark, plain, "Close", noicon, "W", Terminal window */ resource 'WIND' (wTerminal, "terminal", purgeable) { { 0, 0, 0, 0 }, zoomDocProc, invisible, goAway, 0x0, "untitled" staggerParentWindowScreen Revision-number: 54 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 51 Start of a Mac front-end to the terminal emulator. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-20T23:57:58.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 719 Text-content-md5: adcb93d8cc5b230b41a3d27085dd9ff5 Content-length: 839 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN嘳 8滵 獿3哊I孠b匘u嘍獷僄丏>團B匛C丒乊S 匛乊禗0E乸婦5嘒乶侱)昁俥D5凢乶僁侽侳乶僁侽侹 睭侴F乭F俿凢B僄塈乛僄俥團乭G俥DD-咷俥D E凴丩刔D5丏!丒/丯9J凷T乽H乂孍匑I匛刋F俶G俥E匵匥卙丏剓HG俥D匼F?僄匢G俥D刉圚匟嘖-咾=圛?侾唊嘒4僅ECF侹2丗 G2F哬咵 /* * macterm.c -- Macintosh inal front-end */ #include stdlib"macresid.h"putty struct_session { short fnum; int fsize; } voidnew() { Ptr w;*s; /* This should obviously be initialised by other means = smalloc(of(*s))-> = GetFNum("\pMonaco" = 9row24col80XXX: non-Color-QuickDraw? Own storage management?NewC(wT, NULL, ()-1SetPort(font(s((,)FMetricRec mTextFace(0Ss(&_width =.widMaxheightascent +deleadingize *,, TRUE Revision-number: 55 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 67 putty.r renamed to mac_res.r for consistency with Windows version. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-21T10:29:13.000000Z PROPS-END Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 0ed594531882e9d29ae16257faf394fe Text-content-length: 102 Text-content-md5: 582270634dd247c3550ca172c3246f0c Content-length: 145 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN<怈 P噠/噑圛# $Id: PuTTY.make,v 1.1.2.5 1999/02/21 10:29:12mac_res.r macresid.h Rez mac_res Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 4684 Text-content-md5: caefe2ac31cea4e2f25245b2d67fe4d9 Content-length: 4804 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN$$OD9盌 侱<僆E橠9Jw奅岲h丣E丒O婫?橢O咲嶪G'朏@楳7圫侺9D俒嘍俵凞2咵;僁乑僂2D俒僂1僁pE/嘔僇丏俿凢0咲 Dp婹I俰丒僡凧<圗僇N倉塇俉塃橣2N*廏1桭2両卨嘗卭慓匬F8嘗匥慓卽嘍僒E匥凣唙婰匥僁僨咾扷匬\嘺匞0奍儃K 塈N倉凞係侺岴5嘓億圗圽丳倇I圲乂坃僁<侲凘H 凟丒D俒V#乀侹D塏扠儁匘DQ 刌圷F'D僞E塽奃D俒E圽D圽H丗塴GD塅0r丠塽D倉汬乵丩坺丗塡J:ET圸侱2孌俵ENE1僃孍凣!僃!匤凧5G5両峍P匛_4P瀢K7TI`燺G+H漖_燽N況嘩 塃擽Ib8MQ僗PF燲V4RW漽丷燗I4Y淕LF,D)I9K=OH5P@@&W"Tkk4Y漻F擠P=乕汵Ea=J擪L TH G \MJ @W乂Oq凾@C2乀╭@H゜P㎝@A W4}O`玘`潁M瀀K泏[玘E凱-S*N8`玔E璕D桪両丒?G玥俆0QY璻凢産侤BG璓T甡I,V0h璫l甤侸#^瓹丮$@Bd)W-d璬O痏@IV%^盫b X獵H.凨砮i玌嘍砮僁 KT砪Sq珺X潁_#僘礖F.[礘@u/b矰W矰a禲s珇g1JL瓂J琻L濽V稩[QG X(@{ @V稾@V秪@V礚~"F倇G丮圫乥圗OJ:嘍7咲僷凥俉僁6塒抙嘓絑O絀G絑E塽凞 凢僝6侳侱係G1D坹G塅?丏0侱孊嘍圖紻凞0_E塿W絠D絚RE縣@L丏絚丣緉凞塯凧,凟-O匧俈纖d(哅)俆纖J縇D乺丏俹桬F乀丱(圗凞凲'嘍梮匘婮G翺奃嘫奃6D紺哋團僁奼c翺I宱丏肂G宻乕寋慏婮嘍緎侷綷咲*E.L弞F侳%僂.E3丏嘖F9僈腁M腘丠腬塉)^膟丒橵並攖匘 哋(凞肍H舙凣舚P耟F絋D)F艪侳嘕*匤唖咷.丟 塅塼嶦舲K-僃緒丏O(凞肍E緓凟8S侺H=侱莮侶艻哅芔Y芼G荳G怗G舮侴?G儅L=D肂僆 K緓G繲nb荴匘聎咲聎侱艻I2I綶丟 E G蓎丠乊 婭(E5丏 JL膟両 G俕丗+侳蕂D0`蕐D俿丣僒僁怐MG蔨[=G蔨凣蔩[莊丏(侷艸mH*SG俖H蔨S!WF"匞6咶 J:F蚽g(婾薭侳塼凞6僆?奃D<孒蝅G俍D舚F塝廌凞%嘍萮婫蝊婨蝞D%塂E咵乛凟俵EG蝊嘍 僄僂螿嘐H;E'D緕G蝊侱蛕丏6侳xD蟦H衊凣 D E蜝丏萮侱0F俍D蝟嘍6丒螻圖 奃袸僁(咹+凞蝞D萙E蟳J蠻E裧D萮丏舚丟蟉E"侴+G,I蠾婨匛裑凞萮D咲蟦I,侲$侾E坲凨蝞匜E蟶EF塝G,嘔4Gx丏蠴D覲H褆丏裓圗倂E蝚O丵縄*盌-G訷僁詀G,旸詚淗8篍誜G,D詄孌3嘐0G認僂諾孠5嶪諹奃咲訳侲詝並侳謞D訯E&I1侲&侲譪F諽圖=D-H6G2丗倇匰7f*H蔵丏豣D蓒僂 僂KH6俇縆D\iH=丏0僅艻丟l僁6丟D刾G侱D艸avisRgn)->rgnBBox.left, (*window->visRgn)->rgnBBox.top, (*window->visRgn)->rgnBBox.right, (*window->visRgn)->rgnBBox.bottom); EndUpdate(window); Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: caefe2ac31cea4e2f25245b2d67fe4d9 Text-content-length: 289 Text-content-md5: a70228142abd95df0e225217d0d87a7e Content-length: 332 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN$9亀嘰/1匷纊P?廍薩/* $Id: mac_res.r,v 1.1.2.2 1999/02/21 18:09:411024 * 1024, /* Minimum size */ 1024 * 1024,011, enabled, "File", { "New Session",200, 200 }, zoomDocProc, invisible, goAway, 0x0, "untitled","Experimantal Mac Por Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: adcb93d8cc5b230b41a3d27085dd9ff5 Text-content-length: 3682 Text-content-md5: 9e81e80dd07a961b238a3047afc469d2 Content-length: 3725 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN嘳淧B淧Types.h> #include #include #include #include #include #include #include "macresid.h" #include "putty.h" #include "mac.h" struct mac_session { short fontnum; int font_ascent; WindowPtr(window); }; static void mac_initfont(struct mac_session *); /* Temporary hack till I get the terminal emulator supporting multiple sessions */ static struct mac_session *onlysession; void mac_newsession(void) { struct mac_session *s; /* This should obviously be initialised by other means */ s = smalloc(sizeof(*s)); strcpy(cfg.font, "Monaco"); cfg.fontisbold = 0; cfg.fontheight = 9; onlysession = s; /* XXX: non-Color-QuickDraw? Own storage management? */ if (mac_qdversion == gestaltOriginalQD) s->window = GetNewWindow(wTerminal, NULL, (WindowPtr)-1); else s->window = GetNewCWindow(wTerminal, NULL, (WindowPtr)-1); SetWRefCon(s->window, (long)s); term_init(); term_size(24, 80, 100); mac_initfont(s); ShowWindow(s->window); } static void inbuf_putc(int c) { inbuf[inbuf_head] = c; inbuf_head = (inbuf_head+1) & INBUF_MASK; } static void inbuf_putstr(const char *c) { while (*c) inbuf_putc(*c++); } static void mac_initfont(struct mac_session *s) { Str255 macfont; FontInfo fi; SetPort(s->window); macfont[0] = sprintf((char *)&macfont[1], "%s", cfg.font); GetFNum(macfont, &s->fontnum); TextFont(s->fontnum); TextFace(cfg.fontisbold ? bold : 0); TextSize(cfg.fontheight); GetFontInfo(&fi); font_width = fi.widMax; font_height = fi.ascent + fi.descent + fi.leading; s->font_ascent = fi.ascent; SizeWindow(s->window, cols * font_width, rows * font_height, true); inbuf_putstr("Hello,\007 world\007"); term_out(); } /* * Call from the terminal emulator to draw a bit of text * * x and y are text row and column (zero-based) */ void do_text(struct mac_session *s, int x, int y, char *text, int len, unsigned long attr) { int style = 0; SetPort(s->window); TextFont(s->fontnum); if (cfg.fontisbold || (attr & ATTR_BOLD) && !cfg.bold_colour) style |= bold; if (attr & ATTR_UNDER) style |= underline; TextFace(style); TextSize(cfg.fontheight); TextMode(srcCopy); SetFractEnable(FALSE); /* We want characters on pixel boundaries */ MoveTo(x * font_width, y * font_height + s->font_ascent); DrawText(text, 0, len); } /* * Call from the terminal emulator to get its graphics context. * I feel this should disappear entirely (and do_text should take * a Session as an argument. Simon may disagree. */ struct mac_session *get_ctx(void) { return onlysession; } /* * Presumably this does something in Windows */ void free_ctx(struct mac_session *ctx) { } /* * Set the scroll bar position */ void set_sbar(int total, int start, int page) { /* Do something once we actually have a scroll bar */ } /* * Beep */ void beep(void) { SysBeep(30); } /* * Set icon string -- a no-op here (WIndowshade?) */ void set_icon(char *icon) { } /* * Set the window title */ void set_title(char *title) { Str255 mactitle; mactitle[0] = sprintf((char *)&mactitle[1], "%s", title); SetWTitle(onlysession->window, mactitle); } /* * Resize the window at the emulator's request */ void request_resize(int w, int h) { /* XXX: Do something */ } /* * Set the logical palette */ void palette_set(int n, int r, int g, int b) { /* XXX: Do something */ } /* * Reset to the default palette */ void palette_reset(void) { /* XXX: Do something */ } Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 8b27694ddde42b4466996d3ac82df3b5 Text-content-length: 142 Text-content-md5: 4c35cac5e88577138d19ea5d07be5aee Content-length: 185 K 15 cvs2svn:cvs-rev V 7 1.4.2.3 PROPS-END SVN !b 噊俷塤(2孾擲5struct mac_sessionstruct mac_session; typedef struct mac_session *Context;typedef struct Session; Revision-number: 57 Prop-content-length: 154 Content-length: 154 K 7 svn:log V 56 Added mac.h for stuff that's only used by the Mac port. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-21T18:11:35.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 154 Text-content-md5: 035b80757c65074279da4be728a869da Content-length: 274 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN$y嶥綨;孌婬^凟j咲t丏/* * mac.h --intosh-specific declarations */ #ifndef _PUTTY_MAC_H #define extern long_qdversion;voidnewses(); #endif Revision-number: 58 Prop-content-length: 250 Content-length: 250 K 7 svn:log V 151 Most attributes work now. Palette changes aren't yet done (but should be easy). Character-set attributes aren't done. QuickDraw is too clever by half. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-21T22:05:00.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 9e81e80dd07a961b238a3047afc469d2 Text-content-length: 3522 Text-content-md5: 0335560519f9484ed419fdba31a38466 Content-length: 3565 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN$>歺乄丮倆塳俴卹卽圱4乲巖 怺侶抅嘚%乹 RGBColor defpal[24]; RGBColor palette[24]; }; static void mac_initfont(struct mac_session *); static void mac_initpalette int i; /* This should obviously be initialised by other means */ s = smalloc(sizeof(*s)); cfg.bksp_is_delete = TRUE; cfg.rxvt_homeend = FALSE; cfg.linux_funkeys = FALSE; cfg.app_cursor = FALSE; cfg.app_keypad = FALSE; cfg.savelines = 100; cfg.dec_om = FALSE; cfg.wrap_mode = cfg.lfhascr = FALSE; cfg.win_name_always = FALSE; cfg.width = 80; cfg.height = 24; strcpy(cfg.font, "Monaco"); cfg.fontisbold = 0; cfg.fontheight = 9; cfg.vtmode = VT_POORMAN; cfg.try_palette = FALSE; cfg.bold_colour = TRUE; for (i = 0; i < 22; i++) { static char defaults[22][3] = { {187, 187, 187}, {255, 255, 255}, {0, 0, 0}, {85, 85, 85}, {0, 0, 0}, {0, 255, 0}, {0, 0, 0}, {85, 85, 85}, {187, 0, 0}, {255, 85, 85}, {0, 187, 0}, {85, 255, 85}, {187, 187, 0}, {255, 255, 85}, {0, 0, 187}, {85, 85, 255}, {187, 0, 187}, {255, 85, 255}, {0, 187, 187}, {85, 255, 255}, {187, 187, 187}, {255, 255, 255} }; cfg.colours[i][0] = defaults[i][0]; cfg.colours[i][1] = defaults[i][1]; cfg.colours[i][2] = defaults[i][2]; }mac_initpalette\033[1mBold\033[m \033[2mfaint\033[m \033[3mitalic\033[m \033[4mu_line\033[m " "\033[5mslow bl\033[m \033[6mfast bl\033[m \033[7minverse\033[m \033[8mconceal\033[m " "\033[9mstruck\033[m \033[21mdbl ul\033[m\015\012"); term_out(); inbuf_putstr("\033[30mblack \033[31mred \033[32mgreen \033[33myellow " "\033[34mblue \033[35mmagenta \033[36mcyan \033[37mwhite\015\012"); term_out(); inbuf_putstr("\033[1m\033[30mblack \033[31mred \033[32mgreen \033[33myellow " "\033[1m\033[34mblue \033[35mmagenta \033[36mcyan \033[37mwhite\015\012"); term_out(); inbuf_putstr("\033[37;44mwhite on blue \033[32;41mgreen on red\015\012"); term_out(); } /* * Set up the default palette, then call palette_reset to transfer * it to the working palette (should the emulator do this at * startup? */ static void mac_initpalette(struct mac_session *s) { int i; static const int ww[] = { 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 0, 1, 2, 3, 4, 4, 5, 5 }; for (i=0; i<24; i++) { int w = ww[i]; s->defpal[i].red = cfg.colours[w][0] * 0x0101; s->defpal[i].green = cfg.colours[w][1] * 0x0101; s->defpal[i].blue = cfg.colours[w][2] * 0x0101; } palette_reset(); } int bgcolour, fgcolour; RGBColor rgbfore, rgbbackif (attr & ATTR_REVERSE) { bgcolour = ((attr & ATTR_FGMASK) >> ATTR_FGSHIFT) * 2; fgcolour = ((attr & ATTR_BGMASK) >> ATTR_BGSHIFT) * 2; } else { fgcolour = ((attr & ATTR_FGMASK) >> ATTR_FGSHIFT) * 2; bgcolour = ((attr & ATTR_BGMASK) >> ATTR_BGSHIFT) * 2; } if ((attr & ATTR_BOLD) && cfg.bold_colour) fgcolour++; RGBForeColor(&s->palette[fgcolour]); RGBBackColor(&s->palette[bgcolour]) int i; struct mac_session *s = onlysession; for (i = 0; i < 24; i++) { s->palette[i].red = s->defpal[i].red; s->palette[i].green = s->defpal[i].green; s->palette[i].blue = s->defpal[i].blue; } term_invalidate(); } Revision-number: 59 Prop-content-length: 187 Content-length: 187 K 7 svn:log V 89 Slight optimisation of do_text so we don't do anything if the entire string's invisible. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-21T23:49:04.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 0335560519f9484ed419fdba31a38466 Text-content-length: 687 Text-content-md5: 6cfac574ba9f1069f21146e1c611cbb5 Content-length: 730 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN$#  RgnHandle textregion, intersection; Rect textrect; SetPort(s->window); #if 0 /* First check this text is relevant */ textregion = NewRgn(); SetRectRgn(textregion, x * font_width, (x + len) * font_width, y * font_height, (y + 1) * font_height); SectRgn(textregion, s->window->visRgn, textregion); if (EmptyRgn(textregion)) { DisposeRgn(textregion); return; } #else /* alternatively */ textrect.top = y * font_height; textrect.bottom = (y + 1) * font_height; textrect.left = x * font_width; textrect.right = (x + len) * font_width; if (!RectInRgn(&textrect, s->window->visRgn)) return; #endif Revision-number: 60 Prop-content-length: 242 Content-length: 242 K 7 svn:log V 143 Now uses the Palette Manager for everything. Unfortunately this seems to have killed colour entirely. It was working earlier today. Really! K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-24T01:29:10.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 1ce0efeb8fb6ae827ec47bb31fceaccb Text-content-length: 192 Text-content-md5: 461d00da38a809571fee505c7236df3a Content-length: 235 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN.6漥+,濻.廡/* $Id: mac.c,v 1.1.2.7 1999/02/24 01:29:10 case wLicence: /* Do something */ if (GetWVariant(window) == zoomDocProc) return wTerminal; Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: a70228142abd95df0e225217d0d87a7e Text-content-length: 1964 Text-content-md5: 96a16a249f0b377882a1df072dac9fb3 Content-length: 2007 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN96巎[/孮;僩(抶)俁>蔖T{;妎虳/* $Id: mac_res.r,v 1.1.2.3 1999/02/24 01:29:10#include "Palett355 0000 4505 0000 5A05 0000 2405" $"0000 4A85 0001 9005 0002 23F9 0004 7C01" $"0018 0201 7FA0 0C7D 801F 1001 9FE2 2001" $"A00C DFFE AA89 2002 A012 3FFE A82C 0000" $"A052 0000 AA6PREF_pltt_IDresource 'pltt' (wTerminal, "terminal", purgeable) { { 0x0000, 0x0000, 0x0000, pmTolerant, 0x2000, /* black */ 0x5555, 0x5555, 0x5555, pmTolerant, 0x2000, /* bright black */ 0xbbbb, 0x0000, 0x0000, pmTolerant, 0x2000, /* red */ 0xffff, 0x5555, 0x5555, pmTolerant, 0x2000, /* bright red */ 0x0000, 0xbbbb, 0x0000, pmTolerant, 0x2000, /* green */ 0x5555, 0xffff, 0x5555, pmTolerant, 0x2000, /* bright green */ 0xbbbb, 0xbbbb, 0x0000, pmTolerant, 0x2000, /* yellow */ 0xffff, 0xffff, 0x0000, pmTolerant, 0x2000, /* bright yellow */ 0x0000, 0x0000, 0xbbbb, pmTolerant, 0x2000, /* blue */ 0x5555, 0x5555, 0xffff, pmTolerant, 0x2000, /* bright blue */ 0xbbbb, 0x0000, 0xbbbb, pmTolerant, 0x2000, /* magenta */ 0xffff, 0x5555, 0xffff, pmTolerant, 0x2000, /* bright magenta */ 0x0000, 0xbbbb, 0xbbbb, pmTolerant, 0x2000, /* cyan */ 0x5555, 0xffff, 0xffff, pmTolerant, 0x2000, /* bright cyan */ 0xbbbb, 0xbbbb, 0xbbbb, pmTolerant, 0x2000, /* white */ 0xffff, 0xffff, 0xffff, pmTolerant, 0x2000, /* bright white */ 0xbbbb, 0xbbbb, 0xbbbb, pmTolerant, 0x2000, /* default fg */ 0xffff, 0xffff, 0xffff, pmTolerant, 0x2000, /* default bold fg */ 0x0000, 0x0000, 0x0000, pmTolerant, 0x2000, /* default bg */ 0x5555, 0x5555, 0x5555, pmTolerant, 0x2000, /* default bold bg */ 0x0000, 0x0000, 0x0000, pmTolerant, 0x2000, /* cursor bg */ 0x0000, 0x0000, 0x0000, pmTolerant, 0x2000, /* bold cursor bg */ 0x0000, 0xffff, 0x0000, pmTolerant, 0x2000, /* cursor fg */ 0x0000, 0xffff, 0x0000, pmTolerant, 0x2000, /* bold cursor fg */ }3, 107, 17ental Mac Port\n 1997-9 Simon Tatham"}, } }; /* Licence box */ resource 'WIND Node-path: putty-ben-mac-port/macresid.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 545ff3006e10e2b997f11f9b1c35fdf2 Text-content-length: 262 Text-content-md5: be7f37402c09e552f21126fb99665d2e Content-length: 305 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN乺+0丅/* $Id: macresid.h,v 1.1.2.3 1999/02/24 01:29:101 /* Dummy value for desk accessory */ #define wFatal 128 #define wAbout 129 #define wiAboutLicence 1 #define wTerminal 130 #define wLicence 131 /* Preferences */ #define PREF_pltt_ID 1024 Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 6cfac574ba9f1069f21146e1c611cbb5 Text-content-length: 2182 Text-content-md5: 3adabfdafe0175ab230d7757392cb161 Content-length: 2225 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN#=b9R乬&;扡 M侸廻 1+T乤'凙1*=ww秏U穥卻Palette fontnum; int font_ascent; WindowPtr window; PaletteHandle palettecfg.colours = GetNewPalette(PREF_pltt_ID); onlysession = s; /* XXX:/* Set to TRUE to get palette updates in the background. */ SetPalette(s->window, s->palette, FALSE); ShowWindow(s->window} static void mac_initpalette(struct mac_session *s) { s->palette = NewPalette(0, NULL, 0, 0); CopyPalette(cfg.colours, s->palette, 0, 0, (*cfg.colours)->pmEntries); }ect textrect; SetPort(s->window); /* First check this text is relevant /* RGBForeColor(&s->palette[fgcolour]); */ /* XXX Non-Color-QD version */ /* RGBBackColor(&s->palette[bgcolour]); */ PmForeColor(fgcolour); PmBackColor(bgcolour); SetFractEnable(FALSE); /* We want characters on pixel boundaries */ MoveTo(textrect.left, textrect.top + s->font_ascent); DrawText(text, 0, len); /* Tell the window manager about it in case this isn't an update */ ValidRect(&textrect /* * XXX We should indicate the relevant window and/or use the * Notification Manager */ } /* * Set icon string -- a no-op here (Wi struct mac_session *s = onlysession; mactitle[0] = sprintf((char *)&mactitle[1], "%s", title); SetWTitle(scols = w; rows = h; mac_initfont(onlysession); RGBColor col; struct mac_session *s = onlysession; static const int first[21] = { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15, 16, 17, 18, 20, 22 }; col.red = r * 0x0101; col.green = g * 0x0101; col.blue = b * 0x0101; SetEntryColor(s->palette, first[n], &col); if (first[n] >= 18) SetEntryColor(s->palette, first[n]+1, &col); ActivatePalette(s->window); } /* * Reset to the default palette */ void palette_reset(void) { struct mac_session *s = onlysession; if (mac_qdversion == gestaltOriginalQD) return; CopyPalette(cfg.colours, s->palette, 0, 0, (*cfg.colours)->pmEntries); ActivatePalette(s->window); /* Palette Manager will generate update events as required. */ } Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4c35cac5e88577138d19ea5d07be5aee Text-content-length: 176 Text-content-md5: 4018e2e8ebe08a3f4f8fed7fff34a39a Content-length: 219 K 15 cvs2svn:cvs-rev V 7 1.4.2.4 PROPS-END SVN  沒 #include window);if (mac_qdversion == gestaltOriginalQD) return; s->palette = NewPalette((*cfg.colours)->pmEntries, NULL, pmCourteous, 0); if (s->palette == NULL) fatalbox("Unable to create palette" Revision-number: 62 Prop-content-length: 353 Content-length: 353 K 7 svn:log V 254 Right, we now have: * The ability to load the configuration from the current resource file (ie the application for now). * A scroll bar and size box that look right, even if they don't actually _do_ anything yet. * A load of other minor tweaks. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-28T02:38:41.000000Z PROPS-END Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: a34832e6060ccb3eb1187b02fc2b095d Text-content-length: 150 Text-content-md5: bbab44cc4a007d6f7d602e422c52bc4e Content-length: 193 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN慙扽y/哵&G噏塠# $Id: PuTTY.make,v 1.1.2.7 1999/02/28 02:38:40cfgcfg.c.o" {ondoBuild maccfg.c putty.h mac.h macresid.h {C} maccfg Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 461d00da38a809571fee505c7236df3a Text-content-length: 750 Text-content-md5: 42d00990d3514e907e18e504c9876378 Content-length: 793 K 15 cvs2svn:cvs-rev V 7 1.1.2.8 PROPS-END SVN6竰4.丷*俉乶8<嘚卆俀)[檌濶搘?/* $Id: mac.c,v 1.1.2.8 1999/02/28 02:38:4Appearancelong mac_appractivatewindow(WindowPtr, Boolean/* ... and the Appearance Manager? */ if (Gestalt(gestaltAppearanceVersion, &mac_apprversion) != noErr) if (Gestalt(gestaltAppearanceAttr, NULL) == noErr) mac_apprversion = 0x0100; else mac_apprversion = 0; /* We've been tested with the Appearance Manager */ if (mac_apprversion != 0) RegisterAppearanceClient() mac_activatewindow((WindowPtr)event->message, (event->modifiers & activeFlag) != 0);activatewindow(WindowPtr window, Boolean active) { switch (mac_windowtype(window)) { case wTerminal: mac_activateterm(window, active);mac_updateterm Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 035b80757c65074279da4be728a869da Text-content-length: 284 Text-content-md5: ca5d114ec925de2fec4cd85338778a51 Content-length: 327 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN$俰 _ #include #include extern long mac_qdversion; /* from macterm.c */ extern void mac_newsession(void); extern void mac_activateterm(WindowPtr, Boolean); extern void mac_updateterm(WindowPtr); extern void mac_loadconfig(Config *); #endif Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: e369a157c42c90f9c6b186721d82c644 Text-content-length: 10053 Text-content-md5: 2aa8691d295cee1bffcc3fb078bf305e Content-length: 10096 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN亙v?蛓w侻3<抮奜o觓{乕誵.譫媏/* $Id: mac_res.r,v 1.1.2.5 1999/02/28 02:38:40 ben Exp $ */ /* PuTTY resources */ #include "Types.r" #include "Dialog'pTTY' is now registered with Apple as PuTTY's signature version. " "Copyright Simon Tatham 1997-93FFE 00004001 00004FF9 00005005" $"00005355 00004505 00005A05 00002405" $"00004A85 00019005 000223F9 00047C01" $"00180201 7FA00C7D 801F1001 9FE22001" $"A00CDFFE AA892002 A0123FFE A82C0000" $"A0520000 AA6A0000 A00A0000 9FF20000" $"80020000 80020000 80FA0000 80020000" $"80020000 7FFC0000 40040000 7FFC", /* [2] */ $"00003FFE 00007FFF 0000 7FFF 00007FFF" $"00007FFF 00007FFF 0000 7FFF 00007FFF" $"00007FFF 00007FFF 0000 7FFF 00007FFF" $"00007FFF 7FFC7FFF FFFE 7FFF FFFE7FFF" $"FFFE3FFE FFFE3FFE FFFE 3FFE FFFE0000" $"FFFE0000 FFFE0000 FFFE 0000 FFFE0000" $"FFFE0000 FFFE0000 FFFE 0000 FFFE0000" $"FFFE0000 7FFCFC00 10000600 10000500 1FFFFC80" $"10000440 10000420 1FFFFFF0 10000010" $"13FC0F90 1C03F0F0 15FA8090 150A8090" $"1D0B80F0 150A8050 15FA8050 1C038070" $"143A8050 14028050 1FFFABF0 12048110" $"13FCFF10 1AAAAAB0 10000010 17FFFFD0" $"14000050 15252250 15555550 15252250" $"14000050 17FFFFD0 10000010 1FFFFFF0", /* [2] */ $"1FFFFC00 1FFFFE00 1FFFFF00 1FFFFF80" $"1FFFFFC0 1FFFFFE0 1FFFFFF0 1FFFFFF0" $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0" $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0" $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0" $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0" $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0" $"1FFFFFF0 1FFFFFF0 1FFFFFF0 1FFFFFF0" } }; resource 'icl4' (130, purgeable) { $"000FFFFFFFFFFFFFFFFFFF0000000000" $"000F00000000000000000FF000000000" $"000F00000000000000000FCF00000000" $"000FFFFFFFFFFFFFFFFFFFCCF0000000" $"000F00000000000000000FCCCF000000" $"000F00000000000000000FCCCCF00000" $"000FFFFFFFFFFFFFFFFFFFFFFFFF0000" $"000F00000000000000000000000F0000" $"000F00FFFFFFFF000000FFFFF00F0000" $"000FFFCCCCCCCCFFFFFFCCCCFFFF0000" $"000F0FCEEEEECCF0FCCCCCCCF00F0000" $"000F0FCE0D0D0CF0FCCCCCCCF00F0000" $"000FFFCED0D0CCFFFCCCCCCCFFFF0000" $"000F0FCE0D0D0CF0FCCCCCCCCF0F0000" $"000F0FCCC0C0CCF0FCCCCCCCCF0F0000" $"000FFFCCCCCCCCFFFCCCCCCCCFFF0000" $"000F0FCCCCFFFCF0FCCCCCCCCF0F0000" $"000F0FCCCCCCCCF0FCCCCCCCCF0F0000" $"000FFFFFFFFFFFFFFDDDDDDFFFFF0000" $"000F00FCCDDEEF00FDDDDDDF000F0000" $"000F00FFFFFFFF00FFFFFFFF000F0000" $"000F0C0C0C0C0C0C0C0C0C0C0C0F0000" $"000FC0C0C0C0C0C0C0C0C0C0C0CF0000" $"000F0FFFFFFFFFFFFFFFFFFFFF0F0000" $"000FCF0000000000000000000FCF0000" $"000F0F0F00F00F0F00F000F00F0F0000" $"000FCF0F0F0F0F0F0F0F0F0F0FCF0000" $"000F0F0F00F00F0F00F000F00F0F0000" $"000FCF0000000000000000000FCF0000" $"000F0FFFFFFFFFFFFFFFFFFFFF0F0000" $"000FC0C0C0C0C0C0C0C0C0C0C0CF0000" $"000FFFFFFFFFFFFFFFFFFFFFFFFF" }; resource 'icl8' (130, purgeable) { $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000" $"000000FF0000000000000000000000000000000000FFFF000000000000000000" $"000000FF0000000000000000000000000000000000FFF6FF0000000000000000" $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6F6FF00000000000000" $"000000FF0000000000000000000000000000000000FFF6F6F6FF000000000000" $"000000FF0000000000000000000000000000000000FFF6F6F6F6FF0000000000" $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000" $"000000FF0000000000000000000000000000000000000000000000FF00000000" $"000000FF0000FFFFFFFFFFFFFFFF000000000000FFFFFFFFFF0000FF00000000" $"000000FFFFFF2B2B2B2B2B2B2B2BFFFFFFFFFFFF2B2B2B2BFFFFFFFF00000000" $"000000FF00FF2BFCFCFCFCFCF82BFF00FF2B2B2B2B2B2B2BFF0000FF00000000" $"000000FF00FF2BFC2A2A2A2A002BFF00FF2B2B2B2B2B2B2BFF0000FF00000000" $"000000FFFFFF2BFC2A2A2A2A002BFFFFFF2B2B2B2B2B2B2BFFFFFFFF00000000" $"000000FF00FF2BFC2A2A2A2A002BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000" $"000000FF00FF2BF800000000002BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000" $"000000FFFFFF2B2B2B2B2B2B2B2BFFFFFF2B2B2B2B2B2B2B2BFFFFFF00000000" $"000000FF00FF2B2B2B2BFFFFFF2BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000" $"000000FF00FF2B2B2B2B2B2B2B2BFF00FF2B2B2B2B2B2B2B2BFF00FF00000000" $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF9F9F9F9F9F9FFFFFFFFFF00000000" $"000000FF0000FFF7F8F9FAFBFCFF0000FFF9F9F9F9F9F9FF000000FF00000000" $"000000FF0000FFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFF000000FF00000000" $"000000FFF5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5FF00000000" $"000000FFF5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5FF00000000" $"000000FFF5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FF00000000" $"000000FFF5FF00000000000000000000000000000000000000FFF5FF00000000" $"000000FFF5FF00FF0000FF0000FF00FF0000FF000000FF0000FFF5FF00000000" $"000000FFF5FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FFF5FF00000000" $"000000FFF5FF00FF0000FF0000FF00FF0000FF000000FF0000FFF5FF00000000" $"000000FFF5FF00000000000000000000000000000000000000FFF5FF00000000" $"000000FFF5FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5FF00000000" $"000000FFF5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5F5FF00000000" $"000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCNTL' (cVScroll, "vscroll", purgeable) { { 0, 0, 48, 16 }, 0, invisible, 0, 0, scrollBarProc, 0, ""dlgx' (wAbout, "about", purgeable) { versionZero { kDialogFlagsUseThemeBackground | kDialogFlagsUseThemeControls } "Experimental Mac Port\n" " /* Default Preferences */ type PREF_wordness_type { wide array [256] { integer; }; }; /* * This resource collects together the various short settings we need. * Each area of the system gets its own longword for flags, and then * we have the other settings. Strings are stored as two shorts -- * the id of a STR# or STR resource, and the index if it's a STR# (0 * for STR). */ type 'pSET' { /* Basic boolean options */ boolean dont_close_on_exit, close_on_exit; align long; /* SSH options */ boolean use_pty, no_pty; align long; /* Telnet options */ boolean bsd_environ, rfc_environ; align long; /* Keyboard options */ boolean backspace, delete; boolean std_home_end, rxvt_home_end; boolean std_funkeys, linux_funkeys; boolean normal_cursor, app_cursor; boolean normal_keypad, app_keypad; align long; /* Terminal options */ boolean no_dec_om, dec_om; boolean no_auto_wrap, auto_wrap; boolean no_auto_cr, auto_cr; boolean use_icon_name, win_name_always; align long; /* Colour options */ boolean bold_font, bold_colour; align long; /* Non-boolean options */ integer; integer; /* host */ longint; /* port */ longint prot_telnet = 0, prot_ssh = 1; /* protocol */ integer; integer; /* termtype */ integer; integer; /* termspeed */ integer; integer; /* environmt */ integer; integer; /* username */ longint; /* width */ longint; /* height */ longint; /* save_lines */ integer; unsigned integer; /* font */ longint; /* font_height */ integer; /* 'pltt' for colours */ integer; /* 'wORD' for wordness */ }; resource 'pSET' (PREF_settings, "settings", purgeable) { close_on_exit, use_pty, rfc_environ, delete, std_home_end, std_funkeys, normal_cursor, normal_keypad, no_dec_om, auto_wrap, no_auto_cr, use_icon_name, bold_colour, #define PREF_strings 1024 PREF_strings, 1, /* host 'STR#' */ 23, prot_telnet, /* port, protocol */ PREF_strings, 2, /* termtype 'STR#' */ PREF_strings, 3, /* termspeed 'STR#' */ PREF_strings, 4, /* environmt 'STR#' */ PREF_strings, 5, /* username */ 80, 24, 200, /* width, height, save_lines */ PREF_strings, 6, /* font 'STR#' */ 9, /* font_height */ #define PREF_pltt 1024 PREF_pltt, /* colours 'pltt' */ #define PREF_wordness 1024 PREF_wordness, /* wordness 'wORD */ }; resource 'STR#' (PREF_strings, "strings", purgeable) { { "nowhere.loopback.edu", "xterm", "38400,38400", "\000", "", "Monaco", } }; resource PREF_wordness_type (PREF_wordness, "wordness", purgeable) { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1, 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,2, 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2 } }; /* * and _why_ isn't this provided for us? */ type 'TMPL' { array { pstring; /* Item name */ literal longint; /* Item type */ }; }; resource 'TMPL' (128, "pSET") { { "Close on exit", 'BBIT', "", 'BBIT', /* Must pad to a multiple of 8 */ "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'ALNG', "No PTY", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'ALNG', "RFC OLD-ENVIRON", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'ALNG', "Delete key sends delete", 'BBIT', "rxvt home/end", 'BBIT', "Linux function keys", 'BBIT', "Application cursor keys", 'BBIT', "Application keypad", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'ALNG', "Use colour for bold", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'BBIT', "", 'ALNG', "Host STR# ID", 'DWRD', "Host STR# index", 'DWRD', "Port", 'DLNG', "Protocol", 'DLNG', "Termspeed STR# ID", 'DWRD', "Termspeed STR# index", 'DWRD', "Environ STR# ID", 'DWRD', "Environ STR# index", 'DWRD', "Username STR# ID", 'DWRD', "Username STR# index", 'DWRD', "Terminal width", 'DLNG', "Terminal height", 'DLNG', "Save lines", 'DLNG', "Font STR# ID", 'DWRD', "Font STR# index", 'DWRD', "Font size", 'DLNG', "pltt ID", 'DWRD', "wORD ID", 'DWRD', }; }; resource 'pltt' (PREF_pltt Node-path: putty-ben-mac-port/maccfg.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 2050 Text-content-md5: e5f6762df1296c82d74601005866880e Content-length: 2170 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN漻噆 AI汥8桲i圗|Ki哊塊-僎=匘=桪S婦乬嶧#丯乮汫乿塃亁孍亁嘒!匘E侳俖奆俖丏@D侹丟k嶥8E俛僁0丠,咶J僛F俖廍俴婨匞#G嘡塉亇F亇凥侽圙俹僁倁Ht匢凪匘GD僎嶪3朌丠凬扜旹侫侳刅D厏E;E乲凣乿礔唘S<働員嘵唓哖員媈唓働員嶭唓I嘦廝+慞+嶵坙匘團丟唗U4侾員哅(H哱圖&R圝咲(Q坘岴坒I R=哘 塂M唗N乮凣D咾DRL嘑俖N乮D塀F D塀匱<圙(N乮圞桮俕N乮僉(D孲丗.G?E亊F奧僅媌E亊IDD F<哊V慏8嘒u嘐dE團W侲X匯刱K孉E6俉剓丏6僂圱(K匤凞匽D峳丠嶱丟丒圙G僁峊匟'凥&F%侴凞哖H僆K凞匟弢GIH厏EER僃*L!G5G0M5E孌/凨哋侼哻僁H廧僅僆E匞恠I侴!O丒嘓W廹J婸EJ婸LH婸H厏S憃E媈KG扚PE媈W+I媤GK LI媤W+HGJ揚LHM凣媤G恠L嘒侺嘰O圡'嶨恠I侽LF婼攈L;Q 孎廌N攎M圼Q 奡昪J坾U匱%JQ慠E傾丮'I6F0O6E咺H塂侴塙Q 圚攇M桮I塹R旹匟M桮GR梈僁匢昦N梴N+S楧侱丟K/F.FL実O弌D孲GF橺LD孲MD孲匘%嶮'D孲L3Q宐E侴梡奞凟奨M'塃攆[D丗奧G恠L奧D攛J妌Q G寉F凢J汫DK(N泀S巉塃卄圙H D!凟6K廻J凬侹GH凬e 働4嘔 丒)/* $Id: maccfg.c,v 1.1.2.1 1999/02/28 02:38:40 ben Exp $ */ /* * -- Mac port configuration #include TextUtilstring"putty.h"macresid struct strloc { shid, idx; };atic void get_(*l, char *d, size_t maxlen)Str255 s;int i, len; GetIndS, l->x)len = s[0]/ s a terminatorf (>- 1) for (i = 0; i < i++) d[i]i + 1'\0'; }wordness(*dstHandle hh =(PREF_typeh == NULL || *) fatalbox ("Couldn't (%d)", ResError()memcpy(dst, *h, 256 *ofpSETunsigned long basic_flags; #define CLOSE_ON_EXIT 0x80sshNO_PTY telnetRFC_ENVIRONkbdBKSP_IS_DELETEXVT_HOMEEND 0x4LINUX_FUNKEYS 0x2APP_CURSOR 0x1KEYPA0rmDEC_OMWRAP_MODFHASCRWIN_NAME_ALWAcolourOLD_COLOUhostrotocolspeedenvironmusernamewidth, height, savelinefon_s_iLoad a from the currentin of r files.mac_load(C *cfg*s'', settings("Ca "SAttrs(h,) |Lockes = )*/* B&s->, cfg= sclose_on_exi(s-> &) !SSHnopty &Trfc_ &Keyboardbksp_is_delete &xvt_homeendlinux_funkeyapp_cursorkeypaldec_om &wrap_modfhascin__alwadtsisbolFALSE; /* XXXvtVT_POORMAN/* Ctry_palet_NewPFailed todefault elec->& ~Releaseh Node-path: putty-ben-mac-port/macresid.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: be7f37402c09e552f21126fb99665d2e Text-content-length: 184 Text-content-md5: dc4cd46e57fffe63f7424368f2c4a3d8 Content-length: 227 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN協%凙/v/* $Id: macresid.h,v 1.1.2.4 1999/02/28 02:38:4/* Controls */ #define cVScroll 128 /* Preferences */ #define PREF_wordness_type 'wORD' #define PREF_settings 1024 Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 02e6aecf0c63972804dc9cb9d8329fb4 Text-content-length: 2343 Text-content-md5: 02fe55085ee0787f2052318ba94f6976 Content-length: 2386 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN笵舲1慾乹丆乫i'僕僿?媏嶮剘.婳=limits.h> ControlHandle scrollbarstatic void mac_adjustsizmac_loadconfig(&cfg); s = smalloc(sizeof(*s)s->scrollbar = GetNewControl(cVScroll, s->windowmac_adjustsize(s); } /* * To be called whenever the window size changes. * rows and cols should be desired values. * It's assumed the terminal emulator will be or has been informed. */ static void mac_adjustsize(struct mac_session *s) { int winwidth, winheight; winwidth = cols * font_width + 15; winheight = rows * font_height; SizeWindow(s->window, winwidth, winheight, true); HideControl(s->scrollbar); MoveControl(s->scrollbar, winwidth - 15, -1); SizeControl(s->scrollbar, 16, winheight - 13); ShowControl(s->scrollbar); } static void mac_initpalette(struct mac_session *s) { WinCTab ct; I don't think this is (a) safe or (b) a good way to do this. */ static void mac_updatewinbg(struct mac_session *s) { WinCTab ct; WCTabPtr ctp = &ct; WCTabHandle cth = &ctp; ct.wCSeed = 0; ct.wCReserved = 0; ct.ctSize = 1; ct.ctTable[0].value = wContentColor; ct.ctTable[0].rgb = (*s->palette)->pmInfo[16].ciRGB; SetWinColor(s->window, cth); } void mac_activateterm(WindowPtr window, Boolean active) { struct mac_session *s; s = (struct mac_session *)GetWRefCon(window); if (active) ShowControl(s->scrollbar); else HideControl(s->scrollbar); } void mac_updateterm(WindowPtr window) { struct mac_session *s; Rect clip; s = (struct mac_session *)GetWRefCon(window); BeginUpdate(window); term_paint(s, (*window->visRgn)->rgnBBox.left, (*window->visRgn)->rgnBBox.top, (*window->visRgn)->rgnBBox.right, (*window->visRgn)->rgnBBox.bottom); /* Restore default colours in case the Window Manager uses them */ PmForeColor(16); PmBackColor(18); if (FrontWindow() != window) EraseRect(&(*s->scrollbar)->contrlRect); UpdateControls(window, window->visRgn); /* Stop DrawGrowIcon giving us space for a horizontal scrollbar */ clip.left = window->portRect.right - 15; clip.right = SHRT_MAX; clip.top = SHRT_MIN; clip.bottom = SHRT_MAX; ClipRect(&clip); DrawGrowIcon(window); clip.left = SHRT_MIN; ClipRect(&clip); EndUpdate(window Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4018e2e8ebe08a3f4f8fed7fff34a39a Text-content-length: 69 Text-content-md5: a51b32cc7471a7a78a4498a91ae14d49 Content-length: 112 K 15 cvs2svn:cvs-rev V 7 1.4.2.5 PROPS-END SVN 0榁-#ifndef macintosh int mouse_is_xterm; #endif Revision-number: 63 Prop-content-length: 299 Content-length: 299 K 7 svn:log V 200 Erm, major change at the moment is a new test case. You need a file called 'fragment' to build it, but its licence prevents me distributing it at present. Now, about those scrolling optimisations... K 10 svn:author V 3 ben K 8 svn:date V 27 1999-02-28T17:05:11.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 42d00990d3514e907e18e504c9876378 Text-content-length: 568 Text-content-md5: 67cb910d096dd6cab2113f5db1f44443 Content-length: 611 K 15 cvs2svn:cvs-rev V 7 1.1.2.9 PROPS-END SVN竰<*坃剄o峸;怈/* $Id: mac.c,v 1.1.2.9 1999/02/28 17:05:1struct mac_gestalts mac_gestaltsgestalts.qdvers) != noErr) mac_gestalts.qdversgestalts.apprvers) != noErr) if (Gestalt(gestaltAppearanceAttr, NULL) == noErr) mac_gestalts.apprvers = 0x0100; else mac_gestalts.apprvers = 0; /* Mac OS 8.5 Control Manager (proportional scrollbars)? */ if (Gestalt(gestaltControlMgrAttr, &mac_gestalts.cntlattr) != noErr) mac_gestalts.cntlattr = 0; /* We've been tested with the Appearance Manager */ if (mac_gestalts.apprvers Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: ca5d114ec925de2fec4cd85338778a51 Text-content-length: 142 Text-content-md5: 5e257c911f859ad429feb9864f06f4a8 Content-length: 185 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN俰僤 x*x丅'struct mac_gestalts { long qdvers; long apprvers; long cntlattr; }; extern struct mac_gestalts mac_gestalts Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2aa8691d295cee1bffcc3fb078bf305e Text-content-length: 1268 Text-content-md5: 4b6a0a4eedb413d037fb1c441242261a Content-length: 1311 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN亙v亶 塢'亙:scrollbar, 0); SetControlMaximum(s->scrollbar, total - page); SetControlValue(s->scrollbar, start); #if 0 /* XXX: This doesn't compile for me - bjh */ if (mac_gestalts.cntlattr & gestaltControlMgrPresent) SetControlViewSize(s->scrollbar, page); #endifgestalts.qdvers Revision-number: 64 Prop-content-length: 351 Content-length: 351 K 7 svn:log V 252 Right, so that's a hook for scroll optimisations (when Simon gets round to them) and a vaguely-working scrollbar. Next stop: faster and more sensible redraw in 1-bit modes at least. Waiting five minutes for the test case to scroll past is _tedious_. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-01T22:26:50.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 67cb910d096dd6cab2113f5db1f44443 Text-content-length: 1238 Text-content-md5: 02eb3619e969d7d1ec728241d24176ea Content-length: 1282 K 15 cvs2svn:cvs-rev V 8 1.1.2.10 PROPS-END SVN<, = 5條/* $Id: mac.c,v 1.1.2.10 1999/03/01 22:26:49 ben Exp $ */ /* * Copyright (c) 1999 Ben Harris * All rights reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. mac_clickterm(window, event); Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: b255d45a41aca9ea4c7ed815f42ad9cf Text-content-length: 2180 Text-content-md5: 4dc3ccb07559f448d66b5aaca7e2c20f Content-length: 2223 K 15 cvs2svn:cvs-rev V 7 1.1.2.9 PROPS-END SVN衇0怘/堾弅榗I▄=晈ˋ宷-凞匴/* $Id: macterm.c,v 1.1.2.9 1999/03/01 22:26:50static pascal void mac_scrolltracker(ControlHandle, short); /* * Temporary hack till I get the terminal emulator supporting multiple * sessions cfg.height, cfg.width, cfg.savelinesclickterm(WindowPtr window, EventRecord *event) { struct mac_session *s; Point mouse; ControlHandle control; int part; s = (struct mac_session *)GetWRefCon(window); SetPort(window); mouse = event->where; GlobalToLocal(&mouse); part = FindControl(mouse, window, &control); if (control == s->scrollbar) { switch (part) { case kControlIndicatorPart: if (TrackControl(control, mouse, NULL) == kControlIndicatorPart) term_scroll(+1, GetControlValue(control)); break; case kControlUpButtonPart: case kControlDownButtonPart: case kControlPageUpPart: case kControlPageDownPart: TrackControl(control, mouse, mac_scrolltracker); break; } } } static pascal void mac_scrolltracker(ControlHandle control, short part(*control)->contrlOwner); switch (part) { case kControlUpButtonPart: term_scroll(0, -1); break; case kControlDownButtonPart: term_scroll(0, +1); break; case kControlPageUpPart: term_scroll(0, -(rows - 1)); break; case kControlPageDownPart: term_scroll(0, +(rows - 1)); break; }if (mac_gestalts.qdvers == gestaltOriginalQD) return; /* * Move `lines' lines from position `from' to position `to' in the * window. * Note that this is currently broken if "from" and "to" are more * than "lines" lines apart. */ void optimised_move(int to, int from, int lines) { Rect r; RgnHandle update; struct mac_session *s = onlysession; int min, max, d; SetPort(s->window); min = (to < from ? to : from); max = to + from - min; d = max - min; update = NewRgn(); r.left = 0; r.right = cols * font_width; r.top = min * font_height; r.bottom = (max+lines) * font_height; ScrollRect(&r, 0, (to - from) * font_height, update); InvalRgn(update); /* XXX: necessary? probably harmless anyway */ DisposeRgn(update); } Revision-number: 65 Prop-content-length: 400 Content-length: 400 K 7 svn:log V 301 We now use DeviceLoop for redraws, which allows for depth-specific tweaks. The first of these is that in 1-bit modes we ignore colour attributes entirely, which has nice effects on some of Fragments efforts if nothing else. We still seem to be a lot slower than BetterTelnet, which is a bit worrying. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-01T23:43:29.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 4dc3ccb07559f448d66b5aaca7e2c20f Text-content-length: 1907 Text-content-md5: 011fa39e8a74aff2d02d7ae9638e868a Content-length: 1951 K 15 cvs2svn:cvs-rev V 8 1.1.2.10 PROPS-END SVN=)>嶶/B{*;乆縸7莖扵-/* $Id: macterm.c,v 1.1.2.10 1999/03/01 23:43:29static pascal void do_text_for_device(short, short, GDHandle, longstruct do_text_args { struct mac_session *s; Rect textrect; char *text; int len; unsigned long attr; };struct do_text_args a; RgnHandle textrgn; SetPort(s->window); /* First check this text is relevant */ a.textrect.top = y * font_height; a.textrect.bottom = (y + 1) * font_height; a.textrect.left = x * font_width; a.textrect.right = (x + len) * font_width; if (!RectInRgn(&a.textrect, s->window->visRgn)) return; a.s = s; a.text = text; a.len = len; a.attr = attr; SetPort(s->window);if (attr & ATTR_REVERSE) TextMode(notSrcCopy); else TextMode(srcCopy); SetFractEnable(FALSE); /* We want characters on pixel boundaries */ textrgn = NewRgn(); RectRgn(textrgn, &a.textrect); DeviceLoop(textrgn, do_text_for_device, (long)&a, 0); /* Tell the window manager about it in case this isn't an update */ DisposeRgn(textrgn); ValidRect(&a.textrect); } static pascal void do_text_for_device(short depth, short devflags, GDHandle device, long cookie) { struct do_text_args *a; int bgcolour, fgcolour; a = (struct do_text_args *)cookie; switch (depth) { case 1: /* XXX This should be done with a _little_ more configurability */ ForeColor(whiteColor); BackColor(blackColor); break; default: fgcolour = ((a->attr & ATTR_FGMASK) >> ATTR_FGSHIFT) * 2; bgcolour = ((a->attr & ATTR_BGMASK) >> ATTR_BGSHIFT) * 2; if ((a->attr & ATTR_BOLD) && cfg.bold_colour) if (a->attr & ATTR_REVERSE) bgcolour++; else fgcolour++; PmForeColor(fgcolour); PmBackColor(bgcolour); break; } MoveTo(a->textrect.left, a->textrect.top + a->s->font_ascent); DrawText(a->text, 0, a->lenlink Revision-number: 66 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 70 Scroll bar no longer glitches when a new line is added to the window. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-02T14:52:35.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 011fa39e8a74aff2d02d7ae9638e868a Text-content-length: 312 Text-content-md5: 385687d585f2f657a9a2520175f7a689 Content-length: 356 K 15 cvs2svn:cvs-rev V 8 1.1.2.11 PROPS-END SVN=鍆 0乷扜襳/* $Id: macterm.c,v 1.1.2.11 1999/03/02 14:52:35/* We don't redraw until we've set everything up, to avoid glitches */ (*s->scrollbar)->contrlMin = 0; (*s->scrollbar)->contrlMax = total - page; SetControlValue(s->scrollbar, start); #if 0 /* XXX: This doesn't link for me. Revision-number: 67 Prop-content-length: 237 Content-length: 237 K 7 svn:log V 138 Right, I think we now hove scrolling optimisations. They should probably be conditional on something, but I can't be bothered right now. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-02T21:51:55.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 441aaa0a6d9976fe257d5414593bdd52 Text-content-length: 842 Text-content-md5: efce2339dd489e63d890913667a6e76d Content-length: 885 K 15 cvs2svn:cvs-rev V 7 1.5.2.2 PROPS-END SVN偅f偐p!%?"(伄$Q倐static void scroll_display(int, int, int scroll_display(topline, botline, lines); } static void scroll_display(int topline, int botline, int lines) { unsigned long *start, *end; int distance, size, i; start = disptext + topline * (cols + 1); end = disptext + (botline + 1) * (cols + 1); distance = (lines > 0 ? lines : -lines) * (cols + 1); size = end - start - distance; if (lines > 0) { memmove(start, start + distance, size * TSIZE); for (i = 0; i < distance; i++) (start + size)[i] |= ATTR_INVALID; } else { memmove(start + distance, start, size * TSIZE); for (i = 0; i < distance; i++) start[i] |= ATTR_INVALID; } do_scroll(topline, botline, lines); } if (rel == 0 && where < rows && where > -rows) scroll_display(0, rows - 1, where Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 385687d585f2f657a9a2520175f7a689 Text-content-length: 569 Text-content-md5: e9d5f7db66cc13166286430765c15245 Content-length: 613 K 15 cvs2svn:cvs-rev V 8 1.1.2.12 PROPS-END SVN鍆閝%錖/僾/* $Id: macterm.c,v 1.1.2.12 1999/03/02 21:51:5 /* * Scroll the screen. (`lines' is +ve for scrolling forward, -ve * for backward.) */ void do_scroll(int topline, int botline, int lines) { struct mac_session *s = onlysession; Rect r; RgnHandle update; SetPort(s->window); update = NewRgn(); SetRect(&r, 0, topline * font_height, cols * font_width, (botline + 1) * font_height); ScrollRect(&r, 0, - lines * font_height, update); /* XXX: move update region? */ InvalRgn(update); DisposeRgn(update); } Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: a51b32cc7471a7a78a4498a91ae14d49 Text-content-length: 30 Text-content-md5: 4f0b85e8543096619789acf29e2c689b Content-length: 73 K 15 cvs2svn:cvs-rev V 7 1.4.2.6 PROPS-END SVN; 慉do_scroll Revision-number: 68 Prop-content-length: 281 Content-length: 281 K 7 svn:log V 182 We now have saner handling of 4-bit modes (disable colour, get the Palette Manager to give us bg, fg, bold fg and cursor). I've also removed some traces of the old scroll-optimiser. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-02T23:19:20.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: efce2339dd489e63d890913667a6e76d Text-content-length: 28 Text-content-md5: 2ff61186f78b0dda5ebe48060b4994eb Content-length: 71 K 15 cvs2svn:cvs-rev V 7 1.5.2.3 PROPS-END SVN偐p偐;扟:倖U Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4b6a0a4eedb413d037fb1c441242261a Text-content-length: 2102 Text-content-md5: 63a2acf01271fb6712384f412f7b12e1 Content-length: 2145 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN亶亼,亐3/弅_亴8/* $Id: mac_res.r,v 1.1.2.7 1999/03/02 23:19:20 /* * *mutter* It might be nice if Apple could actually put all the flags in * Palettes.r. */ #define pmCourteous 0x0000 #define pmDithered 0x0001 #define pmTolerant 0x0002 #define pmAnimated 0x0004 #define pmExplicit 0x0008 #define pmWhite 0x0010 #define pmBlack 0x0020 #define pmInhibitG2 0x0100 #define pmInhibitC2 0x0200 #define pmInhibitG4 0x0400 #define pmInhibitC4 0x0800 #define pmInhibitG8 0x1000 #define pmInhibitC8 0x2000 #define PM_BASIC (pmTolerant | pmInhibitG4 | pmInhibitG8) #define PM_NORMAL (PM_BASIC | pmInhibitG2 | pmInhibitC2) resource 'pltt' (PREF_pltt, purgeable) { { 0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* black */ 0x5555, 0x5555, 0x5555, PM_NORMAL, 0x2000, /* bright black */ 0xbbbb, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* red */ 0xffff, 0x5555, 0x5555, PM_NORMAL, 0x2000, /* bright red */ 0x0000, 0xbbbb, 0x0000, PM_NORMAL, 0x2000, /* green */ 0x5555, 0xffff, 0x5555, PM_NORMAL, 0x2000, /* bright green */ 0xbbbb, 0xbbbb, 0x0000, PM_NORMAL, 0x2000, /* yellow */ 0xffff, 0xffff, 0x0000, PM_NORMAL, 0x2000, /* bright yellow */ 0x0000, 0x0000, 0xbbbb, PM_NORMAL, 0x2000, /* blue */ 0x5555, 0x5555, 0xffff, PM_NORMAL, 0x2000, /* bright blue */ 0xbbbb, 0x0000, 0xbbbb, PM_NORMAL, 0x2000, /* magenta */ 0xffff, 0x5555, 0xffff, PM_NORMAL, 0x2000, /* bright magenta */ 0x0000, 0xbbbb, 0xbbbb, PM_NORMAL, 0x2000, /* cyan */ 0x5555, 0xffff, 0xffff, PM_NORMAL, 0x2000, /* bright cyan */ 0xbbbb, 0xbbbb, 0xbbbb, PM_NORMAL, 0x2000, /* white */ 0xffff, 0xffff, 0xffff, PM_NORMAL, 0x2000, /* bright white */ 0xbbbb, 0xbbbb, 0xbbbb, PM_BASIC, 0x2000, /* default fg */ 0xffff, 0xffff, 0xffff, PM_BASIC, 0x2000, /* default bold fg */ 0x0000, 0x0000, 0x0000, PM_BASIC, 0x2000, /* default bg */ 0x5555, 0x5555, 0x5555, PM_NORMAL, 0x2000, /* default bold bg */ 0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* cursor bg */ 0x0000, 0x0000, 0x0000, PM_NORMAL, 0x2000, /* bold cursor bg */ 0x0000, 0xffff, 0x0000, PM_BASIC, 0x2000, /* cursor fg */ 0x0000, 0xffff, 0x0000, PM_NORMAL Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: e9d5f7db66cc13166286430765c15245 Text-content-length: 411 Text-content-md5: 202c6685d5f9fb2bc066b289e3681ff3 Content-length: 455 K 15 cvs2svn:cvs-rev V 8 1.1.2.13 PROPS-END SVN閝錿 俹媞0a璗I/簀#僴/* $Id: macterm.c,v 1.1.2.13 1999/03/02 23:19:20#define DEFAULT_FG 16 #define DEFAULT_FG_BOLD 17 #define DEFAULT_BG 18 #define DEFAULT_BG_BOLD 19SetRect(&clip, window->portRect.right - 15, SHRT_MIN, SHRT_MAX, SHRT_MAX)case 2: if ((a->attr & ATTR_BOLD) && cfg.bold_colour) PmForeColor(DEFAULT_FG_BOLD); else PmForeColor(DEFAULT_FG); PmBackColor(DEFAULT_BG Revision-number: 69 Prop-content-length: 234 Content-length: 234 K 7 svn:log V 135 Scroll optimisations are now controlled by #ifdef OPTIMISE_SCROLL. Scroll-bar manipulation now uses scroll optimisation more sensibly. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-02T23:47:23.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2ff61186f78b0dda5ebe48060b4994eb Text-content-length: 460 Text-content-md5: 2dbdcbe69fc68718c3c022a93c29f6aa Content-length: 503 K 15 cvs2svn:cvs-rev V 7 1.5.2.4 PROPS-END SVN偐;偒R#覹d剈伂o貁k7倕h0倗v#ifdef OPTIMISE_SCROLL scroll_display(topline, botline, lines); #endif } #ifdef OPTIMISE_SCROLL#endif /* OPTIMISE_SCROLL */#ifdef OPTIMISE_SCROLL unsigned long *olddisptop = disptop; int shift; #endif /* OPTIMISE_SCROLL */#ifdef OPTIMISE_SCROLL shift = (disptop - olddisptop) / (cols + 1); if (shift < rows && shift > -rows) scroll_display(0, rows - 1, shift); #endif /* OPTIMISE_SCROLL */ Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4f0b85e8543096619789acf29e2c689b Text-content-length: 48 Text-content-md5: 113fbd317c1fe34fb872feaddecc9b9e Content-length: 91 K 15 cvs2svn:cvs-rev V 7 1.4.2.7 PROPS-END SVN;穕u禯adefine OPTIMISE_SCROLL #endif Revision-number: 70 Prop-content-length: 187 Content-length: 187 K 7 svn:log V 89 No longer assume the values of '\n' and '\r', so CR and LF don't get swapped on the Mac. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-03T11:34:43.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2dbdcbe69fc68718c3c022a93c29f6aa Text-content-length: 348 Text-content-md5: 00939458ed482ef7eca3f713d880fdfd Content-length: 391 K 15 cvs2svn:cvs-rev V 7 1.5.2.5 PROPS-END SVN偒R偒f;齂Q9Z侁7恲亶丄侁73仧iZ侁7廹佢#侁7015': curs_x = 0; wrapnext = FALSE3': case '\014': case '\012015': case '\013': case '\014': case '\012015': case '\013': case '\014': case '\012015': case '\013': case '\014': case '\012015': case '\013': case '\014': case '\012 Revision-number: 71 Prop-content-length: 182 Content-length: 182 K 7 svn:log V 80 This commit was manufactured by cvs2svn to create tag 'ben-scrollopt-for-simon'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-03-03T11:34:43.000000Z PROPS-END Node-path: putty-ben-scrollopt-for-simon Node-kind: dir Node-action: add Node-copyfrom-rev: 70 Node-copyfrom-path: putty-ben-early-mac-port Node-path: putty-ben-scrollopt-for-simon/ssh.c Node-action: delete Revision-number: 72 Prop-content-length: 278 Content-length: 278 K 7 svn:log V 179 Resizing of terminal windows added. Seems to work, but term_size might benefit from calling scroll_display. This is where my scroll-optimisations look less useful than Simon's. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-03T22:03:54.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 02eb3619e969d7d1ec728241d24176ea Text-content-length: 273 Text-content-md5: 2fc39da595b045ed264e703730d090f9 Content-length: 317 K 15 cvs2svn:cvs-rev V 8 1.1.2.11 PROPS-END SVN,'乫嶻,朧嶻噆) 搗瑈1纚/* $Id: mac.c,v 1.1.2.11 1999/03/03 22:03:54growwindowmac_growwindow(window, event);growwindow(WindowPtr window, EventRecord *event) { switch (mac_windowtype(window)) { case wTerminal: mac_growterm(window, event)exit(0 Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 5e257c911f859ad429feb9864f06f4a8 Text-content-length: 131 Text-content-md5: 778ff7485271f46c4fcbcddef2c7079c Content-length: 174 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN僤刟 k侲pf22Eventextern void mac_clickterm(WindowPtr, EventRecord *); extern void mac_growterm(WindowPtr, EventRecord * Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 202c6685d5f9fb2bc066b289e3681ff3 Text-content-length: 892 Text-content-md5: fa031e0535a83a076d4f2b2683ebb6ac Content-length: 936 K 15 cvs2svn:cvs-rev V 8 1.1.2.14 PROPS-END SVN錿'咺 0僸8)<乚砮/* $Id: macterm.c,v 1.1.2.14 1999/03/03 22:03:54#include where, &limits); if (grow_result != 0) { newrows = HiWord(grow_result) / font_height; newcols = (LoWord(grow_result) - 15) / font_width; mac_adjustsize(s, newrows, newcols); term_size(newrows, newcols, cfg.savelines) Revision-number: 73 Prop-content-length: 197 Content-length: 197 K 7 svn:log V 99 Added testback.c (not that it works). Now compile with strict prototypes and optimisation (whee!). K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-07T23:15:56.000000Z PROPS-END Node-path: putty-ben-mac-port/PuTTY.make Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: bbab44cc4a007d6f7d602e422c52bc4e Text-content-length: 205 Text-content-md5: b9c84e0115a4043e14d1dc2e1bf04ae6 Content-length: 248 K 15 cvs2svn:cvs-rev V 7 1.1.2.8 PROPS-END SVN扽搒+俁/ 孭 L扏# $Id: PuTTY.make,v 1.1.2.8 1999/03/07 23:15:56-proto strict -opt all "{ObjDir68K}testback"{ObjDir68K}testback.c.o" {ondoBuild testback.c putty.h {C} testback Revision-number: 74 Prop-content-length: 345 Content-length: 345 K 7 svn:log V 246 Lots of things, notably: * Tidied state machine, with better handling of unknown escape and control sequences. * Support for automatic newline mode, with lfhascr now being a session variable. * #include for mem*() and str*(). K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-07T23:19:02.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 00939458ed482ef7eca3f713d880fdfd Text-content-length: 3577 Text-content-md5: 2fe48cfa00fbf9833de02d502cf11b28 Content-length: 3620 K 15 cvs2svn:cvs-rev V 7 1.5.2.6 PROPS-END SVN偒f偠O"欻O圔B噈坘36裈瀋儈!俲乨ls6僣'Q9⺧r 仌K乼仐&丯鹶亙.)亣,厀-亹hH99N仠@g佨u磜仧u>n佒-訥佔ring.h>lfhascr; /* Auto-crEN_GZD4, SEEN_G1D4, SEEN_OSC, SEEN_OSC_P, SEEN_OSC_W, OSC_STRING, OSC_MAYBE_ST, SEEN_ESCHASH, SEEN_ESC_CONFUSED, SEEN_CSI_CONFUSED,lfhascr = cfg.lfhascr case 20: /* line feed/new line mode */ lfhascrenum c0 { NUL, SOH, STX, ETX, EOT, ENQ, ACK, BEL, BS, HT, LF, VT, FF, CR, SO, SI, DLE, DC1, DC2, DC3, DC4, NAK, SYN, ETB, CAN, EM, SUB, ESC, IS1, IS2, IS3, IS4 }; enum c1 { BPH = 0x82, NBH, IND, NEL, SSA, ESA, HTS, HTJ, VTS, PLD, PLU, RI, SS1, SS2, DCS, PU1, PU2, STS, CCH, MW, SPA, EPA, SOS, SCI = 0x9a, CSI, ST, OSC, PM, APC }; int reprocess = FALSE; while (reprocess || (c = inbuf_getc()) != -1) { #ifdef LOG if (!reprocess) reprocess = FALSE;5': curs_x = 0; wrapnext = FALSE3': case '\014': case '\012': case 'INDNELHTS: /* set a tab */ tabs[curs_x] = TRUE; break; case RISCI: /* terminal type query */ /* This sequence is standardised as something else entirely. */ back->send ("\033[?6c", 5)default: if (c >= ' ' && c < 0x7f || c >= 0xa0 break;/* * According to ECMA-35, an escape sequence consists of * ESC, a sequence (possibly empty) of intermediate bytes * from column 02 (SPACE--/), and a final byte from * columns 03-07 (0--~). */ termstate = TOPLEVEL; if (c >= 0x40 && c < 0x60) { /* Fe sequences -- C1 control as an escape sequence */ c += 0x40; reprocess = TRUE; } else switch (c) { /* nF sequences -- with intermediate bytes */ case '#': /* Single control functions */ termstate = SEEN_ESCHASH; break; case '(': /* GZD4: should set G0 */ termstate = SEEN_GZD4; break; case ')': /* G1D4: should set G1 */ termstate = SEEN_G1D4; break; /* Fp sequences -- private control functions */ /* Fs sequences -- standardised control functions */ case 'c': /* RIS: restore power-on settings */ power_on()default: termstate = SEEN_ESC_CONFUSED; reprocess = TRUE; break; } break; case SEEN_ESC_CONFUSED: /* * We're in an escape sequence, but we no longer know what * it means and we just want it to go away */ termstate = TOPLEVEL; if (c < 0x20 || c >= 0x7f) /* * ECMA-35 says this isn't allowed, so we can do what * we like. */ reprocess = TRUE; else if (c <= 0x30) /* Intermediate byte -- more to come */ termstate = SEEN_ESC_CONFUSED; /* Otherwise, that was a final byte and we're free! */ break; case SEEN_CSI: /* * In theory, a control sequence consists of CSI, then a * sequence (possibly empty) of parameter bytes (0--?) * then a sequence (possibly empty) of intermediate bytes * (SPACE--/), then a final byte (@--~). We're rather * more relaxed, and don't differentiate between parameter * and intermediate bytes. */ default: termstate = SEEN_CSI_CONFUSED; reprocess = TRUE; break; } break; case SEEN_CSI_CONFUSED: termstate = TOPLEVEL; if (c < 0x20 || c >= 0x7f) reprocess = TRUE; else if (c < 0x40) termstate = SEEN_CSI_CONFUSED; case SEEN_GZD4: case SEEN_G1D4: switch (c) { case 'A': cset_attr[termstate == SEEN_GZD4 ? 0 : 1] = ATTR_GBCHR; break; case '0': cset_attr[termstate == SEEN_GZD4EN_GZD4 Revision-number: 75 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 48 Pass keyboard events to the terminal front-end. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-07T23:20:20.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 2fc39da595b045ed264e703730d090f9 Text-content-length: 283 Text-content-md5: 38c04c387067e06a04cc58b99d87e15b Content-length: 327 K 15 cvs2svn:cvs-rev V 8 1.1.2.12 PROPS-END SVN'苭乿,6禣岮穎/* $Id: mac.c,v 1.1.2.12 1999/03/07 23:20:20#include /* for vsprintf WindowPtr window else { window = FrontWindow(); switch (mac_windowtype(window)) { case wTerminal: mac_keyterm(window, event); break; } } Revision-number: 76 Prop-content-length: 138 Content-length: 138 K 7 svn:log V 40 Keyboard handling and a visible cursor. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-07T23:22:23.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: fa031e0535a83a076d4f2b2683ebb6ac Text-content-length: 6701 Text-content-md5: 0baf2122943e3807bfec1165277edb79 Content-length: 6745 K 15 cvs2svn:cvs-rev V 8 1.1.2.15 PROPS-END SVN仦Y?砤婰0"媥5L怟渮梋癢?碙朮D衆襳/* $Id: macterm.c,v 1.1.2.15 1999/03/07 23:22:23#include send((char *)buf, len); */ for (i = 0; i < len; i++) inbuf_putc(buf[i]); term_out(); term_update(); } static int mac_keytrans(struct mac_session *s, EventRecord *event, unsigned char *output) { unsigned char *p = output; int code; /* No meta key yet -- that'll be rather fun. */ /* Keys that we handle locally */ if (event->modifiers & shiftKey) { switch (event->message & keyCodeMask) { case K_PRIOR: /* shift-pageup */ term_scroll(0, -(rows - 1)); return 0; case K_NEXT: /* shift-pagedown */ term_scroll(0, +(rows - 1)); return 0; } } /* * Control-2 should return ^@ (0x00), Control-6 should return * ^^ (0x1E), and Control-Minus should return ^_ (0x1F). Since * the DOS keyboard handling did it, and we have nothing better * to do with the key combo in question, we'll also map * Control-Backquote to ^\ (0x1C). */ if (event->modifiers & controlKey) { switch (event->message & charCodeMask) { case ' ': case '2': *p++ = 0x00; return p - output; case '`': *p++ = 0x1c; return p - output; case '6': *p++ = 0x1e; return p - output; case '/': *p++ = 0x1f; return p - output; } } /* * First, all the keys that do tilde codes. (ESC '[' nn '~', * for integer decimal nn.) * * We also deal with the weird ones here. Linux VCs replace F1 * to F5 by ESC [ [ A to ESC [ [ E. rxvt doesn't do _that_, but * does replace Home and End (1~ and 4~) by ESC [ H and ESC O w * respectively. */ code = 0; switch (event->message & keyCodeMask) { case K_F1: code = (event->modifiers & shiftKey ? 23 : 11); break; case K_F2: code = (event->modifiers & shiftKey ? 24 : 12); break; case K_F3: code = (event->modifiers & shiftKey ? 25 : 13); break; case K_F4: code = (event->modifiers & shiftKey ? 26 : 14); break; case K_F5: code = (event->modifiers & shiftKey ? 28 : 15); break; case K_F6: code = (event->modifiers & shiftKey ? 29 : 17); break; case K_F7: code = (event->modifiers & shiftKey ? 31 : 18); break; case K_F8: code = (event->modifiers & shiftKey ? 32 : 19); break; case K_F9: code = (event->modifiers & shiftKey ? 33 : 20); break; case K_F10: code = (event->modifiers & shiftKey ? 34 : 21); break; case K_F11: code = 23; break; case K_F12: code = 24; break; case K_HOME: code = 1; break; case K_INSERT: code = 2; break; case K_DELETE: code = 3; break; case K_END: code = 4; break; case K_PRIOR: code = 5; break; case K_NEXT: code = 6; break; } if (cfg.linux_funkeys && code >= 11 && code <= 15) { p += sprintf((char *)p, "\x1B[[%c", code + 'A' - 11); return p - output; } if (cfg.rxvt_homeend && (code == 1 || code == 4)) { p += sprintf((char *)p, code == 1 ? "\x1B[H" : "\x1BOw"); return p - output; } if (code) { p += sprintf((char *)p, "\x1B[%d~", code); return p - output; } if (app_keypad_keys) { switch (event->message & keyCodeMask) { case KP_ENTER: p += sprintf((char *)p, "\x1BOM"); return p - output; case KP_CLEAR: p += sprintf((char *)p, "\x1BOP"); return p - output; case KP_EQUAL: p += sprintf((char *)p, "\x1BOQ"); return p - output; case KP_SLASH: p += sprintf((char *)p, "\x1BOR"); return p - output; case KP_STAR: p += sprintf((char *)p, "\x1BOS"); return p - output; case KP_PLUS: p += sprintf((char *)p, "\x1BOl"); return p - output; case KP_MINUS: p += sprintf((char *)p, "\x1BOm"); return p - output; case KP_DOT: p += sprintf((char *)p, "\x1BOn"); return p - output; case KP_0: p += sprintf((char *)p, "\x1BOp"); return p - output; case KP_1: p += sprintf((char *)p, "\x1BOq"); return p - output; case KP_2: p += sprintf((char *)p, "\x1BOr"); return p - output; case KP_3: p += sprintf((char *)p, "\x1BOs"); return p - output; case KP_4: p += sprintf((char *)p, "\x1BOt"); return p - output; case KP_5: p += sprintf((char *)p, "\x1BOu"); return p - output; case KP_6: p += sprintf((char *)p, "\x1BOv"); return p - output; case KP_7: p += sprintf((char *)p, "\x1BOw"); return p - output; case KP_8: p += sprintf((char *)p, "\x1BOx"); return p - output; case KP_9: p += sprintf((char *)p, "\x1BOy"); return p - output; } } switch (event->message & keyCodeMask) { case K_UP: p += sprintf((char *)p, app_cursor_keys ? "\x1BOA" : "\x1B[A"); return p - output; case K_DOWN: p += sprintf((char *)p, app_cursor_keys ? "\x1BOB" : "\x1B[B"); return p - output; case K_RIGHT: p += sprintf((char *)p, app_cursor_keys ? "\x1BOC" : "\x1B[C"); return p - output; case K_LEFT: p += sprintf((char *)p, app_cursor_keys ? "\x1BOD" : "\x1B[D"); return p - output; case K_BS: *p++ = (cfg.bksp_is_delete ? 0x7f : 0x08); return p - output; default: *p++ = event->message & charCodeMask; return p - outputhas_focus = active; term_update(if (a->attr & ATTR_ACTCURS) PmBackColor(CURSOR_FG); else if (a->attr & ATTR_ACTCURS) bgcolour = CURSOR_FGPmBackColor(DEFAULT_BG Revision-number: 77 Prop-content-length: 153 Content-length: 153 K 7 svn:log V 55 Attempt at some back-ends useful for testing purposes. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-07T23:23:38.000000Z PROPS-END Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 1572 Text-content-md5: bda2e2e0f166f383e37156566d980ab2 Content-length: 1692 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN別3QE峎@奃@凟H岴?籇@怐丒‵乗岹亅侲丱圖+H0圖@嘍圖乭G俆匜E侳G 嘍@D乶嘍"丒丩婦俛嘍5咲僁@凞僃乺J侷E僑D丏$丟乄E凞僲D@I侹婨儈匛僄凞D僴塅僁侱@D@塃FH匜E乿EF(G嘐F俵侱侰D(H僤丏僅孍刡P僯DF刱紼癊厁G#咲卶旸咢淒卶厁慏E廌唝嘐噈G 僂孏唟嶪奃哣咲侲咰丟:侳2DN厁侲厁侲F圖*僂G厏D婨丏 凟塆丟2婯塭孌丒丠孎D俲侴僅凟圝;D奟F奌凩&O奦凢奿乑妎F奺僙奞廎婹匜塠F-G塟團-D"両奌GD妀H僅F婹侹媑E e媤I ^%]凟-E匴I2凞9凟嶪R奅O峐丩峫U奰僃=僂 O侲 乄4D孌 丒奅咲媫咶扚 丏圗丠丒9D;僆僃凟 DE丣僂9僈弞HH凟巠丏嶬TI4S嶩[婯匞恅/* $Id: testback.c,v 1.1.2.1 1999/03/07 23:23:38 ben Exp $ */ /* * Copyright (c) Simon TathamBen HarrisAll s reserved. Permission is hereby granted, free of charge, to any personobtaining a copythis software and associated documentatifiles (the "S")deal in withoutrestric, includ limito use,, modifepublish, dibute, scense,/orselliesptwhomis furnishedo sojectfollowingndis:The abovenoticshall bedrstantial porHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KINDEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TOIES OFMERCHANTABILITY, FITNFOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALLAUTHORS BE LIABLENY CLAIM, DAMAGR OTHERWHEIN AN ACTIONCONTRACT, TORTWISE, ARISFROM, OFNNEORUSDEALINGSTHE/ /* PuTTY ends# "putty.h" sc *null_init(t,*);int msg(voidsendloop*izepecial(Telnet_S); B = { ,ize }hostreal) { return NULL; }1buflenlo while (len-- ew_hea(inbuf+ 1) & INBUF_MASK;cunsigned)f (!= reap[] =++;; }} code Revision-number: 78 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 31 Changes for updates elsewhere. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-07T23:25:43.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 778ff7485271f46c4fcbcddef2c7079c Text-content-length: 90 Text-content-md5: 99d1f472b5b3584f841c48912e991b4e Content-length: 133 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN刟' F2F/2extern void mac_keyterm(WindowPtr, EventRecord *); /* from maccfg.c */ Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 113fbd317c1fe34fb872feaddecc9b9e Text-content-length: 94 Text-content-md5: 8faabb0b3c9e57f69badfb8a1b955abc Content-length: 137 K 15 cvs2svn:cvs-rev V 7 1.4.2.8 PROPS-END SVN穕窲 HH砵testback.c */ extern Backend null_backend; extern Backend loop_backend Revision-number: 79 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 67 Tanslation tables to Mac OS written, though nothing uses them yet. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-09T00:06:34.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 63a2acf01271fb6712384f412f7b12e1 Text-content-length: 659 Text-content-md5: 015e21e06c8ed1dddd6d4d3c86553b72 Content-length: 702 K 15 cvs2svn:cvs-rev V 7 1.1.2.8 PROPS-END SVN亼,仌y 剕亹}/凪/* $Id: mac_res.r,v 1.1.2.8 1999/03/09 00:06:34 type 'cMAP' { hexstring; }; resource 'cMAP' (128, "Latin-1 G1 -> Mac OS Roman") { $"20 c1 a2 a3 db b4 00 a4 ac a9 bb c7 c2 00 a8 f8" $"a1 b1 00 00 ab b5 a6 e1 fc 00 bc c8 00 00 00 c0" $"cb e7 e5 cc 80 81 ae 82 e9 83 e6 e8 ed ea eb ec" $"00 84 f1 ee ef cd 85 00 af f4 f2 f3 86 00 00 a7" $"88 87 89 8b 8a 8c be 8d 8f 8e 90 91 93 92 94 95" $"00 96 98 97 99 9b 9a d6 bf 9d 9c 9e 9f 00 00 D8" }; resource 'cMAP' (129, "DEC line drawing -> Mac OS VT100") { $"d7 bd 09 0c 0d 0a a1 b1 00 0b d2 d3 d4 d5 da e2" $"e3 e4 f5 f6 f7 f8 f9 fa fb b2 b3 b9 ad a3 e1" Revision-number: 80 Prop-content-length: 128 Content-length: 128 K 7 svn:log V 30 Tiny \n/\r fix in term_mouse. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-09T00:08:41.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2fe48cfa00fbf9833de02d502cf11b28 Text-content-length: 26 Text-content-md5: 4a6204444cd16088c237f5e0946d96e4 Content-length: 69 K 15 cvs2svn:cvs-rev V 7 1.5.2.7 PROPS-END SVN偠O偠O 偞B 偞Cn Revision-number: 81 Prop-content-length: 215 Content-length: 215 K 7 svn:log V 116 Beginnings of support for selecting text -- clicking mostly does the right thing, but dragging doesn't work at all. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-09T00:09:50.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 38c04c387067e06a04cc58b99d87e15b Text-content-length: 204 Text-content-md5: 13f17491b30029f09b663d8eba7d0595 Content-length: 248 K 15 cvs2svn:cvs-rev V 8 1.1.2.13 PROPS-END SVN苭 3胦+俛/* $Id: mac.c,v 1.1.2.13 1999/03/09 00:09:5void write_clip(void *data, int len) { /* XXX: do something */ } void get_clip(void **p, int *lenp) { /* XXX: do something */ Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 0baf2122943e3807bfec1165277edb79 Text-content-length: 1155 Text-content-md5: ee82ada06bd04968941155b6e31f633b Content-length: 1199 K 15 cvs2svn:cvs-rev V 8 1.1.2.16 PROPS-END SVN仦Y仹坆/0燳慫噝&3/* $Id: macterm.c,v 1.1.2.16 1999/03/09 00:09:50static void text_click(struct mac_session *, EventRecord else { text_click(s, event); } } static void text_click(struct mac_session *s, EventRecord *event) { Point localwhere; int row, col; static UInt32 lastwhen = 0; static struct mac_session *lastsess = NULL; static int lastrow = -1, lastcol = -1; static Mouse_Action lastact = MA_NOTHING; SetPort(s->window); localwhere = event->where; GlobalToLocal(&localwhere); col = localwhere.h / font_width; row = localwhere.v / font_height; if (event->when - lastwhen < GetDblTime() && row == lastrow && col == lastcol && s == lastsess) lastact = (lastact == MA_CLICK ? MA_2CLK : lastact == MA_2CLK ? MA_3CLK : lastact == MA_3CLK ? MA_CLICK : MA_NOTHING); else lastact = MA_CLICK; term_mouse(event->modifiers & shiftKey ? MB_EXTEND : MB_SELECT, lastact, col, row); while (StillDown()) { /* XXX Do something */ } lastsess = s; lastrow = row; lastcol = col; lastwhen = event->when; /* XXX: should be time of mmouse _up_ */ Revision-number: 82 Prop-content-length: 406 Content-length: 406 K 7 svn:log V 307 Removed support for Line Feed/New Line Mode on the grounds that it doesn't do the same as lfhascr -- it also changes the "return" key to send CR/LF, which lfhascr doesn't do (and shouldn't do). Also, Line Feed/New Line mode isn't meant to affect IND, which lfhascr currently does (but arguably shouldn't). K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-09T11:57:13.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4a6204444cd16088c237f5e0946d96e4 Text-content-length: 23 Text-content-md5: 0a5a0d5f5f9414a210f7838cf486e97a Content-length: 66 K 15 cvs2svn:cvs-rev V 7 1.5.2.8 PROPS-END SVN偠O偟 馣伳4 Revision-number: 83 Prop-content-length: 203 Content-length: 203 K 7 svn:log V 104 IND no longer notices lfhascr. I've actually got the fix in term_mouse right now (or less wrong). Yeah. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-09T12:10:05.000000Z PROPS-END Node-path: putty-ben-early-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 0a5a0d5f5f9414a210f7838cf486e97a Text-content-length: 85 Text-content-md5: f748728f17310c781396d8ac89156af9 Content-length: 128 K 15 cvs2svn:cvs-rev V 7 1.5.2.9 PROPS-END SVN偟偠 .亖m亞}伇b亗 偝sIND: if (lfhascr && c != IND015 Revision-number: 84 Prop-content-length: 178 Content-length: 178 K 7 svn:log V 76 This commit was manufactured by cvs2svn to create tag 'ben-hacked-terminal'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-03-09T12:10:05.000000Z PROPS-END Node-path: putty-ben-hacked-terminal Node-kind: dir Node-action: add Node-copyfrom-rev: 83 Node-copyfrom-path: putty-ben-early-mac-port Node-path: putty-ben-hacked-terminal/ssh.c Node-action: delete Revision-number: 85 Prop-content-length: 176 Content-length: 176 K 7 svn:log V 76 Allow CSI 0;0r to set default scroll region (previously did nothing useful) K 10 svn:author V 5 simon K 8 svn:date V 27 1999-03-11T10:27:12.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1fe77645c195b4368c61789055e369a6 Text-content-length: 49 Text-content-md5: 1f6f39c62bfb3fbd15f8323dbf9be0fd Content-length: 88 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN偅9偅M 伖2伖<= 1 || esc_args[1] == 0 Revision-number: 86 Prop-content-length: 174 Content-length: 174 K 7 svn:log V 72 This commit was manufactured by cvs2svn to create branch 'ben-mac-port'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-03-11T11:10:53.000000Z PROPS-END Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: add Node-copyfrom-rev: 70 Node-copyfrom-path: putty-ben-early-mac-port/terminal.c Text-copy-source-md5: 00939458ed482ef7eca3f713d880fdfd Revision-number: 87 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 38 pasting now sends \015 rather than \r K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-11T11:10:53.000000Z PROPS-END Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: 00939458ed482ef7eca3f713d880fdfd Text-content-length: 28 Text-content-md5: b5e5ea2d99b90e52e51a313ebf8a5984 Content-length: 76 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.1 PROPS-END SVN偒f偒h 偐Y 偐Z015 Revision-number: 88 Prop-content-length: 140 Content-length: 140 K 7 svn:log V 42 merged changes up to terminal.c 1.6 [r85] K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-11T12:03:18.000000Z PROPS-END Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: b5e5ea2d99b90e52e51a313ebf8a5984 Text-content-length: 49 Text-content-md5: a311cf9a2d3ba6b2fc36250e1defb135 Content-length: 97 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.2 PROPS-END SVN偒h偒| 伩 靁伩<= 1 || esc_args[1] == 0 Revision-number: 89 Prop-content-length: 140 Content-length: 140 K 7 svn:log V 42 Oh, and we'll have back too... K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-11T15:07:16.000000Z PROPS-END Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: a311cf9a2d3ba6b2fc36250e1defb135 Text-content-length: 41 Text-content-md5: 2f675c0197735b65784345dd0eb9745d Content-length: 89 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.3 PROPS-END SVN偒|偓 j偒j#include Revision-number: 90 Prop-content-length: 184 Content-length: 184 K 7 svn:log V 86 Menu items now turn on and off in a vaguely useful way. Dragging to select now works. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-11T21:40:32.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 13f17491b30029f09b663d8eba7d0595 Text-content-length: 867 Text-content-md5: 711293b9be3191d82620f245068abfcc Content-length: 911 K 15 cvs2svn:cvs-rev V 8 1.1.2.14 PROPS-END SVN#4扸, 奫Q漍,痮僜刪/* $Id: mac.c,v 1.1.2.14 1999/03/11 21:40:31struct mac_windows { WindowPtr terminal; /* XXX: Temporary */ WindowPtr about; WindowPtr licence; }; struct mac_windows windows windows.terminal = NULL; windows.about = NULL; windows.licence = NULLmac_adjustmenus(); WindowPtr window; MenuHandle menu; window = FrontWindow(); menu = GetMenuHandle(mApple); EnableItem(menu, 0); EnableItem(menu, iAbout); menu = GetMenuHandle(mFile); EnableItem(menu, 0); EnableItem(menu, iNew); EnableItem(menu, iQuit); switch (mac_windowtype(window)) { case wTerminal: mac_adjusttermmenus(window); break; default: menu = GetMenuHandle(mEdit); DisableItem(menu, 0); break; } DrawMenuBar(); /* * Local Variables: * c-file-style: "simon" * End: */ Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 99d1f472b5b3584f841c48912e991b4e Text-content-length: 46 Text-content-md5: f56ee91fa9a2762e9437efa177546766 Content-length: 89 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN'匰 2adjusttermmenus(WindowPtr Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 015e21e06c8ed1dddd6d4d3c86553b72 Text-content-length: 547 Text-content-md5: ffc73653332c89bf539fe39bebc62aba Content-length: 590 K 15 cvs2svn:cvs-rev V 7 1.1.2.9 PROPS-END SVN仌y仚4"僺緼/'縫:脃亼Y仈]/* $Id: mac_res.r,v 1.1.2.9 1999/03/11 21:40:31, mEditresource 'MENU' (mEdit, preload) { mEdit, textMenuProc, 0b11111111111111111111111111111101, enabled, "Edit", { "Undo", noicon, "Z", nomark, plain, "-", noicon, nokey, nomark, plain, "Cut", noicon, "X", nomark, plain, "Copy", noicon, "C", nomark, plain, "Paste", noicon, "V", nomark, plain, "Clear", noicon, nokey, nomark, plain, "Select All", noicon, "ApMAP' { hex string; }; resource 'pp}; Node-path: putty-ben-mac-port/macresid.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: dc4cd46e57fffe63f7424368f2c4a3d8 Text-content-length: 217 Text-content-md5: 1693d7e93702c8413b955c2c6f3bfb08 Content-length: 260 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN協唗<丯0y亇z俼倁/* $Id: macresid.h,v 1.1.2.5 1999/03/11 21:40:32#define mEdit 130/* Edit menu */ #define iUndo 1 #define iCut 3 #define iCopy 4 #define iPaste 5 #define iClear 6 #define iSelectAll 7 Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: ee82ada06bd04968941155b6e31f633b Text-content-length: 1132 Text-content-md5: 7a253ab034e275273a270af276f48620 Content-length: 1176 K 15 cvs2svn:cvs-rev V 8 1.1.2.17 PROPS-END SVN仹伄圓0%1"&簀M/* $Id: macterm.c,v 1.1.2.17 1999/03/11 21:40:32crap/* * Enable/disable menu items based on the active terminal window. */ void mac_adjusttermmenus(WindowPtr window) { struct mac_session *s; MenuHandle menu; long offset; s = (struct mac_session *)GetWRefCon(window); menu = GetMenuHandle(mEdit); EnableItem(menu, 0); DisableItem(menu, iUndo); DisableItem(menu, iCut); DisableItem(menu, iCopy); if (GetScrap(NULL, 'TEXT', &offset) == noTypeErr) DisableItem(menu, iPaste); else EnableItem(menu, iPaste); DisableItem(menu, iClear); EnableItem(menu, iSelectAlllastsess = s; lastrow = row; lastcol = col; while (StillDown()) { GetMouse(&localwhere); col = localwhere.h / font_width; row = localwhere.v / font_height; term_mouse(event->modifiers & shiftKey ? MB_EXTEND : MB_SELECT, MA_DRAG, col, row); if (row > rows - 1) term_scroll(0, row - (rows - 1)); else if (row < 0) term_scroll(0, row); } lastwhen = TickCount(); /* * Emacs magic: * Local Variables: * c-file-style: "simon" * End: */ Revision-number: 91 Prop-content-length: 232 Content-length: 232 K 7 svn:log V 133 First attempt at copying to the clipboard -- doesn't seem to work. Also a bug-fix in auto-scrolling when drag-selecting off the top. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-11T23:23:45.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 7a253ab034e275273a270af276f48620 Text-content-length: 430 Text-content-md5: 4b3b86f8cb6052388e7b883a7d25dd13 Content-length: 474 K 15 cvs2svn:cvs-rev V 8 1.1.2.18 PROPS-END SVN伄伆* $0俢靤/* $Id: macterm.c,v 1.1.2.18 1999/03/11 23:23:45= 0) term_scroll(0, row - 1); } term_mouse(event->modifiers & shiftKey ? MB_EXTEND : MB_SELECT, MA_RELEASE, col, row); lastwhen = TickCount(); } void write_clip(void *data, int len) { if (ZeroScrap() != noErr) return; PutScrap(len, 'TEXT', data); } void get_clip(void **p, int *lenp) { /* XXX: do something */ Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 8faabb0b3c9e57f69badfb8a1b955abc Text-content-length: 98 Text-content-md5: 827f7b016389dc4019b4ed4380758bd1 Content-length: 141 K 15 cvs2svn:cvs-rev V 7 1.4.2.9 PROPS-END SVN窲竳 L妋L璄ifdef macintosh #define SEL_NL { 13 } #else #define SEL_NL { 13, 10 } #endif Revision-number: 92 Prop-content-length: 202 Content-length: 202 K 7 svn:log V 101 Add AltGr support at last! Thanks to for the technique if not all of the details. K 10 svn:author V 5 simon K 8 svn:date V 27 1999-03-12T17:14:06.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bc5797a09917f80e479590f02c61d3ba Text-content-length: 2083 Text-content-md5: a03094b5b8802aa2305cf66f093dc203 Content-length: 2122 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN偲傄v'弉伵哣>伵侂4榅侅D俥綠倗RKEYUP: case WM_SYSKEYUP: /* * We handle KEYUP ourselves in order to distinghish left * and right Alt or Control keys, which Windows won't do * right if left to itself. See also the special processing * at the top of TranslateKey. */ { BYTE keystate[256]; int ret = GetKeyboardState(keystate); if (ret && wParam == VK_MENU) { if (lParam & 0x1000000) keystate[VK_RMENU] = 0; else keystate[VK_LMENU] = 0; SetKeyboardState (keystate); } if (ret && wParam == VK_CONTROL) { if (lParam & 0x1000000) keystate[VK_RCONTROL] = 0; else keystate[VK_LCONTROL] = 0; SetKeyboardState (keystate); } } /* * We don't return here, in order to allow Windows to do * its own KEYUP processing as well. */ break int cancel_alt = FALSE * Windows does not always want to distinguish left and right * Alt or Control keys. Thus we keep track of them ourselves. * See also the WM_KEYUP handler. */ if (wParam == VK_MENU) { if (lParam & 0x1000000) keystate[VK_RMENU] = 0x80; else keystate[VK_LMENU] = 0x80; SetKeyboardState (keystate); return 0; } if (wParam == VK_CONTROL) { if (lParam & 0x1000000) keystate[VK_RCONTROL] = 0x80; else keystate[VK_LCONTROL] = 0x80; SetKeyboardState (keystate); return 0; } /* * Prepend ESC, and cancel ALT, if ALT was pressed at the time * and it wasn't AltGr. */ if (lParam & 0x20000000 && (keystate[VK_LMENU] & 0x80)) { *p++ = 0x1B; cancel_alt = TRUE; }LeftALT * from the keymap, since its sole effect should be to prepend * ESC, which we've already done. Note that removal of LeftALT * has to happen _after_ the above call to SetKeyboardState, or * dire things will befall. */ if (cancel_alt) { keystate[VK_MENU] = keystate[VK_RMENU]; keystate[VK_LMENU] = 0; } Revision-number: 93 Prop-content-length: 246 Content-length: 246 K 7 svn:log V 147 Mac OS Makefile renamed to not have a >8.3 file name. Since this stops BuildProgram working, I've created a modified BuildProgram as mkputty.mpw. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-13T16:51:46.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 1031 Text-content-md5: da372a19dff9ad2e9fb7790970d3e824 Content-length: 1151 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN搘儃II揈RFF旸n珼z扗丣丮圖X匟丅凟扙W圚K擣丣圗丣奊侱奊9侶2僄侫圖%岲侾凢侱圝俀塙+僙傽刋傽侷?丱.僛俓僛僛刓 俒俌匞哤傽D僿刌咵傽僃`凩乛侱1H 嘐+孠倆D,M哹F唘團唘嘑/擧傿凧嘑嘕傿K嘼僁嘼J傿L嘑圱咾嘩J嘑圵.匘-[咷塂孠J唞K俻奦0T奅 EI-侶K塂H俛丷塧I僙TE僙bF妛f4J僿TF僿GGI(G媓d4IREO媡F孠c4I.Q哘E.F(E.g宒I凩TE凩I'E凩g宒I刯TE刯I'E刯g宒ITEI'Eg宒J&TF&I'F&h7H匜U廻D匜JD匜g宒I卌TE卌I'E卌d宒L厏Q哘H厏F(H厏f?LS憃HN媡K扽e慇K "".outEbcommandDeleteDone."type "`s -i -n -x t OR "{}" =~ / MPST/ # application or tool-n t; Quon; " Else IDFIL/ # desk accessory in Suitcase Font/DA Mover" "{SystemFolder}"" # Install DAdfil(7)Due -yAppenu Items into Node-path: putty-ben-mac-port/PuTTY.make Node-action: delete Revision-number: 94 Prop-content-length: 144 Content-length: 144 K 7 svn:log V 46 Oops. Don't forget to rename the Makefile... K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-13T16:57:30.000000Z PROPS-END Node-path: putty-ben-mac-port/mkputty.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 244d2e0ac9f229f4b9fa9469652a27b6 Text-content-length: 59 Text-content-md5: 0d2208b194c37c898d26a0da69ba2ab3 Content-length: 102 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN唓唓+咶+Set program PuTTY Set makefile Makefile.mpw Revision-number: 95 Prop-content-length: 109 Content-length: 109 K 7 svn:log V 11 Works now. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-13T18:20:14.000000Z PROPS-END Node-path: putty-ben-mac-port/mkputty.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 0d2208b194c37c898d26a0da69ba2ab3 Text-content-length: 368 Text-content-md5: 81cacd14a02c86aaa84d6dfe59e67d19 Content-length: 411 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN唓噅俆2!o刋u厃 Dev:Null || Set Status 0`" Set CaseSensitive True #filetype check for DA must be case sensitive If "{type}" =~ / APPL/ OR "{type}" =~ / MPST/ # application or tool Echo -n 秚; Quote -n "{program}"; Echo -n " " Else If "{type}" =~ / DFIL/ # desk accessory in Suitcase Echo -n 杜 dfil/ # desk accessory (System 7) Echo -n Revision-number: 96 Prop-content-length: 118 Content-length: 118 K 7 svn:log V 20 Sane version number K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-13T18:22:47.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: ffc73653332c89bf539fe39bebc62aba Text-content-length: 197 Text-content-md5: 0de99b5a4085749661cf2930635efd79 Content-length: 241 K 15 cvs2svn:cvs-rev V 8 1.1.2.10 PROPS-END SVN仚4仚4寎/F膔峹%3/* $Id: mac_res.r,v 1.1.2.10 1999/03/13 18:22:47Dev 0.45 Mac 0", /* Short version (list views) */ "Dev 0.45 Mac 0Dev 0.45 Mac 0, Eric Young and Ben Harris Revision-number: 97 Prop-content-length: 133 Content-length: 133 K 7 svn:log V 35 Auto-scrolling now works properly. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-13T18:23:24.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 4b3b86f8cb6052388e7b883a7d25dd13 Text-content-length: 427 Text-content-md5: b964d7adcaaa97d919738f2e206fe53c Content-length: 471 K 15 cvs2svn:cvs-rev V 8 1.1.2.19 PROPS-END SVN伆*伇^%倄岪0丂琹峮僗'-;纓*/* $Id: macterm.c,v 1.1.2.19 1999/03/13 18:23:24#define PTOCC(x) ((x) < 0 ? -(-(x - font_width - 1) / font_width) : \ (x) / font_width) #define PTOCR(y) ((y) < 0 ? -(-(y - font_height - 1) / font_height) : \ (y) / font_height)PTOCC(localwhere.h); row = PTOCR(localwhere.v)PTOCC(localwhere.h); row = PTOCR(localwhere.v) 0) term_scroll(0, rowSysBeep(30); Revision-number: 98 Prop-content-length: 185 Content-length: 185 K 7 svn:log V 87 Drag-select now autoscrolls more sensibly. Selected text now ends up in the clipboard. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T13:08:44.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 711293b9be3191d82620f245068abfcc Text-content-length: 65 Text-content-md5: a0f9c37a825a6da19b6695ef8436a43b Content-length: 109 K 15 cvs2svn:cvs-rev V 8 1.1.2.15 PROPS-END SVN ,蒀,蕒/* $Id: mac.c,v 1.1.2.15 1999/03/14 13:08:43 Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: b964d7adcaaa97d919738f2e206fe53c Text-content-length: 71 Text-content-md5: cb9c22aab51d6e24d3897f260a4fdd96 Content-length: 115 K 15 cvs2svn:cvs-rev V 8 1.1.2.20 PROPS-END SVN伇^伇M 0"0韠胏/* $Id: macterm.c,v 1.1.2.20 1999/03/14 13:08:43 Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: 2f675c0197735b65784345dd0eb9745d Text-content-length: 323 Text-content-md5: 8002c21c0df61b25cf49bcf5c1ac507a Content-length: 371 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.4 PROPS-END SVN偓偓Q'倳~',倵cx < 0) { x = cols - 1; y--; } else if (x >= cols) x = cols - 1; selpoint = disptop + y * (cols + 1) + x; if (selpoint < sbtop) selpoint = sbtop; else if (selpoint > scrtop + rows * (cols + 1) - 1) /* XXX put this in a variable? */ selpoint = scrtop + rows * (cols + 1) - 1 Revision-number: 99 Prop-content-length: 274 Content-length: 274 K 7 svn:log V 175 There's something going wrong here. Occasional builds have difficulty loading the wordness resource. I've added extra diagnostics, but I haven't worked out what's going on. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T15:48:35.000000Z PROPS-END Node-path: putty-ben-mac-port/maccfg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: e5f6762df1296c82d74601005866880e Text-content-length: 504 Text-content-md5: c7544a7086ac73662bafe5eac7c062d7 Content-length: 547 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN漻:働匑.g唓.丯丼巏 M/* $Id: maccfg.c,v 1.1.2.2 1999/03/14 15:48:35id %d (%d)", id, ResError()); memcpy(dst, *h, 256 * sizeof(short)); } #pragma options align=mac68k#pragma options align=reset || *h == NULL) fatalbox("Can't load settings"); if (GetResourceSizeOnDisk(h) != sizeof(struct pSET)) fatalbox("Settings resource is wrong size (%d vs %d)", GetResourceSizeOnDisk(h), sizeof(struct pSET) /* * Emacs magic: * Local Variables: * c-file-style: "simon" * End: */ Revision-number: 100 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 70 Slightly corrected TMPL for pSET, but it still doesn't work properly. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T15:50:19.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 0de99b5a4085749661cf2930635efd79 Text-content-length: 126 Text-content-md5: 51021520a6f070b7b21210ee33118e51 Content-length: 170 K 15 cvs2svn:cvs-rev V 8 1.1.2.11 PROPS-END SVN仚4仚q d亐m0 亖/* $Id: mac_res.r,v 1.1.2.11 1999/03/14 15:50:19type STR# ID", 'DWRD', "Termtype STR# index", 'DWRD Revision-number: 101 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 67 Cursor painting is now _right_ and scrollbar removal works better. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T15:51:34.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: cb9c22aab51d6e24d3897f260a4fdd96 Text-content-length: 1670 Text-content-md5: 67751e3f4af06af1b1afdc5f7ad34b67 Content-length: 1714 K 15 cvs2svn:cvs-rev V 8 1.1.2.21 PROPS-END SVN伇M伓3孍#0A:峞j ;=亸\丆亼.=亾圦桽仚z/* $Id: macterm.c,v 1.1.2.21 1999/03/14 15:51:340 #define CURSOR_FG_BOLD 21 #define CURSOR_BG 22 #define CURSOR_B { PmBackColor(DEFAULT_BG); /* HideControl clears behind the control */ HideControl(s->scrollbar); }DisposeRgn(textrgn); /* Tell the window manager about it in case this isn't an update */, bright; a = (struct do_text_args *)cookie; bright = (a->attr & ATTR_BOLD) && cfg.bold_colour; if (a->attr & ATTR_REVERSE) TextMode(notSrcCopy); else TextMode(srcCopy)if (a->attr & ATTR_ACTCURS) TextMode((a->attr & ATTR_REVERSE) ? srcCopy : notSrcCopy); break; case 2: if (a->attr & ATTR_ACTCURS) { PmForeColor(bright ? CURSOR_FG_BOLD : CURSOR_FG); PmBackColor(CURSOR_BG); TextMode(srcCopy); } else { PmForeColor(bright ? DEFAULT_FG_BOLD : DEFAULT_FG); PmBackColor(DEFAULT_BG); } break; default: if (a->attr & ATTR_ACTCURS) { fgcolour = (bright ? CURSOR_FG_BOLD : CURSOR_FG); bgcolour = CURSOR_BG; TextMode(srcCopy); } else { fgcolour = ((a->attr & ATTR_FGMASK) >> ATTR_FGSHIFT) * 2; bgcolour = ((a->attr & ATTR_BGMASK) >> ATTR_BGSHIFT) * 2; if (bright) if (a->attr & ATTR_REVERSE) bgcolour++; else fgcolour++; } PmForeColor(fgcolour); PmBackColor(bgcolour); break; } MoveTo(a->textrect.left, a->textrect.top + a->s->font_ascent); DrawText(a->text, 0, a->len); if (a->attr & ATTR_PASCURS) { PenNormal(); switch (depth) { case 1: PenMode(patXor); break; default: PmForeColor(CURSOR_BG); break; } FrameRect(&a->textrect); } Revision-number: 102 Prop-content-length: 367 Content-length: 367 K 7 svn:log V 268 Attribute masking implemented. The variable attr_mask stored the current set of "interesting" attributes, and do_paint only takes those ones into account when deciding when to break style runs. Makes redraw quite a bit faster on displays which don't do ANSI colour. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T17:43:35.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 67751e3f4af06af1b1afdc5f7ad34b67 Text-content-length: 995 Text-content-md5: d5bb3703d755b9f33e9c7ca74b9b8010 Content-length: 1039 K 15 cvs2svn:cvs-rev V 8 1.1.2.22 PROPS-END SVN伓伝{=択0:抰6(亖W 亞l丮仈R俥仏7匩仚A9朙仧M/* $Id: macterm.c,v 1.1.2.22 1999/03/14 17:43:35pascal void mac_set_attr_maskattr_mask = ATTR_MASKget_ctx(free_ctx(NULLTextMode(a->attr & ATTR_REVERSE ? notSrcCopy : a->attr & ATTR_REVERSEbright ? CURSOR_FG_BOLD : CURSOR_FG Should probably be called start_redraw or something. */ struct mac_session *get_ctx(void) { struct mac_session *s = onlysession; attr_mask = ATTR_INVALID; DeviceLoop(s->window->visRgn, mac_set_attr_mask, (long)s, 0); return s; } static pascal void mac_set_attr_mask(short depth, short devflags, GDHandle device, long cookie) { switch (depth) { default: attr_mask |= ATTR_FGMASK | ATTR_BGMASK; /* FALLTHROUGH */ case 2: attr_mask |= ATTR_BOLD; /* FALLTHROUGH */ case 1: attr_mask |= ATTR_UNDER | ATTR_REVERSE | ATTR_ACTCURS | ATTR_PASCURS | ATTR_ASCII | ATTR_GBCHR | ATTR_LINEDRW | (cfg.bold_colour ? 0 : ATTR_BOLD); break; } Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 827f7b016389dc4019b4ed4380758bd1 Text-content-length: 45 Text-content-md5: efa5c62aed7180d6df94cc8e94143df6 Content-length: 89 K 15 cvs2svn:cvs-rev V 8 1.4.2.10 PROPS-END SVN竳 岻>岪unsigned long attr_mask; Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: 8002c21c0df61b25cf49bcf5c1ac507a Text-content-length: 50 Text-content-md5: 07a82d05ec8af0ba15551d713968e616 Content-length: 98 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.5 PROPS-END SVN偓Q偓Q侟$乬侟-4侢attr_maskattr_mask Revision-number: 103 Prop-content-length: 123 Content-length: 123 K 7 svn:log V 25 Tweaked build procedure. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T20:07:04.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: da372a19dff9ad2e9fb7790970d3e824 Text-content-length: 383 Text-content-md5: ccf9db383cb11f66a43de8257a2f9289 Content-length: 426 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN搘*俋<1W亁儁侾U噞妐# $Id: Makefile.mpw,v 1.1.2.2 1999/03/14 20:07:04Libs68K ="{Libraries}Interface.o" PuTTY 哪 {Objects68K} {Libs68K} IF (`exists {Targ}.NJ`) ILink -o {Targ} {Sym68K} -t 'APPL' -c 'pTTY' -newerdeps {NewerDeps} ELSE ILink -o {Targ} {Sym68K} -t 'APPL' -c 'pTTY' {Objects68K} {Libs68K} END Revision-number: 104 Prop-content-length: 167 Content-length: 167 K 7 svn:log V 69 externed backends so I can safely turn on duplicate-symbol warnings. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T20:08:09.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: efa5c62aed7180d6df94cc8e94143df6 Text-content-length: 92 Text-content-md5: bd7255352b746f988545583a56ba00e8 Content-length: 136 K 15 cvs2svn:cvs-rev V 8 1.4.2.11 PROPS-END SVN- F瓻F"畗extern Backend telnet_backend; /* * Exports from ssh.c. */ extern Revision-number: 105 Prop-content-length: 164 Content-length: 164 K 7 svn:log V 66 Scrollbar now updates if a character appears while scrolled back. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T20:09:03.000000Z PROPS-END Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: 07a82d05ec8af0ba15551d713968e616 Text-content-length: 65 Text-content-md5: 97498991802fb87d19b47fd455cc4f73 Content-length: 113 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.6 PROPS-END SVN偓Q偓i (侌)侌9 { update_sbar(); term_update(); } Revision-number: 106 Prop-content-length: 201 Content-length: 201 K 7 svn:log V 102 Since Proff doesn't like me, I'll just print the number of elapsed ticks at the end of the test data. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-14T20:43:51.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: d5bb3703d755b9f33e9c7ca74b9b8010 Text-content-length: 289 Text-content-md5: 7081c1c1fad082e916f19c4e5092c5f1 Content-length: 333 K 15 cvs2svn:cvs-rev V 8 1.1.2.23 PROPS-END SVN伝{伣0歬0"(仛$/* $Id: macterm.c,v 1.1.2.23 1999/03/14 20:43:51 UInt32 starttime; char msg[128]starttime = TickCount(); display_resource('pTST', 128); sprintf(msg, "Elapsed ticks: %d\015\012", TickCount() - starttime); inbuf_putstr(msg); term_out( Revision-number: 107 Prop-content-length: 123 Content-length: 123 K 7 svn:log V 25 Colour icons, allegedly. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-15T00:40:55.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 51021520a6f070b7b21210ee33118e51 Text-content-length: 3886 Text-content-md5: 14cc8343b57fcbc35932b9546d1cfab2 Content-length: 3930 K 15 cvs2svn:cvs-rev V 8 1.1.2.12 PROPS-END SVN仚q伌A '0漜沯/* $Id: mac_res.r,v 1.1.2.12 1999/03/15 00:40:5590FA0000 80020000" $"80020000 7FFC0000 40040000 7FFC", /* [2] */ $"00003FFE 00007FFF 00007FFF 00007FFF" $"00007FFF 00007FFF 00007FFF 00007FFF" $"00007FFF 0001FFFF 0003FFFF 0007FFFF" $"001FFFFF 7FFFFFFF FFFFFFFF FFFFFFFF" $"FFFFFFFE FFFF3FFE FFFE3FFE FFFE0000" $"FFFE0000 FFFE0000 FFFE0000 FFFE0000" $"FFFE0000 FFFE0000 FFFE0000 FFFE0000" $"FFFE0000 7FFC0000 7FFC0000 7FFC" } }; resource 'icl4' (128, purgeable) { $"000000000000000000FFFFFFFFFFFFF0" $"00000000000000000FCCCCCCCCCCCCCF" $"00000000000000000FCEEEEEEEEEEECF" $"00000000000000000FCE0D0D0D0D0CCF" $"00000000000000000FCED0FFD0D0D0CF" $"00000000000000000FCE0F1F0D0D0CCF" $"00000000000000000FCFF1F0D0D0D0CF" $"00000000000000000FF11F0D0D0D0CCF" $"00000000000000000F11F0D0D0D0D0CF" $"000000000000000FF11F0D0D0D0D0CCF" $"00000000000000F111FEC0C0C0C0C0CF" $"0000000000000F111FFFFFCCCCCCCCCF" $"00000000000FF111111111FCCCCCCCCF" $"0FFFFFFFFFF111111111FFCCCFFFFFCF" $"FCCCCCCCCCCFFFFF111F3CCCCCCCCCCF" $"FCEEEEEEEEEEECF111FCCCCCCCCCCCCF" $"FCE0D0D0D0D0FF11FFFFFFFFFFFFFFF0" $"FCED0D0D0D0DF11F00FCCCDDDEEEEAF0" $"FCE0D0D0D0DF11F000FFFFFFFFFFFFF0" $"FCED0D0D0DF1FFF00000000000000000" $"FCE0D0D0DF1FCCF00000000000000000" $"FCED0D0D0FFD0CF00000000000000000" $"FCE0D0D0D0D0CCF00000000000000000" $"FCEC0C0C0C0C0CF00000000000000000" $"FCCCCCCCCCCCCCF00000000000000000" $"FCCCCCCCCCCCCCF00000000000000000" $"FC88CCCCFFFFFCF00000000000000000" $"FC33CCCCCCCCCCF00000000000000000" $"FCCCCCCCCCCCCCF00000000000000000" $"0FFFFFFFFFFFFF000000000000000000" $"0FCCCDDDEEEEAF000000000000000000" $"0FFFFFFFFFFFFF" }; resource 'icl8' (128, purgeable) { $"000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF00" $"0000000000000000000000000000000000FF2B2B2B2B2B2B2B2B2B2B2B2B2BFF" $"0000000000000000000000000000000000FF2BFCFCFCFCFCFCFCFCFCFCFC2BFF" $"0000000000000000000000000000000000FF2BFC2A2A2A2A2A2A2A2A2A002BFF" $"0000000000000000000000000000000000FF2BFC2A2AFFFF2A2A2A2A2A002BFF" $"0000000000000000000000000000000000FF2BFC2AFF05FF2A2A2A2A2A002BFF" $"0000000000000000000000000000000000FF2BFFFF05FF2A2A2A2A2A2A002BFF" $"0000000000000000000000000000000000FFFF0505FF2A2A2A2A2A2A2A002BFF" $"0000000000000000000000000000000000FF0505FF2A2A2A2A2A2A2A2A002BFF" $"000000000000000000000000000000FFFF0505FF2A2A2A2A2A2A2A2A2A002BFF" $"0000000000000000000000000000FF050505FFFC000000000000000000002BFF" $"00000000000000000000000000FF050505FFFFFFFFFF2B2B2B2B2B2B2B2B2BFF" $"0000000000000000000000FFFF050505050505050505FF2B2B2B2B2B2B2B2BFF" $"00FFFFFFFFFFFFFFFFFFFF050505050505050505FFFF2B2B2BFFFFFFFFFF2BFF" $"FF2B2B2B2B2B2B2B2B2B2BFFFFFFFFFF050505FFD82B2B2B2B2B2B2B2B2B2BFF" $"FF2BFCFCFCFCFCFCFCFCFCFCFC2BFF050505FF2B2B2B2B2B2B2B2B2B2B2B2BFF" $"FF2BFC2A2A2A2A2A2A2A2A2AFFFF0505FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00" $"FF2BFC2A2A2A2A2A2A2A2A2AFF0505FF0000FF2BF7F8F9FAFAFBFBFCFCFDFF00" $"FF2BFC2A2A2A2A2A2A2A2AFF0505FF000000FFFFFFFFFFFFFFFFFFFFFFFFFF00" $"FF2BFC2A2A2A2A2A2A2AFF05FFFFFF0000000000000000000000000000000000" $"FF2BFC2A2A2A2A2A2AFF05FF002BFF0000000000000000000000000000000000" $"FF2BFC2A2A2A2A2A2AFFFF2A002BFF0000000000000000000000000000000000" $"FF2BFC2A2A2A2A2A2A2A2A2A002BFF0000000000000000000000000000000000" $"FF2BFC000000000000000000002BFF0000000000000000000000000000000000" $"FF2B2B2B2B2B2B2B2B2B2B2B2B2BFF0000000000000000000000000000000000" $"FF2B2B2B2B2B2B2B2B2B2B2B2B2BFF0000000000000000000000000000000000" $"FF2BE3E32B2B2B2BFFFFFFFFFF2BFF0000000000000000000000000000000000" $"FF2BD8D82B2B2B2B2B2B2B2B2B2BFF0000000000000000000000000000000000" $"FF2B2B2B2B2B2B2B2B2B2B2B2B2BFF0000000000000000000000000000000000" $"00FFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000" $"00FF2BF7F8F9FAFAFBFBFCFCFDFF000000000000000000000000000000000000" $"00FFFFFFFFFFFFFFFFFFFFFFFFFF" Revision-number: 108 Prop-content-length: 108 Content-length: 108 K 7 svn:log V 10 macterm.c K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-15T14:22:45.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 7081c1c1fad082e916f19c4e5092c5f1 Text-content-length: 685 Text-content-md5: b918ba2fcf271fc4e96192ebdbaae082 Content-length: 729 K 15 cvs2svn:cvs-rev V 8 1.1.2.24 PROPS-END SVN伣0伬=刡媟0凴恘?;淟^+(亜+0伒T匟伔h/* $Id: macterm.c,v 1.1.2.24 1999/03/15 14:22:45#include wctab == NULL) s->wctab = (WCTabHandle)NewHandle(sizeof(**s->wctab)); if (s->wctab == NULL) return; /* do without */ (*s->wctab)->wCSeed = 0; (*s->wctab)->wCReserved = 0; (*s->wctab)->ctSize = 0; (*s->wctab)->ctTable[0].value = wContentColor; (*s->wctab)->ctTable[0].rgb = (*s->palette)->pmInfo[DEFAULT_BG].ciRGB; SetWinColor(s->window, s->wctabif (first[n] == DEFAULT_BG) mac_adjustwinbg(smac_adjustwinbg( Revision-number: 109 Prop-content-length: 227 Content-length: 227 K 7 svn:log V 128 Split off copy and paste functionality from term_mouse.c so it can be used from menu items without faking up a term_mouse call. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-15T22:27:04.000000Z PROPS-END Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: 97498991802fb87d19b47fd455cc4f73 Text-content-length: 1454 Text-content-md5: 2ff2e04b1fb644d68468949e10575495 Content-length: 1502 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.7 PROPS-END SVN偓i偓| 2佪;%偒Delect if (selstate == DRAGGING) { term_copy(); selstate = SELECTED; } else selstate = NO_SELECTION; else if (b == MB_PASTE && (a==MA_CLICK || a==MA_2CLK || a==MA_3CLK)) term_paste(); term_update(); } /* * We've completed a selection. We now transfer the * data to the clipboard. */ void term_copy() { unsigned char *p = selspace; unsigned long *q = selstart; while (q < selend) { int nl = FALSE; unsigned long *lineend = q - (q-text) % (cols+1) + cols; unsigned long *nlpos = lineend; if (!(*nlpos & ATTR_WRAPPED)) { while ((nlpos[-1] & CHAR_MASK) == 0x20 && nlpos > q) nlpos--; if (nlpos < selend) nl = TRUE; } while (q < nlpos && q < selend) *p++ = (unsigned char) (*q++ & CHAR_MASK); if (nl) { int i; for (i=0; isend (q, p-q); if (p <= data+len-sizeof(sel_nl) && !memcmp(p, sel_nl, sizeof(sel_nl))) { back->send ("\015", 1); p += sizeof(sel_nl); } q = p; } } get_clip(NULL, NULL Revision-number: 110 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 31 added term_copy and term_paste K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-15T22:27:36.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: bd7255352b746f988545583a56ba00e8 Text-content-length: 53 Text-content-md5: cc1f3f8e10c56282315c7b38a4cc4aec Content-length: 97 K 15 cvs2svn:cvs-rev V 8 1.4.2.12 PROPS-END SVN-筞 璡媈璒copy(void); void term_paste(void Revision-number: 111 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.611468Z PROPS-END Revision-number: 112 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.617324Z PROPS-END Revision-number: 113 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.623568Z PROPS-END Revision-number: 114 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.629911Z PROPS-END Revision-number: 115 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.635970Z PROPS-END Revision-number: 116 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.642461Z PROPS-END Revision-number: 117 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.649254Z PROPS-END Revision-number: 118 Prop-content-length: 240 Content-length: 240 K 7 svn:log V 141 The edit menu is now mostly functional. I'm not sure about paste, since I haven't got a working backend at the moment, but it all looks OK. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-16T20:27:31.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: ccf9db383cb11f66a43de8257a2f9289 Text-content-length: 90 Text-content-md5: 092a416a39a8384ba36bb3f37f7167cc Content-length: 133 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN*擣?嘜1h噛婸圸# $Id: Makefile.mpw,v 1.1.2.3 1999/03/16 20:27:30compactcompact Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: a0f9c37a825a6da19b6695ef8436a43b Text-content-length: 941 Text-content-md5: 20d5e9af033edcff23c64fc3a211c3e4 Content-length: 985 K 15 cvs2svn:cvs-rev V 8 1.1.2.16 PROPS-END SVN ".唖籛,%W9|結綵倈Q /* $Id: mac.c,v 1.1.2.16 1999/03/16 20:27:30 WindowPtr window; menu = HiWord(result); item = LoWord(result); window = FrontWindow(); /* Things which do the same whatever window we're in. */ if (windows.about) SelectWindow(windows.about); else windows.about = GetNewDialog(wAbout, NULL, (WindowPtr)-1); goto donegoto donegoto done; case iClose: mac_closewindow(window); goto done; case iQuit: mac_shutdown(); goto done; } break; } /* If we get here, handling is up to window-specific code. */ switch (mac_windowtype(window)) { case wTerminal: mac_menuterm(window, menu, item); break; } done:case wAbout: windows.about = NULL; CloseWindow(window);if (window != NULL) EnableItem(menu, iClose); else DisableItem(menu, iClose Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: f56ee91fa9a2762e9437efa177546766 Text-content-length: 68 Text-content-md5: 8d4bc9b6626686b0d3f04cc153952fea Content-length: 111 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN匰 0Eextern void mac_menuterm(WindowPtr, short, short Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 14cc8343b57fcbc35932b9546d1cfab2 Text-content-length: 320 Text-content-md5: 95ea6ad7153828ffe6a2c85cf2af2012 Content-length: 364 K 15 cvs2svn:cvs-rev V 8 1.1.2.13 PROPS-END SVN伌A伓~' +0z @咹亗~慗亯DE仛@檆仛^/* $Id: mac_res.r,v 1.1.2.13 1999/03/16 20:27:30 1999 Ben Harris\n" "Portions copyright 1993 Eric Young\n" "Portions copyright 1986 Gary S. Brown\n" "\n"Selection options */ boolean no_implicit_copy, implicit_copy no_implicit_copyImplicit copy Node-path: putty-ben-mac-port/maccfg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: c7544a7086ac73662bafe5eac7c062d7 Text-content-length: 190 Text-content-md5: 21f4645de9d9f3b058165819c89a1c5b Content-length: 233 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN:!.揤丣瀙/* $Id: maccfg.c,v 1.1.2.3 1999/03/16 20:27:30unsigned long selection_flags; #define IMPLICIT_COPYcfg->implicit_copy = (s->selection_flags & IMPLICIT_COPY) != 0; Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: b918ba2fcf271fc4e96192ebdbaae082 Text-content-length: 1269 Text-content-md5: e6f80520de204b33fb0e8e63b5c8b2a2 Content-length: 1313 K 15 cvs2svn:cvs-rev V 8 1.1.2.25 PROPS-END SVN伬伹C$0圞.0抩乚V亗7穜俀0#@V亗7僆亝_%?亱D/* $Id: macterm.c,v 1.1.2.25 1999/03/16 20:27:31Memoryvoid mac_drawgrowicon(struct mac_session *sif (term_hasselection()) EnableItem(menu, iCopy); else menuterm(WindowPtr window, short menu, short itemswitch (menu) { case mEdit: switch (item) { case iCopy: term_copy(); break; case iPaste: term_paste(); break; } } } static Handle h = NULL; long offset; if (p == NULL) { /* release memory */ if (h != NULL) DisposeHandle(h); h = NULL; } else if (GetScrap(NULL, 'TEXT', &offset) > 0) { h = NewEmptyHandle(); *lenp = GetScrap(h, 'TEXT', &offset); HLock(h); *p = *h; } else { *p = NULL; *lenp = 0; } mac_drawgrowicon(s); } void mac_updateterm(WindowPtr windowmac_drawgrowicon(s); free_ctx(NULL); EndUpdate(window); } static void mac_drawgrowicon(struct mac_session *s) { Rect clip; SetPort(s->window); /* Stop DrawGrowIcon giving us space for a horizontal scrollbar */ SetRect(&clip, s->window->portRect.right - 15, SHRT_MIN, SHRT_MAX, SHRT_MAX); ClipRect(&clip); DrawGrowIcon(s->window); clip.left = SHRT_MIN; ClipRect(&clip); } Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: cc1f3f8e10c56282315c7b38a4cc4aec Text-content-length: 74 Text-content-md5: 15556a596086eaa4fee0de77683229c7 Content-length: 118 K 15 cvs2svn:cvs-rev V 8 1.4.2.13 PROPS-END SVN筞 /巁 媍瓀 int implicit_copy; #ifint term_hasselection Node-path: putty-ben-mac-port/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 48 Text-delta: true Text-delta-base-md5: 2ff2e04b1fb644d68468949e10575495 Text-content-length: 164 Text-content-md5: a45f6993e5cdbf9fba568d58a0e580ec Content-length: 212 K 15 cvs2svn:cvs-rev V 11 1.5.2.5.2.8 PROPS-END SVN偓|偖偁s妀偁si$偒Xif (cfg.implicit_copy) /* * Find out if there's a selection. */ int term_hasselection(void) { return selstate == SELECTED Revision-number: 119 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.779080Z PROPS-END Revision-number: 120 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:50.784706Z PROPS-END Revision-number: 121 Prop-content-length: 123 Content-length: 123 K 7 svn:log V 25 ignore ILink state files K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-17T21:53:34.000000Z PROPS-END Node-path: putty-ben-mac-port Node-kind: dir Node-action: change Prop-delta: true Prop-content-length: 102 Content-length: 102 K 10 svn:ignore V 70 *.pdb *.ilk *.res *.RES *.pch *.rsp *.rsrc *.makeout .AppleDouble *.NJ PROPS-END Node-path: putty-ben-mac-port/.cvsignore Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 545c2596ac03f388ae41530fbc5542df Text-content-length: 19 Text-content-md5: e5c0b3bc7418dd533fac6997f9f839b7 Content-length: 62 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVNBGA *.NJ Revision-number: 122 Prop-content-length: 279 Content-length: 279 K 7 svn:log V 180 Backends now seem to work. Pasting still doesn't. macterm.c now uses UPPs for a few things so that it should work if compiled natively for the PowerPC. Not tested it yet though. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-18T00:04:34.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: e6f80520de204b33fb0e8e63b5c8b2a2 Text-content-length: 934 Text-content-md5: 69726fa08531ac697d5629739f7851e8 Content-length: 978 K 15 cvs2svn:cvs-rev V 8 1.1.2.26 PROPS-END SVN伹佀Y3唀;03奭5:漟歟纆,躩廟仠(歽伂 /* $Id: macterm.c,v 1.1.2.26 1999/03/18 00:04:34MixedMode#ifdef USES_ROUTINE_DESCRIPTORS static RoutineDescriptor mac_scrolltracker_upp = BUILD_ROUTINE_DESCRIPTOR(uppControlActionProcInfo, (ProcPtr)mac_scrolltracker); static RoutineDescriptor do_text_for_device_upp = BUILD_ROUTINE_DESCRIPTOR(uppDeviceLoopDrawingProcInfo, (ProcPtr)do_text_for_device); static RoutineDescriptor mac_set_attr_mask_upp = BUILD_ROUTINE_DESCRIPTOR(uppDeviceLoopDrawingProcInfo, (ProcPtr)mac_set_attr_mask); #else /* not USES_ROUTINE_DESCRIPTORS */ #define mac_scrolltracker_upp mac_scrolltracker #define do_text_for_device_upp do_text_for_device #define mac_set_attr_mask_upp mac_set_attr_mask #endif /* not USES_ROUTINE_DESCRIPTORS */ back = &loop_backend;&mac_scrolltracker_uppback->send((char *)buf, len&do_text_for_device_upp&mac_set_attr_mask_upp Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: bda2e2e0f166f383e37156566d980ab2 Text-content-length: 77 Text-content-md5: 56a0f45508820d18b8b7a38314238d2a Content-length: 120 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN2奵0僆>嶿/* $Id: testback.c,v 1.1.2.2 1999/03/18 00:04:34op Revision-number: 123 Prop-content-length: 199 Content-length: 199 K 7 svn:log V 100 Pointer-shape canging added -- we now have an I-beam cursor in the terminal window. Pasting works! K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-21T23:23:43.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 20d5e9af033edcff23c64fc3a211c3e4 Text-content-length: 1055 Text-content-md5: 65b5ab5a29f2bd02e9ddc0820eb0afb4 Content-length: 1099 K 15 cvs2svn:cvs-rev V 8 1.1.2.17 PROPS-END SVN"噚,嶹態 匒/* $Id: mac.c,v 1.1.2.17 1999/03/21 23:23:42RgnHandle RgnHandle cursrgn; cursrgn = NewRgn(); for (;;) { mac_adjustcursor(cursrgn); gotevent = WaitNextEvent(everyEvent, &event, LONG_MAX, cursrgn); mac_adjustcursor(cursrgn); if (gotevent) mac_event(&event); } DisposeRgn(cursrgn);RgnHandle cursrgn) { Point mouse; WindowPtr window, front; short part; GetMouse(&mouse); LocalToGlobal(&mouse); part = FindWindow(mouse, &window); front = FrontWindow(); if (part != inContent || window == NULL || window != front) { /* Cursor isn't in the front window, so switch to arrow */ SetCursor(&qd.arrow); SetRectRgn(cursrgn, SHRT_MIN, SHRT_MIN, SHRT_MAX, SHRT_MAX); if (front != NULL) DiffRgn(cursrgn, front->visRgn, cursrgn); } else { switch (mac_windowtype(window)) { case wTerminal: mac_adjusttermcursor(window, mouse, cursrgn); break; default: SetCursor(&qd.arrow); CopyRgn(window->visRgn, cursrgn); break; } } Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 8d4bc9b6626686b0d3f04cc153952fea Text-content-length: 55 Text-content-md5: 98c68dded72a4e59fa0444106884f102 Content-length: 98 K 15 cvs2svn:cvs-rev V 7 1.1.2.8 PROPS-END SVN咵 "<俫cursor(WindowPtr, Point, RgnHandle Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 69726fa08531ac697d5629739f7851e8 Text-content-length: 941 Text-content-md5: e57fdef7db20a8200d7d73e0b51d6f26 Content-length: 985 K 15 cvs2svn:cvs-rev V 8 1.1.2.27 PROPS-END SVN佀Y佉+!唦'0 r耬4筂1閪醄/* $Id: macterm.c,v 1.1.2.27 1999/03/21 23:23:42Set the cursor shape correctly */ void mac_adjusttermcursor(WindowPtr window, Point mouse, RgnHandle cursrgn) { struct mac_session *s; ControlHandle control; short part; int x, y; SetPort(window); s = (struct mac_session *)GetWRefCon(window)SetCursor(&qd.arrow); RectRgn(cursrgn, &(*s->scrollbar)->contrlRect); SectRgn(cursrgn, window->visRgn, cursrgn); } else { x = mouse.h / font_width; y = mouse.v / font_height; SetCursor(*GetCursor(iBeamCursor)); /* Ask for shape changes if we leave this character cell. */ SetRectRgn(cursrgn, x * font_width, y * font_height, (x + 1) * font_width, (y + 1) * font_height); SectRgn(cursrgn, window->visRgn, cursrgn); }Handle(0); *lenp = GetScrap(h, 'TEXT', &offset); HLock(h); *p = *h; if (*p == NULL || *lenp <= 0) fatalbox("Empty scrap") Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 56a0f45508820d18b8b7a38314238d2a Text-content-length: 103 Text-content-md5: 5ff67219df85022dbd7f636209023f60 Content-length: 146 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN? R0[怉/* $Id: testback.c,v 1.1.2.3 1999/03/21 23:23:43 term_out(); term_update(); Revision-number: 124 Prop-content-length: 151 Content-length: 151 K 7 svn:log V 53 Fonts with leading and/or the wrong widMax now work. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-23T00:43:46.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: e57fdef7db20a8200d7d73e0b51d6f26 Text-content-length: 585 Text-content-md5: e7514c8b107b5364a1bdd57046e01c44 Content-length: 629 K 15 cvs2svn:cvs-rev V 8 1.1.2.28 PROPS-END SVN佉+佌E,70恆2餗璤仦"98仱+X烳伈^/* $Id: macterm.c,v 1.1.2.28 1999/03/23 00:43:46int font_leadingCharWidth('W'); /* Well, it's what NCSA uses. */ s->font_ascent = fi.ascent; s->font_leading = fi.leading; font_height = s->font_ascent + fi.descent + s->font_leadingRect leadif (s->font_leading > 0) SetRect(&a.leadrect, a.textrect.left, a.textrect.bottom - s->font_leading, a.textrect.right, a.textrect.bottom); else SetRect(&a.leadrect, 0, 0, 0, 0)if (a->attr & ATTR_REVERSE) PaintRect(&a->leadrect); else EraseRect(&a->leadrect); Revision-number: 125 Prop-content-length: 142 Content-length: 142 K 7 svn:log V 42 Change default mouse pointer to an I-beam K 10 svn:author V 5 simon K 8 svn:date V 27 1999-03-23T17:14:00.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a03094b5b8802aa2305cf66f093dc203 Text-content-length: 29 Text-content-md5: a08ba785e147f346e537e30b25d39d0a Content-length: 68 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN傄v傄v -偝D2IBEAM Revision-number: 126 Prop-content-length: 257 Content-length: 257 K 7 svn:log V 156 Add SSH_STATE_CLOSED to prevent accidentally sending resizes down a closed connection; was causing process hangs under NT and whole- system hangs under '95 K 10 svn:author V 5 simon K 8 svn:date V 27 1999-03-23T17:21:44.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bc60054c910b5809b643a6dc237eea1a Text-content-length: 176 Text-content-md5: b3d68f198bb319f38eb97ecd7ec13088 Content-length: 215 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN亝,亞'噡噡唞2, SSH_STATE_CLOSED */ ssh_state = SSH_STATE_CLOSED; ssh_state = SSH_STATE_CLOSED case SSH_STATE_CLOSED Revision-number: 127 Prop-content-length: 255 Content-length: 255 K 7 svn:log V 156 Ha! Nasty intermittent bug nailed (I think)! "That word, resLocked: I do not think it means what you think it means." HLock seems to be my friend though. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-23T21:00:05.000000Z PROPS-END Node-path: putty-ben-mac-port/maccfg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 21f4645de9d9f3b058165819c89a1c5b Text-content-length: 392 Text-content-md5: 3c7ec027dd1d30056d8a443e73aaeb15 Content-length: 435 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN俫丆8憊j燲/* $Id: maccfg.c,v 1.1.2.4 1999/03/23 21:00:05 ben Exp $ */ /* * maccfg.c -- Mac port configuration */ #include #include #include #include HLock(h); if (GetHandleSize(h) != sizeof(struct pSET)) fatalbox("Settings resource is wrong size (%d vs %d)", GetHandleSize(h), sizeof(struct pSET)HUnlock(h Revision-number: 128 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.111327Z PROPS-END Revision-number: 129 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.119228Z PROPS-END Revision-number: 130 Prop-content-length: 264 Content-length: 264 K 7 svn:log V 165 General cleanup because MrC is rather pickier than SC. Not that the PPC build actually links, you understand, but it does most of the rest of the things it should. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-27T15:39:46.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 092a416a39a8384ba36bb3f37f7167cc Text-content-length: 2789 Text-content-md5: eac30600d770fd1eb43730cef4efdf05 Content-length: 2832 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN擣T#1 .+|;俌僣5lqmpea宧*_巉T_= _恘:m抯bm揦b =# $Id: Makefile.mpw,v 1.1.2.4 1999/03/27 15:39:45SymPC = ObjDirPC = COptions = {Includes} {Sym68K} -proto strict -opt all PPCCOptions = {Includes} {SymPC} -opt size ObjectsPC = "{ObjDirPC}mac.c.x" "{ObjDirPC}maccfg.c.x" "{ObjDirPC}macterm.c.x" "{ObjDirPC}misc.c.x" # "{ObjDirPC}ssh.c.x" # "{ObjDirPC}sshcrc.c.x" # "{ObjDirPC}sshdes.c.x" # "{ObjDirPC}sshmd5.c.x" # "{ObjDirPC}sshrand.c.x" # "{ObjDirPC}sshrsa.c.x" # "{ObjDirPC}sshsha.c.x" # "{ObjDirPC}telnet.c.x" "{ObjDirPC}terminal.c.x" "{ObjDirPC}testback.c.x" LibsPC = "{SharedLibraries}InterfaceLib" "{SharedLibraries}StdCLib" "{SharedLibraries}MathLib" "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" "{PPCLibraries}PPCToolLibs.o" PuTTY.ppc 哪 {ondoBuild {ObjectsPC} PPCLink -o {Targ} {SymPC} {ObjectsPC} -t 'APPL' -c 'pTTY' {LibsPC} "{ObjDirPC}mac.c.x" {ondoBuild mac.c putty.h mac.h macresid.h {PPCC} mac.c -o {Targ} {PPCCOptions} "{ObjDirPC}maccfg.c.x" {ondoBuild maccfg.c putty.h mac.h macresid.h {PPCC} maccfg.c -o {Targ} {PPCCo"{ObjDirPC}macterm.c.x" {ondoBuild macterm.c mac.h putty.h {PPCC} macterm.c -o {Targ} {PPCCo"{ObjDirPC}misc.c.x" {ondoBuild misc.c putty.h {PPCC} misc.c -o {Targ} {PPCCoptions} "{ObjDir68K}ssh.c.o" {ondoBuild ssh.c {C} ssh.c -o {Targ} {COptions} "{ObjDirPC}ssh.c.x" {ondoBuild ssh.c {PPCC} ssh.c -o {Targ} {PPCCoptions} "{ObjDir68K}sshcrc.c.o" {ondoBuild sshcrc.c {C} sshcrc.c -o {Targ} {COptions} "{ObjDirPC}sshcrc.c.x" {ondoBuild sshcrc.c {PPCC} sshcrc.c -o {Targ} {PPCCo"{ObjDirPC}sshdes.c.x" {ondoBuild sshdes.c {PPCC} sshdes.c -o {Targ} {PPCCo"{ObjDirPC}sshmd5.c.x" {ondoBuild sshmd5.c {PPCC} sshmd5.c -o {Targ} {PPCCoptions} "{ObjDir68K}sshrand.c.o" {ondoBuild sshrand.c {C} sshrand.c -o {Targ} {COptions} "{ObjDirPC}sshrand.c.x" {ondoBuild sshrand.c {PPCC} sshrand.c -o {Targ} {PPCCo"{ObjDirPC}sshrsa.c.x" {ondoBuild sshrsa.c {PPCC} sshrsa.c -o {Targ} {PPCCoptions} "{ObjDir68K}sshsha.c.o" {ondoBuild sshsha.c {C} sshsha.c -o {Targ} {COptions} "{ObjDirPC}sshsha.c.x" {ondoBuild sshsha.c {PPCC} sshsha.c -o {Targ} {PPCCoptions} "{ObjDir68K}telnet.c.o" {ondoBuild telnet.c {C} telnet.c -o {Targ} {COptions} "{ObjDirPC}telnet.c.x" {ondoBuild telnet.c {PPCC} telnet.c -o {Targ} {PPCCo"{ObjDirPC}terminal.c.x" {ondoBuild terminal.c putty.h {PPCC} terminal.c -o {Targ} {PPCCo"{ObjDirPC}testback.c.x" {ondoBuild testback.c putty.h {PPCC} testback.c -o {Targ} {PPCCo Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 65b5ab5a29f2bd02e9ddc0820eb0afb4 Text-content-length: 210 Text-content-md5: 2d4286266a2ca4016d5ee66144cb7b66 Content-length: 254 K 15 cvs2svn:cvs-rev V 8 1.1.2.18 PROPS-END SVN譴+:,垀 泒#"滾筍/* $Id: mac.c,v 1.1.2.18 1999/03/27 15:39:45 /* Mac OS 8.5 Window Manager? */ if (Gestalt(gestaltWindowMgrAttr, &mac_gestalts.windattr) != noErr) mac_gestalts.wind Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 98c68dded72a4e59fa0444106884f102 Text-content-length: 96 Text-content-md5: f18c85bb5991d5c1c9c0adc27ca68ae5 Content-length: 139 K 15 cvs2svn:cvs-rev V 7 1.1.2.9 PROPS-END SVN咵 J 凘 long wind /* * Local Variables: * c-file-style: "simon" * End: */ Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: e7514c8b107b5364a1bdd57046e01c44 Text-content-length: 923 Text-content-md5: 94ddd17f259247bb82df69c5a190ed33 Content-length: 967 K 15 cvs2svn:cvs-rev V 8 1.1.2.29 PROPS-END SVN佌E佒[/哵0?朸$54泀 0厇璝70?仮/* $Id: macterm.c,v 1.1.2.29 1999/03/27 15:39:45 TARGET_RT_MAC_CFMTARGET_RT_MAC_CFMTARGET_RT_MAC_CFMSet the background colour of the window correctly. Should be * called whenever the default background changes. */ static void mac_adjustwinbg(struct mac_session *s) { #if 0 /* XXX doesn't link (at least for 68k) */ if (mac_gestalts.windattr & gestaltWindowMgrPresent) SetWindowContentColor(s->window, &(*s->palette)->pmInfo[DEFAULT_BG].ciRGB); else #endif { if (s->wctab == NULL) s->wctab = (WCTabHandle)NewHandle(sizeof(**s->wctab)); if (s->wctab == NULL) return; /* do without */ (*s->wctab)->wCSeed = 0; (*s->wctab)->wCReserved = 0; (*s->wctab)->ctSize = 0; (*s->wctab)->ctTable[0].value = wContentColor; (*s->wctab)->ctTable[0].rgb = (*s->palette)->pmInfo[DEFAULT_BG].ciRGB; SetWinColor(s->window, s->wctab); } Node-path: putty-ben-mac-port/mkputty.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 81cacd14a02c86aaa84d6dfe59e67d19 Text-content-length: 32 Text-content-md5: 387c21d1c3ab1553fd4be5c6cf6031a5 Content-length: 75 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN噅噕 丳丱"{program}" Revision-number: 131 Prop-content-length: 124 Content-length: 124 K 7 svn:log V 26 Meta key support, mostly. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-28T02:06:11.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 2d4286266a2ca4016d5ee66144cb7b66 Text-content-length: 525 Text-content-md5: 04f858df8c30c52ff22485ec9c01fa25 Content-length: 569 K 15 cvs2svn:cvs-rev V 8 1.1.2.19 PROPS-END SVN譴赒#僞,&=乣抌擛俓a簅籭/* $Id: mac.c,v 1.1.2.19 1999/03/28 02:06:10#pragma noreturn (mac_eventloop)#pragma noreturn (mac_shutdown)#pragma noreturn (main)window = FrontWindow(); /* * Check for a command-key combination, but ignore it if it counts * as a meta-key combination and we're in a terminal window. */ if (event->what == keyDown && (event->modifiers & cmdKey) && !((event->modifiers & cfg.meta_modifiers) == cfg.meta_modifiers && mac_windowtype(window) == wTerminal Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 95ea6ad7153828ffe6a2c85cf2af2012 Text-content-length: 183 Text-content-md5: 4f79b73d24915d1b110ccb31d27d215a Content-length: 227 K 15 cvs2svn:cvs-rev V 8 1.1.2.14 PROPS-END SVN伓~伔l亪'/咰亪Q扞亸+仭S/* $Id: mac_res.r,v 1.1.2.14 1999/03/28 02:06:1 integer; /* meta modifier 0x900, /* meta modifiers (cmd+option) "meta modifiers", 'H Node-path: putty-ben-mac-port/maccfg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 3c7ec027dd1d30056d8a443e73aaeb15 Text-content-length: 146 Text-content-md5: da819cdb8e31a0fcfc0fa3bf026637ae Content-length: 189 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVNv.0噊+/* $Id: maccfg.c,v 1.1.2.5 1999/03/28 02:06:10 unsigned short meta_modifierscfg->meta_modifiers = s->meta_modifiers Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 94ddd17f259247bb82df69c5a190ed33 Text-content-length: 925 Text-content-md5: 3ba39408c97100b73cd61b35cf9445a9 Content-length: 969 K 15 cvs2svn:cvs-rev V 8 1.1.2.30 PROPS-END SVN佒[佪""唌婨0 媐 並阨乹8+篴仜z/* $Id: macterm.c,v 1.1.2.30 1999/03/28 02:06:10criptUInt32 mac_rekey(EventModifiers newmodifiers, UInt32 oldmessage) { UInt32 transresult, state; Ptr kchr; state = 0; kchr = (Ptr)GetScriptManagerVariable(smKCHRCache); transresult = KeyTranslate(kchr, (oldmessage & keyCodeMask) >> 8 | newmodifiers & 0xff00, &state); /* * KeyTranslate returns two character codes. We only worry about * one. Yes, this is slightly bogus, but it makes life less * painful. */ return oldmessage & ~charCodeMask | transresult & 0xff; } Check if the meta "key" was held down */ if ((event->modifiers & cfg.meta_modifiers) == cfg.meta_modifiers) { *p++ = '\033'; event->modifiers &= ~cfg.meta_modifiers; event->message = mac_rekey(event->modifiers, event->message); }DEFAULT_FG); PmBackColor(DEFAULT_BG Node-path: putty-ben-mac-port/mkputty.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 387c21d1c3ab1553fd4be5c6cf6031a5 Text-content-length: 174 Text-content-md5: 8e98758685e33e4804ce5cffc6fcef77 Content-length: 217 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN噕. W# $Id: mkputty.mpw,v 1.1.2.5 1999/03/28 02:06:11 ben Exp $ #if (`exists "#""#"`) # echo "# `Date -t` ----- Warning: auto-save file present." #endnd Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 15556a596086eaa4fee0de77683229c7 Text-content-length: 96 Text-content-md5: 7f10c6718b29d3f2083328d7af75e070 Content-length: 140 K 15 cvs2svn:cvs-rev V 8 1.4.2.14 PROPS-END SVN 篩E沒媠沇扗int meta_modifiers#ifdef macintosh #pragma noreturn (fatalbox) #endif Revision-number: 132 Prop-content-length: 118 Content-length: 118 K 7 svn:log V 20 XCOFF object files. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-28T02:07:03.000000Z PROPS-END Node-path: putty-ben-mac-port Node-kind: dir Node-action: change Prop-delta: true Prop-content-length: 108 Content-length: 108 K 10 svn:ignore V 76 *.pdb *.ilk *.res *.RES *.pch *.rsp *.rsrc *.makeout .AppleDouble *.NJ *.c.x PROPS-END Node-path: putty-ben-mac-port/.cvsignore Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: e5c0b3bc7418dd533fac6997f9f839b7 Text-content-length: 20 Text-content-md5: cc877c3ac6b3b0040f8c4530167d18e7 Content-length: 63 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVNGMF *.c.x Revision-number: 133 Prop-content-length: 163 Content-length: 163 K 7 svn:log V 65 PowerPC build sorted and general serious tidying-up of Makefile. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-28T15:23:37.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: eac30600d770fd1eb43730cef4efdf05 Text-content-length: 1712 Text-content-md5: d3de88bc1691b1c22376ee34c6f75d48 Content-length: 1755 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN攟)寋12乵5_T寏[峽a巇弆U2# $Id: Makefile.mpw,v 1.1.2.5 1999/03/28 15:23:37SymPC = COptions = {Includes} {Sym68K} -proto strict -opt all # disable "unused parameter" warnings PPCCOptions = {Includes} {SymPC} -w 35 # short names for targets 68k PuTTY ppc PuTTY.ppc fat PuTTY.fat Objects68K = mac.c.o maccfg.c.o macterm.c.o misc.c.o # ssh.c.o # sshcrc.c.o # sshdes.c.o # sshmd5.c.o # sshrand.c.o # sshrsa.c.o # sshsha.c.o # telnet.c.o terminal.c.o testback.c.o ObjectsPC = mac.c.x maccfg.c.x macterm.c.x misc.c.x # ssh.c.x # sshcrc.c.x # sshdes.c.x # sshmd5.c.x # sshrand.c.x # sshrsa.c.x # sshsha.c.x # telnet.c.x terminal.c.x testback.c.xSharedLibraries}AppearanceLib" "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime-t 'APPL' -c 'pTTY' {ObjectsPC}PuTTY.ppcPuTTY.fat PuTTY PuTTY.ppc Duplicate -y PuTTY PuTTY.fat MergeFragment PuTTY.ppc PuTTY.fat .c.o .c {C} {default}.c -o {Targ} {COptions} # The odd stuff here seems to stop afpd getting confused. .c.x .c echo -n > {Targ} setfile -t XCOF {Targ} {PPCC} {default}.c -o {Targ} {PPCCOptions} mac.c.o mac.c.x putty.h mac.h macresid.h maccfg.c.o maccfg.c.x putty.h mac.h macresid.h macterm.c.o macterm.c.x putty.h mac.h misc.c.o misc.c.x putty.h ssh.c.o ssh.c.x putty.h ssh.h sshcrc.c.o sshcrc.c.x sshdes.c.o sshdes.c.x ssh.h sshmd5.c.o sshmd5.c.x ssh.h sshrand.c.o sshrand.c.x ssh.h sshrsa.c.o sshrsa.c.x ssh.h sshsha.c.o sshsha.c.x ssh.h telnet.c.o telnet.c.x putty.h terminal.c.o terminal.c.x putty.h testback.c.o testback.c.x putty.h Node-path: putty-ben-mac-port/mkputty.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 8e98758685e33e4804ce5cffc6fcef77 Text-content-length: 273 Text-content-md5: 48332ee77db13c499008cf126576d9b7 Content-length: 316 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN.嘷亊亊卆M# $Id: mkputty.mpw,v 1.1.2.6 1999/03/28 15:23:37 ben Exp $ set program "{1}" shift if "{program}" == "" || "{program}" == "68k" set program PuTTY end if "{program}" == "ppc" set program PuTTY.ppc end if "{program}" == "fat" set program PuTTY.fat end Revision-number: 134 Prop-content-length: 153 Content-length: 153 K 7 svn:log V 55 Very basic hex-dump backend for testing meta handling. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-28T15:25:45.000000Z PROPS-END Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 7f10c6718b29d3f2083328d7af75e070 Text-content-length: 42 Text-content-md5: 7375086edaeba637b5d68db7f4eafd5a Content-length: 86 K 15 cvs2svn:cvs-rev V 8 1.4.2.15 PROPS-END SVN篩簓 禮 禢extern Backend hexdum Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 5ff67219df85022dbd7f636209023f60 Text-content-length: 532 Text-content-md5: 664eb01e9ece409b82a3d69a1e507715 Content-length: 575 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN?攗僫塂0丟塮 寃乶巣俿/* $Id: testback.c,v 1.1.2.4 1999/03/28 15:25:45io.h>hexdumBackend hexdump_backend = { null_init, null_msg, hexdumstatic void hexdump_send(char *buf, int len) { static char mybuf[10]; int mylen; while (len--) { mylen = sprintf(mybuf, "%02x\015\012", (unsigned char)*buf++); loop_send(mybuf, mylen); } } static void null_size(void) { } static void null_special(Telnet_Special code) { } /* * Emacs magic: * Local Variables: * c-file-style: "simon" * End: */ Revision-number: 135 Prop-content-length: 179 Content-length: 179 K 7 svn:log V 81 Correct handling of keypad enter in normal keypad mode. Use of hex dump backend. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-28T15:27:03.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 3ba39408c97100b73cd61b35cf9445a9 Text-content-length: 220 Text-content-md5: 04ad5f55b37d14f810312292dd745f34 Content-length: 264 K 15 cvs2svn:cvs-rev V 8 1.1.2.31 PROPS-END SVN佪"佫'0c@綹.#!仏/* $Id: macterm.c,v 1.1.2.31 1999/03/28 15:27:03 ben Exp $ */ /* * Copyright (c) 1999 Simon TathamhexdumF13 0x6900 #define K_F14 0x6b00 #define K_F15 0x71P_ENTER: *p++ = 0x0d Revision-number: 136 Prop-content-length: 114 Content-length: 114 K 7 svn:log V 16 Makefile fixes. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-28T17:34:36.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: d3de88bc1691b1c22376ee34c6f75d48 Text-content-length: 217 Text-content-md5: 7326ec6fc8f57bc80186fb36627d1fd6 Content-length: 260 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN攟;1x6奆寀# $Id: Makefile.mpw,v 1.1.2.6 1999/03/28 17:34:36# pseudo-targets all 68k ppc fat clean delete -i {Objects68K} {ObjectsPC} PuTTY PuTTY.fat PuTTY.ppc PuTTY.NJo {Targ} {Sym68K} Revision-number: 137 Prop-content-length: 160 Content-length: 160 K 7 svn:log V 62 "real bold" temporarily the default to persuade me to fix it. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-29T19:48:50.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 4f79b73d24915d1b110ccb31d27d215a Text-content-length: 77 Text-content-md5: 5a88af9d2e8bca91e5df0e9c56873fc9 Content-length: 121 K 15 cvs2svn:cvs-rev V 8 1.1.2.15 PROPS-END SVN伔l伔j 3亰X/琠亱 /* $Id: mac_res.r,v 1.1.2.15 1999/03/29 19:48:5font Revision-number: 138 Prop-content-length: 233 Content-length: 233 K 7 svn:log V 134 First attempt at multiple-session support. This has broken meta handling, since mac.c needs to know whether to grab Cmd-keys or not. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-29T19:50:24.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 04f858df8c30c52ff22485ec9c01fa25 Text-content-length: 75 Text-content-md5: 5b0e717a3cd9c63eff53d76067cb5901 Content-length: 119 K 15 cvs2svn:cvs-rev V 8 1.1.2.20 PROPS-END SVN赒赨0糝,p紐渃絥/* $Id: mac.c,v 1.1.2.20 1999/03/29 19:50:22/**/ Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 04ad5f55b37d14f810312292dd745f34 Text-content-length: 5410 Text-content-md5: 0a68a2cbd754f7ee2bd4ad3676c2a923 Content-length: 5454 K 15 cvs2svn:cvs-rev V 8 1.1.2.32 PROPS-END SVN佫'佦< /倀乮D朳0瀜w2w5r侳-y亀!獂U玿]!b乬畘^皅眤 丩匢e綠 纞N=翴,腨=r萶O蕒?薞1t蠷裄誳Y譶丣$p逽乑, p刉7乲\騒h𒯱 亝q乨亞{,亪_ni仈sh仌\ 仏D 仐Q`仛JW仠j`乯仦3q僎仭 G俇仴0乯仺乺仾伂~w伆.凮伇%伒t僉{伵bm伷]乤伹j丯伿0佀d丩佂z2佅o丏佉z佖0 佦r7佨p/* $Id: macterm.c,v 1.1.2.32 1999/03/29 19:50:2s->font_width - 1) / s->font_width) : \ (x) / s->font_width) #define PTOCR(y) ((y) < 0 ? -(-(y - s->font_height - 1) / s->font_height) : \ (y) / s->font_height) static void mac_initfont(Session *); static void mac_initpalette(Session *); static void mac_adjustwinbg(Session *); static void mac_adjustsize(Session *, int, int); static void mac_drawgrowicon(SSession *, EventRecord *, unsigned char *); static void text_click(Svoid inbuf_putc(Session *s, int c) { s->inbuf[s->inbuf_head] = c; s->inbuf_head = (s->inbuf_head+1) & INBUF_MASK; } static void inbuf_putstr(Session *s, const char *c) { while (*c) inbuf_putc(s, *c++); } static void display_resource(Session *s, s, t[i]); term_out(sSs = smalloc(sizeof(*s)); memset(s, 0, sizeof(*s)); mac_loadconfig(&s->cfg); s->back = &hexdump_backends); term_size(s, s->cfg.height, s->cfg.width, s->cfg.savelines); mac_initfont(s); mac_initpalette(s); s->s, 'pTST', 128); sprintf(msg, "Elapsed ticks: %d\015\012", TickCount() - starttime); inbuf_putstr(s, msg); term_out(s); } static void mac_initfont(Ss->s->cfg.fontisbold ? bold : 0); TextSize(s->cfg.fontheight); GetFontInfo(&fi); s->s->font_height = s->font_ascent + fi.descent + s->font_leading; mac_adjustsize(s, s->rows, s->Ss->font_width + 15; winheight = newrows * s->Session *s) { if (mac_gestalts.qdvers == gestaltOriginalQD) return; s->palette = NewPalette((*s->cfg.colours)->pmEntries, NULL, pmCourteous, 0); if (s->palette == NULL) fatalbox("Unable to create palette"); CopyPalette(s->cfg.colours, s->palette, 0, 0, (*s->Session *s) { #if TARGET_RT_CFMSession *s; ControlHandle control; short part; int x, y; SetPort(window); s = (Ss->font_width; y = mouse.v / s->s->font_width, y * s->font_height, (x + 1) * s->font_width, (y + 1) * s->Session *s; MenuHandle menu; long offset; s = (SsSession *s; s = (Ss); break; case iPaste: term_paste(s); break; } } } void mac_clickterm(WindowPtr window, EventRecord *event) { SSs, SSs, s, s->rows - 1) term_scroll(s, 0, row - (s->rows - 1)); else if (row < 0) term_scroll(s, 0, row); } term_mouse(s, event->modifiers & shiftKey ? MB_EXTEND : MB_SELECT, MA_RELEASE,Session *s; s = (Ss, 0, -1); break; case kControlDownButtonPart: term_scroll(s, 0, +1); break; case kControlPageUpPart: term_scroll(s, 0, -(s->rows - 1)); break; case kControlPageDownPart: term_scroll(s, 0, +(s->Session *s; s = (Session *)GetWRefCon(window); len = mac_keytrans(s, event, buf); s->back->send(s, Ss->cfg.meta_modifiers) == s->cfg.meta_modifiers) { *p++ = '\033'; event->modifiers &= ~s->s, 0, -(s->rows - 1)); return 0; case K_NEXT: /* shift-pagedown */ term_scroll(s, 0, +(s->s->s->s->s->app_cursor_keys ? "\x1BOA" : "\x1B[A"); return p - output; case K_DOWN: p += sprintf((char *)p, s->s->s->s->Session *s; s = (Session *)GetWRefCon(window); SetRect(&limits, s->font_width + 15, s->s->font_height; newcols = (LoWord(grow_result) - 15) / s->font_width; mac_adjustsize(s, newrows, newcols); term_size(s, newrows, newcols, s->Session *s; s = (Session *)GetWRefCon(window); s->has_focus = active; term_update(sSession *s; s = (Session *)GetWRefCon(window); SetPort(window); BeginUpdate(window); pre_paint(spost_paint(s); EndUpdate(window); } static void mac_drawgrowicon(SSSs->font_height; a.textrect.bottom = (y + 1) * s->font_height; a.textrect.left = x * s->font_width; a.textrect.right = (x + len) * s->s->cfg.fontisbold || (attr & ATTR_BOLD) && !s->s->a->s->void pre_paint(Session *s) { s->attr_mask = ATTR_INVALID; DeviceLoop(s->window->visRgn, &mac_set_attr_mask_upp, (long)s, 0); } static pascal void mac_set_attr_mask(short depth, short devflags, GDHandle device, long cookie) { Session *s = (Session *)cookie; switch (depth) { default: s->attr_mask |= ATTR_FGMASK | ATTR_BGMASK; /* FALLTHROUGH */ case 2: s->attr_mask |= ATTR_BOLD; /* FALLTHROUGH */ case 1: s->s->post_paint(Session *sSession *s, int total, int start, int page) {TARGET_RT_CFMSession *sSession *s, char *icon) { } /* * Set the window title */ void set_title(Session *s, char *title) { Str255 mactitleSession *s, int w, int h) { s->cols = w; s->rows = h; mac_initfont(s); } /* * Set the logical palette */ void palette_set(Session *s, int n, int r, int g, int b) { RGBColor colSession *s) { if (mac_gestalts.qdvers == gestaltOriginalQD) return; CopyPalette(s->cfg.colours, s->palette, 0, 0, (*s->Session *s, int topline, int botline, int lines) {s->font_height, s->cols * s->font_width, (botline + 1) * s->font_height); ScrollRect(&r, 0, - lines * s-> Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 7375086edaeba637b5d68db7f4eafd5a Text-content-length: 4306 Text-content-md5: 0520af1ad30e6d3eaab734084cbfc66e Content-length: 4350 K 15 cvs2svn:cvs-rev V 8 1.4.2.16 PROPS-END SVN簓;= 丵媣丩w僁 ? }圙梄?倊燙咥g/%凣.疜#include #include )馮 騷乄 T-%鴟%#丯亗J*亜$亝a+亰QJ伋8亽G仈乹仏乀仒cN圚仜 仯T仱qb仹+仹#仺@仼V仾pP丟伂Cg乣伄g^伈8 伇)$伈51伋[]伋l|伓# 伔!丠伕,b伖vi伜Z抦伝EQJ伋p乑佇6俉佉 佋k佨 !併佺>佽ld侊m侐u侓侰価#!j俤倎俇們係倖V倝)Ft倞m匸倠cG倯>^乢倰Y9倳8倶q倸剎倹偁偂 凢偅+偍f偑2偒RV偓~偔~#define cfg (s->cfg) #define back (s->back) #define rows (s->rows) #define cols (s->cols) #define savelines (s->savelines) #define font_width (s->font_width) #define font_height (s->font_height) #define has_focus (s->has_focus) #define inbuf (s->inbuf) #define inbuf_head (s->inbuf_head) #define inbuf_reap (s->inbuf_reap) #define app_cursor_keys (s->app_cursor_keys) #define app_keypad_keys (s->app_keypad_keys) #define attr_mask (s->attr_mask) #define text s->ts.text #define scrtop s->ts.scrtop #define disptop s->ts.disptop #define sbtop s->ts.sbtop #define cpos s->ts.cpos #define disptext s->ts.disptext #define wanttext s->ts.wanttext #define alttext s->ts.alttext #define selspace s->ts.selspace#define curr_attr s->ts.curr_attr #define save_attr s->ts.save_attr #define curs_x s->ts.curs_x #define curs_y s->ts.curs_y #define save_x s->ts.save_x #define save_y s->ts.save_y #define marg_t s->ts.marg_t #define marg_b s->ts.marg_b #define curr_dec_om s->ts.dec_om #define wrap s->ts.wrap #define wrapnext s->ts.wrapnext #define insert s->ts.insert #define cset s->ts.cset #define save_cset s->ts.save_cset #define save_csattr s->ts.save_csattr #define rvideo s->ts.rvideo #define cset_attr s->ts.cset_attr #define alt_x s->ts.alt_x #define alt_y s->ts.alt_y #define alt_om s->ts.alt_om #define alt_wrap s->ts.alt_wrap #define alt_wnext s->ts.alt_wnext #define alt_ins s->ts.alt_ins #define alt_cset s->ts.alt_cset #define alt_t s->ts.alt_t #define alt_b s->ts.alt_b #define alt_which s->ts.alt_which #define esc_args s->ts.esc_args #define esc_nargs s->ts.esc_nargs #define esc_query s->ts.esc_query #define osc_strlen s->ts.osc_strlen #define osc_string s->ts.osc_string #define osc_w s->ts.osc_w #define tabs s->ts.tabs #define MAXNL 5 #define nl_count s->ts.nl_count #define termstate (s->ts.termstate) #define selstate (s->ts.selstate) #define selmode (s->ts.selmode) #define selstart (s->ts.selstart) #define selend (s->ts.selend) #define selanchor (s->ts.selanchor) #define curr_wordness s->ts.wordnessSession *, int); static void erase_lots (Session *, int, int, int); static void swap_screen (Session *, int); static void update_sbar (Session *); static void deselect (Session *); static void scroll_display(Session *, Session *scurr_curr_wordness[i] = cfg.wordness[i]; } if (text) { swap_screen (s, 1); erase_lots (s, FALSE, TRUE, TRUE); swap_screen (s, 0); erase_lots (s, Session *s) { pre_paint(s); do_paint(s, TRUE); post_paint(s); nl_count = 0;Session *s) { power_on(s); fix_cpos; disptop = scrtop; deselect(s); term_update(s); } /* * Clear the scrollback. */ void term_clrsb(Session *s) { disptop = sbtop = scrtop; update_sbar(s); } /* * Initialise the terminal. */ void term_init(Session *ss); rows = cols = -1; nl_count = 0; power_on(s); } /* * Set up the terminal for a given size. */ void term_size(Session *s, s); update_sbar(s); term_update(s); } /* * Swap screens. */ static void swap_screen (Session *s, curr_dec_om; curr_Session *sSession *s) { int min; min = (sbtop - text) / (cols+1); set_sbar(s, (scrtop - text) / (cols+1) + rows - min, (disptop - text) / (cols+1) - min, (Session *s, unsigned long *from, unsigned long *to) { if (from < selend && selstart < to) deselect(sSession *s, ss, topline, botline, lines); #endif } #ifdef OPTIMISE_SCROLL static void scroll_display(Session *s, s, Session *s, Session *s, (Session *s, (s, (Session *s, (s, (Session *s, s); request_resize(s, curr_s); swap_screen(s, Session *s) { if (osc_w) { while (osc_strlen--) curr_s, (s, Session *s) { int c; int must_update = FALSE; while ( (c = inbuf_getc(s(s, "\033[?1;2c", 7); break; case '\007': beep(s(s, (s, (s, (s, 1); check_selection(s, s(s, TRUE); break; case '8': /* restore cursor */ save_cursor(s(s, (s, (s, (s, "\033[?6c", 5); break; case 'c': /* restore power-on settings */ power_on(s)(s, (s, (s, curs_x +D': /* move left N cols */ move(s, (s, (s, (s, (s, curs_x, (curr_dec_om ? marg_t : 0) + def(esc_args[0], 1) - 1, (curr_(s, def(esc_args[1], 1) - 1, (curr_dec_om ? marg_t : 0) + def(esc_args[0], 1) - 1, (curr_s, FALSs, (s, (s, curs_y, marg_b, @': /* insert chars */ insch(s, (s, (s, (s, (s, (s, (s, TRUE); break; case 'u': /* restore cursor */ save_cursor(st': /* set page size - ie window height */ request_resize(s, cols, def(esc_args[0], 24)); deselect(s(s, (s, s); term_invalidate(sss, (s, (s, cpos, cpos+1); } if (must_update || nl_count > MAXNL) { update_sbar(s); term_update(s); }Session *s(sSession *s(Session *ss(Session *s, ss, 0, rows - 1, shift); #endif /* OPTIMISE_SCROLL */ term_update(s(Session *s, curr_curr_wordness[p[1] & CHAR_MASK] == wvalue) p++; } else { while (p > linestart && curr_(Session *s) { selstart = sel_spread_half(s, selstart, -1); selend = sel_spread_half(s, selend - 1, +1) + 1; } void term_mouse(Session *s, ssssss); term_update(s); } /* * We've completed a selection. We now transfer the * data to the clipboard. */ void term_copy(Session *s(selspace, p - selspace); } void term_paste(Session *s(s, (s, Session *s) { return selstate == SELECTED; } static void deselect(Session *s(Session *s) { deselect(s); term_update(s Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 664eb01e9ece409b82a3d69a1e507715 Text-content-length: 935 Text-content-md5: 5790afb9f1432b9e266ca860ddf5f362 Content-length: 978 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN攗"唝 0:N:- hg/* $Id: testback.c,v 1.1.2.5 1999/03/29 19:50:24Session *, char *, int, char **); static int null_msg(Session *); static void null_send(Session *, char *, int); static void loop_send(Session *, char *, int); static void hexdump_send(Session *, char *, int); static void null_size(Session *); static void null_special(Session *, Session *s, char *host, int port, char **realhost) { return NULL; } static int null_msg(Session *s) { return 1; } static void null_send(Session *s, char *buf, int len) { } static void loop_send (Session *s, char *buf, int len) { while (len--) { int new_head = (s->s->inbuf_reap) { s->inbuf[s->inbuf_head] = *buf++; s->inbuf_head = new_head; } } term_out(s); term_update(s); } static void hexdump_send(Session *s, s, mybuf, mylen); } } static void null_size(Session *s) { } static void null_special(Session *s, Revision-number: 139 Prop-content-length: 155 Content-length: 155 K 7 svn:log V 57 Ooh! It's some documentation! What's that doing there? K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-29T19:51:40.000000Z PROPS-END Node-path: putty-ben-mac-port/README.mac Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 841 Text-content-md5: 1b69a1c855efad14cfff2d0fd2c1f223 Content-length: 961 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN嘍丠剈bd`HDG汦丆扝'孌侲T咲"楧&侱.旸乧桪侼丏 嘑*E亃丗俶廌乧怐侼嘐塂/奅僃侺D T>嶧僯淓P匘倈怗 楧丗侱 汥 僁3慒丒+咶?侴)侴僓咶凟D5孒卆侲俢嘑SF*丏卾K H卙侲侶嘐)D乧O匷僁俶E咲DQ朌R塆俽$Id: README.mac,v 1.1.2.1 1999/03/29 19:51:40 ben Exp $ Information about PuTTY for the Mac OS -= Known bugs: * PowerPC and fat versions fail to start on systems withAppearanceLib (ie most S 7 ones). The 68k works fine.Ifscreenolls more than once betwcato WaitNextEvent, BadThings can happen owinga in do_ibe fixed when Ihave an easy waytest itDisplay ir too slowFaiColor QuickDraReal bold doesn't compensatechangcharacter widthssEdit 'TMPL' resource setobroken. Features we need (areentirely obvious)S-confl--_dshoulde in-memory anremembe,beed onlygeta different rectangle erm_paints. Local Variables: mode: text End: Revision-number: 140 Prop-content-length: 250 Content-length: 250 K 7 svn:log V 151 We now only link weakly with AppearanceLib, which should let us run on PowerPCs without the Appearance Manager. Not that I've tested this, of course. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-29T23:55:06.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 7326ec6fc8f57bc80186fb36627d1fd6 Text-content-length: 92 Text-content-md5: 63cb1a935ca4ab23344b52855d8ccd7c Content-length: 135 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN& F塖0 # $Id: Makefile.mpw,v 1.1.2.7 1999/03/29 23:55:0-weaklib AppearanceLib Node-path: putty-ben-mac-port/README.mac Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 1b69a1c855efad14cfff2d0fd2c1f223 Text-content-length: 81 Text-content-md5: 2ff6895be4a4f79086416d63e096ba5f Content-length: 124 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN嘍嘡 ;乲-,$Id: README.mac,v 1.1.2.2 1999/03/29 23:55:06 [MAYBE FIXED] Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 5b0e717a3cd9c63eff53d76067cb5901 Text-content-length: 165 Text-content-md5: 78b563ff35c6c8517c7f8214f1c402fa Content-length: 209 K 15 cvs2svn:cvs-rev V 8 1.1.2.21 PROPS-END SVN赨踃 歵,a縒殈/* $Id: mac.c,v 1.1.2.21 1999/03/29 23:55:06Paranoia: Did we manage to pull in AppearanceLib? */ if (&RegisterAppearanceClient == NULL) Revision-number: 141 Prop-content-length: 262 Content-length: 262 K 7 svn:log V 163 Fonts where boldface is wider than usual are now beaten up so they fit. Note that this doesn't happen for non-COlor QuickDraw yet, due to the lack of CharExtra(). K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-30T19:44:52.000000Z PROPS-END Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 0a68a2cbd754f7ee2bd4ad3676c2a923 Text-content-length: 582 Text-content-md5: 06cd7c17a0b812963f38d5c92b996f7d Content-length: 626 K 15 cvs2svn:cvs-rev V 8 1.1.2.33 PROPS-END SVN佦佫@!珿0亗W琿俶伆/* $Id: macterm.c,v 1.1.2.33 1999/03/30 19:44:51if (!s->cfg.bold_colour) { TextFace(bold); s->font_boldadjust = s->font_width - CharWidth('W'); } else s->font_boldadjust = 0if (mac_gestalts.qdvers > gestaltOriginalQD) if (style & bold) { SpaceExtra(s->font_boldadjust << 16); CharExtra(s->font_boldadjust << 16); } else { SpaceExtra(0); CharExtra(0); } textrgn = NewRgn(); RectRgn(textrgn, &a.textrect); if (mac_gestalts.qdvers == gestaltOriginalQD) do_text_for_device(1, 0, NULL, (long)&a); else Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 0520af1ad30e6d3eaab734084cbfc66e Text-content-length: 52 Text-content-md5: 7e23a44c8c5adec58137c2353a25b875 Content-length: 96 K 15 cvs2svn:cvs-rev V 8 1.4.2.17 PROPS-END SVN;-噈&﹕(&int font_boldadjust Revision-number: 142 Prop-content-length: 103 Content-length: 103 K 7 svn:log V 6 Yeah. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-03-30T19:46:44.000000Z PROPS-END Node-path: putty-ben-mac-port/README.mac Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2ff6895be4a4f79086416d63e096ba5f Text-content-length: 94 Text-content-md5: 73020479a24b6713cfe58e7fd3723bd1 Content-length: 137 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN嘡噈 H凘-俥刴$Id: README.mac,v 1.1.2.3 1999/03/30 19:46:44 without Color QuickDraw Revision-number: 143 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.888527Z PROPS-END Revision-number: 144 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.896989Z PROPS-END Revision-number: 145 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.905775Z PROPS-END Revision-number: 146 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.915113Z PROPS-END Revision-number: 147 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:51.923526Z PROPS-END Revision-number: 148 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 60 New version-number system. Doesn't yet do the "about" box. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-01T21:25:06.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 63cb1a935ca4ab23344b52855d8ccd7c Text-content-length: 416 Text-content-md5: ac83b8ad761fe0cc3dae1f03ef68a1c4 Content-length: 459 K 15 cvs2svn:cvs-rev V 7 1.1.2.8 PROPS-END SVN&5倉嶤-G"+恵# $Id: Makefile.mpw,v 1.1.2.8 1999/04/01 21:2 哪 version.r version.h Rez mac_res.r -d BUILD_ARCH='"68k"'ppc 哪 version.r version.h Rez mac_res.r -d BUILD_ARCH='"PowerPC"' -o {Targ} {Includes} -append PuTTY.fat PuTTY PuTTY.ppc version.r version.h Duplicate -y PuTTY PuTTY.fat MergeFragment PuTTY.ppc PuTTY.fat Rez mac_res.r -d BUILD_ARCH='"fat"' -o {Targ} {Includes} -append Node-path: putty-ben-mac-port/version.h Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 280 Text-content-md5: e067e93dbc7435e96007d3fc946dcd3f Content-length: 400 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN6乄RF%匘圖)朌沋圴!嘫丏G;V乛奦 岲fU"慣凢俙凞俧/* PuTTY version number */ /* * Note that this file is used by resource compilersdon'timplemene funkier bits of CPP #define PUTTY_VERS_MAJOR 0_BCD 0x0INOR 45PRERELEASESTATE developHORT_STR "0.45d0"LONGDev Mac 0" Node-path: putty-ben-mac-port/version.r Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 382 Text-content-md5: 885d9e57c096fe61625e02cb8faa37ae Content-length: 502 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN僡A2淒IG 僈^圖]楰揌侱 琎乣俉乻匭亂塆(婦岲ZP奝俰凞倊匨"凟俰/* * PuTTY version resource(separated because it gets rebuilt for each architecture) */ #include ".h"Types.r"fndef BUILD_ARCH #define "unknown" #endif '' (1, purgeable) { PUTTY_VERS_MAJOR_BCD,INSTATEPRERELEAS2, /* Regcode (2 = UK)HORT_STR, LONG " (")\n""Copyright \$a9 Simon Tatham 1997-9", }; Revision-number: 149 Prop-content-length: 153 Content-length: 153 K 7 svn:log V 55 Beginnings of an attempt at MacTCP networking support. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-01T21:26:03.000000Z PROPS-END Node-path: putty-ben-mac-port/macnet.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 2227 Text-content-md5: 7dda2b4aeb04af3671fd3deb84f95d7f Content-length: 2347 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN&咲奵OE婦>凟F岴=籇>怐 ‵7岹乄侲*圖H 圖>嘍亀圖丆G/匜乽E!Gg嘍>D両嘍倉丒'婦<嘍咲乛僁>凞倅僃丮J$E.D俷丏丟2E俶凞僅D>I&婨僘匛"凞俷D僆塅倂僁亀侱>D>塃倅FF匜乚E丵E僞FG刜嘐僿F侴侱DH?丏#孍=P僂DvF凢紼倁癊匰G厏咲匧旸淒匧匰慏唘E_廌員嘐嘓G唃僂噉孏哣嶪噄奃1咲厇侲丟侳 D卾N匰侲匰侲坥F噈圖僂儀G匶DvH:H桪僿凣 侱堿嘖塓圗乿I塪侴塝侼塪塏塪嘑塨K塓哊夾孌乽擣妌嘑妠凞乯圛妋凣+E丏4丟圡3汦#凞奃朒妌慞媈璂8D媧僁8凮媉怳=O媉圙;僁.揋妟H岶 G妎GP:侲孲F匛孲欿妡侲孲凞嶱慒嶦N嶭丗媑唈巙O僁)D孴嶥峟侱3侲侱塎婦妢奊凞侲丒2H匘?H8塅E丒嶥丟FH"丟弒扝媙F"並巙丩峽僁巪E丮'侺D孴揇H峣嘍嶰G巙僂丒2F塃寉匘4侴巙F恾匘塺丗?D抁D?侲丼>僄乑巙JD媣嶳"D巪L圖峆媉O拁H+G侱j婰D?F媧侶咹8I凥"丗J弒丏D婦;D僆丗扴奃丆侲 丏塎G弙怚旸嘑僄奌H昣G晑哛扲丠峎侱媀團凙侱廍侱凚/* $Id: macnet.c,v 1.1.2.1 1999/04/01 21:26:03 ben Exp $ */ /* * Copyright (c) Ben HarrisAll s reserved. Permission is hereby granted, free of charge, to any personobtaining a copythis software and associated documentatifiles (the "S")deal in withoutrestric, includ limito use,, modifepublish, dibute, scense,/orselliesptwhomis furnishedo sojectfollowingndis:The abovenoticshall bedrstantial porHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KINDEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TOIES OFMERCHANTABILITY, FITNFOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALLAUTHORS BE LIABLENY CLAIM, DAMAGR OTHERWHEIN AN ACTIONCONTRACT, TORTWISE, ARISFROM, OFNNEORUSDEALINGSTHE -- PuTTY-to-MacTCP glu/ # AddresXlduCPMixedModeProcessstdlib"putty.h" sc short mtcp_refnum;s OSErrinit= FALSE;void()c pascalresolved(struct HostInfo *, *);fdef TARGET_RT_MAC_CFMRoutineDescriptor_upp = BUILD_ROUTINE_DESCRIPTOR(uppResult, (Ptr)); #else #define #endif Iniise networking. Seif it goes OK {err; err = OpenDriver(".IPP", &);if (!= noErr) returnRr(NULLTRU/* XXX: otherwre aor} Socket *open(consthostt*realip_addr ao ss = smalloc(sizeof)!) =))fatalbox("Couldn't (%d)",s->=GetCurreness(&snStrTo(_i&, (s lookup failed.rtnCodecacheFault) s;hicookie = ()W probably tp what's goon.Alternatively, wkick ofnext stageWakeUp}LoVariablec--style: "simon"nd/ Node-path: putty-ben-mac-port/macnet.h Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 591 Text-content-md5: 932eb216d6b9781ed46d621ead8fc2f2 Content-length: 711 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN:8 YQA朘j嶯}Du侼}嘑{匘>淓乢丒乊G丵扚乺團乺擩E4咷侭凥侻刄僊6F倆G侶G F俇G J俛G;汮丟F働塈Q團僫匤僶慐匜僫怐俛侱侻僉 処0]?GD乭匜9F.E凪丟丣凴E?D乭匞0S4匤匧塅怐旸僁/* * macnet.h -- Mac OS networtking stuff for PuTTY */ #ifndef _PUTTY_MACNET_H #define #include AddressXlationCPProcess typestruct { StreamPtr tcp_s;HostInfo host_infoint portunsigned char *inbuf_head,reapsizeoutSerialNumber psn; } Socket; *SOCKET INVALID_ NULLMSG_OOB 1 externsend(, const void *, _tt);recvopen(,*closeabort #endif Local Variables:c-file-style: "simon"End/ Node-path: putty-ben-mac-port/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: f8b180987bb109ff14131d623951101e Text-content-length: 78 Text-content-md5: d4ab10e64d6d574ea793ada4880c0aea Content-length: 121 K 15 cvs2svn:cvs-rev V 7 1.2.2.2 PROPS-END SVN仛X仜;仛G#ifdef macintosh #include #else /* not macintosh */ Revision-number: 150 Prop-content-length: 118 Content-length: 118 K 7 svn:log V 20 Minor code clean-up K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-01T21:26:44.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 78b563ff35c6c8517c7f8214f1c402fa Text-content-length: 124 Text-content-md5: 10326dbfdd19123fb62e68df1fbfa214 Content-length: 168 K 15 cvs2svn:cvs-rev V 8 1.1.2.22 PROPS-END SVN踃跙V奡,圵妐搖?泘箏/* $Id: mac.c,v 1.1.2.22 1999/04/01 21:26:44CodeFragmentskUnresolvedCFragSymbolAddress Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: f18c85bb5991d5c1c9c0adc27ca68ae5 Text-content-length: 20 Text-content-md5: 40070e99020c396a4b5e5687d6930063 Content-length: 64 K 15 cvs2svn:cvs-rev V 8 1.1.2.10 PROPS-END SVN唝 "匴> Revision-number: 151 Prop-content-length: 121 Content-length: 121 K 7 svn:log V 23 Mac versioning update. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-01T21:27:36.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 5a88af9d2e8bca91e5df0e9c56873fc9 Text-content-length: 72 Text-content-md5: 44efaf657ee833848030581c0fffab5e Content-length: 116 K 15 cvs2svn:cvs-rev V 8 1.1.2.16 PROPS-END SVN伔j伒3 0媉0仼$嶧/* $Id: mac_res.r,v 1.1.2.16 1999/04/01 21:27:36 Revision-number: 152 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 63 Build process tweaks -- now only runs Rez over mac_res.r once. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-02T10:21:49.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: ac83b8ad761fe0cc3dae1f03ef68a1c4 Text-content-length: 1011 Text-content-md5: a62f005b52458253517239026ee76755 Content-length: 1054 K 15 cvs2svn:cvs-rev V 7 1.1.2.9 PROPS-END SVN5榯嘚11/)僞f宧?卄扷# $Id: Makefile.mpw,v 1.1.2.9 1999/04/02 10:21:48# short names for targets 68k PuTTY.68k ppc PuTTY.ppc fat PuTTY PuTTY.rsrc mac_res.r macresid.h Rez mac_res.r -o {Targ} {Includes} PuTTY.ppc {ObjectsPC} PuTTY.rsrc Delete -i {Targ} PPCLink -o {Targ} {SymPC} -t 'APPL' -c 'pTTY' -fragname PuTTY {ObjectsPC} {LibsPC} Echo 'Include "PuTTY.rsrc";' > merge.r Rez merge.r -o {Targ} -append Delete -i merge.r Rez version.r -d BUILD_ARCH='"PowerPC"' -o {Targ} {Includes} -append PuTTY.68k-c 'pTTY' -newerdeps {NewerDeps} ELSE ILink -o {Targ} {Sym68K} -t 'APPL' -c 'pTTY' {Objects68K} {Libs68K} END PuTTY.68k 哪 PuTTY.rsrc Echo 'Include "PuTTY.rsrc";' > merge.r Rez merge.r -o {Targ} -append Delete -i merge.r Rez version.r -d BUILD_ARCH='"68k"' -o {Targ} {Includes} -append PuTTY PuTTY.68k PuTTY.ppc version.r version.h Duplicate -y PuTTY.68k {Targ} MergeFragment PuTTY.ppc {Targ} Rez version Node-path: putty-ben-mac-port/mkputty.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 48332ee77db13c499008cf126576d9b7 Text-content-length: 173 Text-content-md5: 6a399af7ea51fbe4281b5bccaca48035 Content-length: 216 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN嘷嘷 c0f協亂# $Id: mkputty.mpw,v 1.1.2.7 1999/04/02 10:21:49.68k end if "{program}" == "ppc" set program PuTTY.ppc end if "{program}" == "fat" set program PuTTY Revision-number: 153 Prop-content-length: 117 Content-length: 117 K 7 svn:log V 19 Missing dependency K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-02T12:56:57.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: a62f005b52458253517239026ee76755 Text-content-length: 92 Text-content-md5: bead78aa7d143e252a1e836b2d5e8642 Content-length: 136 K 15 cvs2svn:cvs-rev V 8 1.1.2.10 PROPS-END SVN榯 F怞1噛恵# $Id: Makefile.mpw,v 1.1.2.10 1999/04/02 12:56:57 version.r version.h Revision-number: 154 Prop-content-length: 197 Content-length: 197 K 7 svn:log V 99 The "about" box now behaves approximately as it should (though we still don't have a licence box). K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-02T12:58:03.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 10326dbfdd19123fb62e68df1fbfa214 Text-content-length: 1475 Text-content-md5: 13ed0ac1fe4fbc58f410011be0ce93f8 Content-length: 1519 K 15 cvs2svn:cvs-rev V 8 1.1.2.23 PROPS-END SVN跙鋛;妡婥,<媩F.?沝慫哣璱Y碤僙0礥匘脅剗+/* $Id: mac.c,v 1.1.2.23 1999/04/02 12:58:02Resources.h> #include #include EventRecord *); static void mac_activateabout(WindowPtr, EventRecord *openabout(void eventEventRecord *event) { int active; active = (event->modifiers & activeFlag) != 0; case wAbout: mac_activateabout(window, event); break; } } static void mac_activateabout(WindowPtr window, EventRecord *event) { DialogItemType itemtype; Handle itemhandle; short item; Rect itemrect; int active; active = (event->modifiers & activeFlag) != 0; GetDialogItem(window, wiAboutLicence, &itemtype, &itemhandle, &itemrect); HiliteControl((ControlHandle)itemhandle, active ? 0 : 255); DialogSelect(event, &window, &item);mac_openabout(openabout(void) { DialogItemType itemtype; Handle item; VersRecHndl vers; Rect box; StringPtr longvers; if (windows.about) SelectWindow(windows.about); else { windows.about = GetNewDialog(wAbout, NULL, (WindowPtr)-1); /* XXX check we're using the right resource file? */ vers = (VersRecHndl)GetResource('vers', 1); assert(vers != NULL && *vers != NULL); longvers = (*vers)->shortVersion + (*vers)->shortVersion[0] + 1; GetDialogItem(windows.about, wiAboutVersion, &itemtype, &item, &box); assert(itemtype & kStaticTextDialogItem); SetDialogItemText(item, longvers); ShowWindow(windows.about); } Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 44efaf657ee833848030581c0fffab5e Text-content-length: 306 Text-content-md5: 6d3aca5b3ce907be0c20b84549b3c65d Content-length: 350 K 15 cvs2svn:cvs-rev V 8 1.1.2.17 PROPS-END SVN伒3伒F/0俷鎪丄/* $Id: mac_res.r,v 1.1.2.17 1999/04/02 12:58:02240 }, noGrowDocProc, in227 }, Button { enabled, "View Licence" }, { 13, 13, 29, 227 }, StaticText { disabled, "PuTTY"}, { 42, 13, 74, 227 }, StaticText { disabled, "Some version or other\n" "Copyright Node-path: putty-ben-mac-port/macresid.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 1693d7e93702c8413b955c2c6f3bfb08 Text-content-length: 86 Text-content-md5: e5883dacbd38b4a1a89d10815b5e2c85 Content-length: 129 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN唗 @+0#匭/* $Id: macresid.h,v 1.1.2.6 1999/04/02 12:58:03iAboutVersion 3 Node-path: putty-ben-mac-port/version.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 885d9e57c096fe61625e02cb8faa37ae Text-content-length: 24 Text-content-md5: d951358954653f8540bfe22b07fd9ccf Content-length: 67 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN僡僟僕9", }; Revision-number: 155 Prop-content-length: 172 Content-length: 172 K 7 svn:log V 74 Yeah. Some progress on Mac OS networking. Still some way to go, though. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-03T21:53:29.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: bead78aa7d143e252a1e836b2d5e8642 Text-content-length: 98 Text-content-md5: 8466e7422fc0b0bbac671a0d5a158354 Content-length: 142 K 15 cvs2svn:cvs-rev V 8 1.1.2.11 PROPS-END SVN ) L昜2# $Id: Makefile.mpw,v 1.1.2.11 1999/04/03 21:53:29net.c.o macnet.c.x putty Node-path: putty-ben-mac-port/macnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 7dda2b4aeb04af3671fd3deb84f95d7f Text-content-length: 11202 Text-content-md5: 4ba139ed41bffd39ecf0ab5cc702d656 Content-length: 11245 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN&.!塉.t峎嶽簕H朸/* $Id: macnet.c,v 1.1.2.2 1999/04/03 21:53:29sXlation.h> #include #include #include #include #include #include #include #include #include "putty.h" /* * The theory behind this stuff: * * net_recv attempts to deliver any incoming data waiting on the * queue. Since MacTCP maintains a buffer for incoming data, there's * no need for us to run asynchronous TCPRcvs, and we just do a * synchronous one if we detect some data waiting. Since TCPRcv can't * be given a timeout of zero, we use TCPStatus to work out if there's * anything waiting first. * * Sending data is trickier. TCPSend reserves the right to block * until everything we've sent is ACKed, which means we have to use it * asynchronously. In order to make life easier for backends, and to * save a proliferation of circular buffers, we guarantee to take data * off the hands of the backend as soon as it gives it to us. This is * reasonable because currently there's no way for the backend to say * it can't take data, and once it's got them, it may as well give * them to us. * * Anyway, in order to avoid a fixed-size buffer overflowing, the send * buffer is kept as a queue of blocks. When net_send is called, we * malloc a new block and stick it on the queue. If the queue was * empty, we kick off a new asynchronous TCPSend to handle our block. * */ typedef struct Socket { TCPiopb iopb; /* current MacTCP operation */ TCPiopb spareiopb; /* for closing etc */ hostInfo hostinfo; int port; // unsigned char *inbuf; // int inbuf_head, inbuf_reap, inbuf_size; // unsigned char *outbuf; // int outbuf_head, outbuf_reap, outbuf_size; ProcessSerialNumber psn; Session *s; UInt32 a5; qHdr sendq; /* Blocks waiting to be sent */ qHdr freeq; /* Blocks sent, waiting to be freed */ } Socket; typedef struct { QElem qelem; int flags; int len; } Send_Buffer; /* * Yes, I know the struct QElem has a short[1] to represent the user * data. I'm ignoring it because it makes my code prettier and * improves the alignment. */ typedef struct { QElem qelem; Socket *sock; Net_Event_Type type; } NetEvent; #define TCPBUF_SIZE 8192 static QHdr macnet_eventq; static QHdr macnet_freeq; static short mtcp_refnum; static int mtcp_initted = FALSE; static OSErr macnet_init(void); static pascal void macnet_resolved(hostInfo *, char *); static void macnet_opened(TCPiopb*); static void macnet_sent(TCPiopb*); static void macnet_closed(TCPiopb*); static pascal void macnet_asr(StreamPtr, unsigned short, Ptr, unsigned short, ICMPReport *); static void macnet_sendevent(Socket *, Net_Event_Type); #istatic RoutineDescriptor macnet_opened_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPIOCompletionProcInfo, (ProcPtr)macnet_opened); static RoutineDescriptor macnet_sent_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPIOCompletionProcInfo, (ProcPtr)macnet_sent); static RoutineDescriptor macnet_closed_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPIOCompletionProcInfo, (ProcPtr)macnet_closed); static RoutineDescriptor macnet_asr_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPNotifyProcInfo, (ProcPtr)macnet_asr); #else #define macnet_resolved_upp macnet_resolved #define macnet_opened_upp macnet_opened #define macnet_sent_upp macnet_sent #define macnet_closed_upp macnet_closed #define macnet_asr_upp macnet_asr #endif /* * Number of outstanding network events allowed. */ #define NUM_EVENTS 16 NetEvent *eventblock; int i; err = opend/* Set up the event queues, and fill the free queue with events */ macnet_eventq.qFlags = 0; macnet_eventq.qHead = macnet_eventq.qTail = NULL; macnet_freeq.qFlags = 0; macnet_freeq.qHead = macnet_eventq.qTail = NULL; eventblock = smalloc(NUM_EVENTS * sizeof(NetEvent)); for (i = 0; i < NUM_EVENTS; i++) Enqueue(&eventblock[i].qelem, &macnet_freeq); mtcp_initted = TRUE; } Socket *net_open(Session *s, char *host, int port) { ip_addr a; OSErr err = noErr; Socket *sock; void *tcpbuf; /* * First, get hold of all the memory we'll need (a lot of the * later stuff happens at interrupt time) */ sock = smalloc(sizeof(struct Socket)); memset(sock, 0, sizeof(*sock)); tcpbuf = smalloc(TCPBUF_SIZE); /* Make a note of anything we don't want to forget */ sock->port = port; GetCurrentProcess(&sock->psn); sock->a5 = SetCurrentA5(); /* Get MacTCP running if it's not already */ if (!mtcp_initted) if ((err = macnet_init()) != noErr) fatalbox("Couldn't init network (%d)", err); /* Get ourselves a TCP stream to play with */ sock->iopb.ioCRefNum = mtcp_refnum; sock->iopb.csCode = TCPCreate; sock->iopb.csParam.create.rcvBuff = tcpbuf; sock->iopb.csParam.create.rcvBuffLen = TCPBUF_SIZE; sock->iopb.csParam.create.notifyProc = macnet_asr_upp; sock->iopb.csParam.create.userDataPtr = (Ptr)sock; /* This could be done asynchronously, but I doubt it'll take long. */ err = PBControlSync((ParmBlkPtr)&sock->iopb); if (err != noErr) fatalbox("TCP stream open failed (%d)", err); err = StrToAddr(host, &sock->hostinfo, &macnet_resolved_upp, (char *)sock); if (err != noErr) fatalbox("Host lookup failed (%d)", err); if (sock->hostinfo.rtnCode != cacheFault) macnet_resolved(&sock->hostinfo, (char *)sock); return sock; } static pascal void macnet_resolved(hostInfo *hi, char *cookie) { Socket *sock = (Socket *)cookie; OSErr err; UInt32 olda5; olda5 = SetA5(sock->a5); /* * We've resolved a name, so now we'd like to connect to it (or * report an error). */ switch (sock->hostinfo.rtnCode) { case noErr: /* Open a connection */ sock->iopb.ioCompletion = macnet_opened_upp; sock->iopb.csCode = TCPActiveOpen; sock->iopb.csParam.open.validityFlags = typeOfService; sock->iopb.csParam.open.commandTimeoutValue = 0; /* unused */ sock->iopb.csParam.open.remoteHost = sock->hostinfo.addr[0]; /*XXX*/ sock->iopb.csParam.open.remotePort = sock->port; /* localHost is set by MacTCP. */ sock->iopb.csParam.open.localPort = 0; sock->iopb.csParam.open.tosFlags = lowDelay; sock->iopb.csParam.open.dontFrag = 0; sock->iopb.csParam.open.timeToLive = 0; /* default */ sock->iopb.csParam.open.security = 0; sock->iopb.csParam.open.optionCnt = 0; sock->iopb.csParam.open.userDataPtr = (char *)sock; err = PBControlSync((ParmBlkPtr)&sock->iopb); if (err != noErr) macnet_sendevent(sock, NE_NOOPEN); break; default: /* Something went wrong */ macnet_sendevent(sock, NE_NOHOST); break; } SetA5(olda5); } static void macnet_opened(TCPiopb *iopb) { Socket *sock = (Socket *)iopb->csParam.open.userDataPtr; UInt32 olda5; olda5 = SetA5(sock->a5); switch (iopb->ioResult) { case noErr: macnet_sendevent(sock, NE_OPEN); break; default: macnet_sendevent(sock, NE_NOOPEN); break; } SetA5(olda5); } static pascal void macnet_asr(StreamPtr tcpstream, unsigned short eventcode, Ptr cookie, unsigned short terminreason, ICMPReport *icmpmsg) { Socket *sock = (Socket *)cookie; UInt32 olda5; olda5 = SetA5(sock->a5); switch (eventcode) { case TCPClosing: macnet_sendevent(sock, NE_CLOSING); break; case TCPULPTimeout: macnet_sendevent(sock, NE_TIMEOUT); break; case TCPTerminate: switch (terminreason) { case TCPRemoteAbort: macnet_sendevent(sock, NE_ABORT); break; default: macnet_sendevent(sock, NE_DIED); break; } break; case TCPDataArrival: macnet_sendevent(sock, NE_DATA); break; case TCPUrgent: macnet_sendevent(sock, NE_URGENT); break; case TCPICMPReceived: switch (icmpmsg->reportType) { case portUnreach: macnet_sendevent(sock, NE_REFUSED); break; } break; } SetA5(olda5); } /* * Send a block of data. */ int net_send(Socket *sock, void *buf, int buflen, int flags) {{ OSErr err; Send_Buffer *buff; buff = smalloc(sizeof(Send_Buffer) + buflen); buff->flags = flags; buff->len = buflen; memcpy(buff + 1, buf, buflen); Enqueue(&buff->qelem, &sock->sendq); macnet_start(sock); } int net_recv(Socket *sock, void *buf, int buflen, int flags) { TCPiopb iopb; OSErr err; int avail, want, got; memcpy(&iopb, &sock->iopb, sizeof(TCPiopb)); /* Work out if there's anything to recieve (we don't want to block) */ iopb.csCode = TCPStatus; err = PBControlSync((ParmBlkPtr)&iopb); if (err != noErr) return 0; /* macnet_asr should catch it anyway */ avail = iopb.csParam.status.amtUnreadData; if (avail == 0) return 0; want = avail < buflen ? avail : buflen; iopb.csCode = TCPRcv; iopb.csParam.receive.buffPtr = buf; iopb.csParam.receive.buffLen = want; err = PBControlSync((ParmBlkPtr)&iopb); if (err != noErr) return 0; return iopb.csParam.receive.buffLen; } void net_close(Socket *sock) { OSErr err; /* * This might get called in the middle of processing another * request on the socket, so we have a spare parameter block for * this purpose (allocating one dynamically would mean having to * free it, which we can't do at interrupt time). */ memcpy(&sock->spareiopb, &sock->iopb, sizeof(TCPiopb)); sock->spareiopb.ioCompletion = macnet_closed_upp; sock->spareiopb.csCode = TCPClose; sock->spareiopb.csParam.close.validityFlags = 0; sock->spareiopb.csParam.close.userDataPtr = (char *)sock; err = PBControlAsync((ParmBlkPtr)&sock->spareiopb); switch (err) { case noErr: case connectionClosing: case connectionTerminated: /* We'll get an ASR */ break; default: macnet_sendevent(sock, NE_DIED); break; } } static void macnet_closed(TCPiopb* iopb) { Socket *sock = (Socket *)iopb->csParam.close.userDataPtr; UInt32 olda5; olda5 = SetA5(sock->a5); switch (iopb->ioResult) { case noErr: macnet_sendevent(sock, NE_CLOSED); break; case connectionClosing: case connectionTerminated: break; default: macnet_sendevent(sock, NE_DIED); break; } SetA5(olda5); } /* * Free all the data structures associated with a socket and tear down * any connection through it. */ void net_destroy(Socket *sock) { TCPiopb iopb; OSErr err; /* * Yes, we need _another_ iopb, as there may be a send _and_ a * close outstanding. Luckily, destroying a socket is * synchronous, so we can allocate this one dynamically. */ memcpy(&iopb, &sock->iopb, sizeof(TCPiopb)); iopb.csCode = TCPRelease; err = PBControlSync((ParmBlkPtr)&iopb); sfree(iopb.csParam.create.rcvBuff); sfree(sock); } static void macnet_sendevent(Socket *sock, Net_Event_Type type) { NetEvent *ne; ne = (NetEvent *)macnet_freeq.qHead; assert (ne != NULL); Dequeue(&ne->qelem, &macnet_freeq); ne->sock = sock; ne->type = type; Enqueue(&ne->qelem, &macnet_eventq); WakeUpProcess(&sock Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 7e23a44c8c5adec58137c2353a25b875 Text-content-length: 1263 Text-content-md5: bd1c720fd89a9b1fc826c9847f679c28 Content-length: 1307 K 15 cvs2svn:cvs-rev V 8 1.4.2.18 PROPS-END SVN-1 塁'7燞;+俙揹篒typedef struct Socket Socket; /* Types of network event */ typedef enum { NE_NULL, /* Nothing happened */ NE_OPEN, /* Connection successfully opened */ NE_NOHOST, /* DNS lookup failed for some reason */ NE_REFUSED, /* Port unreachable */ NE_NOOPEN, /* Connection failed to open for some other reason */ NE_DATA, /* Incoming normal data */ NE_URGENT, /* Incoming urgent data */ NE_CLOSING, /* Connection closed by remote host */ NE_CLOSED, /* Connection close completed */ NE_TIMEOUT, /* Remote host vanished */ NE_ABORT, /* Remote host reset connection */ NE_DIED, /* Connection has failed for some other reason */ } Net_Event_Type; typedef struct { char *(*init) (Session *, char *host, int port); int (*msg)(Session *, Socket *, Net_Event_Type); void (*shutdown) (Session *typedef struct Socket Socket; /* * Exports from the network system */ extern Socket *net_open(Session *, char *host, int port); extern char *net_realname(Socket *); extern int net_recv(Socket *, void *, int, int); extern int net_send(Socket *, void *, int, int); extern void net_close(Socket *); /* ask the remote end to close */ extern void net_destroy(Socket *); /* Tidy up */ Node-path: putty-ben-mac-port/macnet.h Node-action: delete Revision-number: 156 Prop-content-length: 401 Content-length: 401 K 7 svn:log V 302 Lots of MacTCP networking stuff. I think all the code's written, but it doesn't actually work yet. Also the telnet backend is still single-session, and I haven't even touched the ssh one. Oh, and the "Main" segment just overflowed 32k, so we have extra linker incantations. I'm off to the pub now. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-04T18:23:35.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 8466e7422fc0b0bbac671a0d5a158354 Text-content-length: 313 Text-content-md5: 1e0901a8dc81de5fadc0ad1f31f00097 Content-length: 357 K 15 cvs2svn:cvs-rev V 8 1.1.2.12 PROPS-END SVN) (僁2p卲坈b廮刾<儈+# $Id: Makefile.mpw,v 1.1.2.12 1999/04/04 18:23:33dnr.c.o mac.c.o maccfg.c.o macnet telnet.c.o terminal.c.o testback.c.o ObjectsPC = dnr.c.x mac.c.x maccfg.c.x macnetbr 68k -model far-br 68k -model fardnr.c.o dnr.c.x Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 13ed0ac1fe4fbc58f410011be0ce93f8 Text-content-length: 85 Text-content-md5: 8757583a25b6d8b18b2db97396c67b2e Content-length: 129 K 15 cvs2svn:cvs-rev V 8 1.1.2.24 PROPS-END SVN鋛 ?,縀,/* $Id: mac.c,v 1.1.2.24 1999/04/04 18:23:33 macnet_eventcheck( Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 40070e99020c396a4b5e5687d6930063 Text-content-length: 74 Text-content-md5: 5bc1249eb65f8be45d80fdaef52a6d7a Content-length: 118 K 15 cvs2svn:cvs-rev V 8 1.1.2.11 PROPS-END SVN唝2 64H1/* from macnet.c */ extern void macnet_eventcheck(void Node-path: putty-ben-mac-port/macnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4ba139ed41bffd39ecf0ab5cc702d656 Text-content-length: 3831 Text-content-md5: 0df15c092d552529febcb1c8b9926bc4 Content-length: 3874 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN.(淧昣.両 4俒漢#7) 乁侾*=玿G乣竏咮篔PO:G8丠胑G 臷c蕍}薢5亃虵侰?|+3(1謄%L8踑% /* $Id: macnet.c,v 1.1.2.3 1999/04/04 18:23:34 ProcessSerialNumber psn; Session *s; long a5; QHdr sendq; /* Blocks waiting to be sent */ } Socket; typedef struct { QElem qelem; int flags; wdsEntry wds; short wdstermcompleted_open(TCPiopb*); static void macnet_completed_send(TCPiopb*); static void macnet_sent(Socket *); static void macnet_startsend(Socket *); static void macnet_completed_closecompleted_open_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPIOCompletionProcInfo, (ProcPtr)macnet_completed_open); static RoutineDescriptor macnet_complete_send_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPIOCompletionProcInfo, (ProcPtr)macnet_completed_send); static RoutineDescriptor macnet_completed_close_upp = BUILD_ROUTINE_DESCRIPTOR(uppTCPIOCompletionProcInfo, (ProcPtr)macnet_completed_closecompleted_open_upp macnet_completed_open #define macnet_completed_send_upp macnet_completed_send #define macnet_completed_close_upp macnet_completed_close/* * FIXME: This is hideously broken, in that we're meant to faff * with unit numbers and stuff, and we blatantly don't. */ return 0#if !TARGET_RT_CFM long olda5; olda5 = SetA5(sock->a5); #endifcompleted_open#if !TARGET_RT_CFM SetA5(olda5); #endif } static void macnet_completed_open#if !TARGET_RT_CFM long olda5; olda5 = SetA5(sock->a5); #endif#if !TARGET_RT_CFM SetA5(olda5); #endif#if !TARGET_RT_CFM long olda5; olda5 = SetA5(sock->a5); #endif#if !TARGET_RT_CFM SetA5(olda5); #endifwds.length = buflen; buff->wds.ptr = (Ptr)&buff[1]; /* after the end of the struct */ buff->wdsterm = 0; memcpy(&buff[1], buf, buflen); Enqueue(&buff->qelem, &sock->sendq); /* Kick off the transmit if the queue was empty */ if (sock->sendq.qHead == &buff->qelem) macnet_startsend(sock); } /* * This is called once every time round the event loop to check for * network events and handle them. */ void macnet_eventcheck() { NetEvent *ne; if (!mtcp_initted) return; ne = (NetEvent *)macnet_eventq.qHead; if (ne == NULL) return; Dequeue(&ne->qelem, &macnet_eventq); switch (ne->type) { case NE_SENT: macnet_sent(ne->sock); break; default: (ne->sock->s->back->msg)(ne->sock->s, ne->sock, ne->type); break; } Enqueue(&ne->qelem, &macnet_freeq); } /* * The block at the head of the send queue has finished sending, so we * can free it. Kick off the next transmission if there is one. */ static void macnet_sent(Socket *sock) { Send_Buffer *buff; assert(sock->sendq.qHead != NULL); buff = (Send_Buffer *)sock->sendq.qHead; Dequeue(&buff->qelem, &sock->sendq); sfree(buff); if (sock->sendq.qHead != NULL) macnet_startsend(sock); } /* * There's a block on the head of the send queue which needs to be * sent. */ static void macnet_startsend(Socket *sock) { Send_Buffer *buff; OSErr err; buff = (Send_Buffer *)sock->sendq.qHead; sock->iopb.csCode = TCPSend; sock->iopb.csParam.send.validityFlags = 0; sock->iopb.csParam.send.pushFlag = buff->flags & SEND_PUSH ? true : false; sock->iopb.csParam.send.urgentFlag = buff->flags & SEND_URG ? true : false; sock->iopb.csParam.send.wdsPtr = (Ptr)&buff->wds; sock->iopb.csParam.send.userDataPtr = (char *)sock; err = PBControlAsync((ParmBlkPtr)&sock->iopb rcvBuff = buf; iopb.csParam.receive.rcvBrcvBompleted_closeompleted_close(TCPiopb* iopb) { Socket *sock = (Socket *)iopb->csParam.close.userDataPtr; #if !TARGET_RT_CFM long olda5; olda5 = SetA5(sock->a5); #endif#if !TARGET_RT_CFM SetA5(olda5); #endif Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 06cd7c17a0b812963f38d5c92b996f7d Text-content-length: 399 Text-content-md5: e36e5d08207e3448ecda81c8ed0e6905 Content-length: 443 K 15 cvs2svn:cvs-rev V 8 1.1.2.34 PROPS-END SVN佫@佭C俧0乨伒╘LQ佪o/* $Id: macterm.c,v 1.1.2.34 1999/04/04 18:23:34telnet->back->init(s); /* starttime = TickCount(); */ /* display_resource(s, 'pTST', 128); */ /* sprintf(msg, "Elapsed ticks: %d\015\012", TickCount() - starttime); */ /* inbuf_putstr(s, msg); */ /* term_out(s); */void lognegot(/*Session *s,*/ const char *str) { /* XXX Do something */ Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: bd1c720fd89a9b1fc826c9847f679c28 Text-content-length: 572 Text-content-md5: d8677e37c4d12cd7d248eccd6c6e1df9 Content-length: 616 K 15 cvs2svn:cvs-rev V 8 1.4.2.19 PROPS-END SVN1 .#%乸緅擷繷SENT, /* Used internally by Mac network stack#ifdef macintosh typedef Socket *SOCKET; #define INVALID_SOCKET NULL #endif typedef struct { char *(*init) (Session *); int (*msg)(Session *, SOCKETextern void write_clip (void *, int); extern void get_clip (void **, int *); extern void do_scroll(Session *, int, int, int); extern void fatalbox(const char *, ...); #ifdef macintosh #pragma noreturn (fatalbox) #endif extern void beep(Session *s); extern void lognegot(const char *#define SEND_PUSH 0x01 #define SEND_URG 0x02 Node-path: putty-ben-mac-port/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: d4ab10e64d6d574ea793ada4880c0aea Text-content-length: 2759 Text-content-md5: 7da33904edb36ccecc48a047a63a1962 Content-length: 2802 K 15 cvs2svn:cvs-rev V 7 1.2.2.3 PROPS-END SVN仜亱g乥揤!!乚坸o獂4瑼痆 厇眀峸穃- 苀丷m蒟凘;刉蟵8訰| 謟/賣e踸P軀5軰yZ鄔丅乻鈤僰鋚鑊黙亐>亙_)5亯<亰q-亸T4亹l亾 S仚z#ifdef macintosh#include #include "putty.h" static SOCKET s = INVALID_SOCKET; /* kludge till we decide where to put telnet state */ static Session *sessSession *ignoreunsignedsess->outbuf_head != sess->outbuf_reap) { int end = (sess->outbuf_reap < sess->outbuf_head ? sess->outbuf_head : OUTBUF_SIZE); int len = end - sess->outbuf_reap; int ret; ret = net_send (s, sess->outbuf+sess->outbuf_reap, len, 0); if (ret > 0) sess->outbuf_reap = (sess->sess->outbuf_head + 1) & OUTBUF_MASK; if (new_head != sess->outbuf_reap) { sess->outbuf[sess->outbuf_head] = *p++; sess->sess->inbuf_head + 1) & INBUF_MASK; int c = (unsigned char) *buf; if (new_head != sess->inbuf_reap) { sess->inbuf[sess->inbuf_head] = *buf++; sess->sesssess->cfg.termspeed)+80]; b[0] = IAC; b[1] = SB; b[2] = TELOPT_TSPEED; b[3] = TELQUAL_IS; strcpy((char *)b+4, sess->cfg.termspeed); n = 4 + strlen(sess->sess->sess->sess->cfg.termtype[n]; n++) b[n+4] = (sess->cfg.termtype[n] >= 'a' && sess->cfg.termtype[n] <= 'z' ? sess->cfg.termtype[n] + 'A'-'a' : sess->sess->sess->sess->cfg.username) { b[n++] = var; b[n++] = 'U'; b[n++] = 'S'; b[n++] = 'E'; b[n++] = 'R'; b[n++] = value; e = sess->ELNET_TOPLEVEL, SEENIAC, SEENWILL, SEENWONT, SEENDO, SEENDONT, SEENSB, SUBNEGOT, SUBNEG_IAC, SEENCR } telnet_state = TELNET_ELNET_TOPLEVEL: case SEENCR: if (c == NUL && telnet_state == SEENCR) telnet_state = TELNET_(char *)ELNET_ELNET_ELNET_ELNET_TOPLEVEL; break; case SEENDO: proc_rec_opt (DO, c); telnet_state = TELNET_TOPLEVEL; break; case SEENDONT: proc_rec_opt (DONT, c); telnet_state = TELNET_unsignedELNET_/ static char *telnet_init (Session *this_sess) { sess = this_sess; s = net_open(sess, sess->cfg.host, sess->cfg.port);Session *sess, SOCKET sock, Net_Event_Type neswitch (ne) { case NE_DATA: ret = net_recv(s, buf, sizeof(buf), 0); if (ret < 0) /* any _other_ error */ return -1NE_URGENT: do { ret = net_recv(s, buf, sizeof(buf), 0); } while (ret > 0); telnet_state = TELNET_TOPLEVEL; do { ret = net_recv(s, buf, 1, /*MSG_OOB*/ 0); if (ret > 0) do_telnet_read (buf, ret); } while (ret > 0); if (ret < 0) return -3; return 1; case NE_CLOSINGSession *this_sess, Session *sesssess->cols >> 8; b[4] = sess->cols & 0xFF; b[5] = sess->rows >> 8; b[6] = sess->Session *sess, sess->outbuf_head = sess->outbuf_reap = 0; b[0] = DM; net_send (s, b, 1, SEND_URG Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 5790afb9f1432b9e266ca860ddf5f362 Text-content-length: 224 Text-content-md5: 4489195c6aa8c81b4bf89ddbc8335c35 Content-length: 267 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN丅0妝X弔/* $Id: testback.c,v 1.1.2.6 1999/04/04 18:23:35); static int null_msg(Session *, Socket *, Net_Event_Type) { return NULL; } static int null_msg(Session *s, Socket *sock, Net_Event_Type ne Revision-number: 157 Prop-content-length: 330 Content-length: 330 K 7 svn:log V 231 Mac networking ios still as shafted as ever, but I should probably commit what I _have_ done. It does manage to open a connection to the correct port on the correct host -- it just then bombs the client with a "CHK error". Pity. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-06T23:18:50.000000Z PROPS-END Node-path: putty-ben-mac-port/macnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 0df15c092d552529febcb1c8b9926bc4 Text-content-length: 3514 Text-content-md5: be337b35125d636e21f0a3805f1c4e22 Content-length: 3557 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN(亝j<檖 .岻朏俽倊乛▅咶猔J 盌'>j秈|U.俹?sz組=2MO?irL雞僋丗 +蚡 倀倀L雞丆乿輝}亃m凷B僙鎎t:乧雞6e乴馦I乕驧/* $Id: macnet.c,v 1.1.2.4 1999/04/06 23:18:49#if TARGET_CPU_68K && !TARGET_RT_CFM long a5; #endif/* These handle A5 switching to thwart the optimiser. */ static pascal void macnet_resolved_upp(hostInfo *, char *); static void macnet_completed_open_upp(TCPiopb *); static void macnet_completed_send_upp(TCPiopb *); static void macnet_completed_close_upp(TCPiopb *); static pascal void macnet_asr_upp(StreamPtr, unsigned short, Ptr, unsigned short, ICMPReport *); On the other hand, neither does NCSA Telnet. Hmm#if TARGET_CPU_68K && !TARGET_RT_CFM sock->a5 = SetCurrentA5(); #endifioCompletion = NULLcreate/* * A cache fault indicates that the DNR will call us back when * it's found the host for us. */ if (err#if TARGET_CPU_68K && !TARGET_RT_CFM static pascal void macnet_resolved_upp(hostInfo *hi, char *cookie) { Socket *sock = (Socket *)cookie; long olda5; olda5 = SetA5(sock->a5); macnet_resolved(hi, cookie); SetA5(olda5); } #endif static pascal void macnet_resolved(hostInfo *hi, char *cookie) { Socket *sock = (Socket *)cookie; OSErr err; memset(&sock->iopb.csParam, 0, sizeof(sock->iopb.csParam)); sock->iopb.csParam.open.validityFlags = typeOfService;As} #if TARGET_CPU_68K && !TARGET_RT_CFM static void macnet_completed_open_upp long olda5; olda5 = SetA5(sock->a5); macnet_completed_open(iopb); SetA5(olda5); } #endifOPEN); break; default: macnet_sendevent(sock, NE_NOOPEN); break; } } #if TARGET_CPU_68K && !TARGET_RT_CFM static pascal void macnet_asr_upp(StreamPtr tcpstream, unsigned short eventcode, Ptr cookie, unsigned short terminreason, ICMPReport *icmpmsg) { Socket *sock = (Socket *)cookie; long olda5; olda5 = SetA5(sock->a5); macnet_asr(tcpstream, eventcode, cookie, terminreason, icmpmsg); SetA5(olda5); } #endifioCompletion = macnet_completed_send_upp; sock->iopb.csCode = TCPSend; memset(&sock->iopb.csParam, 0, sizeof(sock->iopb.csParam))#if TARGET_CPU_68K && !TARGET_RT_CFM static void macnet_completed_send_upp(TCPiopb *iopb) { Socket *sock = (Socket *)iopb->csParam.send.userDataPtr; long olda5; olda5 = SetA5(sock->a5); macnet_completed_send(iopb); SetA5(olda5); } #endif static void macnet_completed_send(TCPiopb *iopb) { Socket *sock = (Socket *)iopb->csParam.send.userDataPtr; SENT); break; case connectionClosing: case connectionTerminated: /* We'll get an ASR, so ignore it here. */ break; default: macnet_sendevent(sock, NE_DIED); break; } } */ iopb.ioCompletion = NULL; iopb.csCode = TCPStatus; memset(&sock->iopb.csParam, 0, sizeof(sock->iopb.csParam))ioCompletion = NULL; iopb.csCode = TCPRcv; memset(&sock->iopb.csParam, 0, sizeof(sock->iopb.csParam))memset(&sock->spareiopb.csParam, 0, sizeof(sock->spareiopb.csParam#if TARGET_CPU_68K && !TARGET_RT_CFM static void macnet_completed_close_upp(TCPiopb* iopb) { Socket *sock = (Socket *)iopb->csParam.close.userDataPtr; long olda5; olda5 = SetA5(sock->a5); macnet_completed_close(iopb); SetA5(olda5); } #endifioCompletion = NULL; iopb.csCode = TCPRelease; memset(&iopb.csParam, 0, sizeof(iopb.csParam))if (ne == NULL) return; /* It's a disaster, but how do we tell anyone? */ Node-path: putty-ben-mac-port/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 7da33904edb36ccecc48a047a63a1962 Text-content-length: 522 Text-content-md5: 268e5e5b086c5a9db307a1a18ccd29d0 Content-length: 565 K 15 cvs2svn:cvs-rev V 7 1.2.2.4 PROPS-END SVN亱g亸J#僘丂鞽>俉#髃侹憑鵯#ifdef macintosh #pragma segment Telnet #endifreturn NULL; } static void telnet_opened(Session *sess) {OPEN: telnet_opened(sess); return 1; case NE_NOHOST: fatalbox("Host not found"); case NE_REFUSED: fatalbox("Connection refused"); case NE_NOOPEN: fatalbox("Unable to open connection"); case NE_TIMEOUT: fatalbox("Connection timed out"); case NE_ABORT: fatalbox("Connection reset by peer"); case NE_DIED: fatalbox("Connection died") Revision-number: 158 Prop-content-length: 171 Content-length: 171 K 7 svn:log V 73 Some tweaks, but it still crashes. Really need to do some proper tests. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-07T22:43:35.000000Z PROPS-END Node-path: putty-ben-mac-port/macnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: be337b35125d636e21f0a3805f1c4e22 Text-content-length: 201 Text-content-md5: 54404678e81cf6eb85f1cefca8c2bbfd Content-length: 244 K 15 cvs2svn:cvs-rev V 7 1.1.2.5 PROPS-END SVN亝j亖0".[哾-慘盇9򌊃/* $Id: macnet.c,v 1.1.2.5 1999/04/07 22:43:35/* ASRs apparently get their A5 world set up for them. */ #define macnet_asr_upp macnet_asr*eventblock*sock Revision-number: 159 Prop-content-length: 137 Content-length: 137 K 7 svn:log V 39 original version from MacTCP 2.0.6 SDK K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-07T22:48:55.000000Z PROPS-END Node-path: putty-ben-mac-port/dnr.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 4378 Text-content-md5: b3647bca3a744e2f62d59fba58fe5e90 Content-length: 4498 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN  IE>笵 ‥!E乗揇LH丳岶乗F亁汥倃J俈僁倇圖侤E俼侶9咼俈匤:岴丗僃俛J俈D.D並D働孖乆I俙廍匘&侸乄O僉/欴P慓S嶱則$禠卐匩厀匴 凬厀DW 嘜員嘪唂哅厁哣 凬厀D働W 奙厁奧;凮&匵9凴卻凲L(匧厁丗:僑嶮3塃剒L塅滼侴&怮8I8J嘗)嘍D6嘐儀咲F奒凞儀嘑奒丏&D並D4侱 G0匛卋嶧圸營媖唃媧F咶圸圗奊F寀塅GGEI孲奃媗H孲凞 僂噒H岪D働D寋凥峞G僁働奒億Q峺圙)僉3嘓-嘖<僅嶬塃婰凞侤孍刌奃咲卌朙1丒婨婰E丒僘慒弇奌廌匘倇侲刵侺1塂刵DD匜圗婰丏俽侷8扞巪凞丵廻匘侳廻丗墄EI廧D弜K恑DEF0婦6丏刓岹塆峮G墂侶9侱 E凱2侱K扠楲抾丒 乕憈c峞D*匛慚咲怸匜扠G搚丏?侲0E-丟塃扷侲乗塆H拁侴OI扢E#a D*I峞GD寋僉'侱媝I峲JMF>並扡侺丏)圥峃丒抸H 僊2D3GQ2M2L扠丷扻G丠D寋丗攖s媗D*慐侱嶼僁F梋奃梘H昘奃梘匟JF僅梥E杤岻匘榓FG榤丩"k)D*H 僃圸侱巒匟梜咲橺F昛KP9侱;丟&侳'凢圸嘒檆E扷G榃O橤僁橺D丩橤H榎P媞P7D昘G朏EEG榏DJ$凢媡嘍僈*F寋凢 丗圸R5N楻E榑R榗O榯D$D丏5S孿D弜D侱倇丒宂侱"E媉丗媋D慫凞?凢E慬咲tED1@Y孷D*婦梒婨媌D俼僃咵檍僁媍E僁Z侲G嶭P濰僄巏K-O濱G.侶6R 丏侳楡R 丏烝圗檍嶦!凢橴L凞7僁HG?両奅H僅丗"僃扷僁抺嘓F>FGHJ=D$DF僁D弙P'E擧X烸侱']2DL焬婬?D両朎侱攖丒4I7N渁僃NH)丒1U1D*O8MH梜H烮E揻EH渘G汻丒*丗-F;僂5P 両%丠)JT孿孌N%H昘G嘒KE揻E8G渙F媡丗圸N僅M媡z丂A坉K8@G G侳咵D婦=D瀦K I 僃D両檍L巇D楾侱抺侲D'岶婫L擧F榃IWD0侱婸J丟1E渵咲=匢燾丗燶侲刵侱&D1丗 1/23/95 rrk implemented use of u procptrs d selector name HINFO to HXdueconflictinheaderRemovTrapAvailableexcExists call.ymbol codeHandlgDNRCnddnrPtr Further modificationsSteve Falkenburg,MacDTS 8/91 MJim Matthews, Dartmouth College, 5 */ #ifndef __OSUTILS__ #include #endifERRORErrorFILERESOURCResourcMEMORYMemoryTRAPGESTALTEQUGestaltEquOLDEFoldeTOOLToolACTCP".h"ADDRESSXLATIONAddressXl// think C compatibility stuf _Dispatch #define/* RRK 1/95 -ing outfollows asy are dal filevoid GetSystem(short *vRefNumP, long *dirIDP);CPanelSearchForDNRP(targetTypeCreator, OpenOurRF( Numbox Getthe); Boolean static = nil;ProcPtrPtr /* Checkbitsa trap numbedetermine type. /* InitGraf is always ($A86E). Iftis big ** enough,$AA6E willpointeiUnor some o, butnever besas. Thus, you can csizeoby as ia#pragma seg Main { if (N(_, == 0x) return(0x200); else4}/* OSs starth A08AA( & 0x08000)/* per D.OS; ==&&=7FF) >= )= _!,)SysEnvRec info; wdID;irons(1, &GetWDInfo(.sysV, &noErr) { = 0;}hasMgfalsefeatur))((gFindAttr, &tru!(kOnDisk, krolkDone eds aoat m c'dnrp'HParamBlockfi; Str255; refnumfi..ioleNam =D =Fndex = 1while (PBHGetF&fi,/* ssdrof spec & clFndr.fd &&/* fou? = HRes,, fsRdPermInd(, 1ULL Closenex++) clobbers }-1 opes s1.1&&'cdev', 'ztc!= -1) 0.xmfinally,-1 OSErrlver(char *; cil/* already loadet.it basn &rathy*/ignore failures sincmay have been inf runnn a 512Kpcan'tRes( DetachitnotreloaedMoveHHiHLock()*//UPPrc =, OPENLVERcroblem, flushHUn osrcetc// (*dnr)(CLOSEreleas}declarramulttoUPPead StrTohost, struct *rtnS, , userDataSTRTO,(ToStr(unsig, S errTOSTR,erEnumCache(ENUMCACHENAMEextern H*2MXM}; (causyntaxT5.0 Revision-number: 160 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 48 various tweaks to make it work with current MPW K 10 svn:author V 3 ben K 8 svn:date V 27 1999-04-07T22:50:11.000000Z PROPS-END Node-path: putty-ben-mac-port/dnr.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: b3647bca3a744e2f62d59fba58fe5e90 Text-content-length: 431 Text-content-md5: ae0a6d0e0ba98f466b30b894b133fbee Content-length: 474 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN藑C俙塅0揁>眎剕'俥#俥%縨4;艶 __ #include = 0; j--) c[j+len] = 0; for (i = len - 1; i >= 0; i--) { ai = a[i]; t = 0; for (j = len - 1; j >= 0; j--) { t += ai * (unsigned long) b[j]; t += (unsigned long) c[i+j+1]; c[i+j+1] = t; t = t >> 16; } c[i] = t; } } /* * Compute a = a % m. * Input in first 2*len words of a and first len words of m. * Output in first 2*len words of a (of which first len words will be zero). * The MSW of m MUST have its high bit set. */ static void bigmod(unsigned short *a, unsigned short *m, int len) { unsigned short m0, m1; unsigned int h; int i, k; /* Special case for len == 1 */ if (len == 1) { a[1] = (((long) a[0] << 16) + a[1]) % m[0]; a[0] = 0; return; } m0 = m[0]; m1 = m[1]; for (i = 0; i <= len; i++) { unsigned long t; unsigned int q, r, c; if (i == 0) { h = 0; } else { h = a[i-1]; a[i-1] = 0; } /* Find q = h:a[i] / m0 */ t = ((unsigned long) h << 16) + a[i]; q = t / m0; r = t % m0; /* Refine our estimate of q by looking at h:a[i]:a[i+1] / m0:m1 */ t = (long) m1 * (long) q; if (t > ((unsigned long) r << 16) + a[i+1]) { q--; t -= m1; r = (r + m0) & 0xffff; /* overflow? */ if (r >= m0 && t > ((unsigned long) r << 16) + a[i+1]) q--; } /* Substract q * m from a[i...] */ c = 0; for (k = len - 1; k >= 0; k--) { t = (long) q * (long) m[k]; t += c; c = t >> 16; if ((unsigned short) t > a[i+k]) c++; a[i+k] -= (unsigned short) t; } /* Add back m in case of borrow */ if (c != h) { t = 0; for (k = len - 1; k >= 0; k--) { t += m[k]; t += a[i+k]; a[i+k] = t; t = t >> 16; } } } } /* * Compute (base ^ exp) % mod. * The base MUST be smaller than the modulus. * The most significant word of mod MUST be non-zero. * We assume that the result array is the same size as the mod array. */ static void modpow(Bignum base, Bignum exp, Bignum mod, Bignum result) { unsigned short *a, *b, *n, *m; int mshift; int mlen, i, j; /* Allocate m of size mlen, copy mod to m */ /* We use big endian internally */ mlen = mod[0]; m = malloc(mlen * sizeof(unsigned short)); for (j = 0; j < mlen; j++) m[j] = mod[mod[0] - j]; /* Shift m left to make msb bit set */ for (mshift = 0; mshift < 15; mshift++) if ((m[0] << mshift) & 0x8000) break; if (mshift) { for (i = 0; i < mlen - 1; i++) m[i] = (m[i] << mshift) | (m[i+1] >> (16-mshift)); m[mlen-1] = m[mlen-1] << mshift; } /* Allocate n of size mlen, copy base to n */ n = malloc(mlen * sizeof(unsigned short)); i = mlen - base[0]; for (j = 0; j < i; j++) n[j] = 0; for (j = 0; j < base[0]; j++) n[i+j] = base[base[0] - j]; /* Allocate a and b of size 2*mlen. Set a = 1 */ a = malloc(2 * mlen * sizeof(unsigned short)); b = malloc(2 * mlen * sizeof(unsigned short)); for (i = 0; i < 2*mlen; i++) a[i] = 0; a[2*mlen-1] = 1; /* Skip leading zero bits of exp. */ i = 0; j = 15; while (i < exp[0] && (exp[exp[0] - i] & (1 << j)) == 0) { j--; if (j < 0) { i++; j = 15; } } /* Main computation */ while (i < exp[0]) { while (j >= 0) { bigmul(a + mlen, a + mlen, b, mlen); bigmod(b, m, mlen); if ((exp[exp[0] - i] & (1 << j)) != 0) { bigmul(b + mlen, n, a, mlen); bigmod(a, m, mlen); } else { unsigned short *t; t = a; a = b; b = t; } j--; } i++; j = 15; } /* Fixup result in case the modulus was shifted */ if (mshift) { for (i = mlen - 1; i < 2*mlen - 1; i++) a[i] = (a[i] << mshift) | (a[i+1] >> (16-mshift)); a[2*mlen-1] = a[2*mlen-1] << mshift; bigmod(a, m, mlen); for (i = 2*mlen - 1; i >= mlen; i--) a[i] = (a[i] >> mshift) | (a[i-1] << (16-mshift)); } /* Copy result to buffer */ for (i = 0; i < mlen; i++) result[result[0] - i] = a[i+mlen]; /* Free temporary arrays */ for (i = 0; i < 2*mlen; i++) a[i] = 0; free(a); for (i = 0; i < 2*mlen; i++) b[i] = 0; free(b); for (i = 0; i < mlen; i++) m[i] = 0; free(m); for (i = 0; i < mlen; i++) n[i] = 0; free(n); } #else#endif Revision-number: 172 Prop-content-length: 162 Content-length: 162 K 7 svn:log V 62 Put that ReleaseCapture call just _before_ return, not after! K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-05T16:35:34.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a08ba785e147f346e537e30b25d39d0a Text-content-length: 61 Text-content-md5: 5e34c4d6f1bc52897a8402f3531a226f Content-length: 100 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN傄v傄v #仏M伡仏p ReleaseCapture(); return 0 Revision-number: 173 Prop-content-length: 151 Content-length: 151 K 7 svn:log V 51 Joris's RSA works; reformat and remove old version K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-06T19:38:54.000000Z PROPS-END Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 697b421b87bac4234b124b1b6f3aa475 Text-content-length: 4203 Text-content-md5: c73102bed8aa555bdef5bddd03f2eb85 Content-length: 4242 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN'8V乀J!奐3N巗(恦榮 * Rewritten for more speed by Joris van Rantwijk, Jun 1999. /* * Compute c = a * b. * Input is in the first len words of a and b. * int i, j; unsigned long ai, t; for (j = len - 1; j >= 0; j--) c[j+len] = 0; for (i = len - 1; i >= 0; i--) { ai = a[i]; t = 0; for (j = len - 1; j >= 0; j--) { t += ai * (unsigned long) b[j]; t += (unsigned long) c[i+j+1]; c[i+j+1] = (unsigned short)t; t = t >> 16; } c[i] = (unsigned short)t; } } /* * Compute a = a % m. * Input in first 2*len words of a and first len words of m. *The MSW of m MUST have its high bit set. */ static void bigmod(unsigned short *a, unsigned short *m, int len) { unsigned short m0, m1; unsigned int h; int i, k; /* Special case for len == 1 */ if (len == 1) { a[1] = (((long) a[0] << 16) + a[1]) % m[0]; a[0] = 0; return; } m0 = m[0]; m1 = m[1]; for (i = 0; i <= len; i++) { unsigned long t; unsigned int q, r, c; if (i == 0) { h = 0; } else { h = a[i-1]; a[i-1] = 0; } /* Find q = h:a[i] / m0 */ t = ((unsigned long) h << 16) + a[i]; q = t / m0; r = t % m0; /* Refine our estimate of q by looking at h:a[i]:a[i+1] / m0:m1 */ t = (long) m1 * (long) q; if (t > ((unsigned long) r << 16) + a[i+1]) { q--; t -= m1; r = (r + m0) & 0xffff; /* overflow? */ if (r >= m0 && t > ((unsigned long) r << 16) + a[i+1]) q--; } /* Substract q * m from a[i...] */ c = 0; for (k = len - 1; k >= 0; k--) { t = (long) q * (long) m[k]; t += c; c = t >> 16; if ((unsigned short) t > a[i+k]) c++; a[i+k] -= (unsigned short) t; } /* Add back m in case of borrow */ if (c != h) { t = 0; for (k = len - 1; k >= 0; k--) { t += m[k]; t += a[i+k]; a[i+k] = (unsigned short)t; t = t >> 16; } } } } /* * Compute (base ^ exp) % mod. * The base MUST be smaller than the modulus. * The most significant word of mod MUST be non-zero. * unsigned short *a, *b, *n, *m; int mshift; int mlen, i, j; /* Allocate m of size mlen, copy mod to m */ /* We use big endian internally */ mlen = mod[0]; m = malloc(mlen * sizeof(unsigned short)); for (j = 0; j < mlen; j++) m[j] = mod[mod[0] - j]; /* Shift m left to make msb bit set */ for (mshift = 0; mshift < 15; mshift++) if ((m[0] << mshift) & 0x8000) break; if (mshift) { for (i = 0; i < mlen - 1; i++) m[i] = (m[i] << mshift) | (m[i+1] >> (16-mshift)); m[mlen-1] = m[mlen-1] << mshift; } /* Allocate n of size mlen, copy base to n */ n = malloc(mlen * sizeof(unsigned short)); i = mlen - base[0]; for (j = 0; j < i; j++) n[j] = 0; for (j = 0; j < base[0]; j++) n[i+j] = base[base[0] - j]; /* Allocate a and b of size 2*mlen. Set a = 1 */ a = malloc(2 * mlen * sizeof(unsigned short)); b = malloc(2 * mlen * sizeof(unsigned short)); for (i = 0; i < 2*mlen; i++) a[i] = 0; a[2*mlen-1] = 1; /* Skip leading zero bits of exp. */ i = 0; j = 15; while (i < exp[0] && (exp[exp[0] - i] & (1 << j)) == 0) { j--; if (j < 0) { i++; j = 15; } } /* Main computation */ while (i < exp[0]) { while (j >= 0) { bigmul(a + mlen, a + mlen, b, mlen); bigmod(b, m, mlen); if ((exp[exp[0] - i] & (1 << j)) != 0) { bigmul(b + mlen, n, a, mlen); bigmod(a, m, mlen); } else { unsigned short *t; t = a; a = b; b = t; } j--; } i++; j = 15; } /* Fixup result in case the modulus was shifted */ if (mshift) { for (i = mlen - 1; i < 2*mlen - 1; i++) a[i] = (a[i] << mshift) | (a[i+1] >> (16-mshift)); a[2*mlen-1] = a[2*mlen-1] << mshift; bigmod(a, m, mlen); for (i = 2*mlen - 1; i >= mlen; i--) a[i] = (a[i] >> mshift) | (a[i-1] << (16-mshift)); } /* Copy result to buffer */ for (i = 0; i < mlen; i++) result[result[0] - i] = a[i+mlen]; /* Free temporary arrays */ for (i = 0; i < 2*mlen; i++) a[i] = 0; free(a); for (i = 0; i < 2*mlen; i++) b[i] = 0; free(b); for (i = 0; i < mlen; i++) m[i] = 0; free(m); for (i = 0; i < mlen; i++) n[i] = 0; free(n); } Revision-number: 174 Prop-content-length: 171 Content-length: 171 K 7 svn:log V 69 This commit was manufactured by cvs2svn to create tag 'pre-blowfish'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-07-06T19:38:54.000000Z PROPS-END Node-path: putty-pre-blowfish Node-kind: dir Node-action: add Node-copyfrom-rev: 173 Node-copyfrom-path: putty Revision-number: 175 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Add encryption selection, and Blowfish as second option K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-06T19:42:57.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: df2fce26410fbdb5c70d45ba7e69121b Text-content-length: 65 Text-content-md5: 0b174db02c6a0d76f6334cea27e6a256 Content-length: 104 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN甞 ,40.enum { CIPHER_3DES, CIPHER_BLOWFISH } cipher Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b3d68f198bb319f38eb97ecd7ec13088 Text-content-length: 815 Text-content-md5: 0ac06fa485a04a032f0ee507fe514956 Content-length: 854 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN亞'亱9#厏3;乊卾癴俆侳+A7筽 unsigned long supported_ciphers_mask; int cipher_type; extern struct ssh_cipher ssh_3des; extern struct ssh_cipher ssh_blowfishsupported_ciphers_mask = (pktin.body[12+i+j] << 24) | (pktin.body[13+i+j] << 16) | (pktin.body[14+i+j] << 8) | (pktin.body[15+i+j]cipher_type = cfg.cipher == CIPHER_BLOWFISH ? SSH_CIPHER_BLOWFISH : SSH_CIPHER_3DES; if ((supported_ciphers_mask & (1 << cipher_type)) == 0) { c_write("Selected cipher not supported, falling back to 3DES\r\n", 53); cipher_type = SSH_CIPHER_3DES; } s_wrpkt_start(3, len+15); pktout.body[0] = cipher_type;cipher_type == SSH_CIPHER_BLOWFISH ? &ssh_blowfish : Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 29f9caec1f83f2fff361477b3290ad39 Text-content-length: 121 Text-content-md5: bde993964679114fe44daa648b5bdc85 Content-length: 160 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN/hh#include #define SSH_CIPHER_IDEA 1 #define SSH_CIPHER_3DES 3 #define SSH_CIPHER_BLOWFISH 6 Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 00adaac14319a2620997e10d1514b4fb Text-content-length: 111 Text-content-md5: 47a6bdf22550963e7253e68d2e196cf3 Content-length: 150 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN) Y搙Y2搘#define IDC3_CIPHERSTATIC 1019 #define IDC3_CIPHER3DES 1020 #define IDC3_CIPHERBLOWF 1021 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 5df33ee55a9ad8ecf854a73e68813b52 Text-content-length: 761 Text-content-md5: 2ce9bfdfb72ab80fc3300f8c67b06021 Content-length: 800 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN偝A偣RA*f9'玗2亸G硊 D働伳U佽@*w伬<伻1ssh.h" #include "puttys (sesskey, "Cipher", cfg.cipher == CIPHER_BLOWFISH ? "blowfish" : "3des" RegCloseKey(subkey1{ char cipher[10]; gpps (sesskey, "Cipher", "3des", cipher, 10); if (!strcmp(cipher, "blowfish")) cfg.cipher = CIPHER_BLOWFISH; else cfg.cipher = CIPHER_3DES; }CheckRadioButton (hwnd, IDC3_CIPHER3DES, IDC3_CIPHERBLOWF, cfg.cipher == CIPHER_BLOWFISH ? IDC3_CIPHERBLOWF : IDC3_CIPHER3DES); case IDC3_CIPHER3DES: case IDC3_CIPHERBLOWFif (IsDlgButtonChecked (hwnd, IDC3_CIPHER3DES)) cfg.cipher = CIPHER_3DES; else if (IsDlgButtonChecked (hwnd, IDC3_CIPHERBLOWF)) cfg.cipher = CIPHER_BLOWFISH Revision-number: 176 Prop-content-length: 170 Content-length: 170 K 7 svn:log V 70 Fix misparse of ESC[?9r sequence; I must find out what it _should_ do K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-07T13:16:41.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1f6f39c62bfb3fbd15f8323dbf9be0fd Text-content-length: 39 Text-content-md5: 1ad59138ce03da81c8cc34863ed2ea33 Content-length: 78 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN偅M偅[ 伕隟伕!esc_query && Revision-number: 177 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.042674Z PROPS-END Revision-number: 178 Prop-content-length: 131 Content-length: 131 K 7 svn:log V 31 Blowfish patch, second attempt K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-07T17:33:34.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 635a7f1567c7b32b87db19c2297fff41 Text-content-length: 57 Text-content-md5: bac9e909fff1ee4981d9fad8c17b66dd Content-length: 96 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN-'噁"sshblowfsshblowf.obj: sshblowf Node-path: putty/sshblowf.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 12442 Text-content-md5: de80e079a942cd45361b05c80ad24eb8 Content-length: 12558 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN亶V甇>狤扚4旸嘐4DDG桭4擠ND'朘=匨丯癏丠丟哃婦匛圖9両縅(匘咷!b)噇僊丒儂俵僊丒儂凧俆 岶!F僄凢 丣並"匥-丱9侹-丱9匘團僈塂亊凢fR塜%G 咲"楧 圖 圖 圖 擠 圗咶0咵0圖 嘐嘓圖 嘐嘸圗嘦嘐噛嘐嘍嘔嘐嘐園嘐<嘐嘥嘑嘸嘍嘔嘐4圗坿咵嘐圠嘐8圗咵$嘐園丏!僂塽咵0圖 圖嘔嘐4圗%咵嘐8嘐$嘑嘓咵奌嘐園嘑圠咵4嘐 圖嘔嘐<嘐 嘑 咶咵4圗圷咵 嘐0凞奜E媫匜嘐$嘐 嘐嘐 匘.D奲咵咶婯圖嘔嘑咵,凞奪ED奿侲嘥咶;圗婣咵嘐奌嘐$嘐園嘐嘐婡嘐<咶7嘐嘐,嘐,嘑孭咵嘐奌嘐宼咶+咶坽嘑匜咶/嘐嘸嘐奌嘐4嘐塰咶嘐4嘐圠咶 咶奡嘐嘓嘐僁)F,咵奌嘐,嘑嘍嘔嘐嘸嘐$咶咶噖嘐$嘐嘐<嘐$嘑0咶奌咵嘑孭匜咶嘐$嘐圠嘐圠嘐嘐奌嘐嘸匞峷嘑<咵0嘑 咵0嘐圠咶咶#匞慴嘐婡嘒憒匛嘸嘐園咶孾嘒恱匛圶嘐圠嘐嘥嘑 咶扗咵$咶/咶恮咶峩嘐$嘐宼嘑咵咶媁咶弒咶咶咶塠嘐圶咶婯咷7匜+嘐,咶巤嘑慩匜侱丒嘥嘐嘐宼咶#嘑孭咵<嘐,咶#嘑<匜匘廸D慫咵<咶+嘑4匜7嘐宼嘐0嘓塒僃/嘐$嘐奌嘑 D侲咶7嘐咶実嘐<咷塁嘐匜嘐<咶揋咶?嘒媂匛峘嘐宼咶/咷;咵嘸嘑晅嘐梣咵奌咶咶杦侱攜丗媂咶嘥D揧僂咵咷匜嘐嘸嘑0咵塰咶+咶嘑榎匜媜咶坽嘐婡嘐嘸嘑咵咶岹嘐 嘐峘咶嶹凞坸F%匛$咶嘑 咵歑嘑檒匜咶渒嘐宼咶嘐 嘑(凞>E杗匜檂匜憑咶旵嘐梡匞 匞橿D漸侳嘷孡唎両唡嘑杔匜抯咷濩僁F攅凢塠圗梣匜朑匞欽咷咷$凢巤嘐嘑殀咶(匜奯丏婻G墌嘑$咵歑咶咶咶#咶嘑8咵咶嘑渓匜咶咶滽嘐峘咶歝咶檁嘑奌匜嘐 嘐橦咶嘒(匛咶朑嘐0D僂焇D榼侳峸咶 咶慘嘐咶坈嘐焇嘐嘸咶媁咶咶梂咶;嘑抙匜嘐0嘑咵園咶嘐咶嘷僁)F匜檁嘑宧咶咵圶嘑4咶丏榪F咶咶怱匘6D匜抂嘑 匜榮咶旵咶抂嘑濸D*丗)嘑(匜塁嘑0匜丏楳侲嘐$咶攞咶欿咶嶬咶噆匞,咶咶媍嘑咵D8侳#D巐僂焇嘐園嘑渀匜咶 嘑<咵凞朌F%凢咶;咶攞嘑巪咵塰嘑燡咵嘑$咵烣D侳丏侳婡咵嘸咶揋侱3G9咶擷咶嶺咵婡咶憃咶)嘐烣嘐奌侱檛F5嘐焇咶揋咷宻咶<匜憑凞▇F 丏婾E嘓嘑:咶(咶瀐匜巆咶塐丏2侳爊咵 咷#匞揋匜╥咶/侱榅丒梡咶巆咷1咶匜 嘑燡匜嘒咷媜咷檒凢匘峖D咶,咵梡丏丗咶5咶攐咶9咶嘐婡僁 F瀟D奀丗咶咶︰丏"侲 嘐橦咶廩咶嘷咶?嘑<凣燻咶橤嘑"匜;咶=匞匞橿咶凞弌F)匛烣匞$嘑*匜扖嘐梡咶咶巆咶塐嘑攟匜3嘐 僁E璑凞$F怳凣歝僁#F=僄,嘑搙匜咶+凞峓F7凢咶坽凞4E匜!嘑匜妅咶嘐嘐嘓咶7咶3咶弒嘑怲匜璝嘐&咶漮嘑搇咶漍匜漮嘐$咶盷咶咶3咶匘E:凢≦匘揯D咶痓匜宻丏4丗5咶9咶!嘑匜-嘑:咶憄匜嘑(凣咷濩匜!匘歏E疿凢匞汢嘐焇咶匞燞咷歿匜凥丏擨侲0嘒楶凢嘑$嘝両唡丒G嶹匜噖咶咶匞稡咶畊咷旵匜嶹咶咶妅匞楴咶丏G旴咶咶砓咶奯咶坽匞:咶咶嘢咶咶咶+嘑梡侱E.咷-匜)咶燼丏瀧G嘐梡咶#咶榌凞砈F⊿凢漮嘑漍咵塰僁皗F凞E檔匛 咷盦侱汮F僁5E7匜嘷咶咶%咶9咷攐凞塺E凢噖嘑昞匜咶=咶砓團!凢噖咷榌咶咷<凢嘐橦僁巑F箌侱禟F稤匜/嘒揱侱玐F僁E抝凣匜媨咶咶咷稯咵$匞$咶1D侳咶-凞F燢圖篰匜滽嘑0匜坥咶揋咶篛嘑匜扖咶玦咶圞咶榞咶D.丟.DD墊E窾匜孋咶咶!咶玦咶?匘6E匜匜7嘒凣凞E凢簊匞巄咶嘢咷凣奟匘6D紐匜扥咶攞咶咶媜E漙G2匘竈D╜匜攐咶匞宺咶3D#僃匜 匞咷匜╥咶峸丏G<凞E嘔匜咶璝侱2F榌嘑8匜璝D丏2D穠匜/咶恔咶咷扖匜筗丏綜侲纔咶糲咶沎D丟4咶╥咶孾咶丏恡丗匞秔咶)D 侳咶塁凞痸E匜咶咶碤D恠侳匘$E+D盵F?咷糤匜疘咶/咶咶;匘D匜3咶梴咶咶塠咷 凞腳D'凣絑咶咶咶疘嘐舚咷=凞E凢3僁'F擫匜篻咶!嘐4咶弒丏丟竉匜-匞8侱F3侱F琔咶咶嘑 僁歍F晆凢実嘐 凞F 凢+匞恦匞0匞6凞F9凢檁丏丗媨咷匜簊D蒠侳嘑秄丏F坽咶擪咶揋咶'僁#F筙咵塰咶 咶3咶梂咶攞咶咶納咷匞3D芛丗咶D4侴玼匜7咶1丏丗7嘑匜咶奊匘(E胈D碬F嘑:匞匞渒匜嘑擛匜恄咶恔D+侴<匜9咶廹嘑匜)咶咷匜咶咶?凥丏扻侳璻匜秖咶僁礕F舚匜咷)丏F榮咶圥両唡咶匘F箁侱E礍凢孋咶!嘐4咶奯侱漄F荋咶矼丏>丗咶?嘐籰丏5丟僅嘠咶荋E 丗廹D奙丟楤匘萶E翺凢嶬咶攃僁縦F咶芣匞咵艵匞揯咶匞>咶峸侱H?凣'匜咶繺匞D侳媁咶1匘篘E凣狝凣梲咶咶咶侱F%丏丗僁旳G痓凢凞現F絠凢'嘒%僄咶梂凞歶F繤凢'嘒匛橦丏肗丗!僁弞F凣咷袹匜嘐紻侱G蟌丏F 咶怱咶翤匞嘐艵咶D疎侳 嘑0匞孾匜=咶丏5G"僁*F嘥D丗抯匞#嘒榟匛5D塨侳匞慴咶咶篻咶咶?咶 咷匜榌咶廩咶巆D,僃6凣峧咶+D;侳3匞2嘒 僁虶D誡匜詁侱&F匞奟丏G宖咶嘐塰咶榞咶僁虲G礲凢咶'嘐=凥 咶恔僁橮F蔍匜欿咶㊣咶咶蟌侱纝丗&侱珽F搇匞5匜淕嘑昉匜.匞咶抯僁;F4匞%匜赽咶2咶噆匘D9D丟丏蟗F孋嘐=咶諂丏丟8丏F匞 咶!咶 咶妅D#丏萩E凢巆匞裊凥廵嘒.凢峩匞 D,侳+咷芇匜=咶咶 凞匞咶侱0F3咶扖咶碤嘐咶D癑侳+匞歾丏H丏舗F僁塉E籰僁'F趏匜榞僁:G郼凢擪咶 嘐塰咶-丏媦丗簊嘑8匜咶諂匘$E2侶跕匞"嘒凣 匜蟌嘑<凣咶祔僁鈊F嘥凣莀匞 匘烡E歓凢咶#凞睶F蟞僅 侱F 凞&FDF匜+咶孋咶歝咶輇丏篣丗搘匞簙咶燼咷凣矦咶丏=侲艵咶祔咶繺咶凞襅F4匜蒃僁諰E匜宻D筴侳7侱砢F肈咶渒咶鈜侱6F/咶糤匞?咷烸凣趍D矷侴/匜咶D D F蘪凣'凣 丏丗沎嘐谻丏$丗D磑僄泃凢-圠咺唡咷廜匞凣礰咷抯僁F琧僁*D鍹D膅G咶;丏6丗)咶咶蟌嘑$凣匘E鎪僄丏丗咶!圗H慏镺嘍匘$凞閆咼7僅?怓 侼丣丗K閡嘍镹揇闥丏丏閎廌圙塆 D阩H&両/圗Y隣O俻哊峂<僆丱両丱両丯丠丮stdio"ssh.h" typedef struct { word32 S0[256], S123P[18];iv0, iv1; /*CBC mode}Context; #define GET_32BIT_LSB_FIRST(cp) \ (((unsigned long)char)[0]) |1] << 8216324))PU, value) do { = (;1 >> 8216324; }le (0) Thenit data,aighreferencesbox0[{ 0xd1310ba6, 0x98dfb5ac2ffd72dbd01adfb7b8e1afed6a267e96, 0xba7c9045f12c7f994a19943916cf0801f2e2858efc1636920d871574e6a458fea34933d7ed95748f28eb658718bcd582154ae7b54a41c25a59b9c30d53af26013c5d1b02286085f0a41791b8db38e8e79dcb603a180ec9e0e8b01e8a3d7c1d314b278af2fda55605c60e65525faa55ab9474898663e814455ca3962aab10b4cc5c31141e8ca15486ac72e99b3ee141636fbc2a2ba9c55741831fce5c3e1b87931fd6ba36c24cf5ca3253828958673b8fb4bb9c4bfe81662821961d809cfb21a99487cadec803ef845de98575b1dc26230b651b82389cc0f6d6f83f44239e0b448a48420069c8f049e1f9b521c6684f6e96c9670c9c6abd3886a51a0dd8542f6960fa72ab5133aeef0b6137a3beba3bf057efb2aa1f16539af0176ca5982430e8cee861456f9fb7d84a5c3b8b5ebe06f7585c1207401a44956c16a4ed3aa363f7701bfedf74297d0d72d00a124db0fead9f1c09b075372c80991b725d479f6e8dee3fe501b6794c3976ce0b04c006bc1a94fb09f60ce5c9ec196a2468fb6f3e6c531339b2e3b52ec66dfc5119b30952cc81454af5ebd0bee3dde334af60f280192e4bb0cba8545c8740d20b5fb9d3fb5579c1a60320d6a100c2c727679f25ffb1fa38ea5e9f3222f3c7516dfd616b12f501ecd0552a23db5ffd238753317b3e00df9e5c57bca6f8ca1a87562f1769dd542a8287effac67328c4f55695b27bbca58ce1ffa3b8f0110fa3dfd2183b4afcb52dd1d35a53e4b66d28e49b4bfb979e1ddf2a4cb7e32fb134cee4c6eef20ca36774c007e9e2bf115dbda4ae9091eaad8e7b93d5d08ed1dafc725e8e3c5b25948ff6e2ff2122b68888b81014fad5e688fc31d1cff1b3a8c1a2f2f22e0e1777a752d8b021fae5a0ccb56f7418acf3d89e29b4a84fefd13e07cc43b2ada8d165fa2609577053cc731211a14e6ad2077875442f5cfbcdaf07b3e896411bae1e7e400250e2071b3522680057b8e02464369009b955639159dfa6a78c1438d95a53707d5ba02e5b983260376295cfa11c8194e73472dc7b14a91b51005a53291d60f573c9bc62b60a481e674008ba6f571be91f296ec6a0dd636527b9f9ff3405c58556653b02a99f8476e85076aL}; 14b7a70e5b329db75094196ea649a7df7dcee608fedbecaa8c99a17f6452c2b19ee193602a5094c205913e3f54989b429d66b8fe499f73fa1d29cefe8304d2d38e0255dc4cdd208470eb2382e9021ecc09686b3ebaefc3c97186b6a70687f3582a0e2b79c530aa500733e07847fdeae57d44e5716f2b03ada30c01f0200b3ae0cf53cb574b25837adc0921bd19113f7ca92f94324722f5473ae5e537c2dad8b5769af3ddaa944614fd0030ecc8c7a4751e4e238cd3be280bb183eb33e548b3f6db906f420d060a04bc24977c5679b0bcaf8e9a77d99308138baedccf3f5512722e6b712d9f84cd8a58477408da1c9f9aed8ec7aec3db851d630943c464c3ef1c183215ddd433b24c2ba12a14d4a65c4500e4d71dff8910314e51ac775f1119043556f7a3c763c1124a5f28fe697f1fb9ebabf2e153c686e3457ae96fb860e5e0a3e2abe746f965dcb99e71d80266c82e4cc97c10b36c6150e94e2eaa5fc3c51e0a2dff2361d2b319392619c279223a7071312ebadce3bc45967bc8817f37d18cffc332ddbaa55821868ab98ecea5b2f952aef7d5b81521b6290761cdd47719f1513cca83b61bd0334fea0363c735c4c70a59e9e0baade1e660622c9cab5cb2f384648b1e19bdf0ca02b40685a3c2ab439dc021b8f9b540b875fa095f799623d7da837897e32d11ed935668120e3588c7e6196ded7858ba57f5227269b83c1ac2469db30a532e3058fd9486dbc3158ebf234c6ffee28edee7c3c75d4e864105d03eeeea3aaabeb6c4ffacb4fc7426abb654f3b41cd81e7986854dc44b473d8162cf62a1f5b8d264fc8883c1c7b67f152469cb7497848a5692b28095bbfad19489462b173820e58428d20c55f51dadf4233f703372f08d9375fec6c223cde375bee7442ce7732a6078019f85098efd861d9973969a7a50c065a04abf00bc9e447a34534fdd561e9edb73d105588c675fdae3674c5c43413e383d28ff2153e21eb03de6e39f2b83adf72e48140f64c26946929411527602d4bcf46b4a200d408243320f443b7d500061197244514214fbf8b884d95fc96b5970f4dd66a02fbfbc0903bd977fac6d31cb8506e55fd39a2547abca0a2530429f0a2c86e9b66d68dc4869680ec0a7a18de4f3887a8ce007af4d6ac337e78a3406b2a20fe9ed9f385ee39d7b124c9fa4b6d1856a366eae3973a6efadd5b433241e7ca7820b0af548feb394056ba4895255508e6ba9d096954a8159a9299e1dba62a4a3f31255ef47e029317fdf8e04272f1505282c95c1c66d22, 8c113c70f86d7f9c941041f4047795d886e125f51d59bc0f2bcc1411135257b789f636c0e12b402e132af664fcad1816b2393e92eb240beebeb92b2a26ba0720c2da2fd0127895b79447d0e7ccf449a3877d48c39dfdf33e8d992efa6f6ef4f8fda812da1ebdde14b6e6bc67b56d672c765d4dcd0e8fcc005390f690fed66cedb7d9091cf5b132f515bad7b9479763bd67392ec978026e2f42e31ac66a2b12754c782ef162b792506a1bb631a6b1011cad25bde2e1c344421613d90ce64af67a86a8bebfe964e4c39dbc80f0f7c0787b600360d1fd83f6381f7745ae736f3426f01eabb080413c005e77a057bbde8ae5464582e4e52ddfdf474ef8789bdc5366f9ce475f246fcd7a8b846a0e915f95466e5980b4d555c902de4b90b820511a867574ab77f1e0a92d09c6e85a1f9f0bea01d6efe1a0ba5a4a186f22868f1dcb73906fa1e2ce4fcd7f50115ea70683a002b50de6d09af88c73f86c61a8067a0f5860060583d11e69ed338ea53c2ddc2c2190bcb6dbfc7de591df05e44b7c0189720a7c927c7224d9d1ac15bd39eb8fd545508fca5d83d7cdad0f1e50efb161e6a285633fd5c756e14e362dc6c8d79a322670efa406000e033a39ced3faf27c52d5cb0674fa3374d3822799d5118eb3d62d1cc700c47bb1a1b26eb1eabc946a3766549c253068dde75730acd04dc2939ba9ba46ac952be5ee3a12d513ef8c9a86eec089c2ea51e039cf2dc061be968fe515ba645b2826a2a745ef52feff752046f77fa0a5e4a87b0869b093ee5e990fd534d79270226d5a017da61cf3e7c7d2d21fd5ad6b45a88f5e029ae019a5e47b0acfae8d3c4883b578d56679132e7ed7ee3d3515056ddf46db610564fc3eb9e3c905797271aa93a071b3f6d1e632159c6626dcf37533d9fdf35638aba3c77c20adabcc516ad9de81738379d59ea7a90fb3e7bc5121ce774fbea8b293d48de536413e68a2aedd6db269890721b39a466445c0586cde1cabbb588dcd2016bb4e3bda26a3a59f3e350abcb2eacea64848d6612bf3c6fd29bedef64e637740e0de38af5374040cb4eb4e234d246ab0049598306b8ce6ea043f3b3520a1d27722711560e7933fbb3a793445883951ce79f32ca01fbae01cc8bcc7d1a1a9087d44fbdd0dadec0339c3c691368dfb79e543f551927d945bf97225e6f0f91f9b9415faceb69cc2a86412baa8db6c1076a10d25c01694c9278e99f1d392d3a0348971f211b0a7444c5be71237632df359f9b9920b0fe3fe54cda5dad8e6279cd3e7e6618bfd2c1d8486fb2f523fa6327a83556cccdacf075ee18d271b9494c509071c656e6c6c73445e1dc3f27bc9aa532a80bb25bf32f711269b20402b6cbcfcd76113ec6408abbdadbaf746ce77afa12085cbfe8ae887aaaf9cf9ac22fb8a01c36ad4f865cd35c208e69b1e258fdf3ac372e6parray243f6a5a30831980370734099f3ec4e6c4138d013be546634e90c60ac2c97c584db99216d58979fb1bFprime(a,b,c,d) (S0[a] +b]) ^c] )3[d] )(x) ((x>>24)&0xFF),168xROUND(nxL ^= P[n], t = xL,=LxR, xR = t ) sc void b_encrypt(R*output, *ctx)*S0 = ctx->S0*S112233PP0)123456789111116xR7]xRxL; }de110_cbc *blk, int lenR,[2]((len & 7) == iviv0;> 0=blk+^,=v+4blk += 8-} =;1 ^setkey(const key, short keybytesstr[2i(i = < 18; i++P[ii^= (key[ (i*4+0) % ]))11623256S0S12302[1;+123} -- Interface withSSH_SESSION_KEY_LENGTH 32e dctx;ss) &. =blk) )ssh_cipher }; Revision-number: 179 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 Third attempt at Blowfish, dammit K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-08T08:37:32.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a93e75f686d02bd4162941233131171b Text-content-length: 231 Text-content-md5: dba18bf45fb8cc29dcee23fcb00d2d79 Content-length: 270 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN襢"並'並y▆7/ LTEXT "Cipher:", IDC3_CIPHERSTATIC, 3, 50, 40, 8 AUTORADIOBUTTON "3DES", IDC3_CIPHER3DES, 46, 50, 35, 10, WS_GROUP AUTORADIOBUTTON "Blowfish", IDC3_CIPHERBLOWF, 84, 50, 40, 10 END IDD_PANEL4 Revision-number: 180 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 66 This commit was manufactured by cvs2svn to create tag 'beta-0-46'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-07-08T08:37:32.000000Z PROPS-END Node-path: putty-0.46 Node-kind: dir Node-action: add Node-copyfrom-rev: 179 Node-copyfrom-path: putty Revision-number: 181 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 Add a couple of `extern' keywords K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-12T10:28:18.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 0b174db02c6a0d76f6334cea27e6a256 Text-content-length: 92 Text-content-md5: 50142377b39f1a1267ac5dea08bbb96f Content-length: 131 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN FF塂extern Backend telnet_backend; /* * Exports from ssh.c. */ extern Revision-number: 182 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 36 Remove double close of registry key K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-16T08:13:51.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2ce9bfdfb72ab80fc3300f8c67b06021 Text-content-length: 23 Text-content-md5: 634d7f5f9a3eaa5adb4e42fcd56a3cd7 Content-length: 63 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN偣R偣8 琍倢h琷 Revision-number: 183 Prop-content-length: 150 Content-length: 150 K 7 svn:log V 50 Jimen Ching's patches to remove compiler warnings K 10 svn:author V 5 simon K 8 svn:date V 27 1999-07-20T13:01:56.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 50142377b39f1a1267ac5dea08bbb96f Text-content-length: 25 Text-content-md5: 80cd9e121c8a6f98da3e055bd4325915 Content-length: 64 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN" =抋=void Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 0ac06fa485a04a032f0ee507fe514956 Text-content-length: 53 Text-content-md5: d878688914ff016eaab04be5e693a2be Content-length: 92 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN亱9亰Y(6孏鵥慦*p; static int i, pad Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b621bce4cc8aea4a0ff6457f7fae93e3 Text-content-length: 22 Text-content-md5: 54f1d3a2f8bbe6971322436fd8471c5c Content-length: 61 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN仛t仛U 皉閏 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 634d7f5f9a3eaa5adb4e42fcd56a3cd7 Text-content-length: 23 Text-content-md5: 556de6b4a720baa06c734e748e814f3f Content-length: 63 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN偣8偣# 嘖偙X嘸 Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5e34c4d6f1bc52897a8402f3531a226f Text-content-length: 93 Text-content-md5: e812861733dc85fea923b6380764a395 Content-length: 133 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN傄v傄d=偡]6偡]偽bvoid; min = (to < from ? to : from); max = to + from Revision-number: 184 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.297589Z PROPS-END Revision-number: 185 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.304639Z PROPS-END Revision-number: 186 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 54 Fixes so it runs (with bugs) without Color QuickDraw. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-07-24T15:51:12.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 5bc1249eb65f8be45d80fdaef52a6d7a Text-content-length: 154 Text-content-md5: 8d02caa2dfdbd75302cf6bc8fc62cb28 Content-length: 198 K 15 cvs2svn:cvs-rev V 8 1.1.2.12 PROPS-END SVN2圕y+A?.M唀Gestalt#define HAVE_COLOR_QD() (mac_gestalts.qdvers > gestaltOriginalQD)/* from opentpt.c */ extern void opentpt_shutdown Node-path: putty-ben-mac-port/maccfg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: da819cdb8e31a0fcfc0fa3bf026637ae Text-content-length: 232 Text-content-md5: 617af82b6a34aade932a529d35c287b8 Content-length: 275 K 15 cvs2svn:cvs-rev V 7 1.1.2.6 PROPS-END SVN並].漹}焛/* $Id: maccfg.c,v 1.1.2.6 1999/07/24 15:51:12Palettesif (HAVE_COLOR_QD()) { cfg->colours = GetNewPalette(s->colours_id); if (cfg->colours == NULL) fatalbox("Failed to get default palette"); } Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: e36e5d08207e3448ecda81c8ed0e6905 Text-content-length: 1624 Text-content-md5: aa64fe27e11d5f1a371fa8fb3e728e27 Content-length: 1668 K 15 cvs2svn:cvs-rev V 8 1.1.2.35 PROPS-END SVN佭C佱r媂檊0"歳(% 奨:4稨僣仦@ 1仮X乧伇0~2伌*C0伬W-伳G佌m3)佡<40佨/* $Id: macterm.c,v 1.1.2.35 1999/07/24 15:51:12null_backend; /* XXX: Own storage management? */ if (HAVE_COLOR_QD()) s->window = GetNewCWindow(wTerminal, NULL, (WindowPtr)-1); else s->window = GetNewif (HAVE_COLOR_QD()) { /* Set to FALSE to not get palette updates in the background. */ SetPalette(s->window, s->palette, TRUE); ActivatePalette(s->window); } ShowWindow(s->window); s->back->init(s); starttime = TickCount(); display_resource(s, 'pTST', 128); sprintf(msg, "Elapsed ticks: %d\015\012", TickCount() - starttime); inbuf_putstr(s, msg); term_out(s);!HAVE_COLOR_QD() if (!HAVE_COLOR_QD()) return;if (HAVE_COLOR_QD()) PmBackColor(DEFAULT_BG);/* HideControl clears behind the control */ else BackColor(blackColor);if (HAVE_COLOR_QD()) { PmForeColor(DEFAULT_FG); PmBackColor(DEFAULT_BG); } else { ForeColor(whiteColor); BackColor(blackColor); }HAVE_COLOR_QD()HAVE_COLOR_QD()) DeviceLoop(textrgn, &do_text_for_device_upp, (long)&a, 0); else do_text_for_device(1, 0, NULL, (long)&a/* FIXME: Sort out bold width adjustments on Original QuickDraw. */if (HAVE_COLOR_QD()) DeviceLoop(s->window->visRgn, &mac_set_attr_mask_upp, (long)s, 0); else mac_set_attr_mask(1, 0, NULL, (long)s!HAVE_COLOR_QD()!HAVE_COLOR_QD()) return/* FIXME: This is seriously broken on Original QuickDraw. No idea why. */ SetPort(s->window); if (HAVE_COLOR_QD()) PmBackColor(DEFAULT_BG); else BackColor(blackColor Revision-number: 187 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.415848Z PROPS-END Revision-number: 188 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 36 Various changes for Open Transport. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-08-02T08:04:31.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 1e0901a8dc81de5fadc0ad1f31f00097 Text-content-length: 790 Text-content-md5: 2dcf47be3d0e25380ac28b9be435ca81 Content-length: 834 K 15 cvs2svn:cvs-rev V 8 1.1.2.13 PROPS-END SVN 瀌%卐僫2 凘咮圿奌>梑# $Id: Makefile.mpw,v 1.1.2.13 1999/08/02 08:04:31# macnet.c.o macterm.c.o misc.c.o opentpt opentpt "{Libraries}OpenTransport.o" "{Libraries}OpenTptInet -weaklib AppearanceLib "{SharedLibraries}OpenTransportLib" -weaklib OTGlobalLib -weaklib OTUtilityLib -weaklib OTClientUtilLib -weaklib OTClientLib -weaklib OTStreamUnixLib -weaklib OTXTILib -weaklib OTConfigLib -weaklib OTNtvUtilLib -weaklib OTNativeClientLib "{SharedLibraries}OpenTptInternetLib" -weaklib OTInetClientLib "{PPCLibraries}StdCRuntime.o" "{PPCLibraries}PPCCRuntime.o" "{PPCLibraries}OpenTransportAppPPC.o" "{PPCLibraries}OpenTptInetPPCopentpt.c.o opentpt.c.x putty.h mac Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 8757583a25b6d8b18b2db97396c67b2e Text-content-length: 393 Text-content-md5: c2e42a7b30cbb916d9d81b748abfc950 Content-length: 437 K 15 cvs2svn:cvs-rev V 8 1.1.2.25 PROPS-END SVN4俤,!8糝倅/* $Id: mac.c,v 1.1.2.25 1999/08/02 08:04:31 /* Initialise networking */ #ifdef WITH_OPENTRANSPORT if ((*opentpt_stack.init)() == 0) net_stack = &opentpt_stack; else #endif #ifdef WITH_MACTCP if ((*mactcp_stack.init)() == 0) net_stack = &mactcp_stack; else #endif fatalbox("No useful TCP/IP stack found"); net_pollnet_shutdown(); Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: d8677e37c4d12cd7d248eccd6c6e1df9 Text-content-length: 872 Text-content-md5: 3133f4f6096d03aef10fda2b217a1bed Content-length: 916 K 15 cvs2svn:cvs-rev V 8 1.4.2.20 PROPS-END SVN ": 侲卶橵丅;t*揹void#ifdef macintosh typedef struct { int (*init)(void); SOCKET (*open)(Session *, char const *, int); int (*recv)(SOCKET, void *, int, int); int (*send)(SOCKET, void *, int, int); void (*poll)(void); void (*close)(SOCKET); void (*destroy)(SOCKET); void (*shutdown)(void); } Network_Stack; GLOBAL Network_Stack *net_stack; #define net_open(s, h, p) ((*net_stack->open)((s), (h), (p))) #define net_recv(s, b, l, f) ((*net_stack->recv)((s), (b), (l), (f))) #define net_send(s, b, l, f) ((*net_stack->send)((s), (b), (l), (f))) #define net_poll() ((*net_stack->poll)()) #define net_close(s) ((*net_stack->close)(s)) #define net_destroy(s) ((*net_stack->destroy)(s)) #define net_shutdown() ((*net_stack->shutdown)()) #endif#ifndef macintosh#endif #define SEND_PUSH 0x01 #define SEND_URG 0x02 Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4489195c6aa8c81b4bf89ddbc8335c35 Text-content-length: 87 Text-content-md5: 1c38a6ccc957ce5af45331e7118849be Content-length: 130 K 15 cvs2svn:cvs-rev V 7 1.1.2.7 PROPS-END SVN ;60刧妋5廩/* $Id: testback.c,v 1.1.2.7 1999/08/02 08:04:31OCKETOCKET Revision-number: 189 Prop-content-length: 202 Content-length: 202 K 7 svn:log V 103 Open Transport support, maybe. Also renamed macnet.c to mactcp.c, but it's still as broken as before. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-08-02T08:06:32.000000Z PROPS-END Node-path: putty-ben-mac-port/mactcp.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 7385 Text-content-md5: fdbca2e64e091c010cdfa19823ac766a Content-length: 7505 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN亖0OE婦>凟F岴=籇>怐 ‵7岹乄侲*圖H 圖>嘍亀圖丆G/匜乽E!Gg嘍>D両嘍倉丒'婦<嘍咲乛僁>凞倅僃丮J$E.D俷丏丟2E俶凞僅D>I&婨僘匛"凞俷D僆塅倂僁亀侱>D>塃倅FF匜乚E丵E僞FG刜嘐僿F侴侱DH?丏#孍=P僂DvF凢紼倁癊匰G厏咲匧旸淒匧匰慏唘E_廌員嘐嘓G唃僂噉孏哣嶪噄奃1咲厇侲丟侳 D卾N匰侲匰侲坥F噈圖僂儀G匶DvH:烡僿凣 侱堿嘖塓塃乿N塪匬塨F堿O圢塪哋塩嘑塨K塓哊塪哖凬妉奊;D凨婬刧匘凚D匧廎俵嘐.匘丆塂丆F俛D匧嶨堿凞?嶯 丏婯僂^嘐孴丒俶楩僓嘍丒6K 咲"僁 凪I2F匛5廌俇圖"侲峢凢匘俇丒僄H宬匛侻G匟v僂侺E僁=咵僅m丣俢D俷匘匧奌嶤塂巏僁婦"凣俷侲5L 侱%嘍俷嶨孯嘒侲6D廤匘 丗俕D!嘒孧丒僂E廦丏DE9丗僄処:G侱乀丏僂峾EE俹D巜D丷F]廌廭塇5D宺僂孴L咵 丗峱J恎F僓丏7圖慿侱僁丏;D峿D匧D(G(H匧咲侲J弡塂8匟孧匜.E宖D7丒峷F孫嘍丗,D怋ED-凟媖DD%凟廋E扏孎;E乛匘G俛H-丗僄F3侲^D媥丒丏搣D恥F搆P E巬侲恷咶;Gv滶巟匘凥慛H:侶;侻 匢D孶凞丆僅7圗昸匛 僂2F晑G奵怓晑侳汫>咵 侱丏凞巂丒 凟丒丒=I嶪DG6凣丵攑F婮晑匜晑圖梑F晑匘梑匘"匛孫丠婡婩F攞F桟丒.E梪僂侱n丒&DE5DD嘍%DH慓E.慏丗匟匘乺F g-G匜晑奃塤丏攔D僂檟塃峢怐乽丗杤F,侱檡俆/D侷.F梪婭欼DE歴凞乯嘕歝処:D丏抦両欼嘐抦G<塈昹侲#侸?L汸廏a泇D_D楴丠檅W淨凟淒^渓J D昚丼S汭桭歭俆漲凞 圖3Y渞僂欳I丱檚丏J;咵朲G0怚:H沑咵 奵D昿僁奵凮J?Y N g*咶僆焀IP焌N k焬E濫@b*D濬m焬E<@b*EF盄F僃:凢>G梀W╖KE HD蠱RK僄GD蠱侲梄侺梂F 孏P丣稨丏蠱侲義僁癳E珃DF僄G*G猋I#D梸K琄咹裌D丒-JI;F H甊F約E東I筰侶2D篐匘僡F3JF&L篯K襒H4侺襂J簔J G筫I螶H(F揤FE'E侷篊F珇凟緁凞,G媓M侶EEL汸F?D"丠臖J╭丠>T硆FF5丏祇丣╭H焛L琝JD$FO侴=侸襈M5GH!D誸D攔O?嘙菷丒G筫X1I諬匘侱L謑D2F諯FE P萰M=S誸H產K觓DE搒F楺丏琫H裷D裯F3D7侴 DE侴揮僃丏狵M襪凥襶GG4D,侲匤I;Y淸E-H(W蠥F妠S$丟誚JE;L蠥E筪M)O誩`襃丏丏蠱KQ賞I貹e覩F慬I蟈F俠W譿F廏D寁E俶FD諨G蟝e渨_T!m賈k縪H]礩D賐M3u繮W祣DQG琋X輔凞現F3I 橺祘E丒Z:僲轝僈稧GJ條X辬[聖S"`(@E膅Rs>P@EE蟰@@芀L淒@G/@L荿D6V薣J縛I蔵U,I藅D蜭丒=D:丒僂"E榡E榺DEr1HP=I蟤D媝w蟴MT╙D 咵$丏#G鉕HDI襏F鎖GGHD鋖R+JE楩嘠F J篭]礏RE!@F)a&^窶IDJD歭D穎侱$丏D抁HE鍶侶鐊G醊E!僃蝯丏稢JG镹僉F梌D㏑丟镸丟侴镸丮5o鏭傽F)M 丗蜦KI)\隌F禨DU%y鑘L,_雋D郮侳訯E8E=L檅S╖O筴E穇丒GD鋟G觬G僂擺丏4D奻E丆丒(J緖処D遱侴"F廢丗旻侱丏癳F譲E'FF刯圗揺丟圖揤僂2D廙D廢F.H領G1H廍侴D+Q皒N猂HG賞H旽e鎚N/I颻Z繹QHP8`縵IL輎LK祃D=XGD=^QG馮@H I颻O D碫U緻~,EO鋚@N@B膉Q1丒靏o臖Q @EF@@芀N<@G魙@L荿D Q錕|0@IF<丏H4EF*侱磑J乨E$丟F#侱:丒8D/K縛咲;K訪D?丏;俇]%O筴E丏谾凣韢丒靏丏F豜D1丒,D裯匘-FE馯L:圖穨G鶀F丆G=D]FK3H!D-G頮D訤F豤L頼V顲i飀p闔凥5H/X @@鐴F0[M齂J覼e3G胵R檜[詉X$K/U誋G0E 丏砙丏丏F僁-凞;嘓\誯L產HG&J|D攔G+O;`誸哢瞈I侱汱凞態F凙侱廍侱凚/* $Id: mactcp.c,v 1.1.2.1 1999/08/02 08:06:32 ben Exp $ */ /* * Copyright (c) Ben HarrisAll s reserved. Permission is hereby granted, free of charge, to any personobtaining a copythis software and associated documentatifiles (the "S")deal in withoutrestric, includ limito use,, modifepublish, dibute, scense,/orselliesptwhomis furnishedo sojectfollowingndis:The abovenoticshall bedrstantial porHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KINDEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TOIES OFMERCHANTABILITY, FITNFOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALLAUTHORS BE LIABLENY CLAIM, DAMAGR OTHERWHEIN AN ACTIONCONTRACT, TORTWISE, ARISFROM, OFNNEORUSDEALINGSTHEmacnet.c -- PuTTY-to-MacTCP glu/ # AddressXlDevicixedModeOSUtilProcessassertstdlibring"putty.h" theory behistuffnet_recv attempdeliverincomdata waitqueue. Since mains a buffer for,re'no needurun asynchronous TCPRcvswe justaone ifdetsome can'be given a timeof zero,usStatwork ianythfirstSenis kier. endsblockuntil evere've sentACKwhich meanshave ilyn ordermake life easibackendtoa prorircularsguatfhand ao itreasonable becacurrentlywayto saytoit's gotm,maywAnywayavoid a f-sizeoverfdis keptaWhencallmalloc a newstickIwayktole our/ typedef struct Socket { iopb ; /*op*/spareclosetchostInfoinfo;intSerialNumber psnSe*s; #if TARGET_CPU_68K && !RT_CFMlo5; #fQHdrqB*/ };QElem qelemflagswdsEntryshortterm;end_B;Yes, I knowh[1]epn'm ignokes my code prettaimproalign*sockNet_Event_ Net; #definBUF_SIZE 8192 sc_eq;q;mtcp_refnuminit= FALSEOSEr()pascal resolved(*, *completed_open((tarteasr(StreamPtr, unsigned, ICMPReend,)RT_MACRoutineDescripto_upp =BUILD_ROUTINE_DESCRIPTOR(uppResult, (Ptr)TCPIOCionasrNotifyasr)lse /sle A5 switcwaroptimis*//* ASRs apgeirworld set upmofnetsowed.NUM_S 16Iniiseeifoes OKerr *i; * FIXME: hide broke thatrefaf * unit nsuffblaly don'Oo, neidNCSA Tel Hmmerr =ndr(".IPP", &)f (!= noErr) returnOpenRr(NULL/fill.qF = 0HeaTail = = s(* of()(i i <; i++) En(&[i].TRUE0; } ip_addr a *tcpbuf,holdmemwe'll(a lolater happeterrupt)memset(, 0,Mae wor->=GetC(&sa5 =A5(Gerunt already!) ))atalbox("Could(%d)",ourselaeaplay.ioCRefNumcsC=CreateParam.c.rcv =LeDataPt(d, but I doubtoPBControlSync((ParmBlk failStrTo, , (A cacauldicataDNR w whenfoueF) }hicookieoldA5)Wamo we'd likconnit (raor) .rtn ca: /* ;Active; .validityOfSerremoteH=[0]XXXPtoslowDelay; ANE_NOOPENbrea de:oment wrHOST}->ioinicmpmsgCLOULPTTIMEOUTate: RAborABOR DIED}ArrivalDATArgenURGENceived->UchREFUSaofbufbufl) +-> =wds.length =p&[1 afemcpy(f Ktrans= rloophecknd(nn(DeneNE_SENTt->s->->hfisocaninexton!s(push& SEND_PUSH ? true : falsuURGwds/eASRavail,,cieve (cai =.amd= 0=< ?:Rcvr mmidfnqueseta peurpose (ae dynamiy wwe*Furaeawthrougdoywed __,b_and_. LuckieleaIaahowwe tanyone?WakeUpLoVaric--style: "simon"nd/ Node-path: putty-ben-mac-port/opentpt.c Node-kind: file Node-action: add Prop-content-length: 120 Text-delta: true Text-content-length: 5089 Text-content-md5: 505eb94058dfaf51dc88afd874999a20 Content-length: 5209 K 15 cvs2svn:cvs-rev V 7 1.1.2.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN=昬憄PE婦?凟G岴>籇?怐!‵8岹乆侲+圖H 圖?嘍亁圖丏G0匜乿E"Gh嘍?D丣嘍倊丒(婦=嘍咲乢僁?凞倆僃丯J%E/D俹丏丟3E俷凞僆D?I'婨僙匛#凞俹D僇塅倃僁亁侱?D?塃倆FG匜乛E丷E僟FG刞嘐儀F侶侱DH傽丏$孍>P僃DwF凣紼倂癊匱G咲匨旸淒匨匱慏唙E`廌哢嘐嘔G唄僂噊孏哤嶪噅奃2咲厈侲丟侳D厀N匱侲匱侲坧F噉圖僂儁G匷Dw凣岾'塂4S:塉塗孎8K'哊 慐'僁!僁塷僁%圖!僃刯嘐#匛#‥侳匜)咲6僋<匞婲匛媇婲僂媇G孎)匘媈丏5匟媧嘒孒孍D孿F凾孾丒 D両/丒$D8侱僇宍I孧凟孾DH岾僗.D婮c岼J宩凢孼俆宍丏<俀,咾D刞処岼侲1凞嘓峇T宍D婮E媇丼侽,[嶶僃7I-凞妜咷E丟I宱丗/DG9D岶G9D婮G9凣9E'丣+G嶨H怬嘗孉奆俖F 丒!廗"僑孋J宼H嘍慥D奙塇侳)凞 慒I,I4圡 咾#M扢M;L!圧圥J:丗扜G=凞5F凥D乀揇D刣侲'匛侫奅9E'桭丏凟 匞!K)G I憂E扝丏(Q両孌YD8N 僃峕E3H憇T=圙<嘕扖侱咶扜孎0僄扚F晀旼#峂杋E扝嶨嘍!F僁#E時凟扻D塇H嘜抌K扢丒D哛#E>凞)H桰F 孞奅剒D巘凟侫匘<侷奻D巓嘔桝F D>咹巕E桱G9H榑侶乗N>H桭K媜K扻孧弚V橠R檥乂>侳僘D0侱巄D朜E朇ND歰H/FE:m橮G杬丗0LF0H杛J朒S朸J朒僋沶D朜嶥晆凞昤嘍D朿咲*丒3僂妡J丏朜怭朒L僄侸凟窴H穂N籡嘳籹D/俆嘫粀H6M丟祔咲P(U?侴稵M碭嘍#僙;V>僁:G絖丱㏕I榟侹 丏塳凟睯僁僂猐匘匨匘碖侴甛E-侲県侴産YD,D妜扙!塂瞏D僀HE僘^3D0R.T昻I 僄皊侲丏杁D#H杋両泏D*D纚I奐G,塇抲凞<侴;J>侳両僁罿D#J濱嘍 凨畂侶]J咵僁礎F縅G監僆﹏侳痆E疪F媠E睪孌媕匘6凞俈丟監G凞丏丗羦丏緿F痡凟肁D丆丠 D妉岲匟疢E F擯E4H甼丏琲D胿奃歽丒v[瞜O弢僾僆羒Kc繶孌OpenTransptInternedue ep(OTClon), &errErro) goto splatAttach our fun (notat_ a UPPstallN, sSystemTask(&0Bilo&) -->fName) + len() + 7);w spacr no..buf = (UInt8 *)lenit, += sprintf[],":%d",synchronous blockmso aitSetBCDatas:(bufbuflflags)rFNonSRcv>elseo0/fu!XXX: usbogust it's far easOTSPolitely askeOrderlyDistake any undo itnymgenerally mait safforgbitItuat s timlinTear /* IfeverrtT_MEMORYRELEASwe nerefulProvidSrun!OTDFlush queuewhile ((Deq))OTFreeMeminrecord itselfsAns wausupmaat deferrmustre-entcontextPtr ccookieuTcoswitch ( case T_: complewenew?break; {, NE_DIED);} non-normal data sferOPENDATA:EXURGENTISre /* s a positiveode. Tonegatravalue from-3199., /* spontaneE2.reaskERESETErr: ABORTIMEDOUOUdefault}/* faiNOORDREL:RcvCLO}isirupt (oeres) todispaanhabe backends will expheir msg the*neneAnfatalbox(". Aargh!ne-> =En&, &SchedulmethOTull onmoroff'shem. Keep guntilrun (gettedwe'r)ildly evil asll priunder heavaargarg/* idiom sto "With ". Blame ApplStealLisRse )ss->->msg), s,n}LVaric--style: "simon"nd/ Node-path: putty-ben-mac-port/macnet.c Node-action: delete Revision-number: 190 Prop-content-length: 159 Content-length: 159 K 7 svn:log V 59 Fix potential security problems in random number generator K 10 svn:author V 5 simon K 8 svn:date V 27 1999-08-02T08:35:11.000000Z PROPS-END Node-path: putty/sshrand.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: c0c75f9434b6cd5988c0c22d3bfd4ba7 Text-content-length: 156 Text-content-md5: 46a218923552898f39d0982191a8a830 Content-length: 195 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN2{峸峺(刓烿 + pool_incomingpos, p, length); pool.incomingpos +pool.incoming, digest + pool.poolpos, p, length); pool.poolpos + Revision-number: 191 Prop-content-length: 174 Content-length: 174 K 7 svn:log V 72 This commit was manufactured by cvs2svn to create branch 'ben-mac-port'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-08-02T08:35:11.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/Makefile Text-copy-source-md5: bac9e909fff1ee4981d9fad8c17b66dd Node-path: putty-ben-mac-port/ssh.c Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/ssh.c Text-copy-source-md5: d878688914ff016eaab04be5e693a2be Node-path: putty-ben-mac-port/ssh.h Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/ssh.h Text-copy-source-md5: bde993964679114fe44daa648b5bdc85 Node-path: putty-ben-mac-port/sshblowf.c Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/sshblowf.c Text-copy-source-md5: de80e079a942cd45361b05c80ad24eb8 Node-path: putty-ben-mac-port/sshrand.c Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/sshrand.c Text-copy-source-md5: 46a218923552898f39d0982191a8a830 Node-path: putty-ben-mac-port/sshrsa.c Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/sshrsa.c Text-copy-source-md5: c73102bed8aa555bdef5bddd03f2eb85 Node-path: putty-ben-mac-port/win_res.h Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/win_res.h Text-copy-source-md5: 47a6bdf22550963e7253e68d2e196cf3 Node-path: putty-ben-mac-port/win_res.rc Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/win_res.rc Text-copy-source-md5: dba18bf45fb8cc29dcee23fcb00d2d79 Node-path: putty-ben-mac-port/windlg.c Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/windlg.c Text-copy-source-md5: 556de6b4a720baa06c734e748e814f3f Node-path: putty-ben-mac-port/window.c Node-kind: file Node-action: add Node-copyfrom-rev: 190 Node-copyfrom-path: putty/window.c Text-copy-source-md5: e812861733dc85fea923b6380764a395 Revision-number: 192 Prop-content-length: 186 Content-length: 186 K 7 svn:log V 88 Open Transport stuff now actually compiles. Various stuff caught up to latest versions. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-08-02T22:32:39.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 2dcf47be3d0e25380ac28b9be435ca81 Text-content-length: 157 Text-content-md5: fdeb5cf2f4455570852beb950e0401a1 Content-length: 201 K 15 cvs2svn:cvs-rev V 8 1.1.2.14 PROPS-END SVN瀌+#o僶2 $6 . 淒# $Id: Makefile.mpw,v 1.1.2.14 1999/08/02 22:32:38tcp# mactcpransportApptcp.c.o mactcpblowf.c.o sshblowf.c.x Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: c2e42a7b30cbb916d9d81b748abfc950 Text-content-length: 205 Text-content-md5: 40118a47bcc8a5e48b3355db9a4cc98c Content-length: 249 K 15 cvs2svn:cvs-rev V 8 1.1.2.26 PROPS-END SVN4* 4,耤/* $Id: mac.c,v 1.1.2.26 1999/08/02 22:32:38tpt_stack.init)() == 0) net_stack = &otpt_stack; else #endif #ifdef WITH_MACTCP if ((*mtcp_stack.init)() == 0) net_stack = &m Node-path: putty-ben-mac-port/mac.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 8d02caa2dfdbd75302cf6bc8fc62cb28 Text-content-length: 104 Text-content-md5: 6bc016854319d598c6ac4e380ef7d503 Content-length: 148 K 15 cvs2svn:cvs-rev V 8 1.1.2.13 PROPS-END SVN圕坸N7,5G噟/* config.h or somesuch? */ #define WITH_OPENTRANSPORTNetwork_Stack otpt_stack Node-path: putty-ben-mac-port/opentpt.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 505eb94058dfaf51dc88afd874999a20 Text-content-length: 1008 Text-content-md5: c39b95ca48eb442e428b941a1fc49fc0 Content-length: 1051 K 15 cvs2svn:cvs-rev V 7 1.1.2.2 PROPS-END SVN=L/m+丩凱寈乀圦俍歏剅漘nP:媨 J/癘苆 莖E葂/* $Id: opentpt.c,v 1.1.2.2 1999/08/02 22:32:39CodeFragments.h> #include #include #include #include ep); OTSetSynchronous(s->ep); result = OTRcv(s->ep, buf, buflen, &ot&s->eventq)) != NULL) OTFreeMem(link); while ((link = OTLIFODequeue(&while ((link = OTLIFOStealList(&.fN} Node-path: putty-ben-mac-port/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 3133f4f6096d03aef10fda2b217a1bed Text-content-length: 65 Text-content-md5: 868751af6f1fd09689a9615b70247ecc Content-length: 109 K 15 cvs2svn:cvs-rev V 8 1.4.2.21 PROPS-END SVN > ,爗enum { CIPHER_3DES, CIPHER_BLOWFISH } cipher Revision-number: 193 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.806883Z PROPS-END Revision-number: 194 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.817102Z PROPS-END Revision-number: 195 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.824925Z PROPS-END Revision-number: 196 Prop-content-length: 130 Content-length: 130 K 7 svn:log V 30 Module description file added K 10 svn:author V 5 simon K 8 svn:date V 27 1999-08-10T16:04:43.000000Z PROPS-END Node-path: putty/MODULE Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 288 Text-content-md5: 1c7e9eb29fd5c576df5809a22f24083f Content-length: 404 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN侼rD=籇 HE丒寊乀Module: putty Author: Simon Tatham Description: PuTTY is a free (MIT-licensed) Win32 implementa of Telnet and SSH, with a comprehensive xterm/Linux/vt220 inal emulator attached. Homepage: http://www.chiark.greenend.org.uk/~sgt/.html Releas Revision-number: 197 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.898230Z PROPS-END Revision-number: 198 Prop-content-length: 132 Content-length: 132 K 7 svn:log V 32 Small but highly unhelpful typo K 10 svn:author V 5 simon K 8 svn:date V 27 1999-08-11T08:50:36.000000Z PROPS-END Node-path: putty/sshrand.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 46a218923552898f39d0982191a8a830 Text-content-length: 22 Text-content-md5: de0ad27457e5e3a0bdf6b1eee21f96f9 Content-length: 61 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN 崀朩. Revision-number: 199 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 66 This commit was manufactured by cvs2svn to create tag 'beta-0-47'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-08-11T08:50:36.000000Z PROPS-END Node-path: putty-0.47 Node-kind: dir Node-action: add Node-copyfrom-rev: 198 Node-copyfrom-path: putty Revision-number: 200 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:53.951671Z PROPS-END Revision-number: 201 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 31 ssh_gotdata now compiles again K 10 svn:author V 3 ben K 8 svn:date V 27 1999-08-21T18:18:09.000000Z PROPS-END Node-path: putty-ben-mac-port/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: d878688914ff016eaab04be5e693a2be Text-content-length: 11333 Text-content-md5: 12d3ca14110a69a0598741d6fbeec073 Content-length: 11376 K 15 cvs2svn:cvs-rev V 7 1.7.2.1 PROPS-END SVN亰Y亼乸諪T<;働d: =奐巂L4O哣b,9u歛僎a瀊$俙玸&?8矲>並哣vQ7(僌蔉vo蝫GN{ 謃 乶乥l.l輣  倊8鯝t乫X䅟儃亐9dh亗h亙e亜#僰亪I#include #include #ifndef macintosh #include #endif(l) (l) = 0; #define crBegin2(l) switch(l) { case 0:; #define crBegin(l) crBegin1(l); crBegin2(l); #define crFinish(l,z) } (l) = 0; return (l) #define foolemacs { #define crFinishV(l) } (l) = 0; return #define crReturn(l,z) \ do {\ (l)=__LINE__; return (z); case __LINE__:;\ } while (0) #define crReturnV(l) \ do {\ (l)=__LINE__; return; case __LINE__:;\ } while (0) #define crStop(l,z) do{ (l) = 0; return (z); }while(0) #define crStopV(l) do{ (l)ruct ssh_private { SOCKET s; unsigned char session_key[32]; struct ssh_cipher *cipher; char *savedhost; enum { SSH_STATE_BEFORE_SIZE, SSH_STATE_INTERMED, SSH_STATE_SESSION, SSH_STATE_CLOSED } ssh_state; int size_needed; #ifdef FWHACK char *FWhost; int FWport; #endif struct Packet pktin; struct Packet pktout; /* State for ssh_gotdata coroutine */ int gd_line; long len, biglen, to_read; unsigned char *p; int i, pad; int chunk; char *sversion; size_t sversion_space, sversion_len; /* State for ssh_protocol coroutine */ int pr_line; }; static void s_write (Session *sess, unsigned char *buf, int len) { struct ssh_private *sp = (struct ssh_private*)sess->back_priv; while (len > 0) { int i = net_send (sp->s, buf, len, 0); if (i > 0) len -= i, buf += i; } } static int s_read (Session *sess, unsigned char *buf, int len) { struct ssh_private *sp = (struct ssh_private*)sess->back_priv; int ret = 0; while (len > 0) { int i = net_recv (sp->Session *sess, char *buf, int len) { while (len--) { int new_head = (sess->inbuf_head + 1) & INBUF_MASK; if (new_head != sess->inbuf_reap) { sess->inbuf[sess->inbuf_head] = *buf++; sess->inbuf_head = new_head; } } } static void ssh_protocol(Session *,unsigned char *in, int inlen, int ispkt); static void ssh_size(void); static void ssh_gotdata(Session *sess, unsigned char *data, int datalen) { struct ssh_private *sp = (struct ssh_private *)sess->back_priv; unsigned char *eol; size_t fraglen = datalen; static char vstring[] = "SSH-1.5-PuTTY\n"; crBegin(sp->gd_line); #ifdef FWHACK /* Should wait for "SSH-" */ #endif sp->sversion = smalloc(16); /* enough for "SSH-1.5-1.2.27\n" */ sp->sversion_space = 16; sp->sversion_len = 0; do { while (datalen == 0) crReturnV(sp->gd_line); eol = memchr(data, '\n', datalen); if (eol != NULL) fraglen = eol + 1 - data; /* include \n */ if (sp->sversion_len + fraglen > sp->sversion_space) { /* FIXME Sanity-check length */ srealloc(sp->sversion, sp->sversion_len + fraglen); sp->sversion_space = sp->sversion_len + fraglen; } memcpy(sp->sversion + sp->sversion_len, data, fraglen); data += fraglen; datalen -= fraglen; } while (eol == NULL); sp->sversion[sp->sversion_len - 1] = '\0'; if (sp->sversion_len < 4 || memcmp(sp->sversion, "SSH-", 4) != 0) /* XXX explode! */; /* * We ignore the rest of the banner on the grounds that we only * speak SSH 1.5 anyway. If the server can't, that's its problem. */ s_write(sess, (unsigned char *)vstring, strlen(vstring)); /* End of do_ssh_init */ while (1) { for (sp->i = sp->len = 0; sp->i < 4; sp->i++) { while (datalen == 0) crReturnV(sp->gd_line); sp->len = (sp->len << 8) + *data; data++, datalen--; } #ifdef FWHACK if (sp->sp->sp->pad = 8 - (sp->len%8); sp->biglen = sp->len + sp->pad; sp->len -= 5; /* type and CRC */ sp->pktin.length = sp->len; if (sp->pktin.maxlen < sp->biglen) { sp->pktin.maxlen = sp->biglen; sp->pktin.data = (sp->pktin.data == NULL ? smalloc(sp->biglen) : srealloc(sp->pktin.data, sp->biglen)); } sp->p = sp->pktin.data, sp->to_read = sp->biglen; while (sp->to_read > 0) { sp->chunk = sp->to_read; while (datalen == 0) crReturnV(sp->gd_line); if (sp->chunk > datalen) sp->chunk = datalen; memcpy(sp->p, data, sp->chunk); data += sp->chunk; datalen -= sp->chunk; sp->p += sp->chunk; sp->to_read -= sp->chunk; } if (sp->cipher) sp->cipher->decrypt(sp->pktin.data, sp->biglen); sp->pktin.type = sp->pktin.data[sp->pad]; sp->pktin.body = sp->pktin.data+sp->pad+1; if (sp->sess, NULL, 0, 1); } crFinishV(sp->gd_line); } static void s_wrpkt_start(Session *sess, int type, int len) { struct ssh_private *sp = (struct ssh_private *)sess->back_priv;sp->pktout.length = len-5; if (sp->pktout.maxlen < biglen) { sp->pktout.maxlen = biglen; sp->pktout.data = (sp->pktout.data == NULL ? smalloc(biglen+4) : srealloc(sp->pktout.data, biglen+4)); } sp->pktout.type = type; sp->pktout.body = sp->pktout.data+4+pad+1; } static void s_wrpkt(Session *sess) { struct ssh_private *sp = (struct ssh_private *)sess->back_priv; int pad, len, biglen, i; unsigned long crc; len = sp->sp->pktout.body[-1] = sp->pktout.type; for (i=0; ipktout.data[i+4] = random_byte(); crc = crc32(sp->pktout.data+4, biglen-4); sp->pktout.data[biglen+0] = (unsigned char) ((crc >> 24) & 0xFF); sp->pktout.data[biglen+1] = (unsigned char) ((crc >> 16) & 0xFF); sp->pktout.data[biglen+2] = (unsigned char) ((crc >> 8) & 0xFF); sp->pktout.data[biglen+3] = (unsigned char) (crc & 0xFF); sp->pktout.data[0] = (len >> 24) & 0xFF; sp->pktout.data[1] = (len >> 16) & 0xFF; sp->pktout.data[2] = (len >> 8) & 0xFF; sp->pktout.data[3] = len & 0xFF; if (sp->cipher) sp->cipher->encrypt(sp->pktout.data+4, biglen); s_write(sess, sp->pktout.data, biglen+4); } static int do_ssh_init(Session *sess) { } static void ssh_protocol(Session *sess, unsigned char *in, int inlen, int ispkt) { struct ssh_private *sp = (struct ssh_private *)sess->back_priv;(sp->pr_line); random_init(); while (!ispkt) crReturnV(sp->pr_line); if (sp->pktin.type != 2) fatalbox("Public key packet not received"); memcpy(cookie, sp->pktin.body, 8); MD5Init(&md5c); i = makekey(sp->pktin.body+8, &servkey, &keystr1); j = makekey(sp->pktin.body+8+i, &hostkey, &keystr2); supported_ciphers_mask = (sp->pktin.body[12+i+j] << 24) | (sp->pktin.body[13+i+j] << 16) | (sp->pktin.body[14+i+j] << 8) | (sp->sp->sp->pktout.body[0] = cipher_type; memcpy(sp->pktout.body+1, cookie, 8); sp->pktout.body[9] = (len*8) >> 8; sp->pktout.body[10] = (len*8) & 0xFF; memcpy(sp->pktout.body+11, rsabuf, len); sp->pktout.body[len+11] = sp->pktout.body[len+12] = 0; /* protocol flags */ sp->pktout.body[len+13] = sp->(sp->pr_line); } while (!ispkt); if (sp->(sp->pr_line)sp->pktout.body[0] = sp->pktout.body[1] = sp->pktout.body[2] = 0; sp->pktout.body[3] = strlen(username); memcpy(sp->(sp->pr_line); } while (!ispkt); while (sp->(sp->pr_line)sp->pktout.body[0] = sp->pktout.body[1] = sp->pktout.body[2] = 0; sp->pktout.body[3] = strlen(password); memcpy(sp->(sp->pr_line); } while (!ispkt); if (sp->sp->pktin.type != 14) { fatalbox("Strange packet received, type %d", sp->sp->pktout.body[0] = (i >> 24) & 0xFF; sp->pktout.body[1] = (i >> 16) & 0xFF; sp->pktout.body[2] = (i >> 8) & 0xFF; sp->pktout.body[3] = i & 0xFF; memcpy(sp->pktout.body+4, cfg.termtype, i); i += 4; sp->pktout.body[i++] = (rows >> 24) & 0xFF; sp->pktout.body[i++] = (rows >> 16) & 0xFF; sp->pktout.body[i++] = (rows >> 8) & 0xFF; sp->pktout.body[i++] = rows & 0xFF; sp->pktout.body[i++] = (cols >> 24) & 0xFF; sp->pktout.body[i++] = (cols >> 16) & 0xFF; sp->pktout.body[i++] = (cols >> 8) & 0xFF; sp->pktout.body[i++] = cols & 0xFF; memset(sp->(sp->pr_line); } while (!ispkt); if (sp->pktin.type != 14 && sp->pktin.type != 15) { fatalbox("Protocol confusion"); } else if (sp->(sp->pr_line); if (ispkt) { if (sp->pktin.type == 17 || sp->pktin.type == 18) { long len = 0; for (i = 0; i < 4; i++) len = (len << 8) + sp->pktin.body[i]; c_write(sp->pktin.body+4, len); } else if (sp->sp->pktin.type == 14) { /* SSH_MSG_SUCCESS: may be from EXEC_SHELL on some servers */ } else if (sp->sp->sp->pktin.type); } } else { s_wrpkt_start(16, 4+inlen); sp->pktout.body[0] = (inlen >> 24) & 0xFF; sp->pktout.body[1] = (inlen >> 16) & 0xFF; sp->pktout.body[2] = (inlen >> 8) & 0xFF; sp->pktout.body[3] = inlen & 0xFF; memcpy(sp->(Session *sess) { struct ssh_private *sp; char *host = sess->cfg.host; int port = sess->cfg.port; sess->back_priv = smalloc(sizeof(struct ssh_private)); sp = (struct ssh_private *)sess->back_priv; memset(*sp, 0, sizeof(*sp)); sp->s = INVALID_SOCKET; sp->ssh_state = SSH_STATE_BEFORE_SIZE; sp->savedhost = smalloc(1+strlen(host)); strcpy(sp->savedhost, host); #ifdef FWHACK sp->FWhost = host; sp->FWport = port; host = FWSTR; port = 23; #endif if (port < 0) port = 22; /* default ssh port */ sp->s = net_open(sess, host, port); return NULL; } static void ssh_opened(Session *sess) { struct ssh_private *sp = (struct ssh_private *)sess->back_priv; #ifdef FWHACK send(sp->s, "connect ", 8, 0); send(sp->Session *sess, SOCKET sock, Net_Event_Type ne) { struct ssh_private *sp = (struct ssh_provate *)sess->back_priv;switch (ne) { case NE_OPEN: ssh_opened(sess); return 1; case NE_DATA: ret = net_recv(sock, buf, sizeof(buf), 0); if (ret < 0) /* any _other_ error */ return -1; if (ret == 0) { sp->(sess, buf, ret); return 1; case NE_CLOSING: sp->s = INVALID_SOCKET; sp->ssh_state = SSH_STATE_CLOSED; return 0; case NE_NOHOST: fatalbox("Host not found"); case NE_REFUSED: fatalbox("Connection refused"); case NE_NOOPEN: fatalbox("Unable to open connection"); case NE_TIMEOUT: fatalbox("Connection timed out"); case NE_ABORT: fatalbox("Connection reset by peer"); case NE_DIED: fatalbox("Connection died")(Session *sess, char *buf, int len) { if (s == INVALID_SOCKET) return; ssh_protocol(sess, Session *sess) { struct ssh_private *sp = (struct ssh_private *sp)sess->back_priv; switch (sp->p->sess->cfg.nopty) { s_wrpkt_start(11, 16); sp->pktout.body[0] = (rows >> 24) & 0xFF; sp->pktout.body[1] = (rows >> 16) & 0xFF; sp->pktout.body[2] = (rows >> 8) & 0xFF; sp->pktout.body[3] = rows & 0xFF; sp->pktout.body[4] = (cols >> 24) & 0xFF; sp->pktout.body[5] = (cols >> 16) & 0xFF; sp->pktout.body[6] = (cols >> 8) & 0xFF; sp->pktout.body[7] = cols & 0xFF; memset(sp-> Revision-number: 202 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.018753Z PROPS-END Revision-number: 203 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.025271Z PROPS-END Revision-number: 204 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.032689Z PROPS-END Revision-number: 205 Prop-content-length: 138 Content-length: 138 K 7 svn:log V 38 Added Joris van Rantwijk's scp client K 10 svn:author V 5 simon K 8 svn:date V 27 1999-08-31T09:20:48.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 7660 Text-content-md5: 9afb401f7c90f1b52edd4d3e1ac7a6d9 Content-length: 7776 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN亞08'碋淒3E汧3怐o扗3楴乁凬乬哘亅侾亅凬乬凞乬橨乁塊俧D侱丼G侽燚1凞*嘔0圞僅嶮僗丗丯 僁E匘+D僑慓傿Q/僒價俋僗淒 丏僐哠/桻E塎僁 N廎"H朓E哖乢哢凣哰D匸匞侱 侱丯E哖E嘥僄哰楨揇0孌嘦僁"丳&E噚俇"侳>咶圷D嘮唀%D嘮汧丯L唄凘噏凮3咵哱揇"E奃 侽F哖廏哰圙哱侱,圗狣咥桭D婡DT=僋孲D妠E:塆孷塃X凟塪奅擡孏丏>怐 僅+D婡丼丠+怓孭嘢嶽G嶥圙孫侶巒凣嶰D峿奃侶媝嘑媝婦婡凢#DE媬F侻廌V KF僅処廳咵,昑塎廌K 丏?侲塈J3僁6凞 E0塕塕匟媓D-H媣D(H媣僂F哱E1匘-HE-侲廔F)匘 D怳J岻匛+匜峽咲$岴)丏_E-廍I妛働,E匴抙丏6丠ED怟処DD搒僁(H侲?両R搣J怮F僁宒丏怘丗扺僂'D扨ED妠D(侴"侲'D0丩)L揺H擵E5丮搟H擵L H擵LK3]/G:GI旼P%L?E攇H扨E擩H 圖攡圖岻O;嘐媂凨搇H;丏=僅 HD杫G攍J岻H咲HH僅 L5Q&丗4侱$侲恜K"俁3丮咼僁嘙丒 侱.凟&僐塕E'D侴哰GL2E搢P)員嶽D檉O+DP)僂廚+凣憕僁怢僁D?丏!F朏匜檟D岻FD-E丒橪D刋D歔丟歚D僗歡I歊G歫匘岻僁東匟)GF汫並汳D刉I丟'F>圛僇嶻D汫侱僰侱侲2D刉僂,凞凞宒匘僷N歵D汳D.G'朌圖嘐咺嶻FG歿匞泈G漄侸=H 侲 F朏E歿丗汯D岻ID坬丩孌-僂1侱1嘍:侲塃E9H"F`E7丏9侱E搗E擹E丅D榼D扨M塕F哱F瀉H哰侲揇塀E9D搟僂塃I丗峊侲嶻丏扚丏烣凧烮F9塃(侱:匘匢婨榼処擽D怢J1侴嶺K爄丯爒D昬EE歠F濳丠廕嘍;H攡僆嶻I>乂乂侲"匞E>RDH(MD峍D匛];D玣D東咲丏侶 D岻H甶侸沊D玣IH畃D玣丗 L5O甶L7丏楥EF甶ED梙D-I畊乆疈NE痠奊!E畑岶璣匞癤D廕L!G扙淪D 乊1RG峉E>E瓾P瑼GH匓F;D璤D僃琂侳琘丱獼丗琂丠G琱咹皀丠 丗E#RH E4W瞓F丗,F,G'岴>E恜L-I,EE7G6DE#HE<丗L璆E汳I琭僆睪E﹟M0匛矯GF9D玣O梇U梶DD塀E*D/丟桹G ]砡R硙HH)HHH'G*F祎I珽僁侲I.F祎H琔G*D擪D*丏-凣?D禜嘖匘D禮D欸G$匜禬H硑匘歗DEG汳DE礑侷廟侷秅嘒廐D)丏5丗;Q礰ML,丒6F1K;並並稢I硏P礶L祎凟D JD5N&D爔丒嶼FH F竀Q%NGGF7F9J祏丒笿L嶽]珸FD*丒婤匞孎D"K&侴=FJ7N猌丠僁#G瀅咲燖丣1S?f%T玚侱揇玦D欿侶礭@乁甴團簘D榼E/DP9匘矨Fh碻丏濾D塀I卛@GN;凧;侱琩D2凟琷F砱丏D丏丏緽乄3J4丟穊G+凞侱#丒僂丗G爘VH4F'KH㏕侲4侶砽N#凣?H箌F搤E硉F竀K丒D擺侱抌侳;丒KF1E;F竁P'E桻X羉丟哢H D*E縟D2僃縋僈縔僁2E0D耑F=M0丳﹜T砲^篢M猦僱獄OZ籅D扨Q籏EH匴侳緽D-ED抝I1E凞!M玿K玬]I+E侻2K4DD欿侳F腬@HG籚E祏D扨]琞GJ丏 D梙g璚僉腞E8E竝W匼処腞J岻FDD)僃H丟F蕇丠凟竕MI藀P丠D薆僁'僃D*I菶H蘊侱1侱塅/丗9G4E竲乕葉H蚲E*奙蛃H>F莃FF禼I▃ED搃D#G苆J蟣L攞G*E﹏D恓丟J蠤H"LG4D$Q羨P衚HD*Y琣L衇F膞D縡J苪E衶G蟢F蔱E$丟.F-F袿eJ纁QP莣M衇M薃F蚄E1FH'F1F癆丠卝J衟E廕H'U盄丒癇L莦F7H)N襗N襧F蚄E蚅E M衇侱焧侱絩丒D膇匛)H卛匜M薃G蝛O=I衠H癚匛E皃N#D-岹癩J璬咷d\G4E/H(J議FHF'H:S;KL甿P'F痠FX禸E臿OcN菺L7F1a蒻D G舊丒蜼I襬F1Jj稝丣舊GO窯F觶V侲M觕J豖M觕丒G!匘抣E)DG燗GW襧Q窴U竅P竜E歘QZa.M筃K豖V筧p箆J D*S篢J蝝F膅G蟵[F瞗ME4丟 F衐RG-K瞈D!g睝G蝛P0O(R諁K踘^!T$M怗螼丏D侱榁D匜S>侳鄔丒1僅媣咼D哸丗丠慯E慿I:僄臺E5D侱"侱#僄絞丩瀪NEFE両醤F0L苅F醦P7L釷E-H丒E侸0EH釷H7G醦僄嘍:僃踻凣匷E丳RD2M擵E攇丗揕I(HF搘侲PF遻G*G酺HD廕JDE慱L FFJ"P銻G;D#K侳1D.丗G猼E鄉扜錛F?咵0E卋J3W匼凢H玬EW籷G妟D2E醱D蔵L7L E鄖侶鄓D峍僁?丏蘤H鎍D鍿俀縀G鎍K縔FE萿X5K鎢Y"E恜L!D M翹侶縔EZ匸E豮J耹侶朄僁咹纖ED豩丒淪H聗ED侳2僂桺J嶻H婰锧J(E門丵閆I匓E門丵閆XE門乁E>F慣F搘G憀侲凞(E諴S篢RD瘂G醬丒 J鎃EH6F遼P&L蘪c鎨F碪G?KQ)T緽E酅N鏘E緽j誩d"R靚GM玚GP4IK纚Y I&G1H"H'SU罳Y P I(T\譓G甶U譽I"NW7c疞F颷H痵G4G瘇O飈OPNH餿G F7["L衇I5X翹E(P耹[郖F鄉E丅O鄒HF鄁哠侲鄁@HK$丏 I 丏烳匘殀H鄔F猽NF=J雑E欶L醦pFF7J雫H(D雑P7丒鄃E抋D鄅E郺Q$丏哸Q G H7F7_3D扜LN鉦I擵D2I@&U鑮Ha丂=H;e阣DDGK 嘍汵D塅婾D丟乽丒E&G乽侲酼僂粅匘4侹鷋嘍&侴=D 凞僈鷋D瞃FE鐳F峂匛DD&丒/凟D 嘒鸈塃丏)F嶻俒麀J髜G鹟D镵DDb塂鸝圖1L丏擛H蟇D黇侱獄嘡塕丏嘇F鷀HE.並G"G﹜HG侲9HE2丏塂丏凟(丏搘丟FO齗H鵗W G丗処嶻丮 M4T凞-凞F#凟丱F俓I醙N鶴MD7G-K8G&D雛H攞丟葈H KG亐3匟繾D1JE饁L纎O亐Y丩亐iL(`亐丩亐iK匓`亐丩亐iME5[亖丵5G跩P亖丩亐iG2_亗+丩亐i丏9侳亐I丏6H(J亙凢0丒臸D亐3D竑FyH'丗髚J亙I亙t丗髚^鐹H妝I鎉G醸M鎕I鈝F#D亐3K:H M亜j@N妝奅亙嘍+匜亐 H'FD9匛>丏&E/* * scp.c - Scp (Secure Copy) client for PuTTY.Joris van Rantwijk, Aug 1999This is mainly based on ssh-1.2.26/by Timo Rinne & Tatu YlonenThey, in turn, ustuff from BSD rcp/ #include sockstdlibioringtime #define PUTTY_DO_GLOBALS"putty.h"h"TIME_POSIX_TO_WIN(t, ft) (*(LONG*)&(= \ () (t) + 11644473600) *0)WIN(ft, = (unsigned long)) / -) int verbose = 0; static rsivpresertargetshouldbedirectorystics = 1errconnection_openvoid source(char *src)rsink); Pranor message and perform a fatal exitboxfmt, ...) { va_list ap;start(ap, fmt); fpf(stderr, "F: "vap\na_end((1); } after closing the SSH linkbumpif () { ch; ssh_send_eof(recv(&ch, }sh_get_passwordprompt, trt maxlenHANDLE hin, hout; DWORD savemode, i; hiGetStdHandle(STD_INPUT_OUT= INVALID_VALUE ||) "Cannot gendard input/output hs GetConsoleMode, &S( & (~ENABLE_ECHO)) | PROCESSE |LINEWriteFile(, strlen(), &i, NULLRead-1i > i =; elsei - 2; str[i] = '\0'"\r\n", 2Oan tor@hoecute cmddo_cmcmd*real==st[0]Empty name/* Tryload settingst*/ do_defaultsfg./* No; ncpysiz)- por2}Set !&&!rprotocolPROT_SSH err =init,, &: %s",&& Ced%s 1Update inaabcurriletsdone, nowfloat ratebs; eta;eta10]cnow >)-lse< 1.0etaize -(s, "%02d:", / , %60,% 60 pc100.0"\r%-25.25s | %10ld kB5.1f kB/ETA: %83d%%",1024,.0pc= Find a colonstrre a pointotpetr/* We ignore a leadncecbee.alsoas secondacbecau ofs like f:mytxt. |:(while ( &&:/\\str++Waia responsother sid R0ok, -1(, rbuf[20481) <= Lp switch ( case 0:ok :p++/* fallthrough12 doP: } p <)chn'esp1rrs}SescreIncremcourun_errstr\01scpatE partCP*lafattritat_byteat_Attributes(= -1"%s:uch or ", & FILE_ATTRIBUTE_DIRECTORY)0gulartrrchr,))rc,+: f = CreaGENERIC_READ,SHAREOPEN_EXISTING, 0, f acwr maTime(f&&,buf, "T%lu 0 )SizC0644s = (0; i+= 4096transj, k i + k! f,, k, &jjk:}(+= k ,}Close""Rly ntentsadiWIN32_FIND_DATA fdaok/* maybeD0755E%s/*diFirs&o(!ocmp(.cN"."0rc +) >=/tong, Nexdir} Einkisxistodwr! && !gohnUnexpnewlinf[i0]'\01': buf+ tinu2 E' Tcand %*d &&2 goto IllegalmatCDbreaErolord+1u [^\n]", &&3descriptor/DDc/* wtstampies ?WRITECREATE_ALWAYSNORMAL) 50". wai,We will copy locsmoto(rgcargv[],,cmd =v[-1]S;)++"."Substit"."mtpy='@/*ipec covers multiplif so,flagtosupefhfhfhcmdmalloc0%s -t? " -v" : "rpdmdfree- 1; i++imachinto!Mthan L fInitialWin$ock dri_(_vWSAwsada = MAKE(1WSASup(UnablsSockLOBYTE(.wVersion1HIincompatiwith 1.1hofametersu ve: [-p] [-qrv] []:[..]""Maingramly?)in-, "-vrpqh?-{; } =<>WSACleanuprandom__seed? 0 :}*/ Node-path: putty/scp.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 264 Text-content-md5: 4172bda57980f7f72b768c4948851ea6 Content-length: 380 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN倈L1孍岴丒.窮~凟Z圼2僄MF~El凣}凢D>H 僅 匘乛僁[Dm岹 僃FIh刲匘hD!/* * scp.hJoris van Rantwijk, Aug 1999. */ Exported fromcextern int verbose; void ssh_get_password(char *prompt, str,maxlen);sshinithostcmd*real); recv(unsignedbufsend_eof( Node-path: putty/scp.ico Node-kind: file Node-action: add Prop-content-length: 88 Text-delta: true Text-content-length: 520 Text-content-md5: 401b5a0ee63cc6d9d0346d2c1270f718 Content-length: 608 K 15 cvs2svn:cvs-rev V 3 1.1 K 13 svn:mime-type V 24 application/octet-stream PROPS-END SVN>亀奃 婨 塂匘丒 丗S@丒R僃VDa圖f侲r僃vDDtDO侲K丏ZDM#S丂EvW丒乚M乽N丷僌3侳乶H丣僋乽侺丒侹俁F乛凞丗倉奆侶奃pH 凣-丗俤侴-丗侶僊咷D倇匥僰僊儁僋 僋丱)O儀凨僰E乢J僰侱剉丼@僽嘐/D侽僁/宂協嘚&E匭G匫R'H咶咢侴咹丗咢GF匫I'D匳{侤I匛 & 0(@览痧 鸢 梆鸹皥p x噲换换wwwx  疤糖 疤 wxx@< a<s\@A麁晾?還`0 Node-path: putty/scp.rc Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 30 Text-content-md5: 3f5ca2ffc5a0ab8ce79ec50398e0ab40 Content-length: 146 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN200 ICON "scp.ico" Node-path: putty/scpssh.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 5904 Text-content-md5: fe7b58b2273302a0097d95027b6bcca5 Content-length: 6020 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN;滷>糆滶圙*F 廌]昇 働凬嘍J 塊乛D N乷侱圖慚丏!孧丏!嘐侷丷侽嘡侽廟侽奛俶E>塏E>奡侽孲僂匞乁僄丼(匩'E>嶵(慛俶E!圝卽匘卙孖卨b卾丒俷 丒乶 凧侸卆奌卨G僄嘦哃嘳丱噅侻噞丱噅丮噞並噅咲 旻圿両圱M慔圲咲q塆1咼坴E 奅坴E(圗卬D圗卬團M卾凮F塒刄&凢E塉坴N塨孏 D塀匬J妢僘 I圱嶨奛僂凣塷嶥丏岴媠淒6岲卭旹"FD"凞6D凟)匜侸圫D哱媖D侱<丗[刾&DF孾R 丒峑F匜孾咼K巉凞&F丏8楨丒塲FL媂凢5僃塸N,咼EH峉E0圗奻凥廜侲E丏 J峖F0F墈F峖H巠DE6丒媠侴僁怺凟匘乂凞6T坉丗巎HF奩丏J卂僁6嶪恜E?孍F?凣峚僁丟*團慿僄恘F侲>丏!G奨F嘐 E僂 S怈E奻H恞F0F奵侴:EM両G,D;D噆L揈F堾凢孾I搉圚"匜搝J揈HG恘G8M怺YK恥K"yD恥F1僃1侴V?R+J揈凣弒F0D奣M昳F扜凣昘JF6丯匔F塂嘫F孾GM態JD6E宂楨E宂E媐K杢凣.僃Y侲圞RI媉奌U岶NH=丟扻G搉S抇R乗3H抮僊抾侻 D2WK橯N:D2K揔JF堾僊搚咺榑K HH僅孡並欿Q孼岲K(G欿G6J G欿JH圗S 丏媉Q7E0F丠SK:N/丏扽@U榓D奣侲K"FD'圖扟匨凞噅孏匘漿侺欽侶 丠恗J嘒L汬H僜EH昗U(侷?R H昗G媎W欽L沎D僁-僋況E G%E 僁僄弒F焲F?侶 E丏乚Q慪Q峖G恆咲両朒丏岲漁G嶿F瀘M爌侲爚凴丮匢J峖DD巃H瀕J燭侱恷咲恷凥巌G峚@P丮Gc丷Q峖J爀QG:JH0D學I朰I爈D'凥丏噅圖9侴"侷D爗咲朠D侱J侱噅丗梜O僄:GK(丟G揊#嘓圗孶侶侴GH*I,咹 HG巎F沍G 匘h侱凟岴"侲嘡;D-丏>G媗塆4僅廥E僂T&H匞弒O,僂媠圛乀圙弒G塨咵匘塠侴奧G塨嶱%E塆0匞DF1丗 E哠%D-凢]3圙,L廙V"丗9O>僇宎奊4僁弢咲E嘑$並丒2E凞焋丏╥I奒杢匢ˋ丟G乄,匞↗I玀両"UW杊嘖咶丏猀DI℉丏漰D[琇D桬F˙^琿X咼侻L?侶漀LE%O漣K:丮琷侼侼琲DOF巠EE,E搟N擮丗畕M>QE瑈咵焃D塠D両塚J玿\璴DF畕FN J孧D哠GI 丣侲!O]6HHH侸獵D6SM甪M痐K;[J痗T'M琷MK(K!D僅9揊俉O瞇丒2NK瞝凧 乄凞K!丒燻FQ咲2F2D猐I咲-圖G梘N>UHMT俋E僄0LE噄M!K猲K僄#F P丒噅匞2Q礛丗噄G礵哯&侴7H瀋PE磢L)J禟E'侳榚嶪榳P禰E圗QE漝G峚H沴I璴僄H;I9M>M;K瞐丩﹕PEJ㏄H5DE疭JH;nG僕M>丗DF怟猤L朚S砨凞-岲丠KS碷D凣IXM祏P篫G秌Q?E圗P6Y&丣IP=P稟SGR-L僴F攋D 婦 G1嘑糀H$F糒奍6侹侷塚E僃廙F9I糰H凟5W碮MK2HE歚v篗M絴LI絧僔.J0T絠K稟D網僆綤ET絠NE朙cU丒4嘓梘J_竫H朰J宎嘓猆H猘丗抋僅;E砊E梜K碞凟IH榳_筄丗H凟D'J3GJ羓W碮H:D2D孠U"FH,V.僇翴K稟J3丗猙圖E丏DD嘐匘僃圖笰僃巏侱F甞F7丏2丯宭丗E1僁NO媞G廦K烳丗嘒H≦S坽丯腒僈丗6GJ Q腖侶E繦G猺E5Q膢両臗D1P膤D榅GQ舧G扴JG巎Ilibringwinsock"putty.h"cp #define_MSG_DISCONNECT 1SPUBLIC_KEY 2CSESSION3USER 4AUTH_PASSWORD 9EXEC_CMD 1SUCCESS 1FAILURE 15TDIN_DATA 16TDOUT7ERR8OF 1EXIT_STATUS 20IT_CONFIRMATION 3EBUG 36GET_32BIT(cp) \ (((unsigned long)char)[0] << 24) |116283]))PU, value) {= (>> 24;116283; } sc SOCKET s = INVALID_; session_key[32];struct_cipher *= NULL*savedhostPacket { length;int type crcdatabodymaxlen; }pktin = { 0,, 0 }outvoid s_write (uf,len)while (len > 0 i = send (s, len, 0); noise_ultralight(iif (i <= 0) fatalbox("Lost connecing"-= i += i} s_readre0recv, elsereturnret;Rand decrypt one incomingpget_() buf[4]pad, big nex: .(4)f (!= 4closeet(s ebuf #ifdef FWHACK= 0x52656d6f0x30} #fad = 8 -% 8 =+5; /*CRC <=) ? smalloc(: sre) ->[pad + 1=f (verbosprintf(stderr, "Remote: + 41, \n} goto pkt_start(+%out-5 ? +4) : +4)!Out of memory+4+pad+1(,+[-(i=0; i< i++)[i+4random_byte(crc =32+4-crcendo_iniver[10[4;&c, 1)1c'S' && i < 2)== = 2Hbreak1)1 || c'S')H-{ i'\0'; -1} sizeof)-++c\n's, "SSH-%s-7.7.7\n",(strcmp, "1.5") ? :strlenLoginthrverrequest execuofcommandlusername,cmd, jid[16rsa*keystr12cookie[8RSAKeykey, keMD5Context md5supporteds_mas_extern3desblowfish!) Public key noceivedmemcpy(,,MD5I& = makekey+8, &&j+i, &2+12+i+jUpdate,.Final(, 32( > ?!verify(^id32fg.= CIPHER_BLOWFISH ?:3DES(& (1)Select, fallback to +15+1,9len*81& 0xFF1,0;protocol flagsree&Eccessfully enablLoggin as \"%s\". , 4+4password[10rompt[2, "%s@%s's: , sh_, 10; setA deniedStrange,%d"/* ES: %scmdR a blockolink. Buntilallis avail. Rnr0l)sh_p_input_*ptro>=,; -s)p- + || exitus %,Clossen,n EOFificto_EOFt up, raserror message, oronAlso placesanonicalo `'ort*ADDR_IN addent *a;FWFW1 =FWSTR23* Tryfind. (inet_ INNONgetbywitch (WSAGetLastE() case WSAENETDOWN:"Networkdown"HOST_NOT_FOUND:NOHdoesexistTRY_AGAIfounddefault: unknow} (&a, h->h,antohl(a<2;Open AF_INET,_STREAMAFNOSUPPORTTCP/IPpre)Bto lo.sin_familtonl(ANYs(bock*)&ddr_ERRORC(short)REFUSEDrefuseUNREACHunreacho rotos,8)2"!)"Pialisfg. */ Revision-number: 206 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.198470Z PROPS-END Revision-number: 207 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.205831Z PROPS-END Revision-number: 208 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 38 Disable real network backends for now K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-01T22:12:12.000000Z PROPS-END Node-path: putty-ben-mac-port/Makefile.mpw Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: fdeb5cf2f4455570852beb950e0401a1 Text-content-length: 80 Text-content-md5: 8b73b2ea0b3e1a1d5434e8d2e828fde9 Content-length: 124 K 15 cvs2svn:cvs-rev V 8 1.1.2.15 PROPS-END SVN+-42匜桼嘫# $Id: Makefile.mpw,v 1.1.2.15 1999/09/01 22:12:12## Revision-number: 209 Prop-content-length: 116 Content-length: 116 K 7 svn:log V 18 sunc with reality K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-01T22:12:48.000000Z PROPS-END Node-path: putty-ben-mac-port/README.mac Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 73020479a24b6713cfe58e7fd3723bd1 Text-content-length: 325 Text-content-md5: 6a351ddddd6146ddc8cfbbcee1161b05 Content-length: 368 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN噈9'-Z/乺ꐲ$Id: README.mac,v 1.1.2.4 1999/09/01 22:12:48 [FIXED] [MAYBE FIXED] * Scrolling appears to be shafted on Original QuickDraw. * ResEdit 'TMPL' resource seems to be broken. * sshsha.c and sshmd5.c cause a stack overflow in Apple's PowerPC C compiler unless optimisation is entirely disabled Revision-number: 210 Prop-content-length: 148 Content-length: 148 K 7 svn:log V 50 Don't bother with CFM checks on non-CFM machines. K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-01T22:13:52.000000Z PROPS-END Node-path: putty-ben-mac-port/mac.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 40118a47bcc8a5e48b3355db9a4cc98c Text-content-length: 104 Text-content-md5: 0bc2d8268dc7ed80db6dbc6c8e5129a4 Content-length: 148 K 15 cvs2svn:cvs-rev V 8 1.1.2.27 PROPS-END SVN*鏑G沠,)-芇燴/* $Id: mac.c,v 1.1.2.27 1999/09/01 22:13:52#if TARGET_RT_MAC_CFM#endif Revision-number: 211 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 31 Initial simple raw TCP backend K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-01T22:16:15.000000Z PROPS-END Node-path: putty-ben-mac-port/mac_res.r Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 6d3aca5b3ce907be0c20b84549b3c65d Text-content-length: 94 Text-content-md5: e09bfa08dd749f1cdfc85ca638ebad70 Content-length: 138 K 15 cvs2svn:cvs-rev V 8 1.1.2.18 PROPS-END SVN伒F伒==亯0=亯G.亷/* $Id: mac_res.r,v 1.1.2.18 1999/09/01 22:16:157172.17.11.11 Node-path: putty-ben-mac-port/macterm.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: aa64fe27e11d5f1a371fa8fb3e728e27 Text-content-length: 102 Text-content-md5: 4f1da52e11d921fd993053e6e2132701 Content-length: 146 K 15 cvs2svn:cvs-rev V 8 1.1.2.36 PROPS-END SVN佱佱)A 0!=7伖/* $Id: macterm.c,v 1.1.2.36 1999/09/01 22:16:15rawtcp#if 0#endif Node-path: putty-ben-mac-port/testback.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 1c38a6ccc957ce5af45331e7118849be Text-content-length: 1270 Text-content-md5: 85b3b939ce01efbcbb71ee1f01a87b19 Content-length: 1313 K 15 cvs2svn:cvs-rev V 7 1.1.2.8 PROPS-END SVN 烿塓50\宐唌嶵 N?/* $Id: testback.c,v 1.1.2.8 1999/09/01 22:16:15static char *rawtcp_init(Session *); static int rawtcp_msg(Session *, SOCKET, Net_Event_TypeBackend rawtcp_backend = { rawtcp_init, rawtcp_msg, nullstruct rawtcp_private { SOCKET s; }; static char *rawtcp_init(Session *sess) { struct rawtcp_private *rp; sess->back_priv = smalloc(sizeof(struct rawtcp_private)); rp = (struct rawtcp_private *)sess->back_priv; rp->s = net_open(sess, sess->cfg.host, sess->cfg.port); if (rp->s == INVALID_SOCKET) fatalbox("Open failed"); } static int rawtcp_msg(Session *sess, SOCKET sock, Net_Event_Type ne) { struct rawtcp_private *rp = (struct rawtcp_private *)sess->back_priv; switch (ne) { case NE_NULL: break; case NE_OPEN: break; case NE_NOHOST: case NE_REFUSED: case NE_NOOPEN: rp->s = INVALID_SOCKET; fatalbox("Open failed"); break; case NE_DATA: break; case NE_URGENT: break; case NE_CLOSING: /* net_close(rp->s);*/ break; case NE_CLOSED: rp->s = INVALID_SOCKET; fatalbox("Connection closed"); break; case NE_TIMEOUT: case NE_ABORT: case NE_DIED: fatalbox("Connection died"); rp->s = INVALID_SOCKET; break; } } Revision-number: 212 Prop-content-length: 119 Content-length: 119 K 7 svn:log V 21 Various minor tweaks K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-01T22:24:41.000000Z PROPS-END Node-path: putty-ben-mac-port/opentpt.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: c39b95ca48eb442e428b941a1fc49fc0 Text-content-length: 499 Text-content-md5: 4e8ccc635817b3f2265a4b62e2141ee4 Content-length: 542 K 15 cvs2svn:cvs-rev V 7 1.1.2.3 PROPS-END SVN=25 /:乻揚4刜?5-恉2楢匒臱/* $Id: opentpt.c,v 1.1.2.3 1999/09/01 22:24:41#if TARGET_RT_MAC_CFM#endif Stuff below here is only needed if you actually have Open Transport. */ /* #pragma segment OpenTpt */ /* Last I looked, this only produced a 1.5k segment, which isn't worth it. */Set up a system-task-time event handler (scheduled by the notifier) */ s->eventhandler = OTCreateSystemTask(&otpt_rcvevent, (void *)s); if (s->eventhandler == 0) goto splat;yi Revision-number: 213 Prop-content-length: 106 Content-length: 106 K 7 svn:log V 9 typo fix K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-01T22:28:03.000000Z PROPS-END Node-path: putty-ben-mac-port/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 12d3ca14110a69a0598741d6fbeec073 Text-content-length: 24 Text-content-md5: 747305c05ad2122852f885c7ebf54727 Content-length: 67 K 15 cvs2svn:cvs-rev V 7 1.7.2.2 PROPS-END SVN亼亼 i Node-path: putty-ben-mac-port/sshrand.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 46a218923552898f39d0982191a8a830 Text-content-length: 22 Text-content-md5: de0ad27457e5e3a0bdf6b1eee21f96f9 Content-length: 65 K 15 cvs2svn:cvs-rev V 7 1.2.2.1 PROPS-END SVN 崀朩. Revision-number: 214 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.526795Z PROPS-END Revision-number: 215 Prop-content-length: 126 Content-length: 126 K 7 svn:log V 26 Oops, add scp to makefile K 10 svn:author V 5 simon K 8 svn:date V 27 1999-09-03T15:12:04.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bac9e909fff1ee4981d9fad8c17b66dd Text-content-length: 693 Text-content-md5: 34e05c0f23e523a0d91892313cac9ada Content-length: 732 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN-擨,丗#+働d嶪SCPOBJS = scp.obj windlg.obj misc.obj noise.obj SCPOBJS2 = scpssh.obj sshcrc.obj sshdes.obj sshmd5.obj SCPOBJS3 = sshrsa.obj sshrand.obj sshsha.obj sshblowf.obj version.obj all: putty.exe pscp.exepscp.exe: $(SCPOBJS) $(SCPOBJS2) $(SCPOBJS3) scp.res scp.rsp link /debug -out:pscp.exe @scp.rsp scp.rsp: makefile echo /nologo /subsystem:console > scp.rsp echo $(SCPOBJS) >> scp.rsp echo $(SCPOBJS2) >> scp.rsp echo $(SCPOBJS3) >> scp.rsp echo scp.res >> link.rsp echo $(LIBS1) >> link.rsp echo $(LIBS2) >> link.rsp scp.obj: scp.c putty.h scp.h scpssh.obj: scpssh.c putty.h ssh.h scp.h scp.res: scp.rc scp.ico rc -r -DWIN32 -D_WIN32 -DWINVER=0x0400 scp Revision-number: 216 Prop-content-length: 135 Content-length: 135 K 7 svn:log V 35 Disastrously silly Makefile errors K 10 svn:author V 5 simon K 8 svn:date V 27 1999-09-07T16:36:23.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 34e05c0f23e523a0d91892313cac9ada Text-content-length: 76 Text-content-md5: 14a954503099eb5aa8dbb55f4f4d4617 Content-length: 115 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN擨擣 7乼扷scp.rsp echo $(LIBS1) >> scp.rsp echo $(LIBS2) >> scp Revision-number: 217 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 36 Symbolic constants? What are they? K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-07T23:40:19.000000Z PROPS-END Node-path: putty-ben-mac-port/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 747305c05ad2122852f885c7ebf54727 Text-content-length: 939 Text-content-md5: 072dc2701c4d3789220834145acc0595 Content-length: 982 K 15 cvs2svn:cvs-rev V 7 1.7.2.3 PROPS-END SVN亼仈s*!媘凾9蔦凲6d)>I? 唡+.@鐷o間 隌T :匧亱NSSH_MSG_DEBUGSSH_SMSG_PUBLIC_KEYSSH_CMSG_SESSION_KEYSSH_SMSG_SUCCESSSSH_CMSG_USERSSH_SMSG_FAILURESSH_CMSG_AUTH_PASSWORD, 4+strlen(passwordSSH_SMSG_FAILURESSH_SMSG_SUCCESSSSH_CMSG_REQUEST_PTYSSH_SMSG_SUCCESS && sp->pktin.type != SSH_SMSG_FAILURE) { fatalbox("Protocol confusion"); } else if (sp->pktin.type == SSH_SMSG_FAILURE) { c_write("Server refused to allocate pty\r\n", 32); } } s_wrpkt_start(SSH_CMSG_EXEC_SHELLSSH_SMSG_STDOUT_DATA || sp->pktin.type == SSH_SMSG_STDERR_DATASSH_MSG_DISCONNECTSSH_SMSG_SUCCESS) { /* SSH_MSG_SUCCESS: may be from EXEC_SHELL on some servers */ } else if (sp->pktin.type == SSH_SMSG_FAILURESSH_SMSG_EXITSTATUS) { /* EXITSTATUS */ s_wrpkt_start(SSH_CMSG_EXIT_CONFIRMATIONSSH_CMSG_STDIN_DATASSH_CMSG_WINDOW_SIZE Node-path: putty-ben-mac-port/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: bde993964679114fe44daa648b5bdc85 Text-content-length: 1950 Text-content-md5: f72611a68a87046c3077b2c971585157 Content-length: 1993 K 15 cvs2svn:cvs-rev V 7 1.3.2.1 PROPS-END SVN' h#include #define SSH_CIPHER_NONE 0 #define SSH_CIPHER_IDEA 1 #define SSH_CIPHER_DES 2 #define SSH_CIPHER_3DES 3 #define SSH_CIPHER_RC4 5 #define SSH_CIPHER_BLOWFISH 6 #define SSH_AUTH_RHOSTS 1 #define SSH_AUTH_RSA 2 #define SSH_AUTH_PASSWORD 3 #define SSH_AUTH_RHOSTS_RSA 4 #define SSH_PROTOFLAG_SCREEN_NUMBER 0x00000001 #define SSH_PROTOFLAG_HOST_IN_FWD_OPEN 0x00000002 #define SSH_MSG_NONE 0 #define SSH_MSG_DISCONNECT 1 #define SSH_SMSG_PUBLIC_KEY 2 #define SSH_CMSG_SESSION_KEY 3 #define SSH_CMSG_USER 4 #define SSH_CMSG_AUTH_RHOSTS 5 #define SSH_CMSG_AUTH_RSA 6 #define SSH_SMSG_RSA_CHALLENGE 7 #define SSH_CMSG_AUTH_RSA_RESPONSE 8 #define SSH_CMSG_AUTH_PASSWORD 9 #define SSH_CMSG_REQUEST_PTY 10 #define SSH_CMSG_WINDOW_SIZE 11 #define SSH_CMSG_EXEC_SHELL 12 #define SSH_CMSG_EXEC_CMD 13 #define SSH_SMSG_SUCCESS 14 #define SSH_SMSG_FAILURE 15 #define SSH_CMSG_STDIN_DATA 16 #define SSH_SMSG_STDOUT_DATA 17 #define SSH_SMSG_STDERR_DATA 18 #define SSH_CMSG_EOF 19 #define SSH_SMSG_EXITSTATUS 20 #define SSH_MSG_CHANNEL_OPEN_CONFIRMATION 21 #define SSH_MSG_CHANNEL_OPEN_FAILURE 22 #define SSH_MSG_CHANNEL_DATA 23 #define SSH_MSG_CHANNEL_CLOSE 24 #define SSH_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* 26 was unix-domain X11 forwarding */ #define SSH_SMSG_X11_OPEN 27 #define SSH_CMSG_PORT_FORWARD_REQUEST 28 #define SSH_MSG_PORT_OPEN 29 #define SSH_CMSG_AGENT_REQUEST_FORWARDING 30 #define SSH_SMSG_AGENT_OPEN 31 #define SSH_MSG_IGNORE 32 #define SSH_CMSG_EXIT_CONFIRMATION 33 #define SSH_CMSG_X11_REQUEST_FARWARDING 34 #define SSH_CMSG_AUTH_RHOSTS_RSA 35 #define SSH_MSG_DEBUG 36 #define SSH_CMSG_REQUEST_COMPRESSION 37 #define SSH_CMSG_MAX_PACKET_SIZE 38 #define SSH_CMSG_AUTH_TIS 39 #define SSH_SMSG_AUTH_TIS_CHALLENGE 40 #define SSH_CMSG_AUTH_TIS_RESPONSE 41 #define SSH_CMSG_AUTH_KERBEROS 42 #define SSH_SMSG_AUTH_KERBEROS_RESPONSE 43 #define SSH_CMSG_HAVE_KERBEROS_TGT 44 Revision-number: 218 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 38 Removing one bug, and hunting another K 10 svn:author V 3 ben K 8 svn:date V 27 1999-09-07T23:41:32.000000Z PROPS-END Node-path: putty-ben-mac-port/opentpt.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4e8ccc635817b3f2265a4b62e2141ee4 Text-content-length: 230 Text-content-md5: 5f6f16c8f87a86b74d7be77dd84871f5 Content-length: 273 K 15 cvs2svn:cvs-rev V 7 1.1.2.4 PROPS-END SVN=)丄塵/弅1峽緽/* $Id: opentpt.c,v 1.1.2.4 1999/09/07 23:41:32assert.h>assert(otpt_config != kOTInvalidConfigurationPtr); s = smalloc(sizeof(*s)); memset(s, 0, sizeof(*s)); s->sess = sessDebugger( Revision-number: 219 Prop-content-length: 139 Content-length: 139 K 7 svn:log V 39 We failed to ignore SSH_MSG_IGNORE :-) K 10 svn:author V 5 simon K 8 svn:date V 27 1999-09-10T15:35:26.000000Z PROPS-END Node-path: putty/scpssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: fe7b58b2273302a0097d95027b6bcca5 Text-content-length: 76 Text-content-md5: b5bbc8bf123fdf13be0ec5dc8483f4b7 Content-length: 115 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN;1匧扤;袻梠IGNORE 32 if (pktin.type == SSH_MSG_IGNORE) { Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d878688914ff016eaab04be5e693a2be Text-content-length: 92 Text-content-md5: 88662d6af8544f3dd68f896aab116729 Content-length: 131 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN亰Y亱% D檣D餱檚 if (pktin.type == 32) { /* SSH_MSG_IGNORE */ /* do nothing */; Revision-number: 220 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.772888Z PROPS-END Revision-number: 221 Prop-content-length: 153 Content-length: 153 K 7 svn:log V 54 Changed default title bar format to host.name - PuTTY K 10 svn:author V 4 owen K 8 svn:date V 27 1999-09-20T15:58:50.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e812861733dc85fea923b6380764a395 Text-content-length: 34 Text-content-md5: ad6cafaa0d6a0918431a95eeeec534de Content-length: 74 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN傄d傄e 倿N%s - PuTTY Revision-number: 222 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.817491Z PROPS-END Revision-number: 223 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:54.825398Z PROPS-END Revision-number: 224 Prop-content-length: 196 Content-length: 196 K 7 svn:log V 97 Added accelerators for most of main dialogue box. Still can't get focus into list boxes though. K 10 svn:author V 4 owen K 8 svn:date V 27 1999-09-23T14:30:19.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: dba18bf45fb8cc29dcee23fcb00d2d79 Text-content-length: 1760 Text-content-md5: f410a6d29185c272faa07a18b8d24ae4 Content-length: 1799 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN"訷乗媤婰i&3Lw#丂/ S昦d杅桱i榓&橨^歱汵d渒乊漁J]焢St^`*c]G乪uz猼/玭o丠 v▆eem玭7h7亅乨籋d,綥扤罷&Name", IDC0_HOSTSTATIC, 3, 3, 122, 8 EDITTEXT IDC0_HOST, 3, 11, 122, 12, ES_AUTOHSCROLL LTEXT "&&Telnet", IDC0_PROTTELNET, 86, 29, 33, 10, WS_GROUP AUTORADIOBUTTON "SS&&Telnet", IDC0_PROTTELNET, 96, 29, 33, 10, WS_GROUP AUTORADIOBUTTON "SS&H", IDC0_PROTSSH, 132, 29, 33, 10 #endif LTEXT "Sto&&Load", IDC0_SESSLOAD, 131, 63, 34, 14 PUSHBUTTON "&Save", IDC0_SESSSAVE, 131, 80, 34, 14 PUSHBUTTON "&Delete", IDC0_SESSDEL, 131, 97, 34, 14 AUTOCHECKBOX "Close &&H (ASCII 8)", IDC1_DEL008, 3, 12, 162, 10, WS_GROUP AUTORADIOBUTTON "Control-&&&&&&&&&&wrap mode initially on", IDC2_WRAPMODE, 3, 3, 162, 10 AUTOCHECKBOX "&&icon title", IDC2_WINNAME, 3, 23, 162, 10 AUTOCHECKBOX "Implicit CR in every &&Rows", IDC2_ROWSSTATIC, 10, 59, 32, 8 EDITTEXT IDC2_ROWSEDIT, 50, 57, 30, 12 RTEXT "&&&&XWindows encoding", IDC2_VTXWINDOWS, 3, 120, 162, 10, WS_GROUP AUTORADIOBUTTON "Use font in &&EM mode only", IDC2_VTOEMONLY, 3, 140, 162, 10 AUTORADIOBUTTON "&&&&&&&dd", IDC3_ENVADD, 131, 85, 34, 14 PUSHBUTTON "&&BSD", IDC3_EMBSD, 96, 147, 33, 10, WS_GROUP AUTORADIOBUTTON "R&FC", IDC3_EMRFC, 132, 147, 33, 10 END IDD_PANEL35&AUTOCHECKBOX "Don't allocate a &pseudo-terminal", IDC3_NOPTY, 3, 19, 162, 10 LTEXT "Auto-login &Cipher:", IDC3_CIPHERSTATIC, 3, 50, 40, 8 AUTORADIOBUTTON "&3DES", IDC3_CIPHER3DES, 46, 50, 35, 10, WS_GROUP AUTORADIOBUTTON "&&&&Set", IDC4_CCSET, 33, 145, 34, 14 LTEXT "&&&logical palettes", IDC5_PALETTE, 3, 25, 162, 10 LTEXT "C&& Revision-number: 225 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Add WS_TABSTOP on configuration list boxes K 10 svn:author V 5 simon K 8 svn:date V 27 1999-09-24T10:24:45.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f410a6d29185c272faa07a18b8d24ae4 Text-content-length: 180 Text-content-md5: e75ea5aeecb4d107ff434f277c733e18 Content-length: 219 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN訷 5慟婥痟;攐縥 LBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP | WS_TABSTOP LBS_MULTIPLESEL | WS_TABSTOP LBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP Revision-number: 226 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.334666Z PROPS-END Revision-number: 227 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.346508Z PROPS-END Revision-number: 228 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.352991Z PROPS-END Revision-number: 229 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.360037Z PROPS-END Revision-number: 230 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.366888Z PROPS-END Revision-number: 231 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.373640Z PROPS-END Revision-number: 232 Prop-content-length: 172 Content-length: 172 K 7 svn:log V 72 Stop IAC IAC from being swallowed in telnet (fix due to Robert de Bath) K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-04T14:20:17.000000Z PROPS-END Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 54f1d3a2f8bbe6971322436fd8471c5c Text-content-length: 130 Text-content-md5: 5265ea47befdd706749f880ffc650a36 Content-length: 169 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN仛U仜 j逤j篬遺{ /* ignore (and print) everything else */ b[0] = c; c_write(b,1); telnet_state = TOPLEVEL; } Revision-number: 233 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.789960Z PROPS-END Revision-number: 234 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.799154Z PROPS-END Revision-number: 235 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.807575Z PROPS-END Revision-number: 236 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.814125Z PROPS-END Revision-number: 237 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.822114Z PROPS-END Revision-number: 238 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.829012Z PROPS-END Revision-number: 239 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.834959Z PROPS-END Revision-number: 240 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.842354Z PROPS-END Revision-number: 241 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.850445Z PROPS-END Revision-number: 242 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.856627Z PROPS-END Revision-number: 243 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.863173Z PROPS-END Revision-number: 244 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.871793Z PROPS-END Revision-number: 245 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.882383Z PROPS-END Revision-number: 246 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:55.892952Z PROPS-END Revision-number: 247 Prop-content-length: 170 Content-length: 170 K 7 svn:log V 70 Silly error in loading Default Settings - reset port but not protocol K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-22T15:47:26.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 556de6b4a720baa06c734e748e814f3f Text-content-length: 46 Text-content-md5: f984436c333c1f9f9fc191dd6c3ec63a Content-length: 86 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN偣#偣@ 畁倞<甮rotocol = PROT_TELNET; Revision-number: 248 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.069865Z PROPS-END Revision-number: 249 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.077412Z PROPS-END Revision-number: 250 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.086472Z PROPS-END Revision-number: 251 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.092804Z PROPS-END Revision-number: 252 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.099342Z PROPS-END Revision-number: 253 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Single-DES encryption, patch courtesy of Murphy Lam K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-25T08:59:40.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 80cd9e121c8a6f98da3e055bd4325915 Text-content-length: 33 Text-content-md5: d0547c26f4528d4897169ad02603512b Content-length: 72 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN". 擶欿擶, CIPHER_DES Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 88662d6af8544f3dd68f896aab116729 Text-content-length: 503 Text-content-md5: 4e8fdc16826a873076eacaca7378ce1f Content-length: 542 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN亱%亸1#僃俉卽僺甤筕蘁綺ssh_versioncmp(char *a, char *b) { char *ae, *be; unsigned long av, bv; av = strtoul(a, &ae); bv = strtoul(b, &be); if (av != bv) return (av < bv ? -1 : +1); if (*ae == '.') ae++; if (*be == '.') be++; av = strtoul(ae, &ae); bv = strtoul(be, &be); if (av != bv) return (av < bv ? -1 : +1); return 0PuTTY\n", (ssh_versioncfg.cipher == CIPHER_DES ? SSH_CIPHER_DES : cipher_type == SSH_CIPHER_DES ? &ssh_des Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bde993964679114fe44daa648b5bdc85 Text-content-length: 25 Text-content-md5: 841f6ea069cbbe15ca79fe77aeb0a123 Content-length: 64 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVNC圲/DES 2 Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 5da3d9e974848bfd8043919fda2fef11 Text-content-length: 506 Text-content-md5: f84b268a844d32efd4cb046164fedc9b Content-length: 545 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN佄佉 僞伮A僞媙伮0static void des_sesskey(unsigned char *key) { des_set_key(key, &ekey1); memset(eiv1, 0, sizeof(eiv1)); des_set_key(key, &dkey1); memset(div1, 0, sizeof(div1)); } static void des_encrypt_blk(unsigned char *blk, int len) { des_cbc_encrypt(&ekey1, eiv1, blk, blk, len); } static void des_decrypt_blk(unsigned char *blk, int len) { des_cbc_decrypt(&dkey1, div1, blk, blk, len); } struct ssh_cipher ssh_des = { des_sesskey, des_encrypt_blk, des Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 47a6bdf22550963e7253e68d2e196cf3 Text-content-length: 49 Text-content-md5: ce499b532bcd6f1fcf306c4fe3495115 Content-length: 88 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN 擱2擰#define IDC3_CIPHERDES 1022 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: e75ea5aeecb4d107ff434f277c733e18 Text-content-length: 75 Text-content-md5: a38e7aaf54ea415113ec2801a6f3f333 Content-length: 114 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN誝 64漮. AUTORADIOBUTTON "&DES", IDC3_CIPHERDES, 127, 50, 3 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f984436c333c1f9f9fc191dd6c3ec63a Text-content-length: 388 Text-content-md5: 8db1e5aa66418a96190f1e621efb0f99 Content-length: 428 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN偣@偦@3侰殀歿亹'祒H仒{伹:U侇?-佁R佂9cfg.cipher == CIPHER_DES ? "des" : if (!strcmp(cipher, "des")) cfg.cipher = CIPHER_DESDES, cfg.cipher == CIPHER_BLOWFISH ? IDC3_CIPHERBLOWF : cfg.cipher == CIPHER_DES ? IDC3_CIPHERDES : IDC3_CIPHER3DEScase IDC3_CIPHERDES else if (IsDlgButtonChecked (hwnd, IDC3_CIPHERDES)) cfg.cipher = CIPHER_DES Revision-number: 254 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.208481Z PROPS-END Revision-number: 255 Prop-content-length: 115 Content-length: 115 K 7 svn:log V 15 Fix versioncmp K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-25T14:27:13.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4e8fdc16826a873076eacaca7378ce1f Text-content-length: 97 Text-content-md5: c6c47190b63b3757552e25fe0ed5a07e Content-length: 137 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN亸1亸AE} 鐈8, 10); bv = strtoul(b, &be, 10, 10); bv = strtoul(be, &be, 10 Revision-number: 256 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.288055Z PROPS-END Revision-number: 257 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.296114Z PROPS-END Revision-number: 258 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.305143Z PROPS-END Revision-number: 259 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.314902Z PROPS-END Revision-number: 260 Prop-content-length: 292 Content-length: 292 K 7 svn:log V 191 Add the ability to do ssh by default: using -ssh command line option, or by manually adding protocol and port settings to Default Settings in the Registry, or by compiling with -DSSH_DEFAULT K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-27T14:28:11.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d0547c26f4528d4897169ad02603512b Text-content-length: 317 Text-content-md5: 9c770d6844536932ddb6f037008eb51d Content-length: 356 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN.盉 %歏%擥歡/* * You can compile with -DSSH_DEFAULT to have ssh by default. */ #ifndef SSH_DEFAULT #define DEFAULT_PROTOCOL PROT_TELNET #define DEFAULT_PORT 23 #else #define DEFAULT_PROTOCOL PROT_SSH #define DEFAULT_PORT 22 #endif GLOBAL Config cfg; GLOBAL int default_protocol; GLOBAL int default_port Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8db1e5aa66418a96190f1e621efb0f99 Text-content-length: 388 Text-content-md5: 923b187a52112666ea98b6bdf1abe9fa Content-length: 428 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN偦@偦8俢4㬴俁倠p疨 char prot[10]gpps (sesskey, "HostName", "", cfg.host, sizeof(cfg.host)); gppi (sesskey, "PortNumber", default_port, &cfg.port); gpps (sesskey, "Protocol", "default", prot, 10); if (!strcmp(prot, "ssh")) cfg.protocol = PROT_SSH; else if (!strcmp(prot, "telnet")) cfg.protocol = PROT_TELNET; else cfg.protocol = default_protocol; Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ad6cafaa0d6a0918431a95eeeec534de Text-content-length: 511 Text-content-md5: fc08cdc9e86ad160b2883356c0d964c2 Content-length: 551 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN傄e傊R僞揇@O?偩aefault_protocol = DEFAULT_PROTOCOL; default_port = DEFAULT_PORTProcess command line options first. Yes, this can be * done better, and it will be as soon as I have the * energy... */ while (*p == '-') { char *q = p + strcspn(p, " \t"); p++; if (q == p + 3 && tolower(p[0]) == 's' && tolower(p[1]) == 's' && tolower(p[2]) == 'h') { default_protocol = cfg.protocol = PROT_SSH; default_port = cfg.port = 22; } p = q + strspn(q, " \t"); } Revision-number: 261 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.395057Z PROPS-END Revision-number: 262 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.403595Z PROPS-END Revision-number: 263 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 47 Added saved sessions submenu from system menu. K 10 svn:author V 4 owen K 8 svn:date V 27 1999-10-28T16:07:25.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9c770d6844536932ddb6f037008eb51d Text-content-length: 86 Text-content-md5: 6ab7bb643e5a6dfceb3f83da6ce0f7f0 Content-length: 126 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN盉 @@%void get_sesslist(int allocate); int nsessions; char **sessions Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 923b187a52112666ea98b6bdf1abe9fa Text-content-length: 34 Text-content-md5: abbf03a550872a4cfae920870dfc807d Content-length: 74 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN偦8偤Y侭峍俴倖z恜倵q Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fc08cdc9e86ad160b2883356c0d964c2 Text-content-length: 670 Text-content-md5: ae85cab1269f27df1c0ccb36bc2121a4 Content-length: 710 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN傊R傐46刏匷P祊匶,籌乵禓舙 2$4}弡亙]伮|亾V#define IDM_SAVEDSESS 521 #define IDM_SAVED_MIN 4096 #define IDM_SAVED_MAX 8192,s; int is = CreateMenu(); get_sesslist(TRUE); for (i = 1 ; i < ((nsessions < 256) ? nsessions : 256) ; i++) AppendMenu (s, MF_ENABLED, IDM_SAVED_MIN + (16 * i) , sessions[i]); AppendMenu (m, MF_POPUP | MF_ENABLED, (UINT) s, "Saved Sessionscase IDM_SAVED if (wParam == IDM_SAVEDSESS) { sprintf(c, "putty @%s", sessions[(lParam - IDM_SAVED_MIN) / 16]); cl = c; } else default: if (wParam >= IDM_SAVED_MIN && wParam <= IDM_SAVED_MAX) { SendMessage(hwnd, WM_SYSCOMMAND, IDM_SAVEDSESS, wParam); } Revision-number: 264 Prop-content-length: 126 Content-length: 126 K 7 svn:log V 26 Added a couple of GLOBALs K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-28T16:25:15.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6ab7bb643e5a6dfceb3f83da6ce0f7f0 Text-content-length: 50 Text-content-md5: 89012f460c0ac1cc88b1ffa032739d0a Content-length: 90 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN 4GLOBAL int nsessions; GLOBAL Revision-number: 265 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Stop putting meaning in bottom four bits of WM_SYSCOMMAND wParam K 10 svn:author V 5 simon K 8 svn:date V 27 1999-10-28T16:29:06.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ae85cab1269f27df1c0ccb36bc2121a4 Text-content-length: 887 Text-content-md5: a74c4fbcc2a843c19b6a5c3f0f4f5498 Content-length: 927 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN傐4傑:"咷乭鳶*Zc#哣亐f佊亣50x0010 #define IDM_NEWSESS 0x0020 #define IDM_DUPSESS 0x0030 #define IDM_RECONF 0x0040 #define IDM_CLRSB 0x0050 #define IDM_RESET 0x0060 #define IDM_TEL_AYT 0x0070 #define IDM_TEL_BRK 0x0080 #define IDM_TEL_SYNCH 0x0090 #define IDM_TEL_EC 0x00a0 #define IDM_TEL_EL 0x00b0 #define IDM_TEL_GA 0x00c0 #define IDM_TEL_NOP 0x00d0 #define IDM_TEL_ABORT 0x00e0 #define IDM_TEL_AO 0x00f0 #define IDM_TEL_IP 0x0100 #define IDM_TEL_SUSP 0x0110 #define IDM_TEL_EOR 0x0120 #define IDM_TEL_EOF 0x0130 #define IDM_ABOUT 0x0140 #define IDM_SAVEDSESS 0x0150 #define IDM_SAVED_MIN 0x1000 #define IDM_SAVED_MAX 0x2000 case WM_SYSCOMMAND: switch (wParam & ~0xF) { /* low 4 bits reserved to Windows */ sprintf(c, "putty @%s", sessions[(lParam - IDM_SAVED_MIN) / 16]); cl = c; } else Revision-number: 266 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Mark Baker's raw-TCP back end (untested and experimental as yet) K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-01T16:40:40.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 14a954503099eb5aa8dbb55f4f4d4617 Text-content-length: 43 Text-content-md5: 908db92edee3e07e84900d12f97fa5e9 Content-length: 83 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN擣攅05,坧媀 rawraw.obj: raw Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 89012f460c0ac1cc88b1ffa032739d0a Text-content-length: 62 Text-content-md5: 5c890bed2b0839e45f81cfefd206614c Content-length: 102 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN睶#揥(換/RAW,raw.c. */ Backend raw_backend Node-path: putty/raw.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 2761 Text-content-md5: 2c67eb32178a7900056475330e7ef5d0 Content-length: 2877 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN婦墆旿匭僋嘍J塂P揊m塈e僇rD侶汧6侷s怐乨塇乮処-嶥 侷-婦,凥.揑;G)D匢s峃凞乗侳橠乵G2凞#丏)匢0D僅侶傽E9丮僫廎僌匛僒丩傽G嶥僓僄傽並僜丏僂僁>咲'L僜O僘丏6僅凨刪丏G剉嘐&僋丩咵俖D9G$圙侰D僃匢G+匢僉僃僷J僘E9僔I4S>J剏並2塎剋G8H4凣匤D'I働匬丠F侱T卭a侾咰侺$凞Q弐Df揺丗塸D哶T擵DZ攚嘍%K G塷@!I<婮嶭G杍奊廹L<嘦嶭嘍乣O'D巜R9嘍D恾W)G塷\揺D峩婬梖FK橠歸僃 匑t昄N歊\揺GF係I塎丏奫凾G墆G丏歁E婩I塸D塕奅侱侴FM媘E3F妚扚漋丒漖H厈I3E巏D侲D凨T+K4僂婦峵嘍%H匥D 圗昘丠漦侲則H瀈Y瀢GLI瀧DHH厈G+G歺丠<凞処E卭G怉凮刣僁乼Q D岹D嶢奙<侼丩3婫D瀄K;咵M$K刪丏H唥T=L丮2奃刡侱僂 僄噂丗D>D3J燲N焑圚唥e焭E焔U丠 H刼乢咲Xa乛燗俌X/E丗[2FM嘖YE僓IK嘆I燲丩3F奷L嘍 U塎嘐巂T塮L媙J E凟V噋_"H匔F;MDF嘦T塒E4D俬丗F VIG$匘<凟瀂L?I:丏'D塳E8嘐1SG>侲慔侹>i凣5侴&丟$H両<僇㊣DK¬僈¬F>#include stdiolibwinsock"putty.h"fndef FALSE #define 0 #endifTRU 1 static SOCKET s = INVALID_; iswritable(x) ( != IAC &&CR )void raw_size();int sb_opt,len;char *sb_buf = NULL = 0;SB_DELTA 1024try_e { while (outbuf_headreap end = 0) +) &MASKh, of(a) = elseostntohl(a <= 23; /* telneOpen e(AF_INET,_STREAMs) AFNOSUPPORTTCP/IP suppresen)}Bto lo.sin_family = tonl(ANYs(b(*)&ddr_ERRORCremote(short)CONNREFUSEDion refuseUNREACHunreacho routeWSAAsyncSel, FD_READ | FD_WRITE |OOBCLOSEPss a0has closed<0 a (WPARAM wParam, Ll256]howhell did we here?!-5000ETSELECT(!=:recvbuf)< 0WOULDBLOCK 1)any _other_-10000=0can't happinory} (OOB: do};1, MSG!-3:: but WTFnd datao/* DohingSal code(T_SBack_b=,msgize }; Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ce499b532bcd6f1fcf306c4fe3495115 Text-content-length: 296 Text-content-md5: e3b79bd4ff775006f2f4789e01b14fdf Content-length: 335 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN = 9恡,RAW 1006 #define IDC0_PROTTELNET 1007 #define IDC0_PROTSSH 1008 #define IDC0_SESSSTATIC 1009 #define IDC0_SESSEDIT 1010 #define IDC0_SESSLIST 1011 #define IDC0_SESSLOAD 1012 #define IDC0_SESSSAVE 1013 #define IDC0_SESSDEL 1014 #define IDC0_CLOSEEXIT 1015 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a38e7aaf54ea415113ec2801a6f3f333 Text-content-length: 301 Text-content-md5: e2ea02c6455af99d1be6189876976a7c Content-length: 341 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN誝諯岪u廞42, 8 AUTORADIOBUTTON "R&aw", IDC0_PROTRAW, 51, 29, 33, 10, WS_GROUP AUTORADIOBUTTON "&Telnet", IDC0_PROTTELNET, 86, 29, 33, 1052, 8 AUTORADIOBUTTON "R&aw", IDC0_PROTRAW, 61, 29, 33, 10, WS_GROUP AUTORADIOBUTTON "&Telnet", IDC0_PROTTELNET, 96, 29, 33, 10 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: abbf03a550872a4cfae920870dfc807d Text-content-length: 606 Text-content-md5: 437cec8f2c345749ed3e96d374aec11d Content-length: 646 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN偤Y偧t."攋橻攔:瓹僋釵P='慙鏘伬i鵳 cfg.protocol == PROT_TELNET ? "telnet" : "raw" if (!strcmp(prot, "raw")) cfg.protocol = PROT_RAWRAW, IDC0_PROTSSH, cfg.protocol==PROT_SSH ? IDC0_PROTSSH : cfg.protocol==PROT_TELNET ? IDC0_PROTTELNET : IDC0_PROTRAW case IDC0_PROTRAW { int i = IsDlgButtonChecked (hwnd, IDC0_PROTSSH); int j = IsDlgButtonChecked (hwnd, IDC0_PROTTELNET); cfg.protocol = i ? PROT_SSH : j ? PROT_TELNET : PROT_RAW RAW, IDC0_PROTSSH, (cfg.protocol==PROT_SSH ? IDC0_PROTSSH : cfg.protocol==PROT_TELNET ? IDC0_PROTTELNET : IDC0_PROTRAW Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a74c4fbcc2a843c19b6a5c3f0f4f5498 Text-content-length: 90 Text-content-md5: 4540a8962fd8edf715ee28afff813fc1 Content-length: 130 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN傑:傑l AA偤= cfg.protocol == PROT_TELNET ? &telnet_backend : &raw_backend Revision-number: 267 Prop-content-length: 155 Content-length: 155 K 7 svn:log V 55 Fix potential buffer overrun in new saved-session menu K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-01T17:18:08.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4540a8962fd8edf715ee28afff813fc1 Text-content-length: 341 Text-content-md5: 067902b6fa5a901d4aae4811c7bb7caf Content-length: 381 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN傑l傓I*亖q亖m亊俿亪^佈亱Mint freecl = FALSEchar *session = sessions[(lParam - IDM_SAVED_MIN) / 16]; cl = malloc(16 + strlen(session)); /* 8, but play safe */ if (!cl) cl = NULL; /* not a very important failure mode */ sprintf(cl, "putty @%s", session); freecl = TRUE if (freecl) free(cl Revision-number: 268 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:56.715973Z PROPS-END Revision-number: 269 Prop-content-length: 145 Content-length: 145 K 7 svn:log V 45 John Sullivan's sizetip patch - experimental K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-03T14:08:26.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5c890bed2b0839e45f81cfefd206614c Text-content-length: 49 Text-content-md5: 5c8cbe7583a25786fcee8e87477ab779 Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN睶瞣 俲痠俬GLOBAL HINSTANCE putty_inst; Node-path: putty/sizetip.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 2368 Text-content-md5: 280f9d3fc58417a63127eadfcf6dbceb Content-length: 2484 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN 坽9昇僋匩匘Ji嶦i侽MF乫丒乵慏乢僂揈D5孎H匤0FH俬婲俤婸倅哋倆塏倇塐倇咷侲H僽E俆塏倇慒乀凮僶慖丯倇R凞圙凧奝4桭O刕F係刲働4奅凪F,丏卶K僺丏 匜凱嘐5僂5凢=哖4E>侱丒 奅O咶僎塃>怐O卾J唙G侱噁F1Q5丏唡匤凱D(Q刕僌 E匔M嘒D唡侴凮G7侶>D坒I噃P圔咲_刞FO嘐咹凧R卲僐%H僽丳1DvL侶圞俋G:峅嘕0M塊S刅H嘕墌匫哬俋僂僑侱匶丟媆丗亄O刜哢僙I+岲y4丗岶凱朣噑F唙僄D僂峂嘑峉丏峑岶峠凣峴圤嘐奒 F岻凞 S>侱凱U墋G)FE巗G:僄9D並FF乢H乴G亄匛丱Dj僆D:Dj咲?Dv嘍"G丂F丯凟9侴弞丏E圢D嘆D凣=匥廙丟巭P僅D怷擪=桭 丗n岼>I&EnL怮D慞婳 嘍+嶧憓Q慲凣丟D匷M丄Q慲奆廥Q=僙扱圖憉E[凮僘E侱唎NH*匘匶V9奒>Q塂憉U9D丏oG丟-E:丱=Lj丟$E:僋嶹僈恡楩唙孌 奒 KO嘍{侽昐侱攍團俀D(GF峅丩<朎凨扟>ID侳 E 嘜G;VD婡K墋I婩峆F9P怾L嘍咲-俌J咵乵慞怾Z侴梶VF.塂凪D梶塂橞G楲G巟奆 凞(F巠奃嶦侱<]怈I僪YE%並倆D:丏丯朜咾檝侲J>` {宯W嶥L沑F唙E E弚侻卶咶8K歽塅淵侺淥丗淺匜峕O渇丗渧DM侴;I檡F NF=F.F唙擧朎妡F慇G塎W瀀FG峉G峔e濳F岻F岻JF-L,凢唙E妡丏乂嘙F巗咷G滳淔檡IM2E嘳I焅DH巖丟廬丒廟H廽D:丗爉H D減H漣凥K俠嘚烾OL=JEN廙GD/ #include regtcharstdio"putty.h" ATOM tip_class = 0; HFONTfont; COLORREFbgtext; LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, Ll) { switch () {case WM_ERASEBKGND:return TRUE;PAINTHBRUSH hbr;GDIOBJ holdRECT cint wtlenLPTSTR wtDC hdcSTRUCT pshdc = BeginPaint(&ps)SelectObject(hdc,)GetStockBLACK_PEN)hbr = CreateSolidBrush( =hbrGetClientRc anglecr.lefttoprighbottom =WTextLengthwt = ()malloc((+1)*sizeof(TCHARwttColortBkOu+3free(wDeleteEnd}NCHITTESHTTRANSPARENTDESTROY = NULLbreakSETTEXLPCst()IZE szCompatibleDC(GExtentPoint32str, _tcslen(str), &szPos, 0sz.cx+6ySWP_NOZORDER|MOVEACTIVATEInvalidateFALSDCDef; } wndenablevoid Upsrc,cxy[16]if (!)wndNONCLIENTMETRICS nci// First make sure the is registeredWNDCLASS wcc.styleS_HREDRAW|CS_VlpfncbClsExtraWndhInstanc_inscoCursobrBackgrouszMenuNamC""R(&w //Default values based on s Standard c scheme //SYSTEM_);bgGB(255, 250// Prepare other GDI os and drawing infoys_INFOBKmemset(&ncinci.cb =SystemetersInfo(SPI_GET, FontIndir.lfStatus// Generattip _sntprintf, 16, "%dx%d",cywiycalcul's&wix = wf (ix<16)16ytop -y//Ex(WS_EX_TOOLWINDOW|PMOST, MAKEINTRESOURCEWS_POPUP,ShowwSW_SHOW else Tip already exists, just set}Eb&& !Destroy Node-path: putty/sizetip.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 71 Text-content-md5: ef0d19ec4c8bc93a20db83ea5f2526a4 Content-length: 187 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVNS.僄匢 D丗6D- void UpdateSizeTip(HWND src, int cxy);Enablb Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 067902b6fa5a901d4aae4811c7bb7caf Text-content-length: 239 Text-content-md5: 4b1fce218748146eeec4f99f7e98d872 Content-length: 279 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN傓I傕,!丂丵嶤丮仸 ~侸伒|仸伕D#include "sizetipputty_inst = insENTERSIZEMOVE: EnableSizeTip(1); break; case WM_EXITSIZEMOVE: EnableSizeTip(0); UpdateSizeTip(hwnd, w, h) Revision-number: 270 Prop-content-length: 137 Content-length: 137 K 7 svn:log V 37 Add sizetip stuff to makefile - oops K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-04T09:18:46.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 908db92edee3e07e84900d12f97fa5e9 Text-content-length: 70 Text-content-md5: a349aea785ba8e8b4b1763b5e502a64d Content-length: 110 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN攅&凣6凣Q妠$婣 sizetip.c sizetipsizetip.obj: sizetip Revision-number: 271 Prop-content-length: 166 Content-length: 166 K 7 svn:log V 67 Can now build with /DWIN32S_COMPAT to work (minimally) with Win32s K 10 svn:author V 4 owen K 8 svn:date V 27 1999-11-04T11:26:07.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a349aea785ba8e8b4b1763b5e502a64d Text-content-length: 200 Text-content-md5: e8de60066b6fefefdb8569aca37a4dda Content-length: 240 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN晊*'亀俌怗凲# COMPAT=/DWIN32S_COMPAT will produce a binary that works (minimally) # with Win32s CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd .c.obj: cl $(COMPAT)obj Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 6c25c435d1caaef69c55d3fec5c1fdb6 Text-content-length: 124 Text-content-md5: 9fba2931b8b8f8268f74c6bc2fc4ba79 Content-length: 163 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN沜 ff 梈#ifndef WIN32S_COMPAT if (GetSystemPowerStatus(&pwrstat)) func(&pwrstat, sizeof(pwrstat)); #endif Revision-number: 272 Prop-content-length: 142 Content-length: 142 K 7 svn:log V 42 Prompt before summarily closing a session K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-04T13:44:21.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4b1fce218748146eeec4f99f7e98d872 Text-content-length: 235 Text-content-md5: e7747267ffb003e92127b2f65c3ccc04 Content-length: 275 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN傕,傖~両q丏亰%a倞 CLOSE: if (MessageBox(hwnd, "Are you sure you want to close this session?", "PuTTY Exit Confirmation", MB_ICONWARNING | MB_OKCANCEL) == IDOK) DestroyWindow(hwnd); return 0CLOSE Revision-number: 273 Prop-content-length: 138 Content-length: 138 K 7 svn:log V 38 Warn-on-close is now configurable off K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-05T09:50:49.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5c8cbe7583a25786fcee8e87477ab779 Text-content-length: 38 Text-content-md5: c62cebd3224737965bbc02ca7eeea8db Content-length: 78 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN瞣 7>1int warn_on_close Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: e3b79bd4ff775006f2f4789e01b14fdf Text-content-length: 49 Text-content-md5: b535db40229d569eaa6e17f8000064a6 Content-length: 88 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN=橺 圝恡圛#define IDC0_CLOSEWARN 1016 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e2ea02c6455af99d1be6189876976a7c Text-content-length: 139 Text-content-md5: 30fe29e04f36649759abb566dff80465 Content-length: 179 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN諯 !_峓亃峕:廦,Yr?旿&R&Rr&91, 10 AUTOCHECKBOX "Warn on C&lose", IDC0_CLOSEWARN, 96, 147, 69, 10 END IDD_PANEL1 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 437cec8f2c345749ed3e96d374aec11d Text-content-length: 334 Text-content-md5: 2956ee2081a23b4e72785c14584b5eb7 Content-length: 374 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN偧t偫,昮?昞:"P 頏a4伩K)i (sesskey, "WarnOnClose", !!cfg.warn_on_closei (sesskey, "WarnOnClose", 1, &cfg.warn_on_closeCheckDlgButton (hwnd, IDC0_CLOSEWARN, cfg.warn_on_closeCLOSEWARN cfg.warn_on_close = IsDlgButtonChecked (hwnd, IDC0_CLOSEWARNCheckDlgButton (hwnd, IDC0_CLOSEWARN, cfg.warn_on_close Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e7747267ffb003e92127b2f65c3ccc04 Text-content-length: 51 Text-content-md5: 3e0ea2c3e1d94b15ba927626aca58971 Content-length: 91 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN傖~傗 }佲}!cfg.warn_on_close || Revision-number: 274 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:57.102565Z PROPS-END Revision-number: 275 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:57.108800Z PROPS-END Revision-number: 276 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:57.115256Z PROPS-END Revision-number: 277 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Oleg Panashchenko's Cyrillic support patch K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-08T11:08:09.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e8de60066b6fefefdb8569aca37a4dda Text-content-length: 46 Text-content-md5: 4cf0e9ae89cce0afe25e4b8d955fe4bc Content-length: 86 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN晊坧 xlatxlat.obj: xlat Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c62cebd3224737965bbc02ca7eeea8db Text-content-length: 302 Text-content-md5: 1a0e8642d6d2f1966c4e49d272c50fd2 Content-length: 342 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN! 橦両橝Z;!僉:int fontcharse /* russian language translation */ int xlat_enablekoiwin; int xlat_capslockcyrExports from xlat.c. */ unsigned char xlat_kbd2tty(unsigned char c); unsigned char xlat_tty2scr(unsigned char c); unsigned char xlat_latkbd2win(unsigned char c) Node-path: putty/sizetip.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ef0d19ec4c8bc93a20db83ea5f2526a4 Text-content-length: 90 Text-content-md5: 77a5fb3afbe56fd4a04f6de4f1d26c3a Content-length: 129 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVNSOOOvoid UpdateSizeTip(HWND src, int cx, int cy); void EnableSizeTip(int bEnable); Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1ad59138ce03da81c8cc34863ed2ea33 Text-content-length: 211 Text-content-md5: b0484e8beba9923abad13c1010a1296d Content-length: 250 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN偅[偆e0q仩P亐倀偁gxlat_tty2scr((unsigned char)c) | curr_attr | { int i; unsigned char c; for(i=0;isend(&c,1); } } Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b535db40229d569eaa6e17f8000064a6 Text-content-length: 122 Text-content-md5: 72436dda6452fa3006bf5fd74b814d14 Content-length: 161 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN橺欴 c侰6SPANEL6 114define IDC6_ENABLEKOIWINXLAT 1001 #define IDC6_CAPSLOCKCYR 1002 #endif Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 30fe29e04f36649759abb566dff80465 Text-content-length: 321 Text-content-md5: c197e9dfc3df9fa624d38a53669f1d20 Content-length: 361 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN 貮 )膓)&膅PANEL6 DIALOG DISCARDABLE 6, 30, 168, 163 STYLE WS_CHILD | WS_VISIBLE FONT 8, "MS Sans Serif" BEGIN AUTOCHECKBOX "Enable &KOI8-Win1251 translation", IDC6_ENABLEKOIWINXLAT, 13, 14, 135, 10 AUTOCHECKBOX "&CAPS LOCK acts as cyrillic switch", IDC6_CAPSLOCKCYR, 13, 30, 136, 10 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2956ee2081a23b4e72785c14584b5eb7 Text-content-length: 1267 Text-content-md5: dcb4767ca676bf205bd8f25bd7c6bee0 Content-length: 1307 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN偫偸_丟焌亁匬>q梩 緁v4蘠仼"螧伄2P伾@乀U佈={U佈=_並価*侢q)倐h8 #define MAIN_NPANELS 8 #define RECONF_NPANELS 5CharSet", cfg.fontcharset wppi (sesskey, "KoiWinXlat", cfg.xlat_enablekoiwin); wppi (sesskey, "CapsLockCyr", cfg.xlat_capslockcyr);CharSet", ANSI_CHARSET, &cfg.fontcharsetgppi (sesskey, "KoiWinXlat", 0, &cfg.xlat_enablekoiwin); gppi (sesskey, "CapsLockCyr", 0, &cfg.xlat_capslockcyr); cfg.fontcharsetcharset = lf.lfCharSetint CALLBACK LanguageProc (HWND hwnd, UINT msg, CheckDlgButton (hwnd, IDC6_ENABLEKOIWINXLAT, cfg.xlat_enablekoiwin); CheckDlgButton (hwnd, IDC6_CAPSLOCKCYR, cfg.xlat_capslockcyr); case WM_COMMAND: switch (LOWORD(wParam)) { case IDC6_ENABLEKOIWINXLATcfg.xlat_enablekoiwin = IsDlgButtonChecked (hwnd, IDC6_ENABLEKOIWINXLAT); } break; case IDC6_CAPSLOCKCYRcfg.xlat_capslockcyr = IsDlgButtonChecked (hwnd, IDC6_CAPSLOCKCYR); } break; }, Language, MAKEINTRESOURCE(IDD_PANEL6) }; static char *names[NPANELS] = { "Connection", "Keyboard", "Terminal", "Telnet", "SSH", "Selection", "Colours", "Language" }; static int mainp[MAIN_NPANELS] = { 0, 1, 2, 3, 4, 5, 6, 7}; static int reconfp[RECONF_NPANELS] = { 1, 2, 5, 6, 7 Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3e0ea2c3e1d94b15ba927626aca58971 Text-content-length: 604 Text-content-md5: f1023cb0b5c4eb2978dd9ce26710a6a2 Content-length: 644 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN傗備U",H鑑F駋8佪/倇糼偉.cfg.fontcharset, fw_dontcare, FALSE); f(FONT_UNDERLINE, cfg.fontcharsetcfg.fontcharset, fw_bold, FALSE); f(FONT_BOLDUND, cfg.fontcharsetxlat_kbd2tty((unsigned char)wParam); BOOL capsOn=keystate[VK_CAPITAL] !=0; /* helg: clear CAPS LOCK state if caps lock switches to cyrillic */ if(cfg.xlat_capslockcyr) keystate[VK_CAPITAL] = 0; r = ToAscii (wParam, (lParam >> 16) & 0xFF, keystate, &chr, 0); if(capsOn) chr = xlat_latkbd2win((unsigned char)(chr & 0xFF)); if (r == 1) { *p++ = xlat_kbd2tty((unsigned char)(chr & 0xFF)) Node-path: putty/xlat.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1894 Text-content-md5: 9163298b9cf01650cf5856e8cd1560a0 Content-length: 2010 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN漢咥旾疎L綟K綠綠綠綠紿紾丼綠綠俔綠"擠H6塂 D咺匜哊丏D哬丟D哅丗丏G睤凞"丟岲6D*楧"凞噂D嘯H,圖凘D儃塂孌8丏4凞D坋凞凞,僁凾丏<刉'嘆匤E丏D丗!丏丗%並,E+凣I咷丏丗D哱D廎侴D廩丣唕D D丟丼E噈D D D%ID丟嘰乊+F弣D嘐E噝丒 I嘠D嘼DDD噐DED嘩D"D噆H嘕D刓丏D並%D丒坒D坥X6F弣D圤D丏4侶圼D坘E丏圿DD慱DD坅D,D*丒N0峃0侴I嘐#旾=僂KG抌刄噝/H4U抭V(僁(丒8@HDP乫D恮L亃D廢D D廵D噈DmE坘DD丏坿D丣俕E坈E1DD8D慻D "putty.h" static unsigned char win2koi[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 3132, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 4748, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 6364, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 7980, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 996, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,11112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,12128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,14144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,15160,161,162,163,164,189,166,167,179,180,171,172,173,1776,177,183,1818589225,226,247,231,228,229,246,250,233,234,235,236,238,23042,243,244,242,227,254,251,253,255,248,2593,194,296,197,218,201,202,203,204,205,206,207,20810,211,212,290,199,223,216,299 };koi2win859874,1778756972094509,28xlat_kbd2tty(c)if(cfg.enablekoiwin) returnc];c; }tty2scrlat_7495wincapslockcyr Revision-number: 278 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 68 Clean up sizetip patch: remove separate header file and // comments K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-08T11:13:53.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 1a0e8642d6d2f1966c4e49d272c50fd2 Text-content-length: 114 Text-content-md5: 9d92d789ea11f543f0936777f98087d2 Content-length: 154 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN! \癆\剉+sizetip.c. */ void UpdateSizeTip(HWND src, int cx, int cy); void EnableSizeTip(int bEnable) Node-path: putty/sizetip.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 280f9d3fc58417a63127eadfcf6dbceb Text-content-length: 827 Text-content-md5: e345012a8731ccf9bed030c1ba0a274d Content-length: 866 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN ?卲嘫侶匧1僡-俖條3n漘i(/8 case WM_ERASEBKGND: return TRUE; case WM_NCHITTEST: return HTTRANSPARENT; case WM_DESTROY: DeleteObject(tip_font); tip_font = NULL; break; * First make sure the window class is registered */#if 0 /* Default values based on Windows Standard color scheme */ tip_font = GetStockObject(SYSTEM_FONT); tip_bg = RGB(255, 255, 225); tip_text = RGB(0, 0, 0); #endif /* Prepare other GDI objects and drawing info */ tip_bg = GetSysColor(COLOR_INFOBK); tip_text = GetSysColor(COLOR_INFOTEXT); * Generate the tip text */* calculate the tip's size */* Create the tip window */ ix, iy, sz.cx, sz.cy, * Tip already exists, just set the text */ Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f1023cb0b5c4eb2978dd9ce26710a6a2 Text-content-length: 23 Text-content-md5: 4df849cd908d7dfdd542eff0d6b14a99 Content-length: 63 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN備U備@ 丵傗o乫 Node-path: putty/sizetip.h Node-action: delete Revision-number: 279 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 xlat.c needs stdio.h for vsprintf K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-08T11:14:33.000000Z PROPS-END Node-path: putty/xlat.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9163298b9cf01650cf5856e8cd1560a0 Text-content-length: 52 Text-content-md5: 7bc578df73bc0fb598c2f7369199c4ed Content-length: 91 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN漢漿$漌#include #include maxlen) i = maxlen-1; else i = i - 2; str[i] = '\0'; WriteFile(hout, "\r\n", 2, &i, NULL); } /* * Open an SSH connection to user@host and execute cmd. */ static void do_cmd(char *host, char *user, char *cmd) { char *err, *realhost; if (host == NULL || host[0] == '\0') bump("Empty host name"); /* Try to load settings for this host */ do_defaults(host); if (cfg.host[0] == '\0') { /* No settings for this host; use defaults */ strncpy(cfg.host, host, sizeof(cfg.host)-1); cfg.host[sizeof(cfg.host)-1] = '\0'; cfg.port = 22; } /* Set username */ if (user != NULL && user[0] != '\0') { strncpy(cfg.username, user, sizeof(cfg.username)-1); cfg.username[sizeof(cfg.username)-1] = '\0'; cfg.port = 22; } else if (cfg.username[0] == '\0') { bump("Empty user name"); } if (cfg.protocol != PROT_SSH) cfg.port = 22; err = ssh_init(cfg.host, cfg.port, cmd, &realhost); if (err != NULL) bump("ssh_init: %s", err); if (verbose && realhost != NULL) fprintf(stderr, "Connected to %s\n", realhost); connection_open = 1; }time_t start, time_t now) { float ratebs; unsigned long eta; char etastr[10]; int pct; if (now > start) ratebs = (float) done / (now - start); else ratebs = (float) done; if (ratebs < 1.0) eta = size - done; else eta = (unsigned long) ((size - done) / ratebs); sprintf(etastr, "%02d:%02d:%02d", eta / 3600, (eta % 3600) / 60, eta % 60); pct = (int) (100.0 * (float) done / size); name, done / 1024, ratebs / 1024.0, etastr, pct); if (done == size) printf("\n"); } /* We ignore a leading colon, since the hostname cannot be empty. We also ignore a colon as second character because of filenames like f:myfile.txt. */ if (str[0] == '\0' || str[0] == ':' || str[1] == ':') return (NULL); while (*str != '\0' && *str != ':' && *str != '/' && *str != '\\') str++; if (*str == ':') return (str); else return (NULL); } char ch, resp, rbuf[2048]; int p; if (ssh_recv(&resp, 1) <= 0) bump("Lost connection"); p = 0; switch (resp) { case 0: /* ok */ return (0); default: rbuf[p++] = resp; /* fallthrough */ case 1: /* error */ case 2: /* fatal error */ do { if (ssh_recv(&ch, 1) <= 0) bump("Protocol error: Lost connection"); rbuf[p++] = ch; } while (p < sizeof(rbuf) && ch != '\n'); rbuf[p-1] = '\0'; if (resp == 1) fprintf(stderr, "%s\n", rbuf); else bump("%s", rbuf); errs++; return (-1); } } char str[2048]; va_list ap; va_start(ap, fmt); errs++; strcpy(str, "\01scp: "); vsprintf(str+strlen(str), fmt, ap); strcat(str, "\n"); ssh_send(str, strlen(str)); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); va_end(ap); } /* * Execute the source part of the SCP protocol. */ static void source(char *src) { char buf[2048]; unsigned long size; char *last; HANDLE f; DWORD attr; unsigned long i; unsigned long stat_bytes; time_t stat_starttime, stat_lasttime; attr = GetFileAttributes(src); if (attr == -1) { run_err("%s: No such file or directory", src); return; } if ((attr & FILE_ATTRIBUTE_DIRECTORY) != 0) { if (recursive) rsource(src); else run_err("%s: not a regular file", src); return; } if ((last = strrchr(src, '/')) == NULL) last = src; else last++; if (strrchr(last, '\\') != NULL) last = strrchr(last, '\\') + 1; if (last == src && strchr(src, ':') != NULL) last = strchr(src, ':') + 1; f = CreateFile(src, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); if (f == INVALID_HANDLE_VALUE) { run_err("%s: Cannot open file"); return; } if (preserve) { FILETIME actime, wrtime; unsigned long mtime, atime; GetFileTime(f, NULL, &actime, &wrtime); TIME_WIN_TO_POSIX(actime, atime); TIME_WIN_TO_POSIX(wrtime, mtime); sprintf(buf, "T%lu 0 %lu 0\n", mtime, atime); ssh_send(buf, strlen(buf)); if (response()) return; } size = GetFileSize(f, NULL); sprintf(buf, "C0644 %lu %s\n", size, last); if (verbose) fprintf(stderr, "Sending file modes: %s", buf); ssh_send(buf, strlen(buf)); if (response()) return; if (statistics) { stat_bytes = 0; stat_starttime = time(NULL); stat_lasttime = 0; } for (i = 0; i < size; i += 4096) { char transbuf[4096]; DWORD j, k = 4096; if (i + k > size) k = size - i; if (! ReadFile(f, transbuf, k, &j, NULL) || j != k) { if (statistics) printf("\n"); bump("%s: Read error", src); } ssh_send(transbuf, k); if (statistics) { stat_bytes += k; if (time(NULL) != stat_lasttime || i + k == size) { stat_lasttime = time(NULL); print_stats(last, size, stat_bytes, stat_starttime, stat_lasttime); } } } CloseHandle(f); ssh_send("", 1); (void) response(); } char buf[2048]; char *last; HANDLE dir; WIN32_FIND_DATA fdat; int ok; if ((last = strrchr(src, '/')) == NULL) last = src; else last++; if (strrchr(last, '\\') != NULL) last = strrchr(last, '\\') + 1; if (last == src && strchr(src, ':') != NULL) last = strchr(src, ':') + 1; /* maybe send filetime */ sprintf(buf, "D0755 0 %s\n", last); if (verbose) fprintf(stderr, "Entering directory: %s", buf); ssh_send(buf, strlen(buf)); if (response()) return; sprintf(buf, "%s/*", src); dir = FindFirstFile(buf, &fdat); ok = (dir != INVALID_HANDLE_VALUE); while (ok) { if (strcmp(fdat.cFileName, ".") == 0 || strcmp(fdat.cFileName, "..") == 0) { } else if (strlen(src) + 1 + strlen(fdat.cFileName) >= sizeof(buf)) { run_err("%s/%s: Name too long", src, fdat.cFileName); } else { sprintf(buf, "%s/%s", src, fdat.cFileName); source(buf); } ok = FindNextFile(dir, &fdat); } FindClose(dir); sprintf(buf, "E\n"); ssh_send(buf, strlen(buf)); (void) response(); } /* * Execute the sink part of the SCP protocol. */ static void sink(char *targ) { char buf[2048]; char namebuf[2048]; char ch; int targisdir = 0; int settime = 0; int exists; DWORD attr; HANDLE f; unsigned long mtime, atime; unsigned int mode; unsigned long size, i; int wrerror = 0; unsigned long stat_bytes; time_t stat_starttime, stat_lasttime; char *stat_name; attr = GetFileAttributes(targ); if (attr != -1 && (attr & FILE_ATTRIBUTE_DIRECTORY) != 0) targisdir = 1; if (targetshouldbedirectory && !targisdir) bump("%s: Not a directory", targ); ssh_send("", 1); while (1) { settime = 0; gottime: if (ssh_recv(&ch, 1) <= 0) return; if (ch == '\n') bump("Protocol error: Unexpected newline"); i = 0; buf[i++] = ch; do { if (ssh_recv(&ch, 1) <= 0) bump("Lost connection"); buf[i++] = ch; } while (i < sizeof(buf) && ch != '\n'); buf[i-1] = '\0'; switch (buf[0]) { case '\01': /* error */ fprintf(stderr, "%s\n", buf+1); errs++; continue; case '\02': /* fatal error */ bump("%s", buf+1); case 'E': ssh_send("", 1); return; case 'T': if (sscanf(buf, "T%d %*d %d %*d", &mtime, &atime) == 2) { settime = 1; ssh_send("", 1); goto gottime; } bump("Protocol error: Illegal time format"); case 'C': case 'D': break; default: bump("Protocol error: Expected control record"); } if (sscanf(buf+1, "%u %u %[^\n]", &mode, &size, namebuf) != 3) bump("Protocol error: Illegal file descriptor format"); if (targisdir) { char t[2048]; strcpy(t, targ); if (targ[0] != '\0') strcat(t, "/"); strcat(t, namebuf); strcpy(namebuf, t); } else { strcpy(namebuf, targ); } attr = GetFileAttributes(namebuf); exists = (attr != -1); if (buf[0] == 'D') { if (exists && (attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { run_err("%s: Not a directory", namebuf); continue; } if (!exists) { if (! CreateDirectory(namebuf, NULL)) { run_err("%s: Cannot create directory", namebuf); continue; } } sink(namebuf); /* can we set the timestamp for directories ? */ continue; } f = CreateFile(namebuf, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (f == INVALID_HANDLE_VALUE) { run_err("%s: Cannot create file", namebuf); continue; } ssh_send("", 1); if (statistics) { stat_bytes = 0; stat_starttime = time(NULL); stat_lasttime = 0; if ((stat_name = strrchr(namebuf, '/')) == NULL) stat_name = namebuf; else stat_name++; if (strrchr(stat_name, '\\') != NULL) stat_name = strrchr(stat_name, '\\') + 1; } for (i = 0; i < size; i += 4096) { char transbuf[4096]; int j, k = 4096; if (i + k > size) k = size - i; if (ssh_recv(transbuf, k) == 0) bump("Lost connection"); if (wrerror) continue; if (! WriteFile(f, transbuf, k, &j, NULL) || j != k) { wrerror = 1; if (statistics) printf("\r%-25.25s | %50s\n", stat_name, "Write error.. waiting for end of file"); continue; } if (statistics) { stat_bytes += k; if (time(NULL) > stat_lasttime || i + k == size) { stat_lasttime = time(NULL); print_stats(stat_name, size, stat_bytes, stat_starttime, stat_lasttime); } } } (void) response(); if (settime) { FILETIME actime, wrtime; TIME_POSIX_TO_WIN(atime, actime); TIME_POSIX_TO_WIN(mtime, wrtime); SetFileTime(f, NULL, &actime, &wrtime); } CloseHandle(f); if (wrerror) { run_err("%s: Write error", namebuf); continue; } ssh_send("", 1); } } /* * We will copy local files to a remote server. */ static void toremote(int argc, char *argv[]) { char *src, *targ, *host, *user; char *cmd; int i; targ = argv[argc-1]; /* Seperate host from filename */ host = targ; targ = colon(targ); if (targ == NULL) bump("targ == NULL in toremote()"); *targ++ = '\0'; if (*targ == '\0') targ = "."; /* Substitute "." for emtpy target */ /* Seperate host and username */ user = host; host = strrchr(host, '@'); if (host == NULL) { host = user; user = NULL; } else { *host++ = '\0'; if (*user == '\0') user = NULL; } if (argc == 2) { /* Find out if the source filespec covers multiple files if so, we should set the targetshouldbedirectory flag */ HANDLE fh; WIN32_FIND_DATA fdat; if (colon(argv[0]) != NULL) bump("%s: Remote to remote not supported", argv[0]); fh = FindFirstFile(argv[0], &fdat); if (fh == INVALID_HANDLE_VALUE) bump("%s: No such file or directory\n", argv[0]); if (FindNextFile(fh, &fdat)) targetshouldbedirectory = 1; FindClose(fh); } cmd = smalloc(strlen(targ) + 100); sprintf(cmd, "scp%s%s%s%s -t %s", verbose ? " -v" : "", recursive ? " -r" : "", preserve ? " -p" : "", targetshouldbedirectory ? " -d" : "", targ); do_cmd(host, user, cmd); sfree(cmd); (void) response(); for (i = 0; i < argc - 1; i++) { HANDLE dir; WIN32_FIND_DATA fdat; src = argv[i]; if (colon(src) != NULL) { fprintf(stderr, "%s: Remote to remote not supported\n", src); errs++; continue; } dir = FindFirstFile(src, &fdat); if (dir == INVALID_HANDLE_VALUE) { run_err("%s: No such file or directory", src); continue; } do { char *last; char namebuf[2048]; if (strlen(src) + strlen(fdat.cFileName) >= sizeof(namebuf)) { fprintf(stderr, "%s: Name too long", src); continue; } strcpy(namebuf, src); if ((last = strrchr(namebuf, '/')) == NULL) last = namebuf; else last++; if (strrchr(last, '\\') != NULL) last = strrchr(last, '\\') + 1; if (last == namebuf && strrchr(namebuf, ':') != NULL) last = strchr(namebuf, ':') + 1; strcpy(last, fdat.cFileName); source(namebuf); } while (FindNextFile(dir, &fdat)); FindClose(dir); } } char *src, *targ, *host, *user; char *cmd; if (argc != 2) bump("More than one remote source not supported"); src = argv[0]; targ = argv[1]; /* Seperate host from filename */ host = src; src = colon(src); if (src == NULL) bump("Local to local copy not supported"); *src++ = '\0'; if (*src == '\0') src = "."; /* Substitute "." for empty filename */ /* Seperate username and hostname */ user = host; host = strrchr(host, '@'); if (host == NULL) { host = user; user = NULL; } else { *host++ = '\0'; if (*user == '\0') user = NULL; } cmd = smalloc(strlen(src) + 100); sprintf(cmd, "scp%s%s%s%s -f %s", verbose ? " -v" : "", recursive ? " -r" : "", preserve ? " -p" : "", targetshouldbedirectory ? " -d" : "", src); do_cmd(host, user, cmd); sfree(cmd); sink(targ); } /* * Initialize the Win$ock driver. */ static void init_winsock() { WORD winsock_ver; WSADATA wsadata; winsock_ver = MAKEWORD(1, 1); if (WSAStartup(winsock_ver, &wsadata)) bump("Unable to initialise WinSock"); if (LOBYTE(wsadata.wVersion) != 1 || HIBYTE(wsadata.wVersion) != 1) bump("WinSock version is incompatible with 1.1"); } /* * Short description of parameters. */ static void usage() { printf("PuTTY Secure Copy client\n"); printf("%s\n", ver); printf(" scp [-p] [-q] [-r] [-v] source [source..]" " [user@]host:target\n"); exit(1); } /* * Main program (no, really?) */ int main(int argc, char *argv[]) { int i; init_winsock(); for (i = 1; i < argc; i++) { if (argv[i][0] != '-') break; if (strcmp(argv[i], "-v") == 0) verbose = 1; else if (strcmp(argv[i], "-r") == 0) recursive = 1; else if (strcmp(argv[i], "-p") == 0) preserve = 1; else if (strcmp(argv[i], "-q") == 0) statistics = 0; else if (strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-?") == 0) usage(); else if (strcmp(argv[i], "--") == 0) { i++; break; } else usage(); } argc -= i; argv += i; if (argc < 2) usage(); if (argc > 2) targetshouldbedirectory = 1; if (colon(argv[argc-1]) != NULL) toremote(argc, argv); else tolocal(argc, argv); if (connection_open) { char ch; ssh_send_eof(); ssh_recv(&ch, 1); } WSACleanup(); random_save_seed(); return (errs == 0 ? 0 : 1); } /* end */ Node-path: putty/scpssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b5bbc8bf123fdf13be0ec5dc8483f4b7 Text-content-length: 181 Text-content-md5: 9f6031fdbe1204e911284875d3897f2b Content-length: 220 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN闥  2坋unsigned char)((value) >> 24); \ (cp)[1] = (unsigned char)((value) >> 16); \ (cp)[2] = (unsigned char)((value) >> 8); \ (cp)[3] = (unsigned char) Revision-number: 281 Prop-content-length: 159 Content-length: 159 K 7 svn:log V 60 Removed now obsolete sizetip.h from window.obj dependencies K 10 svn:author V 4 owen K 8 svn:date V 27 1999-11-08T12:19:02.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4cf0e9ae89cce0afe25e4b8d955fe4bc Text-content-length: 20 Text-content-md5: d3ef38ff23e5c00bff282f3026958f66 Content-length: 60 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN 媞 媨 Revision-number: 282 Prop-content-length: 131 Content-length: 131 K 7 svn:log V 31 Switch to using SSH_MSG macros K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-08T17:36:08.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c6c47190b63b3757552e25fe0ed5a07e Text-content-length: 1368 Text-content-md5: 2bba0831db96dc87943fa38a83542e87 Content-length: 1408 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN亸A仈j塦,僠*U榠( 刉,脁亂%凞 T8 覮3諿f輜轤J乊A=錊#define SSH_MSG_DISCONNECT 1 #define SSH_SMSG_PUBLIC_KEY 2 #define SSH_CMSG_SESSION_KEY 3 #define SSH_CMSG_USER 4 #define SSH_CMSG_AUTH_PASSWORD 9 #define SSH_CMSG_REQUEST_PTY 10 #define SSH_CMSG_EXEC_SHELL 12 #define SSH_CMSG_STDIN_DATA 16 #define SSH_SMSG_STDOUT_DATA 17 #define SSH_SMSG_STDERR_DATA 18 #define SSH_SMSG_SUCCESS 14 #define SSH_SMSG_FAILURE 15 #define SSH_SMSG_EXITSTATUS 20 #define SSH_MSG_IGNORE 32 #define SSH_CMSG_EXIT_CONFIRMATION 33 #define SSH_MSG_DEBUG 36SSH_MSG_DEBUG) { /* FIXME: log it */ } else if (pktin.type == SSH_MSG_IGNORE) {SSH_SMSG_PUBLIC_KEYSSH_CMSG_SESSION_KEYSSH_SMSG_SUCCESSSSH_CMSG_USERSSH_SMSG_FAILURESSH_CMSG_AUTH_PASSWORD, 4+strlen(passwordSSH_CMSG_REQUEST_PTYSSH_MSG_SUCCESS && pktin.type != SSH_MSG_FAILURE) { fatalbox("Protocol confusion"); } else if (pktin.type == SSH_MSG_FAILURESSH_CMSG_EXEC_SHELLSSH_SMSG_STDOUT_DATA || pktin.type == SSH_SMSG_STDERR_DATASSH_MSG_DISCONNECT) { ssh_state = SSH_STATE_CLOSED; } else if (pktin.type == SSH_MSG_SUCCESS) { /* may be from EXEC_SHELL on some servers */ } else if (pktin.type == SSH_MSG_FAILURE) { /*SSH_SMSG_EXITSTATUS) { s_wrpkt_start(SSH_CMSG_EXIT_CONFIRMATIONSSH_CMSG_STDIN_DATA Revision-number: 283 Prop-content-length: 130 Content-length: 130 K 7 svn:log V 30 Add TIS authentication option K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-08T17:42:12.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9d92d789ea11f543f0936777f98087d2 Text-content-length: 37 Text-content-md5: 5c8969c72853af27ab3d41babe247b48 Content-length: 77 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN) 1爃+int try_tis_auth Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2bba0831db96dc87943fa38a83542e87 Text-content-length: 1759 Text-content-md5: 1cb3fe0fa9111eec8b04b69f9f803895 Content-length: 1799 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN仈仩G 疉 僺磌W竮-榋3僪T蠤塜譿`醦刢釶`3琹#define SSH_CMSG_AUTH_TIS 39 #define SSH_SMSG_AUTH_TIS_CHALLENGE 40 #define SSH_CMSG_AUTH_TIS_RESPONSE 41 #define SSH_AUTH_TIS 5static unsigned long supported_ciphers_mask, supported_auth(pktin.body[12+i+j] << 24) | (pktin.body[14+i+j] << 8) | (pktin.body[15+i+j])); supported_auths_mask = ((pktin.body[16+i+j] << 24) | (pktin.body[17+i+j] << 16) | (pktin.body[18+i+j] << 8) | (pktin.body[19+i+j]) static int pwpkt_type; /* * Show password prompt, having first obtained it via a TIS * exchange if we're doing TIS authentication. */ pwpkt_type = SSH_CMSG_AUTH_PASSWORD; if (pktin.type == SSH_SMSG_FAILURE && cfg.try_tis_auth && (supported_auths_mask & (1<= negsize) { negsize += 64; events = srealloc (events, negsize * sizeof(*events)); } events[nevents] = smalloc(1+strlen(string)); strcpy (events[nevents], string); neveneventlog Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4df849cd908d7dfdd542eff0d6b14a99 Text-content-length: 1386 Text-content-md5: 6ccb07b91cda45d92e4e355e286409d1 Content-length: 1426 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN備@傡,0 p芻 亙D穐佋)區倢 嘖衞倱QSEPARATOR, 0, 0); } AppendMenu (m, MF_ENABLED, IDM_SHOWLOG, "Event Log"); AppendMenu (m, MF_SEPARATOR, 0, 0);eventlogif (len == -1) return DefWindowProc (hwnd, message, wParam, lParam && cfg.alt_f4) { return -1; } if ((lParam & 0x20000000) && wParam == VK_SPACE && cfg.alt_space) { SendMessage (hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0); return -1if (cfg.nethack_keypad) { int shift = keystate[VK_SHIFT] & 0x80; /* * NB the shifted versions only work with numlock off. */ switch ( (lParam >> 16) & 0x1FF ) { case 0x047: *p++ = shift ? 'Y' : 'y'; return p - output; case 0x048: *p++ = shift ? 'K' : 'k'; return p - output; case 0x049: *p++ = shift ? 'U' : 'u'; return p - output; case 0x04B: *p++ = shift ? 'H' : 'h'; return p - output; case 0x04C: *p++ = '.'; return p - output; case 0x04D: *p++ = shift ? 'L' : 'l'; return p - output; case 0x04F: *p++ = shift ? 'B' : 'b'; return p - output; case 0x050: *p++ = shift ? 'J' : 'j'; return p - output; case 0x051: *p++ = shift ? 'N' : 'n'; return p - output; case 0x053: *p++ = '.'; return p - output; } } else if (app_keypad_keys) { /* * If we're in applications keypad mode, we have to process it * before char-map translation, because it will pre-empt lots * of stuff, even if NumLock is off. */ Revision-number: 285 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Oops - Shift-PgUp/PgDn conflicted with NetHack mode K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-09T11:19:34.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6ccb07b91cda45d92e4e355e286409d1 Text-content-length: 132 Text-content-md5: 5c659c66d5151263f88983d32caa11a3 Content-length: 172 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN傡傢^倝6^倱Y<倝&/倷iNetHack keypad mode. This may conflict with Shift-PgUp/PgDn, * so we do it first. */ Revision-number: 286 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 Fix unexpected network error 5000 K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-09T11:34:14.000000Z PROPS-END Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2c67eb32178a7900056475330e7ef5d0 Text-content-length: 441 Text-content-md5: 7f4d8b9f46b2faed65b80b84cf05ea74 Content-length: 480 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN玬倊 瀕亀焪-/* * Because reading less than the whole of the available pending * data can generate an FD_READ event, we need to allow for the * possibility that FD_READ may arrive with FD_CLOSE already in * the queue; so it's possible that we can get here even with s * invalid. If so, we return 1 and don't worry about it. */ if (s == INVALID_SOCKET) return 1 case FD_CLOSE Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 818e11cc1d62b2f90e49dee73239afbf Text-content-length: 481 Text-content-md5: bfea446f81ea6716484160c15ce8b90f Content-length: 521 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN伄]伆7仧B倊 仩亀仭 仱=/* * Because reading less than the whole of the available pending * data can generate an FD_READ event, we need to allow for the * possibility that FD_READ may arrive with FD_CLOSE already in * the queue; so it's possible that we can get here even with s * invalid. If so, we return 1 and don't worry about it. */ if (s == INVALID_SOCKET) return 1 case FD_CLOSE } ssh_gotdata (buf, ret); return 1 Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3de5a664c7d8f539afdcb08e6424da06 Text-content-length: 448 Text-content-md5: 43212738fa30c4792de25b8cae6af167 Content-length: 487 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN仜仠n!亐K倊 亖亀亗(刵亜E 亯h/* * Because reading less than the whole of the available pending * data can generate an FD_READ event, we need to allow for the * possibility that FD_READ may arrive with FD_CLOSE already in * the queue; so it's possible that we can get here even with s * invalid. If so, we return 1 and don't worry about it. */ if (s == INVALID_SOCKET) return 1 case FD_CLOSE Revision-number: 287 Prop-content-length: 163 Content-length: 163 K 7 svn:log V 63 Added local-editing line discipline to make raw backend usable K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-09T12:05:34.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d3ef38ff23e5c00bff282f3026958f66 Text-content-length: 308 Text-content-md5: 7b938b3c34a93b334ce03ee53b36341d Content-length: 348 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN朿 僕U僢坰坧!OBJS1 = window.obj windlg.obj terminal.obj telnet.obj raw.obj POBJS2 = xlat.obj ldiscOBJS1) $(POBJS2) $(OBJS1) $(OBJS2) $(OBJS3) $(RESRC) link.rsp link /debug -out:putty.exe @link.rsp puttyd.exe: $(POBJS1) $(POBJS2OBJS1) >> link.rsp echo $(POBJS2ldisc.obj: ldisc Node-path: putty/ldisc.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1672 Text-content-md5: 1d59f68b54e6c83422d68a05b3087894 Content-length: 1788 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN唥旿匘JD侱RBD丏慒/扚&丏4塂}丒D乀僆,僃8凟#DE8丣8僂僈H/H,凟僆fF}怘gDH俲圛僈塂両fD凬乢侶D乿楨DF僪匢塃凟僣嘠侴O凾怐cH'P乑凪凟刬咲cJ俍Eo丒v@H僉GD!F僔E乕E乮丗%E"Fu團%丷*R僈7僁)凞僿扜哋G丏)僐7D咼丯哋R唈並唥嘐嘠婰*K嘖丠哋P=凟(OD 侶%咲坬哖=E俲刲|F僔K+L*圤(凟I侳擣%奅#僇 丠丩,圚慐妛I 圝 乭奐僇 嶦,咵QJ 僂-丒2D}J 侱僣侱婬僁.僁D-慒*DN媜F媏僎婨匤孨奩宍丏嘑1凢E刡凢妛GF,F僢L僂#丏圝E僅H俲並塋丟3丗匛3E2凨岰侶処峖G@K峩E乽O峩凢嶴侲妛YJ廫乗廸僄廮J嶢Y8丯嶳丠ER@Z巒F?L凾O嶢侼嶳丩媓I恦I坔侱丗/E慞D峾D丏廍D刯侲6凩匟/G匨I 侶+W:丯嶳丳I恦Q(凣,O嶢丯嶳咲5丗孨X峗侶峹怘慛H嘷侱峃侲H俲JD O"F6[>侶8丩岯匜孨凞侳M d擰O昒丟#D嘨NP OQ揥圧凴F岺丗宧廌&咼8Q廔丩F峼NL匧"嶴擺D;NT 侱)丟G匨LU>凱揤R俁Eo哷K擰E攁F攏凞DFB丏俲凧僊橴FE檉KD檛#include stdio"putty.h" /* * ldisc.c: PuTTY line ips */ static void c_write (char *buf, int len) { while (len-- new_head = (inbuf+ 1) & INBUF_MASK;cunsigned )f (!= reap[] =++;; }} }term_buf = NULL;len = 0,sizquotenext;plen c(c >= 32 && c <= 126) ||160))return 1;elsec < 1282;/* ^x for some x4hex XYpc(&cc, 1)}[2]c[1(c =7 ? '?' : c + 0x400'^'25sprintf"<%02X>", c4bsb( "\010 ", 3);sendswitch (? ' /* * ^h/^?: delete oneand outputBSBw,BSBs, toto last space/nonboundaryuBOLr: echo "^R\n"redrawv: d:at, ef fclose connection,setm/^j:-plus-\r\n/case 8:127:back> 0 [-1])); -}break23: ^Wword && is!]))1U18R^R"i(i i <; i++i]2VTRUE4D logor==/* FIXME: eof */ ->130^M/^Jwith"default:gthis label fromhandle=+ 256 = saferealloc++cFALSsimple} L_ = { }; Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 89aa28141a6ca58a8cdc95e43c48195f Text-content-length: 165 Text-content-md5: bd07e2c21f298fa2b977a8c7c49dc3cc Content-length: 205 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN"竁/@卲抜婱玌void (*send) (char *buf, int len); } Ldisc; GLOBAL Ldisc *ldiscint ldisc_term;ldisc.c. */ extern Ldisc ldisc_term, ldisc_simple Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b0484e8beba9923abad13c1010a1296d Text-content-length: 99 Text-content-md5: b4e799695b93e4c64d76b5bd3d2ae433 Content-length: 138 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN偆e偆l3#/(3濬亾_丗伈)伋s襗佄vs偂W偄Nldiscldiscldiscldiscldiscldiscldisc Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 44f9e1a14a5b723c2b90b2956db09046 Text-content-length: 49 Text-content-md5: 8e27448660d847229b288a2ecbbd548b Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN8沀 *#define IDC1_LDISCTERM 1019 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: aebbd203070a6ae3078e577a0225e9d6 Text-content-length: 138 Text-content-md5: ea5335b3ead2352208359050b82ff772 Content-length: 178 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN* oo縩% AUTOCHECKBOX "&Use local terminal line discipline", IDC1_LDISCTERM, 3, 133, 162, 10 END IDD_PANEL2 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e710ae9b06ca9b20eeb18280994ba644 Text-content-length: 257 Text-content-md5: f79101f2c21ce3afb6f916adeb7ee176 Content-length: 297 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN傆_傊4+丠焍焩烱誹*塣仌\仠+GJ佊?伌仧DLdiscTerm", cfg.ldisc_termLdiscTerm", 0, &cfg.ldisc_termCheckDlgButton (hwnd, IDC1_LDISCTERM, cfg.ldisc_term case IDC1_LDISCTERMldisc_term = IsDlgButtonChecked (hwnd, IDC1_LDISCTERM); break; } Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5c659c66d5151263f88983d32caa11a3 Text-content-length: 182 Text-content-md5: fd274d8d0de13749b6c8974fb7178c49 Content-length: 222 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN傢傢J 伈08佋{亷N佫7 cfg.protocol == PROT_TELNET ? &telnet_backend : &raw_backend); ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simpleldiscldisc Revision-number: 288 Prop-content-length: 154 Content-length: 154 K 7 svn:log V 54 Should be able to switch line disciplines mid-session K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-09T14:20:51.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fd274d8d0de13749b6c8974fb7178c49 Text-content-length: 79 Text-content-md5: fe6ff1e692e47ce3e58e03a9543c28f2 Content-length: 119 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN傢J傤 5亽j佢h亽bldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple Revision-number: 289 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Add "extern" on declaration of raw_backend K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-10T09:14:08.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: bd07e2c21f298fa2b977a8c7c49dc3cc Text-content-length: 28 Text-content-md5: 68a3cdedfc58531e92cd2b19cd454222 Content-length: 68 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN竁竈 0'0extern Revision-number: 290 Prop-content-length: 131 Content-length: 131 K 7 svn:log V 31 Added LICENCE and README files K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-10T09:47:31.000000Z PROPS-END Node-path: putty/LICENCE Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 952 Text-content-md5: 0f0d8d51b7edbd7a641c26daf8f4666e Content-length: 1068 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN圛-睱〥笶D岴K擠.嶨3侲 圖乢H乨怐.圖H凣丵D乢E 丏 凟嘍侾丏孌嘍俢僁侷婦僃)J亇侱L侱僄E侰凬亃婨)嶥*D咲匛.孠匜9E-E.FbG#圙侱亀D凣H丏倂奌,OtDG9淒匰WF*廌 嘐唟G僂孌匒嶪奃卛咲5侲匳丏嘐侳=D1D両侲侲F圖噝L侾uTTY is copyright 1997-1999 Simon Tatham. PortionGary S. Brown and Eric Young. Permissionhereby granted, free of charge, to any person obtaining athis softwareassociated documenta files (the "S")deal in without restric, includlimisuse,, modife publish, dibute, scenand/or sellies, tomitwhomis furnishedo so, subjectfollowcondi: The abovenoticshall beedrstantial p. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IES OF MERCHANTABILITY, FITNFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SIMON TATHAM BE LIABLENY CLAIM, DAMAGR OTHERWHEIN AN ACTIONCONTRACT, TORTWISE, ARISFROM, OFNNE ORUSDEALINGS. Node-path: putty/README Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 738 Text-content-md5: aba0bd096e5e9169460bf83229f67537 Content-length: 854 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN7,*XDD紻凞F匛1凢嘑:怐F匜T丒Kc揇擧乶旻乮嶦乫嘓匘乬M&嘑乯塂2嶥奃乬嶪zG@E岲W睩慐1旸 咲丒擠嶦嘓侤凟僩孏/D俴匘孌刅咲丠0僁丷婨'侱丩FET咶D凞匘僒his is the README for PuTTY, a free Win32 Telnet and SSH client. The provided MakefileMS Visual C++ systems. Type `nmake' to build both putty.exe (maingram)pscpan SCP ). Setting up aject nIDE sometimes failswork. In particular,Studio 6 falls over oodd macro usagssh.c. a bug, sinceC++6 commline compiler s fine. Ifdoubt, just us home web sit http://www.chiark.greenend.org.uk/~sgtatham/html Bug reportsfeature requests shoue sent<-bugs@lists.tartarus>. PLEASE readsectionweb about how tos effvely. Do NOTd one- say`it doesn't'!LICENClicecondis. Revision-number: 291 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 61 Add spiel about there being a comment at the top of Makefile K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-10T10:28:59.000000Z PROPS-END Node-path: putty/README Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: aba0bd096e5e9169460bf83229f67537 Text-content-length: 225 Text-content-md5: ac3f153f8c07f827804754799ee7bccf Content-length: 264 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN7 両丩両刲並 The comment at the top of the Makefile gives extra build options you can use to build in limited Win32s compatibility, a hack to pass SSH through some types of firewall, and `official' version numbers Revision-number: 292 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.018540Z PROPS-END Revision-number: 293 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.027362Z PROPS-END Revision-number: 294 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.037941Z PROPS-END Revision-number: 295 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.048242Z PROPS-END Revision-number: 296 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.058073Z PROPS-END Revision-number: 297 Prop-content-length: 147 Content-length: 147 K 7 svn:log V 47 _sntprintf is nonportable; use sprintf instead K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-11T10:13:40.000000Z PROPS-END Node-path: putty/sizetip.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: e345012a8731ccf9bed030c1ba0a274d Text-content-length: 59 Text-content-md5: ccff27df48f4a093e059f10b28ddc0eb Content-length: 98 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN %塽' 欱32sprintf(str, "%dx%d", cx, cy); Revision-number: 298 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 49 Put a #ifndef around definition of TCS_MULTILINE K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-11T10:27:09.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ea5335b3ead2352208359050b82ff772 Text-content-length: 168 Text-content-md5: f7b8728287622bc1929d8189bd9ace6a Content-length: 208 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN 踠赪3#include /* Some systems don't define this, so I do it myself if necessary */ #ifndef TCS_MULTILINE #define TCS_MULTILINE 0x0200 #endif Revision-number: 299 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.258909Z PROPS-END Revision-number: 300 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.265834Z PROPS-END Revision-number: 301 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.272672Z PROPS-END Revision-number: 302 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.281598Z PROPS-END Revision-number: 303 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.290628Z PROPS-END Revision-number: 304 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.300140Z PROPS-END Revision-number: 305 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.310466Z PROPS-END Revision-number: 306 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.320610Z PROPS-END Revision-number: 307 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.328878Z PROPS-END Revision-number: 308 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.338992Z PROPS-END Revision-number: 309 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.347910Z PROPS-END Revision-number: 310 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.355582Z PROPS-END Revision-number: 311 Prop-content-length: 309 Content-length: 309 K 7 svn:log V 208 Declare `struct RSAKey' so that its implicit declaration in the parameter list of verify_ssh_host_key() does not have scope restricted to that parameter list. Probably unnecessary but let's not take chances. K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-15T10:31:06.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 68a3cdedfc58531e92cd2b19cd454222 Text-content-length: 79 Text-content-md5: f58c1b36532d1048a5268a682deebd9e Content-length: 119 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN竈 :&:$struct RSAKey; /* be a little careful of scope */ Revision-number: 312 Prop-content-length: 189 Content-length: 189 K 7 svn:log V 89 Update from Joris van Rantwijk: command line options to specify port and password in scp K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-16T09:26:19.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ebad092216caba10216239dc7a64ffb8 Text-content-length: 881 Text-content-md5: 649ea2f0fa7c6d0196bcea657cb0a909 Content-length: 920 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN亯P亸-6U匢P哛 r7宩雈僣亗 傿亞, Novportnumber = 0; static char *password = NULL, i; if (password) { strncpy(str, password, maxlen); str[maxlen-1] = '\0'; password = NULL; return; }if (portnumber) cfg.port = portnumber;Usage: scp [options] [user@]host:source target\n"); printf(" scp [options] source [source...] [user@]host:target\n"); printf("Options:\n"); printf(" -p preserve file attributes\n"); printf(" -q quiet, don't show statistics\n"); printf(" -r copy directories recursively\n"); printf(" -v show verbose messages\n"); printf(" -P port connect to specified port\n"); printf(" -pw passw login with specified passwordP") == 0 && i+1 < argc) portnumber = atoi(argv[++i]); else if (strcmp(argv[i], "-pw") == 0 && i+1 < argc) password = argv[++i] Revision-number: 313 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 36 Fix printing of Telnet GA as ugrave K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-16T09:57:40.000000Z PROPS-END Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 43212738fa30c4792de25b8cae6af167 Text-content-length: 122 Text-content-md5: beec306e3b2b44c8ddcfa2cdc248b3af Content-length: 161 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN仠n仢 b逹b糲 everything else; print it if it's IAC */ if (c == IAC) { b[0] = c; c_write(b,1); } Revision-number: 314 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.480523Z PROPS-END Revision-number: 315 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.490440Z PROPS-END Revision-number: 316 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.497197Z PROPS-END Revision-number: 317 Prop-content-length: 138 Content-length: 138 K 7 svn:log V 38 Fix a slightly picky compiler warning K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-17T10:39:17.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 649ea2f0fa7c6d0196bcea657cb0a909 Text-content-length: 28 Text-content-md5: 998ce19e4ac4963f2ba6d422fbcd7d70 Content-length: 67 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN亸亸! (int) Revision-number: 318 Prop-content-length: 147 Content-length: 147 K 7 svn:log V 47 Add ISO-8859-2 / Win-1250 char set translation K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-17T10:44:43.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f58c1b36532d1048a5268a682deebd9e Text-content-length: 31 Text-content-md5: 2d661f432ef2048851695a093c06276c Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN3 漟汣漌88592w1250 Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8e27448660d847229b288a2ecbbd548b Text-content-length: 163 Text-content-md5: 37a9f78f5b5bcd79fe27bd11d182c1e7 Content-length: 203 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN沀XLATSTATIC 1001 #define IDC6_NOXLAT 1002 #define IDC6_KOI8WIN1251 1003 #define IDC6_88592WIN1250 1004 #define IDC6_CAPSLOCKCYR 1005 #endif Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f7b8728287622bc1929d8189bd9ace6a Text-content-length: 404 Text-content-md5: e9d8843ca6488875b27f677614c958af Content-length: 444 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN踠, 倈 倈$蒆LTEXT "Character set translation:", IDC6_XLATSTATIC, 3, 3, 162, 8 AUTORADIOBUTTON "&None", IDC6_NOXLAT, 3, 12, 162, 10, WS_GROUP AUTORADIOBUTTON "&KOI8 / Win-1251", IDC6_KOI8WIN1251, 3, 22, 162, 10 AUTORADIOBUTTON "&ISO-8859-2 / Win-1250", IDC6_88592WIN1250, 3, 32, 162, 10 AUTOCHECKBOX "&CAPS LOCK acts as cyrillic switch", IDC6_CAPSLOCKCYR, 3, 46, 162 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f79101f2c21ce3afb6f916adeb7ee176 Text-content-length: 488 Text-content-md5: 626b67c219a133c64c2195be928bcbf9 Content-length: 528 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN傊4傌!#7,﹍伝2"値p丼倯-88592Xlat", cfg.xlat_88592w125088592Xlat", 0, &cfg.xlat_88592w1250RadioButton (hwnd, IDC6_NOXLAT, IDC6_88592WIN1250, cfg.xlat_88592w1250 ? IDC6_88592WIN1250 : cfg.xlat_enablekoiwin ? IDC6_KOI8WIN1251 : IDC6_NOXLATNOXLAT: case IDC6_KOI8WIN1251: case IDC6_88592WIN1250: cfg.xlat_enablekoiwin = IsDlgButtonChecked (hwnd, IDC6_KOI8WIN1251); cfg.xlat_88592w1250 = IsDlgButtonChecked (hwnd, IDC6_88592WIN1250); Node-path: putty/xlat.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7bc578df73bc0fb598c2f7369199c4ed Text-content-length: 789 Text-content-md5: f6d96eca8448709bb766183bfdad6825 Content-length: 828 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN漿5匱(-乽歡-&乽z0歡Q;亊搕static unsigned char xlatWIN1250toISO88592[] 39,131, 34, 46,124,124,136, 47,169, 60,166,171,174,172, 144, 96, 39, 34, 34, 42, 45, 45,152, 84,185, 62,182,187,190,188, 160,183,162,163,164,161,124,167,168, 99,170, 34, 39,173, 82,175, 176, 63,178,179,180,117,182,255,184,177,186, 34,165,189,181static unsigned char xlatISO88592toWIN1250[] 5,162,163,164,188,140,167,168,138,170,141,143,173,142,175, 176,185,178,179,180,190,156,161,184,154,186,157,159,189,158else if (cfg.xlat_88592w1250) return xlatWIN1250toISO88592[c]; return c; } unsigned char xlat_tty2scr(unsigned char c) { if(cfg.xlat_enablekoiwin) return koi2win[c]; else if (cfg.xlat_88592w1250) return xlatISO88592toWIN1250 Revision-number: 319 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.649772Z PROPS-END Revision-number: 320 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.659488Z PROPS-END Revision-number: 321 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 46 Remove accelerator conflict in Language panel K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-17T14:00:45.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e9d8843ca6488875b27f677614c958af Text-content-length: 24 Text-content-md5: 7fea1033d222947e5f8454c137a7263a Content-length: 64 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN,, ?抝蔅CA& Revision-number: 322 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 66 This commit was manufactured by cvs2svn to create tag 'beta-0-48'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 1999-11-17T14:00:45.000000Z PROPS-END Node-path: putty-0.48 Node-kind: dir Node-action: add Node-copyfrom-rev: 321 Node-copyfrom-path: putty Revision-number: 323 Prop-content-length: 141 Content-length: 141 K 7 svn:log V 41 Fix potential segfault on malloc failure K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-17T14:22:12.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fe6ff1e692e47ce3e58e03a9543c28f2 Text-content-length: 97 Text-content-md5: c8f58c2110f56b23d126678ce3ad74df Content-length: 137 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN傤傤F亴ZF佮v亶else { sprintf(cl, "putty @%s", session); freecl = TRUE; } Revision-number: 324 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:58.762307Z PROPS-END Revision-number: 325 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Cleanups to remove warnings for GNU/mingw32 compilation K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-22T10:07:24.000000Z PROPS-END Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1d59f68b54e6c83422d68a05b3087894 Text-content-length: 71 Text-content-md5: fd5ba23333161f7a2a8a3131c9f8584d Content-length: 110 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN17檢$#include #include #include (int *)int c0, c1, c2; sprintf(buf, "Colour%d", i); gpps (sesskey, buf, defaults[i], buf2, sizeof(buf2)); if(sscanf(buf2, "%d,%d,%d", &c0, &c1, &c2) == 3) { cfg.colours[i][0] = c0; cfg.colours[i][1] = c1; cfg.colours[i][2] = c2; }(HWND) Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c8f58c2110f56b23d126678ce3ad74df Text-content-length: 52 Text-content-md5: 53138cad944ceca615469ea526c352e7 Content-length: 92 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN傤傤'gc鞸渟併M亰I#include send ("PuTTY\r", 6); break; case '\007': beep(); disptop = scrtopseen_disp_eventseen_disp_event if (cfg.lfhascr) curs_x = 0; fix_cpos; wrapnext = FALSE; seen_disp_event = 1seen_disp_event = TRUE; break; } } else switch (termstate) { case TOPLEVEL: if (c >= ' ' && c != 0234) { if (wrapnext) { cpos[1] = ATTR_WRAPPED; if (curs_y == marg_b) scroll (marg_t, marg_b, 1, TRUE); else if (curs_y < rows-1) curs_y++; curs_x = 0; fix_cpos; wrapnext = FALSE; nl_count++; } if (insert) insch (1); check_selection (cpos, cpos+1); *cpos++ = xlat_tty2scr((unsigned char)c) | curr_attr | (c <= 0x7F ? cset_attr[cset] : ATTR_ASCII); curs_x++; if (curs_x == cols) { cpos--; curs_x--; wrapnext = wrap; } seen_disp_event = 1; } break; seen_disp_eventseen_disp_event = TRUEseen_disp_event = TRUEseen_disp_event = TRUE; break; case 'Zc': /* restore power-on settings */ power_on(); fix_cpos; disptop = scrtop; seen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventTRUE); seen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_eventseen_disp_event Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 53138cad944ceca615469ea526c352e7 Text-content-length: 326 Text-content-md5: 47fe783a9aaf8c890bef3e4e9149e254 Content-length: 366 K 15 cvs2svn:cvs-rev V 4 1.28 PROPS-END SVN傤'傪d#籿D伻K籱乢倓' * Choose unscroll method */ unscroll_event = US_DISPRecord that we pressed key so the scroll window can be reset, but * be careful to avoid Shift-UP/Down */ if( wParam != VK_SHIFT && wParam != VK_PRIOR && wParam != VK_NEXT ) { seen_key_event = 1; } Revision-number: 329 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 49 Oops - fix total idiocies in applying that patch K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-30T11:13:33.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e2a7192e63abe52ddcd485da594e0ea4 Text-content-length: 22 Text-content-md5: 33ce96afd9193499a44ed9f5308e0490 Content-length: 62 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN簄簄 巙玿巚T Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 362024338a3de5bcb767522c03325ccb Text-content-length: 18 Text-content-md5: a7665f6e0ce7b2ce2e3b18c50b6e912e Content-length: 58 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN倻倹c倹c+ Revision-number: 330 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 61 Turn #ifdef LOG into a command-line option for debugging use K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-30T11:22:30.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 33ce96afd9193499a44ed9f5308e0490 Text-content-length: 41 Text-content-md5: 37788c706c8a5fc92e38c53594abf4ab Content-length: 81 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN簄 玞 GLOBAL char *logfile Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a7665f6e0ce7b2ce2e3b18c50b6e912e Text-content-length: 300 Text-content-md5: 44db9e11b0383630fa321f041ea0d5b7 Content-length: 340 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN倹c倻w  仺Y /* * Optionally log the session traffic to a file. Useful for * debugging and possibly also useful for actual logging. */ if (logfile) { static FILE *fp = NULL; if (!fp) fp = fopen(logfile, "wb"); if (fp) fputc (c, fp); } Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 47fe783a9aaf8c890bef3e4e9149e254 Text-content-length: 166 Text-content-md5: bdd7ab10167732b88c57b26b30a767f5 Content-length: 206 K 15 cvs2svn:cvs-rev V 4 1.29 PROPS-END SVN傪d傫w  傋^ else if (q == p + 3 && tolower(p[0]) == 'l' && tolower(p[1]) == 'o' && tolower(p[2]) == 'g') { logfile = "putty.log" Revision-number: 331 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Add description of workaround for Visual Studio 6 problem K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-30T11:39:04.000000Z PROPS-END Node-path: putty/README Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ac3f153f8c07f827804754799ee7bccf Text-content-length: 558 Text-content-md5: eedadc2f8b231eecbeabf9bb2d6024f9 Content-length: 597 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN 俧MS Visual Studio version 6 falls over on the nasty macros in ssh.c. This is a bug in Visual Studio. The culprit is the /ZI compiler option (debug info generation: Edit and Continue). To avoid this problem while compiling PuTTY under VS6, you should: - right-click ssh.c in the FileView - click Settings - select the C/C++ tab and the General category - under `Debug info:', select anything _other_ than `Program Database for Edit and Continue'. Alternatively disable the /ZI option, replacing it with a saner value, such as /Zi Revision-number: 332 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 46 Avoid recursing into . and .. when in -r mode K 10 svn:author V 5 simon K 8 svn:date V 27 1999-11-30T11:53:42.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ee0dbcf1dc48db577edff935905b1f7e Text-content-length: 510 Text-content-md5: d46bd33d5ddbf522f39375f840f12483 Content-length: 549 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN亸'亽E 僤3僤.眣 { /* * Avoid . and .. directories. */ char *p; p = strrchr(src, '/'); if (!p) p = strrchr(src, '\\'); if (!p) p = src; else p++; if (!strcmp(p, ".") || !strcmp(p, "..")) /* skip . and .. */; else rsource(src); } else { run_err("%s: not a regular file", src); } Revision-number: 333 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.180668Z PROPS-END Revision-number: 334 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 46 Replace SHA implementation with homegrown one K 10 svn:author V 5 simon K 8 svn:date V 27 1999-12-03T11:32:50.000000Z PROPS-END Node-path: putty/sshsha.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b69a40d3ca1f7a403e60490d00874be3 Text-content-length: 1420 Text-content-md5: 77d1c7ac26672ca3371d525f300a15bc Content-length: 1459 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN睭妢妢妢/* * SHA core transform algorithm, used here solely as a `stirring' * function for the PuTTY random number pool. Implemented directly * from the specification by Simon Tatham. */ #include "ssh.h" #define rol(x,y) ( ((x) << (y)) | (((word32)x) >> (32-y)) ) void SHATransform(word32 *digest, word32 *block) { word32 w[80]; word32 a,b,c,d,e; int t; for (t = 0; t < 16; t++) w[t] = block[t]; for (t = 16; t < 80; t++) { word32 tmp = w[t-3] ^ w[t-8] ^ w[t-14] ^ w[t-16]; w[t] = rol(tmp, 1); } a = digest[0]; b = digest[1]; c = digest[2]; d = digest[3]; e = digest[4]; for (t = 0; t < 20; t++) { word32 tmp = rol(a, 5) + ( (b&c) | (d&~b) ) + e + w[t] + 0x5a827999; e = d; d = c; c = rol(b, 30); b = a; a = tmp; } for (t = 20; t < 40; t++) { word32 tmp = rol(a, 5) + (b^c^d) + e + w[t] + 0x6ed9eba1; e = d; d = c; c = rol(b, 30); b = a; a = tmp; } for (t = 40; t < 60; t++) { word32 tmp = rol(a, 5) + ( (b&c) | (b&d) | (c&d) ) + e + w[t] + 0x8f1bbcdc; e = d; d = c; c = rol(b, 30); b = a; a = tmp; } for (t = 60; t < 80; t++) { word32 tmp = rol(a, 5) + (b^c^d) + e + w[t] + 0xca62c1d6; e = d; d = c; c = rol(b, 30); b = a; a = tmp; } digest[0] += a; digest[1] += b; digest[2] += c; digest[3] += d; digest[4] += e; } Revision-number: 335 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.266574Z PROPS-END Revision-number: 336 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.275754Z PROPS-END Revision-number: 337 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.283928Z PROPS-END Revision-number: 338 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.290635Z PROPS-END Revision-number: 339 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.297943Z PROPS-END Revision-number: 340 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.305507Z PROPS-END Revision-number: 341 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.311778Z PROPS-END Revision-number: 342 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.317636Z PROPS-END Revision-number: 343 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.326067Z PROPS-END Revision-number: 344 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.334699Z PROPS-END Revision-number: 345 Prop-content-length: 206 Content-length: 206 K 7 svn:log V 105 Added keyboard shortcuts on the system menu. I haven't tried to compile it, but the changes are trivial. K 10 svn:author V 5 chris K 8 svn:date V 27 1999-12-06T14:57:49.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: bdd7ab10167732b88c57b26b30a767f5 Text-content-length: 414 Text-content-md5: 4e984bf6c3137ace41a5521296a6015b Content-length: 454 K 15 cvs2svn:cvs-rev V 4 1.30 PROPS-END SVN傫w傫倂亀乚[蚲偅5蜝&Event Log"); AppendMenu (m, MF_SEPARATOR, 0, 0); AppendMenu (m, MF_ENABLED, IDM_NEWSESS, "Ne&w Session"); AppendMenu (m, MF_ENABLED, IDM_DUPSESS, "&&ved Sessions"); AppendMenu (m, MF_ENABLED, IDM_RECONF, "Chan&ge Settings"); AppendMenu (m, MF_SEPARATOR, 0, 0); AppendMenu (m, MF_ENABLED, IDM_CLRSB, "C&lear Scrollback"); AppendMenu (m, MF_ENABLED, IDM_RESET, "Rese&& Revision-number: 346 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.393461Z PROPS-END Revision-number: 347 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.403805Z PROPS-END Revision-number: 348 Prop-content-length: 150 Content-length: 150 K 7 svn:log V 50 Oops - that unscroll stuff was a little broken... K 10 svn:author V 5 simon K 8 svn:date V 27 1999-12-09T17:10:28.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 44db9e11b0383630fa321f041ea0d5b7 Text-content-length: 26 Text-content-md5: be32ebca5f8ccffa3ab2c96f4470e9d7 Content-length: 66 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN倻w倻w 侜|| Revision-number: 349 Prop-content-length: 137 Content-length: 137 K 7 svn:log V 37 Add multi-makefile management system K 10 svn:author V 5 simon K 8 svn:date V 27 1999-12-13T17:21:42.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7b938b3c34a93b334ce03ee53b36341d Text-content-length: 2833 Text-content-md5: 5d61a77390f50c9b46458ea5e1f4876a Content-length: 2873 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN朿昳r俤乂塨J8奙 昗# Visual C++ Makefile for PuTTY. # # Use `nmake' to build. # ##-- help # # Extra options you can set: # # - FWHACK=/DFWHACK # Enables a hack that tunnels through some firewall proxies. # # - VER=/DSNAPSHOT=1999-01-25 # Generates executables whose About box report them as being a # development snapshot. # # - VER=/DRELEASE=0.43 # Generates executables whose About box report them as being a # release version. # # - COMPAT=/DWIN32S_COMPAT # Generates a binary that works (minimally) with Win32s. # ##--OBJ=obj RES=res ##-- objects putty POBJS1 = window.$(OBJ) windlg.$(OBJ) terminal.$(OBJ) telnet.$(OBJ) raw.$(OBJ) POBJS2 = xlat.$(OBJ) ldisc.$(OBJ) sizetip.$(OBJ) ssh.$(OBJ) ##-- objects pscp SOBJS = scp.$(OBJ) windlg.$(OBJ) scpssh.$(OBJ) ##-- objects putty pscp OBJS1 = misc.$(OBJ) noise.$(OBJ) OBJS2 = sshcrc.$(OBJ) sshdes.$(OBJ) sshmd5.$(OBJ) sshrsa.$(OBJ) sshrand.$(OBJ) OBJS3 = sshsha.$(OBJ) sshblowf.$(OBJ) version.$(OBJ) ##-- resources putty PRESRC = win_res.$(RES) ##-- resources pscp SRESRC = scp.$(RES) ##-- ##-- gui-apps # putty ##-- console-apps # pscp ##-- LIBS1 = advapi32.lib user32.lib gdi32.lib LIBS2 = wsock32.lib comctl32.lib comdlg32.lib all: putty.exe pscp.exe putty.exe: $(POBJS1) $(POBJS2) $(OBJS1) $(OBJS2) $(OBJS3) $(PRESRC) link.rsp link /debug -out:putty.exe @link.rsp pscp.exe: $(SOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(SRESRC) scp.rsp link /debug -out:pscp.exe @scpPscp.rsp: makefile echo /nologo /subsystem:console > scp.rsp echo $(SOBJS) >> scp.rsp echo $(OBJS1) >> scp.rsp echo $(OBJS2) >> scp.rsp echo $(OBJS3) >> scp.rsp echo $(SRESRC) >> scp.rsp echo $(LIBS1) >> scp.rsp echo $(LIBS2) >> scp.rsp ##-- dependencies window.$(OBJ): window.c putty.h win_res.h windlg.$(OBJ): windlg.c putty.h ssh.h win_res.h terminal.$(OBJ): terminal.c putty.h sizetip.$(OBJ): sizetip.c putty.h telnet.$(OBJ): telnet.c putty.h raw.$(OBJ): raw.c putty.h xlat.$(OBJ): xlat.c putty.h ldisc.$(OBJ): ldisc.c putty.h misc.$(OBJ): misc.c putty.h noise.$(OBJ): noise.c putty.h ssh.h ssh.$(OBJ): ssh.c ssh.h putty.h sshcrc.$(OBJ): sshcrc.c ssh.h sshdes.$(OBJ): sshdes.c ssh.h sshmd5.$(OBJ): sshmd5.c ssh.h sshrsa.$(OBJ): sshrsa.c ssh.h sshsha.$(OBJ): sshsha.c ssh.h sshrand.$(OBJ): sshrand.c ssh.h sshblowf.$(OBJ): sshblowf.c ssh.h scp.$(OBJ): scp.c putty.h scp.h scpssh.$(OBJ): scpssh.c putty.h ssh.h scp.h version.$(OBJ): version.c ##-- # Hack to force version.obj to be rebuilt always version.obj: versionpseudotarget @echo (built version.obj) versionpseudotarget: cl $(FWHACK) $(VER) $(CFLAGS) /c version.c ##-- dependencies win_res.$(RES): win_res.rc win_res.h putty.ico ##-- win_res.$(RES): rc $(FWHACK) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 win_res.rc ##-- dependencies scp.$(RES): scp.rc scp.ico ##-- scp.$(RES): rc $(FWHACK) Node-path: putty/README Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: eedadc2f8b231eecbeabf9bb2d6024f9 Text-content-length: 316 Text-content-md5: 36efa246bcc08f383eedbe8ba68e053f Content-length: 355 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN; $1$俧.For other compilers, some alternative Makefiles are provided. These Makefiles are generated automatically from the master `Makefile' by the Perl script `mkfiles.pl'. Additions and corrections to the script are more useful than additions and corrections to the alternative Makefiles themselves Node-path: putty/mkfiles.pl Node-kind: file Node-action: add Prop-content-length: 142 Text-delta: true Text-content-length: 2474 Text-content-md5: b1841428a146711d9451d7317f1c47cc Content-length: 2616 K 14 svn:executable V 1 * K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN HG咵6朒擠烣橠 嘒6婦*E丱侱=O乁咲8E丱D$揈丒丱侽{D8匩E8僃'凞`JN:侺侶丒(媃.匘乻孒乊G倉嘍乻丗7D'旼倉処;婫侷丣E侸M僱G|E儈匛 侱僗咶廐塇僉僱F丂匞別婩D乼塂僤凣 刟+噄匫侲厃凣E凢婨丮E哾丏唈G別匘僔G侲丱團E卛丗區橢僣H>侴単丮哋傽x哵侶嘰D哾丒唝G9僁噒僃噓D*嘔FFf嘓奃哱孠侶?岲剏獽唟嘑區圗嘳E塭丏丩G塭凞塲團怐奷岲婬妔廎僁婽D俶奊*揝9朙DF妔圚婣凢妔丳孍咺D妠圚1咷宱咲岴K丠妔凞孍侴.凪婯G.侳妔G>匘岻楬孹H峾僂岲凣嘕6D N嶤岶妔僂怑侳匛咹 匜妔凣8処宻EG奲JE1丱妀塆;F妔岹學圖,咵2F$圢 僁 丩$丵1G#D2J怬丣,僆FG奲嶨D唃丗剋I3M*侶怌咲僓O慗E憃咵丱廧婻弌怘妔凟%匢扴D怗E抆H ^,咼怘F妔匢"婦慉侱怾K廝G塝僁塦丗E塦F(凞^5僸塚H,丠 匑c丗,匞E凥侲-孏D!丠妔嘐6凢5嘑6僂6凞哱HGD 岻D擰L 咵匞-D媧僁婩,孒桰侾島丒嶳嶯#僆-侱杧僂塿H,D凣"岶僃*D 嘒哃 侲H%FD?匵2丏怟丠#僂怾I"丟,H7侱/E榙H峞両峬匟G E(M巆E橲I恊J9倂廋G慦G処F僅凞慉丏僛J"I@C僁朧G慪僁唟E卬廚慬ED%凟搘侻J淓E檖侶淴D僓嘙慒N+侳剈G!g凥榮DD榞E!凞'侲漺L僱E慗D丩丠/I慲僁憓DH漿MM漽FD) { chomp; if (/^##--/ @words = split /\s+/,$_ shift; # remove $ifirst !defined $i) { # nos } els[0]only$ieat least twmap {. "." . $_ }foreach($projects{$i} = $i; }push, "objdefs" store.=. "\n"} } close IN; @ = keys %; '\n','gui-apps'}~ s/^# //$gui1; }console-0sub my ($p) = @q"$p"}ob.resourceq(\S+)\s[^\n]*\n/\$($1) /g $qlis$1@ ', @ CygWinOUT, ">.cyg"; selOUT; print "founder cygwin. # gcc command line option is -D not /D ($_help"})=\/D/=-D \n".You can this path to poat your toolsyou need toTOOLPATH = c:\\\\br similar,'re running Windows/pkg/mingw32msvc/i386-CC = \$()gccRwindremay also tell wherefind include :RCIN---dir\\FLAGSg -O2 -D_WINDOWS -DDEBUG\$() --WIN32=1WINVER=0x0400LIBladvapi32 -lusergdwsockcomctldlg32OBJ=RES=}.SUFFIXES%.o %.obj: %.\t\$(CC)FWHACK) -c \$()echcdelexepchapilkdb Revision-number: 350 Prop-content-length: 139 Content-length: 139 K 7 svn:log V 39 Couple of bug fixes to cygwin makefile K 10 svn:author V 5 simon K 8 svn:date V 27 1999-12-14T09:29:55.000000Z PROPS-END Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b1841428a146711d9451d7317f1c47cc Text-content-length: 177 Text-content-md5: f95e242a611a11a75e90feedc8cf868b Content-length: 216 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN廙 俽恆揤o\n". "\n"; print $store{"objdefs"}; print "\n". ".SUFFIXES:\n". "\n". "%.o: %.c\n". "\t\$(CC) \$(FWHACK) \$(CFLAGS) -c \$<\n". "\n". "%.oversion.c Revision-number: 351 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.573623Z PROPS-END Revision-number: 352 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.581500Z PROPS-END Revision-number: 353 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.590873Z PROPS-END Revision-number: 354 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.599444Z PROPS-END Revision-number: 355 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.608516Z PROPS-END Revision-number: 356 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.619375Z PROPS-END Revision-number: 357 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Disable warn-on-close for inactive windows K 10 svn:author V 5 simon K 8 svn:date V 27 1999-12-21T10:19:05.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 37788c706c8a5fc92e38c53594abf4ab Text-content-length: 46 Text-content-md5: 79f329d8ba1e29d37ed8601f5ed7d8b1 Content-length: 86 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN!  瑌GLOBAL int session_closed Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4e984bf6c3137ace41a5521296a6015b Text-content-length: 118 Text-content-md5: 2f5a596986b0dba5c21c3b4117953d8f Content-length: 158 K 15 cvs2svn:cvs-rev V 4 1.31 PROPS-END SVN傫傭YP芵"亗^伜伔session_closed = FALSE; session_closed session_closed = TRUE; Revision-number: 358 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.769040Z PROPS-END Revision-number: 359 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.777675Z PROPS-END Revision-number: 360 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.787638Z PROPS-END Revision-number: 361 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.796999Z PROPS-END Revision-number: 362 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.804087Z PROPS-END Revision-number: 363 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.815719Z PROPS-END Revision-number: 364 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.827786Z PROPS-END Revision-number: 365 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.835600Z PROPS-END Revision-number: 366 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.849413Z PROPS-END Revision-number: 367 Prop-content-length: 173 Content-length: 173 K 7 svn:log V 73 New option to allow SysTabControl32 to be specified in ASCII not Unicode K 10 svn:author V 5 simon K 8 svn:date V 27 2000-01-18T18:14:07.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5d61a77390f50c9b46458ea5e1f4876a Text-content-length: 267 Text-content-md5: ca829d1776e52da32e2e2995442da5be Content-length: 307 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN 乻乻晆 - CFL=/DASCIICTLS # Uses ASCII rather than Unicode to specify the tab control in # the resource file. Probably most useful when compiling with # Cygnus/mingw32, whose resource compiler may have less of a # problem with it Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7fea1033d222947e5f8454c137a7263a Text-content-length: 295 Text-content-md5: 4b113dda2adb155579f68b477dfc2ada Content-length: 335 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN,.噖s7)y晐) #ifdef ASCIICTLS "SysTabControl32", #else L"SysTabControl32", #endif TCS_MULTILINE | WS_TABSTOP, #ifdef ASCIICTLS "SysTabControl32", #else L"SysTabControl32", #endif TCS_MULTILINE | WS_TABSTOP, 3, 3, 174, 193 END IDD_PANEL0 Revision-number: 368 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.905893Z PROPS-END Revision-number: 369 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:06:59.914489Z PROPS-END Revision-number: 370 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 36 Fix FORCE target in Cygwin makefile K 10 svn:author V 5 simon K 8 svn:date V 27 2000-01-19T12:11:38.000000Z PROPS-END Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f95e242a611a11a75e90feedc8cf868b Text-content-length: 26 Text-content-md5: 22e8edd9136ccf2ef99fb6fe00001e8e Content-length: 65 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN扽H<嶩!; Revision-number: 371 Prop-content-length: 154 Content-length: 154 K 7 svn:log V 54 Fix problems with resource compilation Makefile lines K 10 svn:author V 5 simon K 8 svn:date V 27 2000-01-19T12:16:19.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ca829d1776e52da32e2e2995442da5be Text-content-length: 45 Text-content-md5: 7ebca2c1d1d83ac2d99d016067875f68 Content-length: 85 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN 昡~檝 歳R$(RCFL$(RCFL Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 22e8edd9136ccf2ef99fb6fe00001e8e Text-content-length: 56 Text-content-md5: 3a1f83b9a2bfb478a0854656cd7d022a Content-length: 95 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN悀坵噊檣) \$(RCFLAGS) \$< \$\@\$(RCFL Revision-number: 372 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:00.371608Z PROPS-END Revision-number: 373 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:00.639951Z PROPS-END Revision-number: 374 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:00.701503Z PROPS-END Revision-number: 375 Prop-content-length: 137 Content-length: 137 K 7 svn:log V 37 Joris van Rantwijk's fix for pscp -P K 10 svn:author V 5 simon K 8 svn:date V 27 2000-01-28T20:20:58.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d46bd33d5ddbf522f39375f840f12483 Text-content-length: 71 Text-content-md5: eab71d59872759d64ebcdb2d3d6384b3 Content-length: 110 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN亽E亽5&朞"東.)if (portnumber) cfg.port = portnumber Revision-number: 376 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.149919Z PROPS-END Revision-number: 377 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.161163Z PROPS-END Revision-number: 378 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.171113Z PROPS-END Revision-number: 379 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.180583Z PROPS-END Revision-number: 380 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.189859Z PROPS-END Revision-number: 381 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.200190Z PROPS-END Revision-number: 382 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.208640Z PROPS-END Revision-number: 383 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.218230Z PROPS-END Revision-number: 384 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.227795Z PROPS-END Revision-number: 385 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.236967Z PROPS-END Revision-number: 386 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.246993Z PROPS-END Revision-number: 387 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.256063Z PROPS-END Revision-number: 388 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.263709Z PROPS-END Revision-number: 389 Prop-content-length: 166 Content-length: 166 K 7 svn:log V 66 Joris van Rantwijk's fixes for cygwin (NB includes WIN32S_COMPAT) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-02-20T11:01:00.000000Z PROPS-END Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3a1f83b9a2bfb478a0854656cd7d022a Text-content-length: 220 Text-content-md5: aeeabe371562f3966d915716badeff48 Content-length: 259 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN 2h0 廙怳C憇mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT -D_NO_OLDNAMES -I.\n". "LDFLAGS = -mno-cygwin -sres.resmy $mw = $gui{$p} ? " -mwindows" : ""; print "\t\$(CC)" . $mw . " Revision-number: 390 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 29 Fix an error message in pscp K 10 svn:author V 5 simon K 8 svn:date V 27 2000-02-21T14:20:19.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: eab71d59872759d64ebcdb2d3d6384b3 Text-content-length: 28 Text-content-md5: bd4e47b8e9b6410fd0775223268ff52d Content-length: 67 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN亽5亽:  , src Revision-number: 391 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.412977Z PROPS-END Revision-number: 392 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.420756Z PROPS-END Revision-number: 393 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.428250Z PROPS-END Revision-number: 394 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:01.436841Z PROPS-END Revision-number: 395 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Borland makefile should now work sanely with the free-beer bcc55 K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-08T09:41:17.000000Z PROPS-END Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: aeeabe371562f3966d915716badeff48 Text-content-length: 757 Text-content-md5: 779285c42a82b24a0d85f42e0686cb64 Content-length: 796 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN .匥&刢&J汢17N++c32 \$(FWHACK) \$(RCFL) -i \$(BCB)\\include \\\n". "\t\t-r -DNO_WINRESRC_Hap = $gui{$p} ? "" : " -ap"; print "\tilink32$ap -Gn -L\$(BCB)\\lib \@$p.rsp\n\n"; } foreach $p (@projects) { print $p, ".rsp: \$(MAKEFILE)\n"; $c0w = $gui{$p} ? "c0w32" : "c0x32"; print "\techo $c0w + > $p.rsp\n"; @objlines = &projlist("objects.$p"); for ($i=0; $i<=$#objlines; $i++) { $plus = ($i < $#objlines ? " +" : ""); print "\techo \$($objlines[$i])$plus >> $p.rsp\n"; } print "\techo $p.exe >> $p.rsp\n"; print "\techo nul,cw32 import32, >> $p.rsp\n"; print "\techo " . (join " ", &project("resources.$p")) . " >> $p.rsp\n";*\n". "\tdel *.pdb\n". "\tdel *.rsp\n". "\tdel *.tds\n". "\tdel *.\$\$\$\$\$\$ Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4b113dda2adb155579f68b477dfc2ada Text-content-length: 125 Text-content-md5: 2124eaca3e81c7af7347a3b834538e2d Content-length: 165 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN.ll/* Some compilers, like Borland, don't have winresrc.h */ #ifndef NO_WINRESRC_H #include #endif Revision-number: 396 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 68 Fix some picky compiler warnings kindly provided by Borland C++ 5.5 K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-08T10:21:13.000000Z PROPS-END Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: fd5ba23333161f7a2a8a3131c9f8584d Text-content-length: 20 Text-content-md5: 7c46c16572724610983d10613dc02b0a Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN1 乲' Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 20cadb9a7b30d69c53f3b5b217d8612d Text-content-length: 20 Text-content-md5: 9a964ff0c5e8e5554801e915ef3fd0d2 Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN琈. 圞坖 Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bd4e47b8e9b6410fd0775223268ff52d Text-content-length: 94 Text-content-md5: 73303c479f38722443008e93ad1d1f6a Content-length: 133 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN亽:亽U/"沖)奱(嘚 郱俛亗A亝"(DWORD)(DWORD)(DWORD)DWORDvoidvoid Node-path: putty/scpssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9f6031fdbe1204e911284875d3897f2b Text-content-length: 25 Text-content-md5: 2959b938e2111741c86d12e278ed73ad Content-length: 64 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN闥闿 5$5void Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: c73102bed8aa555bdef5bddd03f2eb85 Text-content-length: 57 Text-content-md5: 2719ed3b67a112650edc1472d8636a1f Content-length: 96 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN7 $<疻旳(unsigned long)m0 && Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2f5a596986b0dba5c21c3b4117953d8f Text-content-length: 275 Text-content-md5: 94681a26d6f263cfdc6c62f8956db86b Content-length: 315 K 15 cvs2svn:cvs-rev V 4 1.32 PROPS-END SVN傭Y傮(乚嘥鴍嘵Q籅亐xW俍伣僷伩o伄s伱fLRESULT CALLBACKLRESULT CALLBACK WndProc (HWND hwnd, UINT message, EnableSizeTip(1); break; case WM_EXITSIZEMOVE: EnableSizeTip(0); /* break; (never reached) */ Revision-number: 397 Prop-content-length: 251 Content-length: 251 K 7 svn:log V 150 New CRC32 implementation, from scratch, not copyrighted by somebody else! Removed Gary S Brown's name from copyrights. Only Eric Young's DES left :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-08T16:13:32.000000Z PROPS-END Node-path: putty/LICENCE Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 0f0d8d51b7edbd7a641c26daf8f4666e Text-content-length: 84 Text-content-md5: 8448af6d05e84667366226aa28af9f3b Content-length: 123 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN圛7CC噒UPuTTY is copyright 1997-1999 Simon Tatham. Portions copyright Eric Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3cb4494661ce8640e822192e568be205 Text-content-length: 35 Text-content-md5: 1cc6fc431222d4a1d6c6bda3a3d9aaf3 Content-length: 74 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN7( "剎?void *s, size_ Node-path: putty/sshcrc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 5de39024b25f15fc6c2e2c63a29c9d6c Text-content-length: 8758 Text-content-md5: 49a2a4ba4a2df38c2e32482826c13d86 Content-length: 8797 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN)'''/* * CRC32 implementation. * * The basic concept of a CRC is that you treat your bit-string * abcdefg... as a ludicrously long polynomial M=a+bx+cx^2+dx^3+... * over Z[2]. You then take a modulus polynomial P, and compute the * remainder of M on division by P. Thus, an erroneous message N * will only have the same CRC if the difference E = M-N is an * exact multiple of P. (Note that as we are working over Z[2], M-N * = N-M = M+N; but that's not very important.) * * What makes the CRC good is choosing P to have good properties: * * - If its first and last terms are both nonzero then it cannot * be a factor of any single term x^i. Therefore if M and N * differ by exactly one bit their CRCs will guaranteeably * be distinct. * * - If it has a prime (irreducible) factor with three terms then * it cannot divide a polynomial of the form x^i(1+x^j). * Therefore if M and N differ by exactly _two_ bits they will * have different CRCs. * * - If it has a factor (x+1) then it cannot divide a polynomial * with an odd number of terms. Therefore if M and N differ by * _any odd_ number of bits they will have different CRCs. * * - If the error term E is of the form x^i*B(x) where B(x) has * order less than P (i.e. a short _burst_ of errors) then P * cannot divide E (since no polynomial can divide a shorter * one), so any such error burst will be spotted. * * The CRC32 standard polynomial is * x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x^1+x^0 * * In fact, we don't compute M mod P; we compute M*x^32 mod P. * * The concrete implementation of the CRC is this: we maintain at * all times a 32-bit word which is the current remainder of the * polynomial mod P. Whenever we receive an extra bit, we multiply * the existing remainder by x, add (XOR) the x^32 term thus * generated to the new x^32 term caused by the incoming bit, and * remove the resulting combined x^32 term if present by replacing * it with (P-x^32). * * Bit 0 of the word is the x^31 term and bit 31 is the x^0 term. * Thus, multiplying by x means shifting right. So the actual * algorithm goes like this: * * x32term = (crcword & 1) ^ newbit; * crcword = (crcword >> 1) ^ (x32term * 0xEDB88320); * * In practice, we pre-compute what will happen to crcword on any * given sequence of eight incoming bits, and store that in a table * which we then use at run-time to do the job: * * outgoingplusnew = (crcword & 0xFF) ^ newbyte; * crcword = (crcword >> 8) ^ table[outgoingplusnew]; * * where table[outgoingplusnew] is computed by setting crcword=0 * and then iterating the first code fragment eight times (taking * the incoming byte low bit first). * * Note that all shifts are rightward and thus no assumption is * made about exact word length! (Although word length must be at * _least_ 32 bits, but ANSI C guarantees this for `unsigned long' * anyway.) */ #include /* ---------------------------------------------------------------------- * Multi-function module. Can be compiled three ways. * * - Compile with no special #defines. Will generate a table * that's already initialised at compile time, and one function * crc32(buf,len) that uses it. Normal usage. * * - Compile with INITFUNC defined. Will generate an uninitialised * array as the table, and as well as crc32(buf,len) it will * also generate void crc32_init(void) which sets up the table * at run time. Useful if binary size is important. * * - Compile with GENPROGRAM defined. Will create a standalone * program that does the initialisation and outputs the table as * C code. */ #define POLY (0xEDB88320L) #ifdef GENPROGRAM #define INITFUNC /* the gen program needs the init func :-) */ #endif #ifdef INITFUNC /* * This variant of the code generates the table at run-time from an * init function. */ static unsigned long crc32_table[256]; void crc32_init(void) { unsigned long crcword; int i; for (i = 0; i < 256; i++) { unsigned long newbyte, x32term; int j; crcword = 0; newbyte = i; for (j = 0; j < 8; j++) { x32term = (crcword ^ newbyte) & 1; crcword = (crcword >> 1) ^ (x32term * POLY); newbyte >>= 1; } crc32_table[i] = crcword; } } #else /* * This variant of the code has the data already prepared. */ static const unsigned long crc32_table[256] = { 0x00000000L, 0x77073096L, 0xEE0E612CL, 0x990951BAL, 0x076DC419L, 0x706AF48FL, 0xE963A535L, 0x9E6495A3L, 0x0EDB8832L, 0x79DCB8A4L, 0xE0D5E91EL, 0x97D2D988L, 0x09B64C2BL, 0x7EB17CBDL, 0xE7B82D07L, 0x90BF1D91L, 0x1DB71064L, 0x6AB020F2L, 0xF3B97148L, 0x84BE41DEL, 0x1ADAD47DL, 0x6DDDE4EBL, 0xF4D4B551L, 0x83D385C7L, 0x136C9856L, 0x646BA8C0L, 0xFD62F97AL, 0x8A65C9ECL, 0x14015C4FL, 0x63066CD9L, 0xFA0F3D63L, 0x8D080DF5L, 0x3B6E20C8L, 0x4C69105EL, 0xD56041E4L, 0xA2677172L, 0x3C03E4D1L, 0x4B04D447L, 0xD20D85FDL, 0xA50AB56BL, 0x35B5A8FAL, 0x42B2986CL, 0xDBBBC9D6L, 0xACBCF940L, 0x32D86CE3L, 0x45DF5C75L, 0xDCD60DCFL, 0xABD13D59L, 0x26D930ACL, 0x51DE003AL, 0xC8D75180L, 0xBFD06116L, 0x21B4F4B5L, 0x56B3C423L, 0xCFBA9599L, 0xB8BDA50FL, 0x2802B89EL, 0x5F058808L, 0xC60CD9B2L, 0xB10BE924L, 0x2F6F7C87L, 0x58684C11L, 0xC1611DABL, 0xB6662D3DL, 0x76DC4190L, 0x01DB7106L, 0x98D220BCL, 0xEFD5102AL, 0x71B18589L, 0x06B6B51FL, 0x9FBFE4A5L, 0xE8B8D433L, 0x7807C9A2L, 0x0F00F934L, 0x9609A88EL, 0xE10E9818L, 0x7F6A0DBBL, 0x086D3D2DL, 0x91646C97L, 0xE6635C01L, 0x6B6B51F4L, 0x1C6C6162L, 0x856530D8L, 0xF262004EL, 0x6C0695EDL, 0x1B01A57BL, 0x8208F4C1L, 0xF50FC457L, 0x65B0D9C6L, 0x12B7E950L, 0x8BBEB8EAL, 0xFCB9887CL, 0x62DD1DDFL, 0x15DA2D49L, 0x8CD37CF3L, 0xFBD44C65L, 0x4DB26158L, 0x3AB551CEL, 0xA3BC0074L, 0xD4BB30E2L, 0x4ADFA541L, 0x3DD895D7L, 0xA4D1C46DL, 0xD3D6F4FBL, 0x4369E96AL, 0x346ED9FCL, 0xAD678846L, 0xDA60B8D0L, 0x44042D73L, 0x33031DE5L, 0xAA0A4C5FL, 0xDD0D7CC9L, 0x5005713CL, 0x270241AAL, 0xBE0B1010L, 0xC90C2086L, 0x5768B525L, 0x206F85B3L, 0xB966D409L, 0xCE61E49FL, 0x5EDEF90EL, 0x29D9C998L, 0xB0D09822L, 0xC7D7A8B4L, 0x59B33D17L, 0x2EB40D81L, 0xB7BD5C3BL, 0xC0BA6CADL, 0xEDB88320L, 0x9ABFB3B6L, 0x03B6E20CL, 0x74B1D29AL, 0xEAD54739L, 0x9DD277AFL, 0x04DB2615L, 0x73DC1683L, 0xE3630B12L, 0x94643B84L, 0x0D6D6A3EL, 0x7A6A5AA8L, 0xE40ECF0BL, 0x9309FF9DL, 0x0A00AE27L, 0x7D079EB1L, 0xF00F9344L, 0x8708A3D2L, 0x1E01F268L, 0x6906C2FEL, 0xF762575DL, 0x806567CBL, 0x196C3671L, 0x6E6B06E7L, 0xFED41B76L, 0x89D32BE0L, 0x10DA7A5AL, 0x67DD4ACCL, 0xF9B9DF6FL, 0x8EBEEFF9L, 0x17B7BE43L, 0x60B08ED5L, 0xD6D6A3E8L, 0xA1D1937EL, 0x38D8C2C4L, 0x4FDFF252L, 0xD1BB67F1L, 0xA6BC5767L, 0x3FB506DDL, 0x48B2364BL, 0xD80D2BDAL, 0xAF0A1B4CL, 0x36034AF6L, 0x41047A60L, 0xDF60EFC3L, 0xA867DF55L, 0x316E8EEFL, 0x4669BE79L, 0xCB61B38CL, 0xBC66831AL, 0x256FD2A0L, 0x5268E236L, 0xCC0C7795L, 0xBB0B4703L, 0x220216B9L, 0x5505262FL, 0xC5BA3BBEL, 0xB2BD0B28L, 0x2BB45A92L, 0x5CB36A04L, 0xC2D7FFA7L, 0xB5D0CF31L, 0x2CD99E8BL, 0x5BDEAE1DL, 0x9B64C2B0L, 0xEC63F226L, 0x756AA39CL, 0x026D930AL, 0x9C0906A9L, 0xEB0E363FL, 0x72076785L, 0x05005713L, 0x95BF4A82L, 0xE2B87A14L, 0x7BB12BAEL, 0x0CB61B38L, 0x92D28E9BL, 0xE5D5BE0DL, 0x7CDCEFB7L, 0x0BDBDF21L, 0x86D3D2D4L, 0xF1D4E242L, 0x68DDB3F8L, 0x1FDA836EL, 0x81BE16CDL, 0xF6B9265BL, 0x6FB077E1L, 0x18B74777L, 0x88085AE6L, 0xFF0F6A70L, 0x66063BCAL, 0x11010B5CL, 0x8F659EFFL, 0xF862AE69L, 0x616BFFD3L, 0x166CCF45L, 0xA00AE278L, 0xD70DD2EEL, 0x4E048354L, 0x3903B3C2L, 0xA7672661L, 0xD06016F7L, 0x4969474DL, 0x3E6E77DBL, 0xAED16A4AL, 0xD9D65ADCL, 0x40DF0B66L, 0x37D83BF0L, 0xA9BCAE53L, 0xDEBB9EC5L, 0x47B2CF7FL, 0x30B5FFE9L, 0xBDBDF21CL, 0xCABAC28AL, 0x53B39330L, 0x24B4A3A6L, 0xBAD03605L, 0xCDD70693L, 0x54DE5729L, 0x23D967BFL, 0xB3667A2EL, 0xC4614AB8L, 0x5D681B02L, 0x2A6F2B94L, 0xB40BBE37L, 0xC30C8EA1L, 0x5A05DF1BL, 0x2D02EF8DL }; #endif #ifdef GENPROGRAM int main(void) { unsigned long crcword; int i; crc32_init(); for (i = 0; i < 256; i++) { printf("%s0x%08XL%s", (i % 4 == 0 ? " " : " "), crc32_table[i], (i % 4 == 3 ? (i == 255 ? "\n" : ",\n") : ",")); } return 0; } #endif unsigned long crc32(const void *buf, size_t len) { unsigned long crcword = 0L; const unsigned char *p = (const unsigned char *) buf; while (len--) { unsigned long newbyte = *p++; newbyte ^= crcword & 0xFFL; crcword = (crcword >> 8) ^ crc32_table[newbyte]; } return crcword; } Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2124eaca3e81c7af7347a3b834538e2d Text-content-length: 20 Text-content-md5: adaf4adfe75c25861d5f5f5e186c1623 Content-length: 60 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN辳 袹)裓 Revision-number: 398 Prop-content-length: 234 Content-length: 234 K 7 svn:log V 133 New DES implementation, replacing Eric Young's. All of PuTTY is now under my own copyright and there are no tricky licensing issues! K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-10T17:27:20.000000Z PROPS-END Node-path: putty/LICENCE Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 8448af6d05e84667366226aa28af9f3b Text-content-length: 57 Text-content-md5: 22774cbb1843318e4c6f946f99504b06 Content-length: 96 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN7)噊HPuTTY is copyright 1997-2000 Simon Tatham Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: edc8e28b891e639e592a47ac02d28f20 Text-content-length: 21203 Text-content-md5: ec8e98e06ff3e9db2ae78e4b1244a770 Content-length: 21242 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN佉s仾&仴仯# 伩?W伭伮Z伳!{a伷4#include #include "ssh.h" /* des.c - implementation of DES */ /* * Description of DES * * Unlike the description in FIPS 46, I'm going to use _sensible_ indices: * bits in an n-bit word are numbered from 0 at the LSB to n-1 at the MSB. * And S-boxes are indexed by six consecutive bits, not by the outer two * followed by the middle four. * * The DES encryption routine requires a 64-bit input, and a key schedule K * containing 16 48-bit elements. * * First the input is permuted by the initial permutation IP. * Then the input is split into 32-bit words L and R. (L is the MSW.) * Next, 16 rounds. In each round: * (L, R) <- (R, L xor f(R, K[i])) * Then the pre-output words L and R are swapped. * Then L and R are glued back together into a 64-bit word. (L is the MSW, * again, but since we just swapped them, the MSW is the R that came out * of the last round.) * The 64-bit output block is permuted by the inverse of IP and returned. * * Decryption is identical except that the elements of K are used in the * opposite order. (This wouldn't work if that word swap didn't happen.) * * The function f, used in each round, accepts a 32-bit word R and a * 48-bit key block K. It produces a 32-bit output. * * First R is expanded to 48 bits using the bit-selection function E. * The resulting 48-bit block is XORed with the key block K to produce * a 48-bit block X. * This block X is split into eight groups of 6 bits. Each group of 6 * bits is then looked up in one of the eight S-boxes to convert * it to 4 bits. These eight groups of 4 bits are glued back * together to produce a 32-bit preoutput block. * The preoutput block is permuted using the permutation P and returned. * * Key setup maps a 64-bit key word into a 16x48-bit key schedule. Although * the approved input format for the key is a 64-bit word, eight of the * bits are discarded, so the actual quantity of key used is 56 bits. * * First the input key is converted to two 28-bit words C and D using * the bit-selection function PC1. * Then 16 rounds of key setup occur. In each round, C and D are each * rotated left by either 1 or 2 bits (depending on which round), and * then converted into a key schedule element using the bit-selection * function PC2. * * That's the actual algorithm. Now for the tedious details: all those * painful permutations and lookup tables. * * IP is a 64-to-64 bit permutation. Its output contains the following * bits of its input (listed in order MSB to LSB of output). * * 6 14 22 30 38 46 54 62 4 12 20 28 36 44 52 60 * 2 10 18 26 34 42 50 58 0 8 16 24 32 40 48 56 * 7 15 23 31 39 47 55 63 5 13 21 29 37 45 53 61 * 3 11 19 27 35 43 51 59 1 9 17 25 33 41 49 57 * * E is a 32-to-48 bit selection function. Its output contains the following * bits of its input (listed in order MSB to LSB of output). * * 0 31 30 29 28 27 28 27 26 25 24 23 24 23 22 21 20 19 20 19 18 17 16 15 * 16 15 14 13 12 11 12 11 10 9 8 7 8 7 6 5 4 3 4 3 2 1 0 31 * * The S-boxes are arbitrary table-lookups each mapping a 6-bit input to a * 4-bit output. In other words, each S-box is an array[64] of 4-bit numbers. * The S-boxes are listed below. The first S-box listed is applied to the * most significant six bits of the block X; the last one is applied to the * least significant. * * 14 0 4 15 13 7 1 4 2 14 15 2 11 13 8 1 * 3 10 10 6 6 12 12 11 5 9 9 5 0 3 7 8 * 4 15 1 12 14 8 8 2 13 4 6 9 2 1 11 7 * 15 5 12 11 9 3 7 14 3 10 10 0 5 6 0 13 * * 15 3 1 13 8 4 14 7 6 15 11 2 3 8 4 14 * 9 12 7 0 2 1 13 10 12 6 0 9 5 11 10 5 * 0 13 14 8 7 10 11 1 10 3 4 15 13 4 1 2 * 5 11 8 6 12 7 6 12 9 0 3 5 2 14 15 9 * * 10 13 0 7 9 0 14 9 6 3 3 4 15 6 5 10 * 1 2 13 8 12 5 7 14 11 12 4 11 2 15 8 1 * 13 1 6 10 4 13 9 0 8 6 15 9 3 8 0 7 * 11 4 1 15 2 14 12 3 5 11 10 5 14 2 7 12 * * 7 13 13 8 14 11 3 5 0 6 6 15 9 0 10 3 * 1 4 2 7 8 2 5 12 11 1 12 10 4 14 15 9 * 10 3 6 15 9 0 0 6 12 10 11 1 7 13 13 8 * 15 9 1 4 3 5 14 11 5 12 2 7 8 2 4 14 * * 2 14 12 11 4 2 1 12 7 4 10 7 11 13 6 1 * 8 5 5 0 3 15 15 10 13 3 0 9 14 8 9 6 * 4 11 2 8 1 12 11 7 10 1 13 14 7 2 8 13 * 15 6 9 15 12 0 5 9 6 10 3 4 0 5 14 3 * * 12 10 1 15 10 4 15 2 9 7 2 12 6 9 8 5 * 0 6 13 1 3 13 4 14 14 0 7 11 5 3 11 8 * 9 4 14 3 15 2 5 12 2 9 8 5 12 15 3 10 * 7 11 0 14 4 1 10 7 1 6 13 0 11 8 6 13 * * 4 13 11 0 2 11 14 7 15 4 0 9 8 1 13 10 * 3 14 12 3 9 5 7 12 5 2 10 15 6 8 1 6 * 1 6 4 11 11 13 13 8 12 1 3 4 7 10 14 7 * 10 9 15 5 6 0 8 15 0 14 5 2 9 3 2 12 * * 13 1 2 15 8 13 4 8 6 10 15 3 11 7 1 4 * 10 12 9 5 3 6 14 11 5 0 0 14 12 9 7 2 * 7 2 11 1 4 14 1 7 9 4 12 10 14 8 2 13 * 0 15 6 12 10 9 13 0 15 3 3 5 5 6 8 11 * * P is a 32-to-32 bit permutation. Its output contains the following * bits of its input (listed in order MSB to LSB of output). * * 16 25 12 11 3 20 4 15 31 17 9 6 27 14 1 22 * 30 24 8 18 0 5 29 23 13 19 2 26 10 21 28 7 * * PC1 is a 64-to-56 bit selection function. Its output is in two words, * C and D. The word C contains the following bits of its input (listed * in order MSB to LSB of output). * * 7 15 23 31 39 47 55 63 6 14 22 30 38 46 * 54 62 5 13 21 29 37 45 53 61 4 12 20 28 * * And the word D contains these bits. * * 1 9 17 25 33 41 49 57 2 10 18 26 34 42 * 50 58 3 11 19 27 35 43 51 59 36 44 52 60 * * PC2 is a 56-to-48 bit selection function. Its input is in two words, * C and D. These are treated as one 56-bit word (with C more significant, * so that bits 55 to 28 of the word are bits 27 to 0 of C, and bits 27 to * 0 of the word are bits 27 to 0 of D). The output contains the following * bits of this 56-bit input word (listed in order MSB to LSB of output). * * 42 39 45 32 55 51 53 28 41 50 35 46 33 37 44 52 30 48 40 49 29 36 43 54 * 15 4 25 19 9 1 26 16 5 11 23 8 12 7 17 0 22 3 10 14 6 20 27 24 */ typedef struct { word32 k0246[16], k1357[16]; word32 eiv0, eiv1; word32 div0, div1; } DESContext; #define rotl(x, c) ( (x << c) | (x >> (32-c)) ) #define rotl28(x, c) ( ( (x << c) | (x >> (28-c)) ) & 0x0FFFFFFF) static word32 bitsel(word32 *input, const int *bitnums, int size) { word32 ret = 0; while (size--) { int bitpos = *bitnums++; ret <<= 1; if (bitpos >= 0) ret |= 1 & (input[bitpos / 32] >> (bitpos % 32)); } return ret; } void des_key_setup(word32 key_msw, word32 key_lsw, DESContext *sched) { static const int PC1_Cbits[] = { 7, 15, 23, 31, 39, 47, 55, 63, 6, 14, 22, 30, 38, 46, 54, 62, 5, 13, 21, 29, 37, 45, 53, 61, 4, 12, 20, 28 }; static const int PC1_Dbits[] = { 1, 9, 17, 25, 33, 41, 49, 57, 2, 10, 18, 26, 34, 42, 50, 58, 3, 11, 19, 27, 35, 43, 51, 59, 36, 44, 52, 60 }; static const int PC2_0246[] = { 49, 36, 59, 55, -1, -1, 37, 41, 48, 56, 34, 52, -1, -1, 15, 4, 25, 19, 9, 1, -1, -1, 12, 7, 17, 0, 22, 3, -1, -1, 46, 43 }; static const int PC2_1357[] = { -1, -1, 57, 32, 45, 54, 39, 50, -1, -1, 44, 53, 33, 40, 47, 58, -1, -1, 26, 16, 5, 11, 23, 8, -1, -1, 10, 14, 6, 20, 27, 24 }; static const int leftshifts[] = {1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1}; word32 C, D; word32 buf[2]; int i; buf[0] = key_lsw; buf[1] = key_msw; C = bitsel(buf, PC1_Cbits, 28); D = bitsel(buf, PC1_Dbits, 28); for (i = 0; i < 16; i++) { C = rotl28(C, leftshifts[i]); D = rotl28(D, leftshifts[i]); buf[0] = D; buf[1] = C; sched->k0246[i] = bitsel(buf, PC2_0246, 32); sched->k1357[i] = bitsel(buf, PC2_1357, 32); } sched->eiv0 = sched->eiv1 = 0; sched->div0 = sched->div1 = 0; /* for good measure */ } static const word32 SPboxes[8][64] = { {0x01010400, 0x00000000, 0x00010000, 0x01010404, 0x01010004, 0x00010404, 0x00000004, 0x00010000, 0x00000400, 0x01010400, 0x01010404, 0x00000400, 0x01000404, 0x01010004, 0x01000000, 0x00000004, 0x00000404, 0x01000400, 0x01000400, 0x00010400, 0x00010400, 0x01010000, 0x01010000, 0x01000404, 0x00010004, 0x01000004, 0x01000004, 0x00010004, 0x00000000, 0x00000404, 0x00010404, 0x01000000, 0x00010000, 0x01010404, 0x00000004, 0x01010000, 0x01010400, 0x01000000, 0x01000000, 0x00000400, 0x01010004, 0x00010000, 0x00010400, 0x01000004, 0x00000400, 0x00000004, 0x01000404, 0x00010404, 0x01010404, 0x00010004, 0x01010000, 0x01000404, 0x01000004, 0x00000404, 0x00010404, 0x01010400, 0x00000404, 0x01000400, 0x01000400, 0x00000000, 0x00010004, 0x00010400, 0x00000000, 0x01010004L}, {0x80108020, 0x80008000, 0x00008000, 0x00108020, 0x00100000, 0x00000020, 0x80100020, 0x80008020, 0x80000020, 0x80108020, 0x80108000, 0x80000000, 0x80008000, 0x00100000, 0x00000020, 0x80100020, 0x00108000, 0x00100020, 0x80008020, 0x00000000, 0x80000000, 0x00008000, 0x00108020, 0x80100000, 0x00100020, 0x80000020, 0x00000000, 0x00108000, 0x00008020, 0x80108000, 0x80100000, 0x00008020, 0x00000000, 0x00108020, 0x80100020, 0x00100000, 0x80008020, 0x80100000, 0x80108000, 0x00008000, 0x80100000, 0x80008000, 0x00000020, 0x80108020, 0x00108020, 0x00000020, 0x00008000, 0x80000000, 0x00008020, 0x80108000, 0x00100000, 0x80000020, 0x00100020, 0x80008020, 0x80000020, 0x00100020, 0x00108000, 0x00000000, 0x80008000, 0x00008020, 0x80000000, 0x80100020, 0x80108020, 0x00108000L}, {0x00000208, 0x08020200, 0x00000000, 0x08020008, 0x08000200, 0x00000000, 0x00020208, 0x08000200, 0x00020008, 0x08000008, 0x08000008, 0x00020000, 0x08020208, 0x00020008, 0x08020000, 0x00000208, 0x08000000, 0x00000008, 0x08020200, 0x00000200, 0x00020200, 0x08020000, 0x08020008, 0x00020208, 0x08000208, 0x00020200, 0x00020000, 0x08000208, 0x00000008, 0x08020208, 0x00000200, 0x08000000, 0x08020200, 0x08000000, 0x00020008, 0x00000208, 0x00020000, 0x08020200, 0x08000200, 0x00000000, 0x00000200, 0x00020008, 0x08020208, 0x08000200, 0x08000008, 0x00000200, 0x00000000, 0x08020008, 0x08000208, 0x00020000, 0x08000000, 0x08020208, 0x00000008, 0x00020208, 0x00020200, 0x08000008, 0x08020000, 0x08000208, 0x00000208, 0x08020000, 0x00020208, 0x00000008, 0x08020008, 0x00020200L}, {0x00802001, 0x00002081, 0x00002081, 0x00000080, 0x00802080, 0x00800081, 0x00800001, 0x00002001, 0x00000000, 0x00802000, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00800080, 0x00800001, 0x00000001, 0x00002000, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002001, 0x00002080, 0x00800081, 0x00000001, 0x00002080, 0x00800080, 0x00002000, 0x00802080, 0x00802081, 0x00000081, 0x00800080, 0x00800001, 0x00802000, 0x00802081, 0x00000081, 0x00000000, 0x00000000, 0x00802000, 0x00002080, 0x00800080, 0x00800081, 0x00000001, 0x00802001, 0x00002081, 0x00002081, 0x00000080, 0x00802081, 0x00000081, 0x00000001, 0x00002000, 0x00800001, 0x00002001, 0x00802080, 0x00800081, 0x00002001, 0x00002080, 0x00800000, 0x00802001, 0x00000080, 0x00800000, 0x00002000, 0x00802080L}, {0x00000100, 0x02080100, 0x02080000, 0x42000100, 0x00080000, 0x00000100, 0x40000000, 0x02080000, 0x40080100, 0x00080000, 0x02000100, 0x40080100, 0x42000100, 0x42080000, 0x00080100, 0x40000000, 0x02000000, 0x40080000, 0x40080000, 0x00000000, 0x40000100, 0x42080100, 0x42080100, 0x02000100, 0x42080000, 0x40000100, 0x00000000, 0x42000000, 0x02080100, 0x02000000, 0x42000000, 0x00080100, 0x00080000, 0x42000100, 0x00000100, 0x02000000, 0x40000000, 0x02080000, 0x42000100, 0x40080100, 0x02000100, 0x40000000, 0x42080000, 0x02080100, 0x40080100, 0x00000100, 0x02000000, 0x42080000, 0x42080100, 0x00080100, 0x42000000, 0x42080100, 0x02080000, 0x00000000, 0x40080000, 0x42000000, 0x00080100, 0x02000100, 0x40000100, 0x00080000, 0x00000000, 0x40080000, 0x02080100, 0x40000100L}, {0x20000010, 0x20400000, 0x00004000, 0x20404010, 0x20400000, 0x00000010, 0x20404010, 0x00400000, 0x20004000, 0x00404010, 0x00400000, 0x20000010, 0x00400010, 0x20004000, 0x20000000, 0x00004010, 0x00000000, 0x00400010, 0x20004010, 0x00004000, 0x00404000, 0x20004010, 0x00000010, 0x20400010, 0x20400010, 0x00000000, 0x00404010, 0x20404000, 0x00004010, 0x00404000, 0x20404000, 0x20000000, 0x20004000, 0x00000010, 0x20400010, 0x00404000, 0x20404010, 0x00400000, 0x00004010, 0x20000010, 0x00400000, 0x20004000, 0x20000000, 0x00004010, 0x20000010, 0x20404010, 0x00404000, 0x20400000, 0x00404010, 0x20404000, 0x00000000, 0x20400010, 0x00000010, 0x00004000, 0x20400000, 0x00404010, 0x00004000, 0x00400010, 0x20004010, 0x00000000, 0x20404000, 0x20000000, 0x00400010, 0x20004010L}, {0x00200000, 0x04200002, 0x04000802, 0x00000000, 0x00000800, 0x04000802, 0x00200802, 0x04200800, 0x04200802, 0x00200000, 0x00000000, 0x04000002, 0x00000002, 0x04000000, 0x04200002, 0x00000802, 0x04000800, 0x00200802, 0x00200002, 0x04000800, 0x04000002, 0x04200000, 0x04200800, 0x00200002, 0x04200000, 0x00000800, 0x00000802, 0x04200802, 0x00200800, 0x00000002, 0x04000000, 0x00200800, 0x04000000, 0x00200800, 0x00200000, 0x04000802, 0x04000802, 0x04200002, 0x04200002, 0x00000002, 0x00200002, 0x04000000, 0x04000800, 0x00200000, 0x04200800, 0x00000802, 0x00200802, 0x04200800, 0x00000802, 0x04000002, 0x04200802, 0x04200000, 0x00200800, 0x00000000, 0x00000002, 0x04200802, 0x00000000, 0x00200802, 0x04200000, 0x00000800, 0x04000002, 0x04000800, 0x00000800, 0x00200002L}, {0x10001040, 0x00001000, 0x00040000, 0x10041040, 0x10000000, 0x10001040, 0x00000040, 0x10000000, 0x00040040, 0x10040000, 0x10041040, 0x00041000, 0x10041000, 0x00041040, 0x00001000, 0x00000040, 0x10040000, 0x10000040, 0x10001000, 0x00001040, 0x00041000, 0x00040040, 0x10040040, 0x10041000, 0x00001040, 0x00000000, 0x00000000, 0x10040040, 0x10000040, 0x10001000, 0x00041040, 0x00040000, 0x00041040, 0x00040000, 0x10041000, 0x00001000, 0x00000040, 0x10040040, 0x00001000, 0x00041040, 0x10001000, 0x00000040, 0x10000040, 0x10040000, 0x10040040, 0x10000000, 0x00040000, 0x10001040, 0x00000000, 0x10041040, 0x00040040, 0x10000040, 0x10040000, 0x10001000, 0x10001040, 0x00000000, 0x10041040, 0x00041000, 0x00041000, 0x00001040, 0x00001040, 0x00040040, 0x10000000, 0x10041000L} }; #define f(R, K0246, K1357) (\ s0246 = R ^ K0246, \ s1357 = R ^ K1357, \ s0246 = rotl(s0246, 28), \ SPboxes[0] [(s0246 >> 24) & 0x3F] | \ SPboxes[1] [(s1357 >> 24) & 0x3F] | \ SPboxes[2] [(s0246 >> 16) & 0x3F] | \ SPboxes[3] [(s1357 >> 16) & 0x3F] | \ SPboxes[4] [(s0246 >> 8) & 0x3F] | \ SPboxes[5] [(s1357 >> 8) & 0x3F] | \ SPboxes[6] [(s0246 ) & 0x3F] | \ SPboxes[7] [(s1357 ) & 0x3F]) #define bitswap(L, R, n, mask) (\ swap = mask & ( (R >> n) ^ L ), \ R ^= swap << n, \ L ^= swap) /* Initial permutation */ #define IP(L, R) (\ bitswap(R, L, 4, 0x0F0F0F0F), \ bitswap(R, L, 16, 0x0000FFFF), \ bitswap(L, R, 2, 0x33333333), \ bitswap(L, R, 8, 0x00FF00FF), \ bitswap(R, L, 1, 0x55555555)) /* Final permutation */ #define FP(L, R) (\ bitswap(R, L, 1, 0x55555555), \ bitswap(L, R, 8, 0x00FF00FF), \ bitswap(L, R, 2, 0x33333333), \ bitswap(R, L, 16, 0x0000FFFF), \ bitswap(R, L, 4, 0x0F0F0F0F)) void des_encipher(word32 *output, word32 L, word32 R, DESContext *sched) { word32 swap, s0246, s1357; IP(L, R); L = rotl(L, 1); R = rotl(R, 1); L ^= f(R, sched->k0246[ 0], sched->k1357[ 0]); R ^= f(L, sched->k0246[ 1], sched->k1357[ 1]); L ^= f(R, sched->k0246[ 2], sched->k1357[ 2]); R ^= f(L, sched->k0246[ 3], sched->k1357[ 3]); L ^= f(R, sched->k0246[ 4], sched->k1357[ 4]); R ^= f(L, sched->k0246[ 5], sched->k1357[ 5]); L ^= f(R, sched->k0246[ 6], sched->k1357[ 6]); R ^= f(L, sched->k0246[ 7], sched->k1357[ 7]); L ^= f(R, sched->k0246[ 8], sched->k1357[ 8]); R ^= f(L, sched->k0246[ 9], sched->k1357[ 9]); L ^= f(R, sched->k0246[10], sched->k1357[10]); R ^= f(L, sched->k0246[11], sched->k1357[11]); L ^= f(R, sched->k0246[12], sched->k1357[12]); R ^= f(L, sched->k0246[13], sched->k1357[13]); L ^= f(R, sched->k0246[14], sched->k1357[14]); R ^= f(L, sched->k0246[15], sched->k1357[15]); L = rotl(L, 31); R = rotl(R, 31); swap = L; L = R; R = swap; FP(L, R); output[0] = L; output[1] = R; } void des_decipher(word32 *output, word32 L, word32 R, DESContext *sched) { word32 swap, s0246, s1357; IP(L, R); L = rotl(L, 1); R = rotl(R, 1); L ^= f(R, sched->k0246[15], sched->k1357[15]); R ^= f(L, sched->k0246[14], sched->k1357[14]); L ^= f(R, sched->k0246[13], sched->k1357[13]); R ^= f(L, sched->k0246[12], sched->k1357[12]); L ^= f(R, sched->k0246[11], sched->k1357[11]); R ^= f(L, sched->k0246[10], sched->k1357[10]); L ^= f(R, sched->k0246[ 9], sched->k1357[ 9]); R ^= f(L, sched->k0246[ 8], sched->k1357[ 8]); L ^= f(R, sched->k0246[ 7], sched->k1357[ 7]); R ^= f(L, sched->k0246[ 6], sched->k1357[ 6]); L ^= f(R, sched->k0246[ 5], sched->k1357[ 5]); R ^= f(L, sched->k0246[ 4], sched->k1357[ 4]); L ^= f(R, sched->k0246[ 3], sched->k1357[ 3]); R ^= f(L, sched->k0246[ 2], sched->k1357[ 2]); L ^= f(R, sched->k0246[ 1], sched->k1357[ 1]); R ^= f(L, sched->k0246[ 0], sched->k1357[ 0]); L = rotl(L, 31); R = rotl(R, 31); swap = L; L = R; R = swap; FP(L, R); output[0] = L; output[1] = R; } #define GET_32BIT_MSB_FIRST(cp) \ (((unsigned long)(unsigned char)(cp)[3]) | \ ((unsigned long)(unsigned char)(cp)[2] << 8) | \ ((unsigned long)(unsigned char)(cp)[1] << 16) | \ ((unsigned long)(unsigned char)(cp)[0] << 24)) #define PUT_32BIT_MSB_FIRST(cp, value) do { \ (cp)[3] = (value); \ (cp)[2] = (value) >> 8; \ (cp)[1] = (value) >> 16; \ (cp)[0] = (value) >> 24; } while (0) static void des_cbc_encrypt(unsigned char *dest, const unsigned char *src, unsigned int len, DESContext *sched) { word32 out[2], iv0, iv1; unsigned int i; assert((len & 7) == 0); iv0 = sched->eiv0; iv1 = sched->eiv1; for (i = 0; i < len; i += 8) { iv0 ^= GET_32BIT_MSB_FIRST(src); src += 4; iv1 ^= GET_32BIT_MSB_FIRST(src); src += 4; des_encipher(out, iv0, iv1, sched); iv0 = out[0]; iv1 = out[1]; PUT_32BIT_MSB_FIRST(dest, iv0); dest += 4; PUT_32BIT_MSB_FIRST(dest, iv1); dest += 4; } sched->eiv0 = iv0; sched->eiv1 = iv1; } static void des_cbc_decrypt(unsigned char *dest, const unsigned char *src, unsigned int len, DESContext *sched) { word32 out[2], iv0, iv1, xL, xR; unsigned int i; assert((len & 7) == 0); iv0 = sched->div0; iv1 = sched->div1; for (i = 0; i < len; i += 8) { xL = GET_32BIT_MSB_FIRST(src); src += 4; xR = GET_32BIT_MSB_FIRST(src); src += 4; des_decipher(out, xL, xR, sched); iv0 ^= out[0]; iv1 ^= out[1]; PUT_32BIT_MSB_FIRST(dest, iv0); dest += 4; PUT_32BIT_MSB_FIRST(dest, iv1); dest += 4; iv0 = xL; iv1 = xR; } sched->div0 = iv0; sched->div1 = iv1; } static void des_3cbc_encrypt(unsigned char *dest, const unsigned char *src, unsigned int len, DESContext *scheds) { des_cbc_encrypt(dest, src, len, &scheds[0]); des_cbc_decrypt(dest, src, len, &scheds[1]); des_cbc_encrypt(dest, src, len, &scheds[2]); } static void des_3cbc_decrypt(unsigned char *dest, const unsigned char *src, unsigned int len, DESContext *scheds) { des_cbc_decrypt(dest, src, len, &scheds[2]); des_cbc_encrypt(dest, src, len, &scheds[1]); des_cbc_decrypt(dest, src, len, &scheds[0]); } DESContext keys[3]; static void des3_sesskey(unsigned char *key) { des_key_setup(GET_32BIT_MSB_FIRST(key), GET_32BIT_MSB_FIRST(key+4), &keys[0]); des_key_setup(GET_32BIT_MSB_FIRST(key+8), GET_32BIT_MSB_FIRST(key+12), &keys[1]); des_key_setup(GET_32BIT_MSB_FIRST(key+16), GET_32BIT_MSB_FIRST(key+20), &keys[2]blk, blk, len, keysblk, blk, len, keyskey_setup(GET_32BIT_MSB_FIRST(key), GET_32BIT_MSB_FIRST(key+4), &keys[0]blk, blk, len, keys); } static void des_decrypt_blk(unsigned char *blk, int len) { des_cbc_decrypt(blk, blk, len, keys Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: adaf4adfe75c25861d5f5f5e186c1623 Text-content-length: 1204 Text-content-md5: 985f7c12d83346f355a04e539f031d60 Content-length: 1244 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN辳59坥螰螲K]裞cg#ie詓fE>d`譯乹K9)T-乺2303, 44, 14 LTEXT "Copyright \251 1997-2000 Simon Tatham", 1000, 10, 1026, 206, 8 LTEXT "obtaining a copy of this software and associated documentation", 1003, 10, 3442, 206, 8 LTEXT "including without limitation the rights to use, copy, modify, merge,", 1005, 10, 5058, 206, 8 LTEXT "and to permit persons to whom the Software is furnished to do so,", 1007, 10, 6674, 206, 8 LTEXT "The above copyright notice and this permission notice shall be", 1010, 10, 9098, 206, 8 LTEXT "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT", 1013, 10, 114, 206, 8 LTEXT "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,", 1014, 10, 122, 206, 8 LTEXT "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", 1015, 10, 13038, 206, 8 LTEXT "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", 1017, 10, 146, 206, 8 LTEXT "SIMON TATHAM BE LIABLE FOR ANY CLAIM, DAMAGES OR", 1018, 10, 15462, 206, 8 LTEXT "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN", 1020, 10, 170, 206, 8 LTEXT "CONNECTION WITH THE SOFTWARE OR THE USE OR", 1021, 10, 178, 206, 8 LTEXT "OTHER DEALINGS IN THE SOFTWARE.", 1022, 10, 186, 206, 8 END Revision-number: 399 Prop-content-length: 224 Content-length: 224 K 7 svn:log V 123 Added a large comment describing the transformations between the DES specification and the optimised implementation given. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T11:06:06.000000Z PROPS-END Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ec8e98e06ff3e9db2ae78e4b1244a770 Text-content-length: 6460 Text-content-md5: d5ba8c09435e5bfcfc26141ac3331a72 Content-length: 6499 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN仾佨(g皐d畖盪 竏 ------------------/* * Implementation details * ---------------------- * * If you look at the code in this module, you'll find it looks * nothing _like_ the above algorithm. Here I explain the * differences... * * Key setup has not been heavily optimised here. We are not * concerned with key agility: we aren't codebreakers. We don't * mind a little delay (and it really is a little one; it may be a * factor of five or so slower than it could be but it's still not * an appreciable length of time) while setting up. The only tweaks * in the key setup are ones which change the format of the key * schedule to speed up the actual encryption. I'll describe those * below. * * The first and most obvious optimisation is the S-boxes. Since * each S-box always targets the same four bits in the final 32-bit * word, so the output from (for example) S-box 0 must always be * shifted left 28 bits, we can store the already-shifted outputs * in the lookup tables. This reduces lookup-and-shift to lookup, * so the S-box step is now just a question of ORing together eight * table lookups. * * The permutation P is just a bit order change; it's invariant * with respect to OR, in that P(x)|P(y) = P(x|y). Therefore, we * can apply P to every entry of the S-box tables and then we don't * have to do it in the code of f(). This yields a set of tables * which might be called SP-boxes. * * The bit-selection function E is our next target. Note that E is * immediately followed by the operation of splitting into 6-bit * chunks. Examining the 6-bit chunks coming out of E we notice * they're all contiguous within the word (speaking cyclically - * the end two wrap round); so we can extract those bit strings * individually rather than explicitly running E. This would yield * code such as * * y |= SPboxes[0][ (rotl(R, 5) ^ top6bitsofK) & 0x3F ]; * t |= SPboxes[1][ (rotl(R,11) ^ next6bitsofK) & 0x3F ]; * * and so on; and the key schedule preparation would have to * provide each 6-bit chunk separately. * * Really we'd like to XOR in the key schedule element before * looking up bit strings in R. This we can't do, naively, because * the 6-bit strings we want overlap. But look at the strings: * * 3322222222221111111111 * bit 10987654321098765432109876543210 * * box0 XXXXX X * box1 XXXXXX * box2 XXXXXX * box3 XXXXXX * box4 XXXXXX * box5 XXXXXX * box6 XXXXXX * box7 X XXXXX * * The bit strings we need to XOR in for boxes 0, 2, 4 and 6 don't * overlap with each other. Neither do the ones for boxes 1, 3, 5 * and 7. So we could provide the key schedule in the form of two * words that we can separately XOR into R, and then every S-box * index is available as a (cyclically) contiguous 6-bit substring * of one or the other of the results. * * The comments in Eric Young's libdes implementation point out * that two of these bit strings require a rotation (rather than a * simple shift) to extract. It's unavoidable that at least _one_ * must do; but we can actually run the whole inner algorithm (all * 16 rounds) rotated one bit to the left, so that what the `real' * DES description sees as L=0x80000001 we see as L=0x00000003. * This requires rotating all our SP-box entries one bit to the * left, and rotating each word of the key schedule elements one to * the left, and rotating L and R one bit left just after IP and * one bit right again just before FP. And in each round we convert * a rotate into a shift, so we've saved a few per cent. * * That's about it for the inner loop; the SP-box tables as listed * below are what I've described here (the original S value, * shifted to its final place in the input to P, run through P, and * then rotated one bit left). All that remains is to optimise the * initial permutation IP. * * IP is not an arbitrary permutation. It has the nice property * that if you take any bit number, write it in binary (6 bits), * permute those 6 bits and invert some of them, you get the final * position of that bit. Specifically, the bit whose initial * position is given (in binary) as fedcba ends up in position * AcbFED (where a capital letter denotes the inverse of a bit). * * We have the 64-bit data in two 32-bit words L and R, where bits * in L are those with f=1 and bits in R are those with f=0. We * note that we can do a simple transformation: suppose we exchange * the bits with f=1,c=0 and the bits with f=0,c=1. This will cause * the bit fedcba to be in position cedfba - we've `swapped' bits c * and f in the position of each bit! * * Better still, this transformation is easy. In the example above, * bits in L with c=0 are bits 0x0F0F0F0F, and those in R with c=1 * are 0xF0F0F0F0. So we can do * * difference = ((R >> 4) ^ L) & 0x0F0F0F0F * R ^= (difference << 4) * L ^= difference * * to perform the swap. Let's denote this by bitswap(4,0x0F0F0F0F). * Also, we can invert the bit at the top just by exchanging L and * R. So in a few swaps and a few of these bit operations we can * do: * * Initially the position of bit fedcba is fedcba * Swap L with R to make it Fedcba * Perform bitswap( 4,0x0F0F0F0F) to make it cedFba * Perform bitswap(16,0x0000FFFF) to make it ecdFba * Swap L with R to make it EcdFba * Perform bitswap( 2,0x33333333) to make it bcdFEa * Perform bitswap( 8,0x00FF00FF) to make it dcbFEa * Swap L with R to make it DcbFEa * Perform bitswap( 1,0x55555555) to make it acbFED * Swap L with R to make it AcbFED * * (In the actual code the four swaps are implicit: R and L are * simply used the other way round in the first, second and last * bitswap operations.) * * The final permutation is just the inverse of IP, so it can be * performed by a similar set of operations./* * The bit numbers in the two lists below don't correspond to * the ones in the above description of PC2, because in the * above description C and D are concatenated so `bit 28' means * bit 0 of C. In this implementation we're using the standard * `bitsel' function above and C is in the second word, so bit * 0 of C is addressed by writing `32' here. */ Revision-number: 400 Prop-content-length: 242 Content-length: 242 K 7 svn:log V 141 Robert de Bath's patch: ^C ^Z and ^D send Telnet specials in terminal line discipline; also switching disciplines in midsession works better K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:03:04.000000Z PROPS-END Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7c46c16572724610983d10613dc02b0a Text-content-length: 1053 Text-content-md5: 7d9a36168ec580f09451c18f5d48b0c2 Content-length: 1092 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN瀩E嘗坸俆坴y0婡R 9[恓<a恓丣憌4c32!f,#define CTRL(x) (x^'@')c: Do a ^u then send a telnet IP * ^z: Do a ^u then send a telnet SUSP * ^\: Do a ^u then send a telnet ABORT: send line-plus-\r\n and reset to BOL */ case CTRL('H'): case CTRL('?'):CTRL('W'): /* delete wordCTRL('U'): /* delete line */ case CTRL('C'): /* Send IP */ case CTRL('\\'): /* Quit */ case CTRL('Z'): /* Suspend if( c == CTRL('C') ) back->special (TS_IP); if( c == CTRL('Z') ) back->special (TS_SUSP); if( c == CTRL('\\') ) back->special (TS_ABORT); break; case CTRL('R'): /*CTRL('V'): /* quote next char */ term_quotenext = TRUE; break; case CTRL('D'): /* logout or send */ if (term_buflen == 0) { back->special (TS_EOF)CTRL('M'): /*if( term_buflen != 0 ) { back->send(term_buf, term_buflen); while (term_buflen > 0) { bsb(plen(term_buf[term_buflen-1])); term_buflen--; } } Revision-number: 401 Prop-content-length: 223 Content-length: 223 K 7 svn:log V 122 Robert de Bath's patch: integrate line disciplines into Telnet and have them interoperate sensibly with ECHO negotiations K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:06:11.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 79f329d8ba1e29d37ed8601f5ed7d8b1 Text-content-length: 41 Text-content-md5: b36d6e96ec8955fc88f872ac834d577b Content-length: 81 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN!5 恇?恇, TS_LECHO, TS_RECHO Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 978a64afd3ba9c1fb0ec07a45dd3ee45 Text-content-length: 560 Text-content-md5: cb46622b96e19bd37266ede7fcebd317 Content-length: 599 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN仢v仭k,W乑$T郮籿俓仠p if (o->option == TELOPT_ECHO) { cfg.ldisc_term = FALSE; ldisc = &ldisc_simple if (o->option == TELOPT_ECHO) { cfg.ldisc_term = TRUE; ldisc = &ldisc_term1] = DM; send (s, b, 2, MSG_OOB); break; case TS_RECHO: if (o_echo.state == INACTIVE || o_echo.state == REALLY_INACTIVE) { o_echo.state = REQUESTED; send_opt (o_echo.send, o_echo.option); } break; case TS_LECHO: if (o_echo.state == ACTIVE) { o_echo.state = REQUESTED; send_opt (o_echo.nsend, o_echo.option); } Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 94681a26d6f263cfdc6c62f8956db86b Text-content-length: 77 Text-content-md5: ae11562f9f0503ccd00f43f4bf859df7 Content-length: 117 K 15 cvs2svn:cvs-rev V 4 1.33 PROPS-END SVN傮傮U 3仏佪仌}back->special (cfg.ldisc_term ? TS_LECHO : TS_RECHO Revision-number: 402 Prop-content-length: 226 Content-length: 226 K 7 svn:log V 125 Robert de Bath's patch: sort out once and for all the confusion between ESC [ ... Q and ESC [ ... ? Q (for all values of Q). K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:08:36.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: be32ebca5f8ccffa3ab2c96f4470e9d7 Text-content-length: 1591 Text-content-md5: 7113ee4a4f2567cdf6a8ea01533c6c1c Content-length: 1631 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN倻w偄&N媅:A 9so亷俛3亙w丷仒(俧昒仜Cm伇俤伈"伌s唜佄荝佌%#define ANSI(x,y) ((x)+((y)<<8)) #define ANSI_QUE(x) ANSI(x,TRUE)/* Only graphic characters get this far, ctrls are stripped above */ if (wrapnext) { cpos[1] = ATTR_WRAPPED;curs_x = 0; fix_cpos; wrapnext = FALSE; nl_count++; } if (insert) insch (1); check_selection (cpos, cpos+1); *cpos++ = xlat_tty2scr((unsigned char)c) | curr_attr | (c <= 0x7F ? cset_attr[cset] : ATTR_ASCII); curs_x++; if (curs_x == cols) { cpos--; curs_x--; wrapnext = wrap; } seen_disp_event = 1;if( isdigit(c) ) { } else if( c == ';' ) { if (++esc_nargs <= ARGS_MAX) esc_args[esc_nargs-1] = ARG_DEFAULT; termstate = SEEN_CSI; } else if( c < '@' ) { if( esc_query ) esc_query = -1; else if( c == '?' ) esc_query = TRUE; else esc_query = c; termstate = SEEN_CSI; } else switch (ANSI(c,esc_query)) { case ANSI_QUE('h'): case ANSI_QUE('l'):if( c != '%' ) /* * This OSC stuff is EVIL. It takes just one character to get into * sysline mode and it's not initially obvious how to get out. * So I've added CR and LF as string aborts. * This shouldn't effect compatibility as I believe embedded * control characters are supposed to be interpreted (maybe?) * and they don't display anything useful anyway. * * -- RDB */ if (c == '\n' || c == '\r') { termstate = TOPLEVEL; } else if (c == 0234 || c == '\007' Revision-number: 403 Prop-content-length: 278 Content-length: 278 K 7 svn:log V 177 Robert de Bath's patch: be a little more careful of main and alternate screens when resizing the window. Should avoid lines of alternate screen showing up in scrollback buffer. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:10:10.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7113ee4a4f2567cdf6a8ea01533c6c1c Text-content-length: 241 Text-content-md5: a8d735ca42c7c010ff22c124daad8b12 Content-length: 281 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN偄&偅丳狾3廰8佺$nt save_alt_which = alt_which; if (newrows == rows && newcols == cols && newsavelines == savelines) return; /* nothing to do */ deselect(); swap_screen(0);swap_screen(save_alt_which); Revision-number: 404 Prop-content-length: 184 Content-length: 184 K 7 svn:log V 84 Robert de Bath's patch: a few more character translations for OEM line drawing mode K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:11:02.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ae11562f9f0503ccd00f43f4bf859df7 Text-content-length: 128 Text-content-md5: d509ddffad89c50bc5a3c8d3027d2af6 Content-length: 168 K 15 cvs2svn:cvs-rev V 4 1.34 PROPS-END SVN傮U傮a f侒&fU侓\x04\xB1****\xF8\xF1**\xD9\xBF\xDA\xC0\xC5" "\xC4\xC4\xC4\xC4\xC4\xC3\xB4\xC1\xC2\xB3\xF3\xF2\xE3 Revision-number: 405 Prop-content-length: 230 Content-length: 230 K 7 svn:log V 129 Robert de Bath's patch: be much more careful about font heights and widths, including underline mode and OEM/ANSI size mismatch. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:15:24.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d509ddffad89c50bc5a3c8d3027d2af6 Text-content-length: 2970 Text-content-md5: 2406e2ffac8f69105a4ead29ea934d74 Content-length: 3010 K 15 cvs2svn:cvs-rev V 4 1.35 PROPS-END SVN傮a傸B4朮鎧e6=4寈鮊4&乷.凚侙K; int fsize[5]; HDC hdc; int fw_dontcare, fw_bold; int firstchar = ' '; font_messup: hdc = GetDC(hwnd); font_height = cfg.fontheight; font_width = 0; #define f(i,c,w,u) \ fonts[i] = CreateFont (font_height, font_width if (cfg.vtmode != VT_OEMONLY) { f(FONT_NORMAL, cfg.fontcharset, fw_dontcare, FALSE); SelectObject (hdc, fonts[FONT_NORMAL]); GetTextMetrics(hdc, &tm); font_height = tm.tmHeight; font_width = tm.tmAveCharWidth; f(FONT_UNDERLINE, cfg.fontcharset, fw_dontcare, TRUE); if (bold_mode == BOLD_FONT) { f(FONT_BOLD, cfg.fontcharset, fw_bold, FALSE); f(FONT_BOLDUND, cfg.fontcharset, fw_bold, TRUE); } if (cfg.vtmode == VT_OEMANSI) { f(FONT_OEM, OEM_CHARSET, fw_dontcare, FALSE); f(FONT_OEMUND, OEM_CHARSET, fw_dontcare, TRUE); if (bold_mode == BOLD_FONT) { f(FONT_OEMBOLD, OEM_CHARSET, fw_bold, FALSE); f(FONT_OEMBOLDUND, OEM_CHARSET, fw_bold, TRUE); } } } else { f(FONT_OEM, cfg.fontcharset, fw_dontcare, FALSE); SelectObject (hdc, fonts[FONT_OEM]); GetTextMetrics(hdc, &tm); font_height = tm.tmHeight; font_width = tm.tmAveCharWidth; f(FONT_OEMUND, cfg.fontcharset, fw_dontcare, TRUE); if (bold_mode == BOLD_FONT) { f(FONT_BOLD, cfg.fontcharset, fw_bold, FALSE); f(FONT_BOLDUND, cfg.fontcharset, fw_bold, TRUE); } } #undef f descent = tm.tmAscent + 1; if (descent >= font_height) descent = font_height - 1; firstchar = tm.tmFirstChar; if( cfg.vtmode == VT_XWINDOWS && firstchar >= ' ' ) cfg.vtmode = VT_POORMAN; for (i=0; i<8; i++) { if (fonts[i]) { SelectObject (hdc, fonts[i]); GetTextMetrics(hdc, &tm); fsize[i] = tm.tmAveCharWidth + 256 * tm.tmHeight; } } ReleaseDC (hwnd, hdc); if (fsize[FONT_UNDERLINE] != fsize[FONT_NORMAL] || (bold_mode == BOLD_FONT && fsize[FONT_BOLDUND] != fsize #if 0 MessageBox(NULL, "Disabling underline font", "Font Size Mismatch", MB_ICONINFORMATION | MB_OK); #endif } if (bold_mode == BOLD_FONT && fsize[FONT_BOLD] != fsize #if 0 MessageBox(NULL, "Disabling bold font", "Font Size Mismatch", MB_ICONINFORMATION | MB_OK); #endif } if (cfg.vtmode == VT_OEMANSI && fsize[FONT_OEM] != fsize[FONT_NORMAL] ) { if( cfg.fontcharset == OEM_CHARSET ) { cfg.vtmode = VT_OEMONLY; } else if( firstchar < ' ' ) { MessageBox(NULL, "The OEM and ANSI versions of this font are\n" "different sizes. Using XTerm mode instead", "Font Size Mismatch", MB_ICONINFORMATION | MB_OK); cfg.vtmode = VT_XWINDOWS; } else { MessageBox(NULL, "The OEM and ANSI versions of this font are\n" "different sizes. Using ISO8859-1 mode instead", "Font Size Mismatch", MB_ICONINFORMATION | MB_OK); cfg.vtmode = VT_POORMAN; } for (i=0; i<8; i++) if (fonts[i]) DeleteObject (fonts[i]); goto font_messup Revision-number: 406 Prop-content-length: 375 Content-length: 375 K 7 svn:log V 274 Robert de Bath's patch: ARG_DEFAULT is now zero because it's apparently defined behaviour for _all_ CSI-type sequences that ESC[Q should be equivalent to ESC[0Q. Which is a pain in the wossname and not a sane way to do it, but if the standards say it then I suppose ... :-( K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:16:55.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a8d735ca42c7c010ff22c124daad8b12 Text-content-length: 25 Text-content-md5: 2cc648d965f6974c6bc9b33e0d780dc3 Content-length: 65 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN偅偅 倳p0 Revision-number: 407 Prop-content-length: 302 Content-length: 302 K 7 svn:log V 201 Robert de Bath's patch: when the user presses CR, the Telnet backend now sends NVT `NL' (CR,LF) instead of NVT `CR' (CR,NUL). Unix telnetd apparently cares not a jot for the difference, but others do. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-11T14:25:35.000000Z PROPS-END Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cb46622b96e19bd37266ede7fcebd317 Text-content-length: 704 Text-content-md5: fad3dc060a3795dd0b6284df4ef42a7d Content-length: 744 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN仭k仸L`怓[乚亹Y3亽8if( cfg.ldisc_term ) { struct Opt **o; for (o = opts; *o; o++) if ((*o)->state == REQUESTED) (*o)->state = INACTIVE; } else static unsigned char nl[2] = { CR, LF }; if (s == INVALID_SOCKET) return; p = buf; if (cfg.ldisc_term) { while (p < buf+len) { char *q = p; unsigned char * cstr = 0; while (p < buf+len) { if ((unsigned char)*p == IAC) { cstr = iac; break; } if (*p == '\r') { if( p+1 >= buf+len || ( p[1] != '\n' && p[1] != '\0')) { cstr = cr; break; } } p++; } if (p!=q) s_write (q, p-q); if (cstr) s_write (cstr,2), p++; } } elsenl Revision-number: 408 Prop-content-length: 128 Content-length: 128 K 7 svn:log V 28 Shift-Tab now sends ESC [ Z K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-13T14:45:32.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2406e2ffac8f69105a4ead29ea934d74 Text-content-length: 239 Text-content-md5: ac2d436f925dddae21c82382f26edd77 Content-length: 279 K 15 cvs2svn:cvs-rev V 4 1.36 PROPS-END SVN傸B傼+丼偢d丼胻偢NShift-Tab should send ESC [ Z. */ if (ret && (keystate[VK_SHIFT] & 0x80) && wParam == '\t') { *p++ = 0x1B; /* ESC */ *p++ = '['; *p++ = 'Z'; return p - output; Revision-number: 409 Prop-content-length: 169 Content-length: 169 K 7 svn:log V 69 Let's spell '\t' as VK_TAB in that last patch, in fact, just in case K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-13T15:04:07.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ac2d436f925dddae21c82382f26edd77 Text-content-length: 31 Text-content-md5: 2b1fce697d5ecf64213a7a7e207b8d31 Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.37 PROPS-END SVN傼+傼- 偣C膁偣GVK_TAB Revision-number: 410 Prop-content-length: 408 Content-length: 408 K 7 svn:log V 307 First stab at the ability to compile puttytel.exe, an SSH-free variant which is patent-safe in the US and legal in France and Russia. This is a horrible hack in some ways: it's shown up serious deficiencies in the module boundaries. Needs further work, probably once the SSH implementations are recombined. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-15T15:08:48.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7ebca2c1d1d83ac2d99d016067875f68 Text-content-length: 2129 Text-content-md5: 8c039bd2194d5b6b0596ef26ccdc4104 Content-length: 2169 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN5*(N2乗 !塐匨K俧梋 乭( puttytel GOBJS1 = window.$(OBJ) windlg.$(OBJ) terminal.$(OBJ) telnet.$(OBJ) raw.$(OBJ) GOBJS2 = xlat.$(OBJ) ldisc.$(OBJ) sizetip.$(OBJ) ##-- objects putty POBJS = ssh.$(OBJ) be_all.$(OBJ) ##-- objects puttytel TOBJS = be_nossh.$(OBJ) ##-- objects pscp SOBJS = scp.$(OBJ) windlg.$(OBJ) scpssh.$(OBJ) be_none.$(OBJ) ##-- objects putty puttytel pscp MOBJS = misc.$(OBJ) version.$(OBJ) ##-- objects putty pscp OBJS12 = sshsha.$(OBJ) sshblowf.$(OBJ) noise.$(OBJ) ##-- resources putty PRESRC = win_res.$(RES) ##-- resources puttytel TRESRC = nossh_res.$(RES) ##-- resources pscp SRESRC = scp.$(RES) ##-- ##-- gui-apps # putty # puttyteluttytel.exe pscp.exe putty.exe: $(GOBJS1) $(GOBJS2) $(POBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(PRESRC) putty.rsp link /debug -out:putty.exe @putty.rsp puttytel.exe: $(GOBJS1) $(GOBJS2) $(TOBJS) $(MOBJS) $(PRESRC) puttytel.rsp link /debug -out:puttytel.exe @puttytel.rsp pscp.exe: $(SOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(SRESRC) pscp.rsp link /debug -out:pscp.exe @pscp.rsp putty.rsp: makefile echo /nologo /subsystem:windows > putty.rsp echo $(GOBJS1) >> putty.rsp echo $(GOBJS2) >> putty.rsp echo $(POBJS) >> putty.rsp echo $(MOBJS) >> putty.rsp echo $(OBJS1) >> putty.rsp echo $(OBJS2) >> putty.rsp echo $(PRESRC) >> putty.rsp echo $(LIBS1) >> putty.rsp echo $(LIBS2) >> putty.rsp puttytel.rsp: makefile echo /nologo /subsystem:windows > puttytel.rsp echo $(GOBJS1) >> puttytel.rsp echo $(GOBJS2) >> puttytel.rsp echo $(TOBJS) >> puttytel.rsp echo $(MOBJS) >> puttytel.rsp echo $(TRESRC) >> puttytel.rsp echo $(LIBS1) >> puttytel.rsp echo $(LIBS2) >> puttytel.rsp pscp.rsp: makefile echo /nologo /subsystem:console > pscp.rsp echo $(SOBJS) >> pscp.rsp echo $(MOBJS) >> pscp.rsp echo $(OBJS1) >> pscp.rsp echo $(OBJS2) >> pscp.rsp echo $(SRESRC) >> pscp.rsp echo $(LIBS1) >> pscp.rsp echo $(LIBS2) >> pbe_all.$(OBJ): be_all.c be_nossh.$(OBJ): be_nossh.c be_none.$(OBJ): be_nonenossh_res.$(RES): nossh_res.rc win_res.h putty.ico ##-- nossh_res.$(RES): rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 nossh Node-path: putty/be_all.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 255 Text-content-md5: 966c57698ec7ef2d38f468b5d79d2288 Content-length: 371 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN侭2丅BD咲 婩F岾Y匨k慔9丒'H::侹8廌丩F乹U丼塂丩働丼/* * Linking module for PuTTY proper: list the available backendsincludssh. */ #e stdio"putty.h" struct_[] = { {PROT_SSH, "ssh", &ssh_},TELNET, "telnetRAW, "rawraw0, NULL} }; Node-path: putty/be_none.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 270 Text-content-md5: baa0956335f552ce87e08fbd42cba366 Content-length: 386 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN 乲BD糄綤/匨丄慔0丒H1/* * Linking module for PSCP: list no available backends. This isonly present to satisfy linker requirements. I should reallyuntangle the whole lot a bit better. */ #include stdio"putty.h" struct_[] = { {0, NULL} }; Node-path: putty/be_nossh.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 369 Text-content-md5: c6bc2ee9a9f9fc950576f7ba78c6a7bf Content-length: 485 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN/D"BD咲 婩F岾Y匨k慔5丒#H6丩丟6侹8塂丷働乗岶淔3楧4FS朌俬咶俫汧/* * Linking module for PuTTYtel: list the available backends notincludssh. */ #e stdio"putty.h" struct_[] = { {PROT_TELNET, "telnet", &_},RAW, "rawraw0, NULL} }; Stub implementations of funcnot used in non-ssh versvoid random_save_seed() { } noise_ultralight(DWORD data Node-path: putty/nossh_res.rc Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 100 Text-content-md5: 02d089ca2a8c5635aeb3096266f3354c Content-length: 216 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVNYYY/* Stub rc file for the PuTTYtel ssh-free binary */ #define NO_SSH #include "win_res.rc" Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b36d6e96ec8955fc88f872ac834d577b Text-content-length: 137 Text-content-md5: 814498d76abc5bee155a5cf3b22ed02a Content-length: 177 K 15 cvs2svn:cvs-rev V 4 1.28 PROPS-END SVN5ma攕GLOBAL struct backend_list { int protocol; char *name; Backend *backend; } backends[]char *keystr Node-path: putty/scpssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2959b938e2111741c86d12e278ed73ad Text-content-length: 388 Text-content-md5: 9b3c763ff75f306238bb6b7e38b4267a Content-length: 427 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN闿 俵癳俵筄/* * Verify the host key. */ { /* * First format the key into a string. */ int len = rsastr_len(&hostkey); char *keystr = malloc(len); if (!keystr) fatalbox("Out of memory"); rsastr_fmt(keystr, &hostkey); verify_ssh_host_key(savedhost, keystr); free(keystr); } Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 79383ee645e808c6401998dd2aebc005 Text-content-length: 390 Text-content-md5: 15737c892680290d9f069bb523da2b06 Content-length: 430 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN伆}伋@ 俵菺俵 萷/* * Verify the host key. */ { /* * First format the key into a string. */ int len = rsastr_len(&hostkey); char *keystr = malloc(len); if (!keystr) fatalbox("Out of memory"); rsastr_fmt(keystr, &hostkey); verify_ssh_host_key(savedhost, keystr); free(keystr); } Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 985f7c12d83346f355a04e539f031d60 Text-content-length: 39 Text-content-md5: 81c1606b8ca3035c8a79c77c71959405 Content-length: 79 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN5轐B拁蕓9#ifndef NO_SSH Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2f113cf325e152029b24ecb55d95de7a Text-content-length: 653 Text-content-md5: a9aa1a4b0123cdae7aa8c41b98def332 Content-length: 693 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN傌n傌2刡%乸* 倲Z砢i'偸G p = "raw"; for (i = 0; backends[i].backend != NULL; i++) if (backends[i].protocol == cfg.protocol) { p = backends[i].name; break; } wpps (sesskey, "Protocol", p gpps (sesskey, "Protocol", "default", prot, 10); cfg.protocol = default_protocol; for (i = 0; backends[i].backend != NULL; i++) if (!strcmp(prot, backends[i].name)) { cfg.protocol = backends[i].protocol; break; }char *keystr) { char *otherstr, *mungedhost; int len; HKEY rkey; len = 1 + strlen(keystr Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2b1fce697d5ecf64213a7a7e207b8d31 Text-content-length: 617 Text-content-md5: 0402de65fee2593dfa142d3d16783f7b Content-length: 657 K 15 cvs2svn:cvs-rev V 4 1.38 PROPS-END SVN傼-儌 凬凬傏2/* * Select protocol. This is farmed out into a table in a * separate file to enable an ssh-free variant. */ { int i; back = NULL; for (i = 0; backends[i].backend != NULL; i++) if (backends[i].protocol == cfg.protocol) { back = backends[i].backend; break; } if (back == NULL) { MessageBox(NULL, "Unsupported protocol number found", "PuTTY Internal Error", MB_OK | MB_ICONEXCLAMATION); WSACleanup(); return 1; } } Revision-number: 411 Prop-content-length: 117 Content-length: 117 K 7 svn:log V 17 More cvs ignores K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-16T10:43:30.000000Z PROPS-END Node-path: putty Node-kind: dir Node-action: change Prop-delta: true Prop-content-length: 105 Content-length: 105 K 10 svn:ignore V 73 *.pdb *.ilk *.res *.RES *.pch *.rsp *.obj *.exe Makefile.bor Makefile.cyg PROPS-END Node-path: putty/.cvsignore Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 91d2c7f274245107dac3e76f09767869 Text-content-length: 85 Text-content-md5: 4d47ac536c682d87d0df551b59b2bfa7 Content-length: 124 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN$JJJ*.pdb *.ilk *.res *.RES *.pch *.rsp *.obj *.exe Makefile.bor Makefile.cyg Revision-number: 412 Prop-content-length: 145 Content-length: 145 K 7 svn:log V 45 Fix a couple of Makefile dependencies - oops K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-16T10:45:48.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8c039bd2194d5b6b0596ef26ccdc4104 Text-content-length: 27 Text-content-md5: e1a3e5593228b8f864a438cd94e93c6e Content-length: 67 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN5廈(廋俇燻T Revision-number: 413 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:02.343597Z PROPS-END Revision-number: 414 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:02.353954Z PROPS-END Revision-number: 415 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 PuTTY website URL spelling change K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-16T14:56:26.000000Z PROPS-END Node-path: putty/README Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 36efa246bcc08f383eedbe8ba68e053f Text-content-length: 22 Text-content-md5: 16875ccfb314f1fbaa57c67925e3c403 Content-length: 61 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN;7 ) ./ Revision-number: 416 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 61 RDB patch: disable incremental linking and disable debugging K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:30:21.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e1a3e5593228b8f864a438cd94e93c6e Text-content-length: 228 Text-content-md5: 88ca3a0b5c442475777a91abcc236eb4 Content-length: 268 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN<哘!哖m巔i廲抧怰# LFLAGS = /debug # Use MSVC DLL # CFLAGS = /nologo /W3 /YX /O2 /Yd /D_WINDOWS /DDEBUG /ML /Fd # Disable debug and incremental linking LFLAGS = /incremental:no$(LFLAGS)$(LFLAGS)$(LFLAGS) Revision-number: 417 Prop-content-length: 225 Content-length: 225 K 7 svn:log V 124 RDB's patch: ^U sends Telnet Erase Line; line ending is now \r or \r\n depending on protocol, so local ldisc works with ssh K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:31:14.000000Z PROPS-END Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7d9a36168ec580f09451c18f5d48b0c2 Text-content-length: 149 Text-content-md5: 55265948a373533716ec11e7053678fe Content-length: 188 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN瀩焗y搑匩搇c/橬back->special (TS_EL);if (cfg.protocol == PROT_RAW) back->send("\r\n", 2); else back->send("\r", 1 Revision-number: 418 Prop-content-length: 439 Content-length: 439 K 7 svn:log V 338 RDB's patch: - use WM_TIMER for various things (blinking cursor; updates while moving/sizing; coping with overloading influx of netevents) - clip text output to avoid underlines outside character cell - even more careful font selection (we can now do OEMANSI by default) - a few extra keyboard mappings from the VTxxx terminals K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:34:41.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0402de65fee2593dfa142d3d16783f7b Text-content-length: 7892 Text-content-md5: 49c943a50dc160705a8941ef75915117 Content-length: 7932 K 15 cvs2svn:cvs-rev V 4 1.39 PROPS-END SVN儌儸X籆乫嘕丟?塡9!;;豊丟2婾40!乀:唘亐]唊亪/扷亸 丅仮l侤伹侒x侕s侖j俙侚3卪俁侟O侹侴個@$:倓;? 倗l0倛l丠\倞9俇緂倠p.偸OV偺yV偺yV偺yi偹|f偺iY偺x偺gXUSER + 1) #define WM_IGNORE_CLIP (WM_XUSER + 2int); static int extra_width, extra_height; static int pending_netevent = 0; static WPARAM pend_netevent_wParam = 0; static LPARAM pend_netevent_lParam = 0; static void enact_pending_netevent(void)0{ int timer_id = 0, long_timer = 0; while (GetMessage (&msg, NULL, 0, 0) == 1) { /* Sometimes DispatchMessage calls routines that use their own * GetMessage loop, setup this timer so we get some control back. * * Also call term_update() from the timer so that if the host * is sending data flat out we still do redraws. */ if(timer_id && long_timer) { KillTimer(hwnd, timer_id); long_timer = timer_id = 0; } if(!timer_id) timer_id = SetTimer(hwnd, 1, 20, NULL); DispatchMessage (&msg); /* This is too fast, but I'll leave it for now 'cause it shows * how often term_update is called (far too often at times!) */ term_blink(0); /* If there's nothing new in the queue then we can do everything * we've delayed, reading the socket, writing, and repainting * the window. */ if (!PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { if (pending_netevent) { enact_pending_netevent(); term_blink(1); } } else continue; if (!PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { if (timer_id) { KillTimer(hwnd, timer_id); timer_id = 0; } if (inbuf_reap != inbuf_head) term_out(); term_update(); timer_id = SetTimer(hwnd, 1, 500, NULL); long_timer = 1; } }Actually do the job requested by a WM_NETEVENT */ static void enact_pending_netevent(void) { int i; pending_netevent = FALSE; i = back->msg (pend_netevent_wParam, pend_netevent_lParam); if (i < 0) { char buf[1024]; switch (WSABASEERR + (-i) % 10000) { case WSAECONNRESET: sprintf(buf, "Connection reset by peer"); break; default: sprintf(buf, "Unexpected network error %d", -i); break; } MessageBox(hwnd, buf, "PuTTY Fatal Error", MB_ICONERROR | MB_OK); PostQuitMessage(1); } else if (i == 0) { if (cfg.close_on_exit) PostQuitMessage(0); else { session_closed = TRUE; MessageBox(hwnd, "Connection closed by remote host", "PuTTY", MB_OK | MB_ICONINFORMATION); SetWindowText (hwnd, "PuTTY (inactive)"); } }/ static void init_fonts(int pick_width) { TEXTMETRIC tm; int i; int fsize[8]; HDC hdc; int fw_dontcare, fw_bold; int firstchar = ' '; #ifdef CHECKOEMFONT font_messup: #endifpick_widthfor (i=0; i<8; i++) { if (fonts[i]) { if (SelectObject (hdc, fonts[i]) && GetTextMetrics(hdc, &tm) ) fsize[i] = tm.tmAveCharWidth + 256 * tm.tmHeight; else fsize[i] = -i; } else fsize[i] = -i; } ReleaseDC (hwnd, hdc); /* ... This is wrong in OEM only mode */ } #ifdef CHECKOEMFONT /* With the facist font painting it doesn't matter if the linedraw font * isn't exactly the right size anymore so we don't have to check this. */#endif } void request_resize (int w, int h, int refont) { int width, height; #ifdef CHECKOEMFONT /* Don't do this in OEMANSI, you may get disable messages */ if (refont && w != cols && (cols==80 || cols==132) && cfg.vtmode != VT_OEMANSI) #else if (refont && w != cols && (cols==80 || cols==132)) #endif { /* If font width too big for screen should we shrink the font more ? */ if (w==132) font_width = ((font_width*cols+w/2)/w); else font_width = 0; { int i; for (i=0; i<8; i++) if (fonts[i]) DeleteObject(fonts[i]); } bold_mode = cfg.bold_colour ? BOLD_COLOURS : BOLD_FONT; und_mode = UND_FONT; init_fonts(font_width); } width = extra_width + font_width * w; TIMER: if (pending_netevent) enact_pending_netevent(); if (inbuf_reap != inbuf_head) term_out(); term_update(); return 0;0); sfree(logpal); /* Telnet will change local echo -> remote if the remote asks */ if (cfg.protocol != PROT_TELNET) ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple/* Notice we can get multiple netevents, FD_READ, FD_WRITE etc * but the only one that's likely to try to overload us is FD_READ. * This means buffering just one is fine. */ if (pending_netevent) enact_pending_netevent(); pending_netevent = TRUE; pend_netevent_wParam=wParam; pend_netevent_lParam=lParam;int lattr = 0; /* Will be arg later for line attribute type */ COLORREF fg, bg, t; int nfg, nbg, nfont; HDC hdc = ctx; RECT line_box; int force_manual_underline = 0; static int *IpDx = 0, IpDxLEN = 0;; if (len>IpDxLEN || IpDx[0] != font_width*(1+!lattr)) { int i; if (len>IpDxLEN) { sfree(IpDx); IpDx = smalloc((len+16)*sizeof(int)); IpDxLEN = (len+16); } for(i=0; i= '\x60' && text[i] <= '\x7E') text[i] = oemmap[(unsigned char)text[i] - 0x60]; break; }!fonts[nfont]) { if (nfont&FONT_UNDERLINE) force_manual_underline = 1; /* Don't do the same for manual bold, it could be bad news. */ nfont &= ~(FONT_BOLD|FONT_UNDERLINE); }if (bold_mode == BOLD_COLOURS && (attr & ATTR_BLINK)) nbline_box.left = x; line_box.top = y; line_box.right = x+font_width*len; line_box.bottom = y+font_height; ExtTextOut (hdc, x, y, ETO_CLIPPED|ETO_OPAQUE, &line_box, text, len, IpDx /* GRR: This draws the character outside it's box and can leave * 'droppings' even with the clip box! I suppose I could loop it * one character at a time ... yuk. */ ExtTextOut (hdc, x-1, y, ETO_CLIPPED, &line_box, text, len, IpDx); } if (force_manual_underline || (und_mode == UND_LINE && (attr & ATTR_UNDER) * In addition a real VT100 maps Ctrl-3/4/5/7 and 83') { *p++ = 0x1B'4') { *p++ = 0x1C'5') { *p++ = 0x1D'7''8') { *p++ = 0x7 Revision-number: 419 Prop-content-length: 184 Content-length: 184 K 7 svn:log V 84 RDB's patch: thanks to improvements in OEMANSI font mode, it can now be the default K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:35:09.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a9aa1a4b0123cdae7aa8c41b98def332 Text-content-length: 31 Text-content-md5: 1240c2116086226e07214844305a7487 Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN傌2傌2 艶倯e芃OEMANSI Revision-number: 420 Prop-content-length: 530 Content-length: 530 K 7 svn:log V 429 RDB's patch: - `local ldisc' config option now switches between PuTTY's original behaviour when off (aggressively start negotiations, never use local line discipline) and Unix telnet's off-port-25 behaviour when on (wait to be negotiated with, toggle local line discipline when TELOPT_ECHO changes) - SYNCH handling has been improved again, though it may still be broken due to WinSock being irretrievably pants K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:37:35.000000Z PROPS-END Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fad3dc060a3795dd0b6284df4ef42a7d Text-content-length: 1358 Text-content-md5: 5dc5b693f1d85f0fae34f5d8d4b3bdbb Content-length: 1398 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN仸L仱3B墌&狧乻 8僈俷辮H/酳]鰈亗A僩僘亷D仌;static int in_synch; && cfg.ldisc_term) ldisc = &ldisc_simple; && cfg.ldisc_term) ldisc = &ldisc_term; if (!in_synch) c_write (b, 1); #if 1 /* I can't get the F***ing winsock to insert the urgent IAC * into the right position! Even with SO_OOBINLINE it gives * it to recv too soon. And of course the DM byte (that * arrives in the same packet!) appears several K later!! * * Oh well, we do get the DM in the right place so I'll * just stop hiding on the next 0xf2 and hope for the best. */ else if (c == DM) in_synch = 0; #endifif (c == DM) { in_synch = 0; telnet_state = TOPLEVEL; } { BOOL b = TRUE; setsockopt (s, SOL_SOCKET, SO_OOBINLINE, (void *)&b, sizeof(b)); } /* * Set up SYNCH state. */ in_synch = FALSE;{ int clear_of_oob = 1; if (ioctlsocket (s, SIOCATMARK, &clear_of_oob) < 0 ) return -20000-WSAGetLastError(); in_synch = !clear_of_oob; do { ret = recv(s, buf, sizeof(buf), 0); if (ret < 0 && WSAGetLastError() == WSAEWOULDBLOCK) return 1; if (ret < 0) /* any _other_ error */ return -10000-WSAGetLastError(); if (ret == 0) { s = INVALID_SOCKET; return 0; } do_telnet_read (buf, ret); } while (in_synch); } Revision-number: 421 Prop-content-length: 347 Content-length: 347 K 7 svn:log V 246 RDB's patch. Oodles of new terminal functionality, including ATTR_BLINK (as bold background) and VT52 support. Plus a compatibility tracking system whereby all escape sequences can be disabled for a pure-VT102 compatibility mode or other levels. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:39:05.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 814498d76abc5bee155a5cf3b22ed02a Text-content-length: 370 Text-content-md5: 55fe85d98c26900f12ad8b10b3436f32 Content-length: 410 K 15 cvs2svn:cvs-rev V 4 1.29 PROPS-END SVN綰侷$/=廱+峇瓸BLINK 0x000008/* * I've just looked in the windows standard headr files for WM_USER, there * are hundreds of flags defined using the form WM_USER+123 so I've * renumbered this NETEVENT value and the two in window.c */ #define WM_XUSER (WM_USER + 0x2000) #define WM_NETEVENT (WM_XUSER + 5void term_blink(int set_cursor Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2cc648d965f6974c6bc9b33e0d780dc3 Text-content-length: 14931 Text-content-md5: 3ca733901b116f52dc62d564079d4c7b Content-length: 14971 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN偅傷r僞餱R噒!P儃唎5奻両怗|;億峟╳榓秅a-俻3-噉謌J傽轔#鈖a侻鎡o'阾:0<噖鞦#鯩<q亯t丟鷌乚(刔>則亜0乷亯"侴L亴;傾o:1亼%^亽d乣亾@c仌仏 哯仐^Oc仦bO仧oT仦qZJ仦{J仱}仹6仸%伂"$伃E\p伄fx伅TC伆G亊伌|*伕C]伜e唗丵伝]俙 伨E俙匱伬oT伷@L伻|T<伾E 丣佀v噖>佂m佅#梒佇#$V亾u'凜佽Z丯塏來O僒刲侘丣侟#define CL_ANSIMIN 0x0001 /* Everybody has these even MSDOS */ #define CL_VT100 0x0002 /* VT100 */ #define CL_VT100AVO 0x0004 /* VT100 +AVO; 132x24 (not 132x14) & attrs */ #define CL_VT102 0x0008 /* VT102 */ #define CL_VT220 0x0010 /* VT220 */ #define CL_VT320 0x0020 /* VT320 */ #define CL_VT420 0x0040 /* VT420 */ #define CL_VT510 0x0080 /* VT510, NB VT510 includes ANSI */ #define CL_VT340TEXT 0x0100 /* VT340 extensions that appear in the VT420 */ #define CL_ANSI 0x1000 /* ANSI ECMA-48 not in the VT100..VT420 */ #define CL_OTHER 0x2000 /* Others, Xterm, linux, putty, dunno, etc */ #define TM_ANSIMIN (CL_ANSIMIN) #define TM_VT100 (CL_ANSIMIN+CL_VT100) #define TM_VT100AVO (TM_VT100+CL_VT100AVO) #define TM_VT102 (TM_VT100AVO+CL_VT102) #define TM_PUTTY (-1) #define compatibility(x) \ if ( ((CL_##x)&compatibility_level) == 0 ) { \ termstate=TOPLEVEL; \ break; \ } #define has_compat(x) ( ((CL_##x)&compatibility_level) != 0 ) static int compatibility_level = TM_PUTTY; static unsigned long erase_char = ERASE_CHARstatic int cursor_on; /* cursor enabled flag */ static int reset_132; /* Flag ESC c resets to 80 cols */ static int use_bce; /* Use Background coloured erase */ static int blinker; /* When blinking is the cursor on ? */ static int vt52_mode; /* Is VT100+ in vt52 mode ?, VT52_ESC, VT52_Y1, VT52_Y2cursor_on = 1use_bce = 0; erase_char = ERASE_CHARerase_charerase_charerase_char if (use_bce) erase_char = (' ' |(curr_attr&(ATTR_FGMASK|ATTR_BGMASK)))+1; check_selection (startpos, endpos); /* Clear screen also forces a full window redraw, just in case. */ if (startpos == scrtop && endpos == scrtop + rows * (cols+1)) term_invalidate(); while (startpos < endpos) *startpos++ = erase_charerase_char; } else { memmove (cpos+n, cpos, m*TSIZE); while (n--) cpos[n] = erase_char2: /* VT52 mode */ vt52_mode = !, 1); reset_132 = state; break; case 5: /* reverse video */ rvideo = state; seen_disp_event = TRUE; if (state) term_update()25: /* enable/disable cursor */ compatibility(VT220); cursor_on = state; seen_disp_event = TRUE; break; case 47: /* alternate screen */ compatibility(OTHER);compatibility(VT102); insert = state; break; case 12: /* set echo mode */ /* * This may be very good in smcup and rmcup (or smkx & rmkx) if you * have a long RTT and the telnet client/daemon doesn't understand * linemode. * * DONT send TS_RECHO/TS_LECHO; the telnet daemon tries to fix the * tty and _really_ confuses some programs. */ compatibility(VT220); ldisc = (state? &ldisc_simple : &ldisc_term)/* Note only VT220+ are 8-bit VT102 is seven bit, it shouldn't even * be able to display 8-bit characters, but I'll let that go 'cause * of i18n. */ if( (c&0x60) == 0 && termstate < DO_CTRLS && ( (c&0x80) == 0 || has_compat(VT220))) { switch (c) { case '\005': /* terminal type query */ /* Strictly speaking this is VT100 but a VT100 defaults to * no response. Other terminals respond at their option. * * Don't put a CR in the default string as this tends to * upset some weird software. * * An xterm returns "xterm" (5 characters) */ compatibility(OTHER); ldisc->send ("PuTTY", 5 compatibility(VT100); cset = 1; break; case '\017': compatibility(VT100); cset = 0; break; case '\033': if (vt52_mode) termstate = VT52_ESC; else { compatibility(ANSIMIN); termstate = SEEN_ESC; } break; case 0233: compatibility(VT220);0235: compatibility(VT220); compatibility(VT100); } if (insert) insch (1); if (selstate != NO_SELECTION) check_selection (cpos, cpos+1); switch (cset_attr[cset]) { /* Linedraw characters are different from 'ESC ( B' only * for a small range, for ones outside that range make sure * we use the same font as well as the same encoding. */ case ATTR_LINEDRW: if (c<0x60 || c>0x7F) *cpos++ = xlat_tty2scr((unsigned char)c) | curr_attr | ATTR_ASCII; else *cpos++ = ((unsigned char)c) | curr_attr | ATTR_LINEDRW; break; default: *cpos++ = xlat_tty2scr((unsigned char)c) | curr_attr | (c <= 0x7F ? cset_attr[cset] : ATTR_ASCII); break; } compatibility(VT220);/* Compatibility is nasty here, xterm, linux, decterm yuk! */ compatibility(OTHER); termstate = SEEN_OSC; esc_args[0] = 0; break; case '(': /* should set GL */ compatibility(VT100); termstate = SET_GL; break; case ')': /* should set GR */ compatibility(VT100); compatibility(VT100); save_cursor (TRUE); break; case '8': /* restore cursor */ compatibility(VT100); save_cursor (FALSE); seen_disp_event = TRUE; break; case '=': compatibility(VT100); app_keypad_keys = TRUE; break; case '>': compatibility(VT100); app_keypad_keys = FALSE; break; case 'D': /* exactly equivalent to LF */ compatibility(VT100);fix_cpos; wrapnext = FALSE; seen_disp_event = TRUE; break; case 'E': /* exactly equivalent to CR-LF */ compatibility(VT100); compatibility(VT100); compatibility(VT100); compatibility(VT100); power_on(); if (reset_132) { request_resize (80, rows, 1); reset_132 = 0; } compatibility(VT100); termstate = SEEN_ESCHASH; break; case 'H': /* set a tab */ compatibility(VT100);e': /* move down N lines */ compatibility(ANSI); case 'B':a': /* move right N cols */ compatibility(ANSI); case 'C': compatibility(ANSI); move (0F': /* move up N lines and CR */ compatibility(ANSI); move (0, curs_y -G': case '`': /* set horizontal posn */ compatibility(ANSI); compatibility(ANSI); move (curs_x, compatibility(VT102); compatibility(VT102);/* XXX VTTEST says this is vt220, vt510 manual says vt102 */ compatibility(VT102); compatibility(VT102); compatibility(VT100); /* This is the response for a VT102/* Wonder of wonders ANSI.SYS has this!! */ char buf[32]; sprintf (buf, "\033[%d;%dR", curs_y + 1, curs_x + 1); ldisc->send (buf, strlen(buf)); } else if (esc_args[0] == 5) { /* Are we working ... well I suppose so :-) */ /* But ANSI.SYS doesn't say it's working :-) :-) */ compatibility(VT100); ldisc->send ("\033[0n", 4); } break; case 'h': /* toggle modes to high */ case ANSI_QUE('h'): compatibility(VT100); { int i; for (i=0; i=24)) { request_resize (cols, def(esc_args[0], 24), 0); deselect(); } break; case ANSI('|', '*'): /* VT420 sequence DECSNLS * Set number of lines on screen * VT420 uses VGA like hardware and can support any size in * reasonable range (24..49 AIUI) with no default specified. */ compatibility(VT420); if (esc_nargs==1 && esc_args[0]>=24) { request_resize (cols, def(esc_args[0], cfg.height), 0); deselect(); } break; case ANSI('|', '$'): /* VT340/VT420 sequence DECSCPP * Set number of columns per page * Docs imply range is only 80 or 132, but I'll allow any. */ compatibility(VT340TEXT); if (esc_nargs<=1) { request_resize (cols, def(esc_args[0], cfg.width), 0); deselect(); }/* XXX VTTEST says this is vt220, vt510 manual says vt100 */ compatibility(VT100);erase_char; seen_disp_event = TRUE; } break; case 'x': /* report terminal characteristics */ compatibility(VT100); case ANSI('L','='): compatibility(OTHER); use_bce = (esc_args[0]<=0); erase_char = ERASE_CHAR; if (use_bce) erase_char = (' '|(curr_attr&(ATTR_FGMASK|ATTR_BGMASK))); break; case ANSI('p','"'): /* Allow the host to make this emulator a 'perfect' VT102. * This first appeared in the VT220, but we do need to get * back to PuTTY mode so I won't check it. * * The arg == 60 is a PuTTY extension. * The 2nd arg, 8bit vs 7bit is not obeyed. * * Setting VT102 mode should also change the Fkeys to * generate PF* codes as a real VT102 has no Fkeys. * The VT220 does this, F11..F13 become ESC,BS,LF other Fkeys * send nothing. * * Note ESC c will NOT change this! */ if (esc_args[0] == 61) compatibility_level = TM_VT102; else if (esc_args[0] == 60) compatibility_level = TM_ANSIMIN; else compatibility_level = TM_PUTTY; break; } break; case SET_GL: case SET_GR: /* VT100 only here, checked above */case 'B':!has_compat(VT220) || case VT52_ESC: termstate = TOPLEVEL; seen_disp_event = TRUE; switch (c) { case 'A': move (curs_x, curs_y - 1, 1); break; case 'B': move (curs_x, curs_y + 1, 1); break; case 'C': move (curs_x + 1, curs_y, 1); break; case 'D': move (curs_x - 1, curs_y, 1); break; case 'F': cset_attr[cset=0] = ATTR_LINEDRW; break; case 'G': cset_attr[cset=0] = ATTR_ASCII; break; case 'H': move (0, 0, 0); break; case 'I': if (curs_y == 0) scroll (0, rows-1break; case 'J': erase_lots(FALSE, FALSE, TRUE); disptop = scrtop; break; case 'K': erase_lots(TRUE, FALSE, TRUE); break; case 'V': /* XXX Print cursor line */ break; case 'W': /* XXX Start controller mode */ break; case 'X': /* XXX Stop controller mode */ break; case 'Y': termstate = VT52_Y1; break; case 'Z': ldisc->send ("\033/Z", 3); break; case '=': app_cursor_keys = TRUE; break; case '>': app_cursor_keys = FALSE; break; case '<': /* XXX This should switch to VT100 mode not current or default * VT mode. But this will only have effect in a VT220+ * emulation. */ vt52_mode = FALSE; break; case '^': /* XXX Enter auto print mode */ break; case '_': /* XXX Exit auto print mode */ break; case ']': /* XXX Print screen */ break; } break; case VT52_Y1: termstate = VT52_Y2; move(curs_x, c-' ', 0); break; case VT52_Y2: termstate = TOPLEVEL; move(c-' ', curs_y, 0); break; } if (selstate != NO_SELECTION) check_selection (cpos, cpos+1); }if (cursor_on) { if (has_focus) { if (blinker) cursor = ATTR_ACTCURS; else cursor = 0; } else cursor = ATTR_PASCURS; } else cursor = 0Flick the switch that says if blinking things should be shown or hidden. */ void term_blink(int flg) { static long last_blink = 0; long now, blink_diff; if (flg) { blinker = 1; last_blink = GetTickCount(); return; } now = GetTickCount(); blink_diff = now-last_blink; /* Make sure the cursor blinks no more than 2Hz */ if (blink_diff>=0 && blink_diff<450) return; last_blink = now; blinker = !blinker;/* This should happen soon enough, also for some reason it sometimes * fails to actually do anything when re-sizing ... painting the wrong * window perhaps ? do_paint (ctx, FALSE); */ Revision-number: 422 Prop-content-length: 160 Content-length: 160 K 7 svn:log V 60 Spelling fix to RDB's comments: fascist is spelled thus :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:40:36.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 49c943a50dc160705a8941ef75915117 Text-content-length: 27 Text-content-md5: cce79bf0a72141e2f0c04ecf56c69f36 Content-length: 67 K 15 cvs2svn:cvs-rev V 4 1.40 PROPS-END SVN儸X儸Y 亷f倽r亷fs Revision-number: 423 Prop-content-length: 201 Content-length: 201 K 7 svn:log V 100 Patch to RDB's blinking cursor: make it configurable and by default off. It's terribly distracting. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T10:46:59.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 55fe85d98c26900f12ad8b10b3436f32 Text-content-length: 34 Text-content-md5: bc09a3c57a3de2cdbf1613d6c65cf6a8 Content-length: 74 K 15 cvs2svn:cvs-rev V 4 1.30 PROPS-END SVN綰緃 瀠焒瀘int blink_cur Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3ca733901b116f52dc62d564079d4c7b Text-content-length: 109 Text-content-md5: 20af9a59c4e8902a09a1530259f3f095 Content-length: 149 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN傷r傸# S偫S6偫< || !cfg.blink_cur) cursor = ATTR_ACTCURS; else Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 37a9f78f5b5bcd79fe27bd11d182c1e7 Text-content-length: 49 Text-content-md5: fbb30648927a5e43f4a177c70f683d3b Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN; ,巗+#define IDC1_BLINKCUR 1020 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 81c1606b8ca3035c8a79c77c71959405 Text-content-length: 87 Text-content-md5: 27fa15ded1d5d24ce2617c2c95b6b1c6 Content-length: 127 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN轐 AA< AUTOCHECKBOX "&Blinking cursor", IDC1_BLINKCUR, 3, 14 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 1240c2116086226e07214844305a7487 Text-content-length: 224 Text-content-md5: 6918fc95c07030c2b56b13a66eb84fba Content-length: 264 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN傌2傏~%- 燬爎..仒X\仧h伌V仯\BlinkCur", cfg.blink_curBlinkCur", 0, &cfg.blink_curCheckDlgButton (hwnd, IDC1_BLINKCUR, cfg.blink_cur case IDC1_BLINKCURblink_cur = IsDlgButtonChecked (hwnd, IDC1_BLINKCUR Revision-number: 424 Prop-content-length: 130 Content-length: 130 K 7 svn:log V 30 Oops - move homepage location K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-17T11:23:33.000000Z PROPS-END Node-path: putty/MODULE Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1c7e9eb29fd5c576df5809a22f24083f Text-content-length: 78 Text-content-md5: 45a4d6e340db266505ea95ca46bc8e4f Content-length: 117 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN侼侳>/ Release: http://www.chiark.greenend.org.uk/~sgtatham/putty/ Revision-number: 425 Prop-content-length: 450 Content-length: 450 K 7 svn:log V 349 Peter Schellenbach's patch: re-implement the PuTTY cryptographic functions as calls to the MS Crypto API. Not integrated into the Makefile yet, but should eventually allow building of an SSH-enabled PuTTY which contains no native crypto code, so it can be used everywhere (and anyone who can get the MS encryption pack can still use the SSH parts). K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-24T09:45:49.000000Z PROPS-END Node-path: putty/mscrypto.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 4720 Text-content-md5: 8ac044e607ab27c18e1977dac885e7fa Content-length: 4836 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN-7嶥濳匭-僋-圡-RF僁丗'嘍f匞乂D-橤 碋乧慏乭凞,H怐乚両狣侱丒僀丳僆侻僆G:丒僅侱僀侱僀丩僅N僅H:ES僊丏僀侱僀侱僀侶!侲凜丏僀侲処E凚丒刣丒刣侱僀侶!丒丒僅丒刯丒凚丗E刯丒侼僲侲E丒匧丒傿丒刣丒刯侶!丗僠E僅丗E凬丒僠丒傿丒凬侷 E億丒僋侲E傿F 丒刯丒凥侷卶E匧丒:F9F匥丒僋F丒侶!丒僋丒億丗F:E:F哘丒僅両 丒:L嘔丒丒刕丗匧FJ凾E:丗僙FE匧丒僠丒凚丒匧侶!丒凥F匭F噠GE刯丒傿丒僋侷刄E丒僠丗剕F僙F唞E刕丒傿両 丒刕F丒億丗刯F圥K億侶!侲唘E傿L咾F5F丒塏両 丗.K(丒凥F坵丒億F侼僲F丗刕F咶E丗匵F凥丠!丒凥丒匧丒凬刜"U H:f @o-@乆丗E:丒凬侶2丒塏丒億丒刣丗僅E億F4丒両塂G卌F刾E:FF匭丒刕丗嶦I(丒:F!F1丗刯H哛D H:H*F塮FF刾@乀孧@丳+丏丼D1亁 朌;d搑E揧z D.凟e孎9僂乧怞乥奃倁侱乚慐(怐攎慐昁奅昋u攓D5D晊N'D昈I昅岴婩攡侳婫5E扚d嶥,E晊塅=|朣kF?K桸圙~G擽凩攋圗>慐昋D榼丏咷 G攓H亁塃乧奜/丗'M0嘑=F=D-I乧侳橜咺L 侳榳J F檚D楶@A峫揺@BD榦丒咲H攎N丂丗榳凟乧僃M)塈丗H塃朿匞7G朣丒歀EG團侲6丒榥咹攎丏圖,丮%凪_漑孏;丏2F滸刞E6E)匜;侱揻侴;E滸乯濴凢潁|匜烜咲2gD.卄潂@C歅坬揺@CE凞漿咲.G匥攎F淏丒2凪)咵.E嘍N渃E昤凞漞E乧匘僁I楶塛6丗'Q'婮)K濱H攗D丏3J侲僇朌^D奡9匫?宆7F嘔9G淐E匨1婫"D乭LG9GKGG橣EKFJ@L欻宭揹@F汱凷G7嶨O丂D丯僁攎S%凟GD榩J㎜侱H欻5F 侱﹜F檚O榶丗 侽丮宂〆G丟(H5丮丱侱侽猈DD團E僁EH嘕侴O IU丳3K%I狫Ii猉OyIE玪乴玃圖=丏侷圛HH僂侴咺狫G匘甤H丒侱4團俬F侶&G%凞玕GE!僂侱&岻玴G朣凣丟G%侴%V╠J滻R▁侱丱H-K㏑P5僂E皛侳獽K乶咶獽咲旹奊8咲-匲癹僃獽G侴F僁﹕JTK凥凟G滿F獽D眤侴K丏漞O丠$処砡O丟GED楯EE丏眤E紌E碅XH%侴$S;E+婦痎E5嘖8L糧G$FH絃E7F朣丒糃咵嶮禜丠絃旼絃K禬E-咲E眤G1D2FDE圗D╙D?K:H玵Q橝GG!僁籾L縧F礔侲?E塇6HG癥K痺凥瞂ED L僄欿HD僄 侱綷U$I癭F侱︰E8嘍6丒嘑繶HG縧D侱 GD罞H籇塂檙僊丏P秌D昍T:両罯G侲橾X羐J檤GE 僃>@B歈僉$処']揻@H塛FH h膁`K0乂臲I聓Ll`?@s芵M1@K>@m薵V蘒O蘬Q蘾UR$s HK乶J僇P眓凢蠷D稟婫E4僄瞃JK瞡D丒繲凲紺嶧E侷;D膃D稺E痆僁丠絃G筫K孒'D觩J丏#僋'侻緈^[R篅Z丷J誖I#G朣丣籈D)T F%T觭Q籬J瞣\:E罳僗:J誖M糿G篈j謊G篈G僛 凪訴M9侱K謖侷眐僇.咾稟E豜U稴D豜S穘D豜P僃蠷侴覰侱籾H篳K:DPO筣L(x箌DI篈Em譖丩襬G JX D-KNE橫KG質G朣K#E #define _WIN32NT 0x0400 #include stdiolibwincrypt"ssh.h" void fatalbox(char *fmt, ...); static HCRYPTKEY create_des_key(unsigned key PROV hCProv;hDESKey[2][3] = {{0,0,0},}; /* global for now */ /* use Microsoft Enhanced ographic Service iderCSP MS_ENHANCED_ BYTE PrivateKeyWithExponentOfOne[] = { 7,20A4553413BEFFAC67D8DE630992D47682D71C31443A4F75DE4C356D787A4E321712FCE5B0D08CB884B9BB5D6EFE167C872459AD384D0, 6AB1A01932CC13}-* * Utility functionsint o_startup() if(AcquireContext(&, "Putty",, _RSA_FULL, _NEWKEYSET) == 0 if(GetLastError(NTE_EXISTS return FALSEfailed to a c - probably don't have high eion installed!} } elseTRUE; } wrapnt i, j;for(i=0; i<2; i++jj<3; ji][j]) DestroyKey; = 0; ) Releas0)Random numberr_byte(bif(!Gen1, &b)) "generatorure!"badd_nois *,length/ nothing}initget_savedata**lenheavy(*) )lighultraDWORD _seedMD5 hashMD5Istruct *ctxCHashCALG_M&ctx->h durBegin!\nMD5Update,const *buf,D, lenSessionKeyFinaldigest[16], cb = 16ParamHP_HASHVAL,bSA public kemakeRSAKey *resultstr*p =w,get size (bits) of modulus->4 (<< 8) + *p++ew (w(w+7)/8;-> converttob=allocatefor& copy i= m(bmemcpy, p, u crs point ( = p atst, second time(p -+sasaKeyinRsaKeyPUBLICTRUC *pBloRSAPUB*pRPKbuflebufblobif((of() + )ULLOutemoryessageblock +1(buffrom hos*) hange big endianlittl[i[-i-1]->bTypBLOBVerx02reservedaiKeyAlg =KEYXRPK*)(RPK->magic31415352"RSA1"bitleitspubeximporintoainI++keypy =s, theE&ng * For somereason,scypherin backwards ()order, so reverse it! i < (- i - 1]ree; sastr_len2 * + 1fmtst0,sprintf+"%04x",+=str[len++'/'12[i\0'DES/ dedes3_sessj < + (j * 8_blkblk0][0]1211ssh_ci3d0, h = 8HEADER *pbhuf[I256]Need special ptoo wn, since onlys beed)0, 8256builpb*)pbhSIMPLEDES*(*) Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: bc09a3c57a3de2cdbf1613d6c65cf6a8 Text-content-length: 119 Text-content-md5: 319a5804d24b2b566383c1eb12ac9f0f Content-length: 159 K 15 cvs2svn:cvs-rev V 4 1.31 PROPS-END SVN緃縌 a%a僈Exports from mscrypto.c */ #ifdef MSCRYPTOAPI int crypto_startup(); void crypto_wrapup(); #endif Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 73303c479f38722443008e93ad1d1f6a Text-content-length: 70 Text-content-md5: 70bf1c61bfac3054186368e35265563a Content-length: 110 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN亽U亾 .亼}Y亼|#ifdef MSCRYPTOAPI crypto_wrapup(); #endif Node-path: putty/scp.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4172bda57980f7f72b768c4948851ea6 Text-content-length: 122 Text-content-md5: 31f3ef3a098332f095625b75ecb38c0b Content-length: 161 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN倈僥i倈i/* * Exports from mscrypto.c */ #ifdef MSCRYPTOAPI int crypto_startup(); void crypto_wrapup(); #endif Node-path: putty/scpssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9b3c763ff75f306238bb6b7e38b4267a Text-content-length: 649 Text-content-md5: dc5f234a38fe937c9846e266ceb94395 Content-length: 688 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN & 刔%&両d"h#ifdef MSCRYPTOAPI /* allocate enough buffer space for extra block * for MS CryptEncrypt() */ pktin.data = (pktin.data == NULL) ? smalloc(biglen+8) : srealloc(pktin.data, biglen+8); #else pktin.data = (pktin.data == NULL) ? smalloc(biglen) : srealloc(pktin.data, biglen); #endif#ifdef MSCRYPTOAPI /* Allocate enough buffer space for extra block * for MS CryptEncrypt() */ pktout.data = (pktout.data == NULL ? malloc(biglen+8) : realloc(pktout.data, biglen+8)); #else#endif#ifdef MSCRYPTOAPI if(crypto_startup() == 0) return "Microsoft high encryption pack not installed!" Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 15737c892680290d9f069bb523da2b06 Text-content-length: 666 Text-content-md5: 8e67ba1314e02498b240e239c451363f Content-length: 706 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN伋@伔]!刱欯1丣d+闿j亶b#ifdef MSCRYPTOAPI /* Allocate enough buffer space for extra block * for MS CryptEncrypt() */ pktin.data = (pktin.data == NULL ? malloc(biglen+8) : realloc(pktin.data, biglen+8)); #else pktin.data = (pktin.data == NULL ? malloc(biglen) : realloc(pktin.data, biglen)); #endif#ifdef MSCRYPTOAPI /* Allocate enough buffer space for extra block * for MS CryptEncrypt() */ pktout.data = (pktout.data == NULL ? malloc(biglen+8) : realloc(pktout.data, biglen+8)); #else#endif #ifdef MSCRYPTOAPI if(crypto_startup() == 0) return "Microsoft high encryption pack not installed!" Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1cc6fc431222d4a1d6c6bda3a3d9aaf3 Text-content-length: 358 Text-content-md5: 68c46e08543ee9a8a43ba1fe738ad07d Content-length: 397 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN(奌侭1~倂乄y倉Kb團#ifdef MSCRYPTOAPI unsigned long exponent; unsigned char *modulus; #else void *modulus; void *exponent; #endif#ifdef MSCRYPTOAPI unsigned long hHash; #else uint32 buf[4]; uint32 bits[2]; unsigned char in[64]; #endif#ifndef MSCRYPTOAPI void SHATransform(word32 *digest, word32 *data); #endif Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cce79bf0a72141e2f0c04ecf56c69f36 Text-content-length: 98 Text-content-md5: 8f94bf64afc33a2bf2b0c1057e3f5ba2 Content-length: 138 K 15 cvs2svn:cvs-rev V 4 1.41 PROPS-END SVN儸Y儹 I醳I偸K { random_save_seed(); #ifdef MSCRYPTOAPI crypto_wrapup(); #endif } Revision-number: 426 Prop-content-length: 317 Content-length: 317 K 7 svn:log V 216 Rather silly byte-string / word-string transformations in RSA key handling were failing when the key had an odd number of bytes. A server with an 850-bit key was suffering connection failures as a result. Now fixed. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-24T11:46:39.000000Z PROPS-END Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2719ed3b67a112650edc1472d8636a1f Text-content-length: 378 Text-content-md5: 3d9ba38ff01ac8ed934e2bb514a77c47 Content-length: 417 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN7俈w剎ttk媀筧b; i-- ;) { unsigned char byte = *p++; if (i & 1) bn[j][1+i/2] |= byte<<8; else bn[j][1+i/2] |= bytekey->bytes; i-- ;) { unsigned char byte = *p++; if (i & 1) b1[1+i/2] |= byte<<8; else b1[1+i/2] |= bytekey->bytes; i-- ;) { unsigned char b; if (i & 1) b = b2[1+i/2] >> 8; else b = b2[1+i/2] & 0xFF Revision-number: 427 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:02.944202Z PROPS-END Revision-number: 428 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:02.952444Z PROPS-END Revision-number: 429 Prop-content-length: 133 Content-length: 133 K 7 svn:log V 33 Yet another accelerator clash... K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-29T13:15:00.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 27fa15ded1d5d24ce2617c2c95b6b1c6 Text-content-length: 26 Text-content-md5: 6c8b066aa1da2a24a571b460077fd7ec Content-length: 66 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN ╮ ╳Colu& Revision-number: 430 Prop-content-length: 131 Content-length: 131 K 7 svn:log V 31 oops - keys[] should be static K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-31T13:19:19.000000Z PROPS-END Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d5ba8c09435e5bfcfc26141ac3331a72 Text-content-length: 32 Text-content-md5: 19a36719af89d601af74c8600d045dd6 Content-length: 71 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN佨(佨/ 佉P塜佉Pstatic Revision-number: 431 Prop-content-length: 202 Content-length: 202 K 7 svn:log V 101 Tidy up Blowfish S- and P-boxes: make them static and const, and clean up the declarations a bit :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-03-31T13:33:37.000000Z PROPS-END Node-path: putty/sshblowf.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9cd91f5a4dc8b33abf1bc1398331f271 Text-content-length: 13512 Text-content-md5: dc8b7147c65bbc568c793514e4289514 Content-length: 13551 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN亷亾T*`剋7*4: hex digits of the fractional part of pi. * (ie pi as a hex fraction is 3.243F6A8885A308D3...) */ static const word32 parray[] = { 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344, 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89, 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C, 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917, 0x9216D5D9, 0x8979FB1B, }; static const word32 sbox0[] = { 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7, 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99, 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16, 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E, 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE, 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013, 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF, 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E, 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60, 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440, 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE, 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A, 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E, 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677, 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193, 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032, 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88, 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239, 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E, 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0, 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3, 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98, 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88, 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE, 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6, 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D, 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B, 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7, 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA, 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463, 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F, 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09, 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3, 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB, 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279, 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8, 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB, 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82, 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB, 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573, 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0, 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B, 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790, 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8, 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4, 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0, 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7, 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C, 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD, 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1, 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299, 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9, 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477, 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF, 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49, 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF, 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA, 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5, 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41, 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915, 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400, 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915, 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664, 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A, }; static const word32 sbox1[] = { 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623, 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266, 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1, 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E, 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6, 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1, 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E, 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1, 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737, 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8, 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF, 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD, 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701, 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7, 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41, 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331, 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF, 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF, 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E, 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87, 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C, 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2, 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16, 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD, 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B, 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509, 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E, 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3, 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F, 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A, 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4, 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960, 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66, 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28, 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802, 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84, 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510, 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF, 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14, 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E, 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50, 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7, 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8, 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281, 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99, 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696, 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128, 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73, 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0, 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0, 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105, 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250, 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3, 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285, 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00, 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061, 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB, 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E, 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735, 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC, 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9, 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340, 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20, 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7, }; static const word32 sbox2[] = { 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934, 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068, 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF, 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840, 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45, 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504, 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A, 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB, 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE, 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6, 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42, 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B, 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2, 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB, 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527, 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B, 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33, 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C, 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3, 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC, 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17, 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564, 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B, 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115, 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922, 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728, 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0, 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E, 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37, 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D, 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804, 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B, 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3, 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB, 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D, 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C, 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350, 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9, 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A, 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE, 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D, 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC, 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F, 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61, 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2, 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9, 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2, 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C, 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E, 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633, 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10, 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169, 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52, 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027, 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5, 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62, 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634, 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76, 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24, 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC, 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4, 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C, 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837, 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0, }; static const word32 sbox3[] = { 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B, 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE, 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B, 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4, 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8, 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6, 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304, 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22, 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4, 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6, 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9, 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59, 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593, 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51, 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28, 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C, 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B, 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28, 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C, 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD, 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A, 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319, 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB, 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F, 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991, 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32, 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680, 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166, 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE, 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB, 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5, 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47, 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370, 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D, 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84, 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048, 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8, 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD, 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9, 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7, 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38, 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F, 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C, 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525, 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1, 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442, 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964, 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E, 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8, 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D, 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F, 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299, 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02, 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC, 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614, 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A, 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6, 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B, 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0, 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060, 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E, 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9, 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F, 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6, Revision-number: 432 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.085543Z PROPS-END Revision-number: 433 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.092650Z PROPS-END Revision-number: 434 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.099879Z PROPS-END Revision-number: 435 Prop-content-length: 231 Content-length: 231 K 7 svn:log V 130 Add the -ls option to execute `ls -la' on a directory instead of trying to copy anything. Likely to be useful for GUI front ends. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-03T19:54:31.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 70bf1c61bfac3054186368e35265563a Text-content-length: 1077 Text-content-md5: 8071179a392acbf01d47e6d3e34976d4 Content-length: 1117 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN亾仠2N嘫莟乴>+乶>僰-丱乶>乢- 圥亗 刅亰[z亸俀Y亽+aaaaaWe will issue a list command to get a remote directory. */ static void get_dir_list(int argc, char *argv[]) { char *src, *host, *user; char *cmd, *p, *q; char c; src = argv[0]; /* Sepaa4*strlen(src) + 100); strcpy(cmd, "ls -la '"); p = cmd + strlen(cmd); for (q = src; *q; q++) { if (*q == '\'') { *p++ = '\''; *p++ = '\\'; *p++ = '\''; *p++ = '\''; } else { *p++ = *q; } } *p++ = '\''; *p = '\0'; do_cmd(host, user, cmd); sfree(cmd); while (ssh_recv(&c, 1) > 0) fputc(c, stdout); /* thank heavens for buffered I/O */ int list = 0ls") == 0) list = 1list) { if (argc != 1) usage(); get_dir_list(argc, argv); } else { if (argc < 2) usage(); if (argc > 2) targetshouldbedirectory = 1; if (colon(argv[argc-1]) != NULL) toremote(argc, argv); else tolocal(argc, argv); } if (connection_open) { char ch; ssh_send_eof(); ssh_recv(&ch, 1); } Revision-number: 436 Prop-content-length: 127 Content-length: 127 K 7 svn:log V 27 Add -ls to online help bit K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-04T14:40:44.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8071179a392acbf01d47e6d3e34976d4 Text-content-length: 68 Text-content-md5: 0d0a579185932b910eadd0d9671a3e6d Content-length: 108 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN仠2仠o +亸O寀亸= scp [options] -ls user@host:filespec Revision-number: 437 Prop-content-length: 144 Content-length: 144 K 7 svn:log V 44 Replace MD5 implementation with my own code K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-04T14:47:22.000000Z PROPS-END Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 68c46e08543ee9a8a43ba1fe738ad07d Text-content-length: 246 Text-content-md5: 5f8178e44322d193d65967cb61a77f30 Content-length: 285 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN奌! 乛乛2typedef struct { uint32 h[4]; } MD5_Core_State; struct MD5Context { #ifdef MSCRYPTOAPI unsigned long hHash; #else MD5_Core_State core; unsigned char block[BLKSIZE]; int blkused; uint32 lenhi, lenlo Node-path: putty/sshmd5.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d47275d160983e0412e047b6b22981d3 Text-content-length: 6730 Text-content-md5: 0bfe8d8570214631e801bf4db1417d96 Content-length: 6769 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN繸;;;#include "ssh.h" /* * MD5 implementation for PuTTY. Written directly from the spec by * Simon Tatham. */ /* ---------------------------------------------------------------------- * Core MD5 algorithm: processes 16-word blocks into a message digest. */ #define F(x,y,z) ( ((x) & (y)) | ((~(x)) & (z)) ) #define G(x,y,z) ( ((x) & (z)) | ((~(z)) & (y)) ) #define H(x,y,z) ( (x) ^ (y) ^ (z) ) #define I(x,y,z) ( (y) ^ ( (x) | ~(z) ) ) #define rol(x,y) ( ((x) << (y)) | (((uint32)x) >> (32-y)) ) #define subround(f,w,x,y,z,k,s,ti) \ w = x + rol(w + f(x,y,z) + block[k] + ti, s) typedef struct { uint32 h[4]; } MD5_Core_State; void MD5_Core_Init(MD5_Core_State *s) { s->h[0] = 0x67452301; s->h[1] = 0xefcdab89; s->h[2] = 0x98badcfe; s->h[3] = 0x10325476; } void MD5_Block(MD5_Core_State *s, uint32 *block) { uint32 a,b,c,d; a = s->h[0]; b = s->h[1]; c = s->h[2]; d = s->h[3]; subround(F, a, b, c, d, 0, 7, 0xd76aa478); subround(F, d, a, b, c, 1, 12, 0xe8c7b756); subround(F, c, d, a, b, 2, 17, 0x242070db); subround(F, b, c, d, a, 3, 22, 0xc1bdceee); subround(F, a, b, c, d, 4, 7, 0xf57c0faf); subround(F, d, a, b, c, 5, 12, 0x4787c62a); subround(F, c, d, a, b, 6, 17, 0xa8304613); subround(F, b, c, d, a, 7, 22, 0xfd469501); subround(F, a, b, c, d, 8, 7, 0x698098d8); subround(F, d, a, b, c, 9, 12, 0x8b44f7af); subround(F, c, d, a, b, 10, 17, 0xffff5bb1); subround(F, b, c, d, a, 11, 22, 0x895cd7be); subround(F, a, b, c, d, 12, 7, 0x6b901122); subround(F, d, a, b, c, 13, 12, 0xfd987193); subround(F, c, d, a, b, 14, 17, 0xa679438e); subround(F, b, c, d, a, 15, 22, 0x49b40821); subround(G, a, b, c, d, 1, 5, 0xf61e2562); subround(G, d, a, b, c, 6, 9, 0xc040b340); subround(G, c, d, a, b, 11, 14, 0x265e5a51); subround(G, b, c, d, a, 0, 20, 0xe9b6c7aa); subround(G, a, b, c, d, 5, 5, 0xd62f105d); subround(G, d, a, b, c, 10, 9, 0x02441453); subround(G, c, d, a, b, 15, 14, 0xd8a1e681); subround(G, b, c, d, a, 4, 20, 0xe7d3fbc8); subround(G, a, b, c, d, 9, 5, 0x21e1cde6); subround(G, d, a, b, c, 14, 9, 0xc33707d6); subround(G, c, d, a, b, 3, 14, 0xf4d50d87); subround(G, b, c, d, a, 8, 20, 0x455a14ed); subround(G, a, b, c, d, 13, 5, 0xa9e3e905); subround(G, d, a, b, c, 2, 9, 0xfcefa3f8); subround(G, c, d, a, b, 7, 14, 0x676f02d9); subround(G, b, c, d, a, 12, 20, 0x8d2a4c8a); subround(H, a, b, c, d, 5, 4, 0xfffa3942); subround(H, d, a, b, c, 8, 11, 0x8771f681); subround(H, c, d, a, b, 11, 16, 0x6d9d6122); subround(H, b, c, d, a, 14, 23, 0xfde5380c); subround(H, a, b, c, d, 1, 4, 0xa4beea44); subround(H, d, a, b, c, 4, 11, 0x4bdecfa9); subround(H, c, d, a, b, 7, 16, 0xf6bb4b60); subround(H, b, c, d, a, 10, 23, 0xbebfbc70); subround(H, a, b, c, d, 13, 4, 0x289b7ec6); subround(H, d, a, b, c, 0, 11, 0xeaa127fa); subround(H, c, d, a, b, 3, 16, 0xd4ef3085); subround(H, b, c, d, a, 6, 23, 0x04881d05); subround(H, a, b, c, d, 9, 4, 0xd9d4d039); subround(H, d, a, b, c, 12, 11, 0xe6db99e5); subround(H, c, d, a, b, 15, 16, 0x1fa27cf8); subround(H, b, c, d, a, 2, 23, 0xc4ac5665); subround(I, a, b, c, d, 0, 6, 0xf4292244); subround(I, d, a, b, c, 7, 10, 0x432aff97); subround(I, c, d, a, b, 14, 15, 0xab9423a7); subround(I, b, c, d, a, 5, 21, 0xfc93a039); subround(I, a, b, c, d, 12, 6, 0x655b59c3); subround(I, d, a, b, c, 3, 10, 0x8f0ccc92); subround(I, c, d, a, b, 10, 15, 0xffeff47d); subround(I, b, c, d, a, 1, 21, 0x85845dd1); subround(I, a, b, c, d, 8, 6, 0x6fa87e4f); subround(I, d, a, b, c, 15, 10, 0xfe2ce6e0); subround(I, c, d, a, b, 6, 15, 0xa3014314); subround(I, b, c, d, a, 13, 21, 0x4e0811a1); subround(I, a, b, c, d, 4, 6, 0xf7537e82); subround(I, d, a, b, c, 11, 10, 0xbd3af235); subround(I, c, d, a, b, 2, 15, 0x2ad7d2bb); subround(I, b, c, d, a, 9, 21, 0xeb86d391); s->h[0] += a; s->h[1] += b; s->h[2] += c; s->h[3] += d; } /* ---------------------------------------------------------------------- * Outer MD5 algorithm: take an arbitrary length byte string, * convert it into 16-word blocks with the prescribed padding at * the end, and pass those blocks to the core MD5 algorithm. */ #define BLKSIZE 64 void MD5Init(struct MD5Context *s) { MD5_Core_Init(&s->core); s->blkused = 0; s->lenhi = s->lenlo = 0; } void MD5Update(struct MD5Context *s, unsigned char const *p, unsigned len) { unsigned char *q = (unsigned char *)p; uint32 wordblock[16]; uint32 lenw = len; int i; /* * Update the length field. */ s->lenlo += lenw; s->lenhi += (s->lenlo < lenw); if (s->blkused+len < BLKSIZE) { /* * Trivial case: just add to the block. */ memcpy(s->block + s->blkused, q, len); s->blkused += len; } else { /* * We must complete and process at least one block. */ while (s->blkused + len >= BLKSIZE) { memcpy(s->block + s->blkused, q, BLKSIZE - s->blkused); q += BLKSIZE - s->blkused; len -= BLKSIZE - s->blkused; /* Now process the block. Gather bytes little-endian into words */ for (i = 0; i < 16; i++) { wordblock[i] = ( ((uint32)s->block[i*4+3]) << 24 ) | ( ((uint32)s->block[i*4+2]) << 16 ) | ( ((uint32)s->block[i*4+1]) << 8 ) | ( ((uint32)s->block[i*4+0]) << 0 ); } MD5_Block(&s->core, wordblock); s->blkused = 0; } memcpy(s->block, q, len); s->blkused = len; } } void MD5Final(unsigned char output[16], struct MD5Context *s) { int i; int pad; unsigned char c[64]; uint32 lenhi, lenlo; if (s->blkused >= 56) pad = 56 + 64 - s->blkused; else pad = 56 - s->blkused; lenhi = (s->lenhi << 3) | (s->lenlo >> (32-3)); lenlo = (s->lenlo << 3); memset(c, 0, pad); c[0] = 0x80; MD5_Bytes(s, &c, pad); c[7] = (lenhi >> 24) & 0xFF; c[6] = (lenhi >> 16) & 0xFF; c[5] = (lenhi >> 8) & 0xFF; c[4] = (lenhi >> 0) & 0xFF; c[3] = (lenlo >> 24) & 0xFF; c[2] = (lenlo >> 16) & 0xFF; c[1] = (lenlo >> 8) & 0xFF; c[0] = (lenlo >> 0) & 0xFF; MD5_Bytes(s, &c, 8); for (i = 0; i < 4; i++) { output[4*i+3] = (s->core.h[i] >> 24) & 0xFF; output[4*i+2] = (s->core.h[i] >> 16) & 0xFF; output[4*i+1] = (s->core.h[i] >> 8) & 0xFF; output[4*i+0] = (s->core.h[i] >> 0) & 0xFF; } } Revision-number: 438 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 49 Oops - now let's get that MD5 change _right_ :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-04T14:51:17.000000Z PROPS-END Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 5f8178e44322d193d65967cb61a77f30 Text-content-length: 23 Text-content-md5: 2bf4cc7847cedad3604faa7b4ca42a8d Content-length: 62 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN! =刔咲64 Node-path: putty/sshmd5.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 0bfe8d8570214631e801bf4db1417d96 Text-content-length: 66 Text-content-md5: 9ffec13db42df7d1e04690daca7e91dc Content-length: 105 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN; 凮╝!環9unsignedUpdate(s, Update(s, Revision-number: 439 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.403392Z PROPS-END Revision-number: 440 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.411937Z PROPS-END Revision-number: 441 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.419989Z PROPS-END Revision-number: 442 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.427911Z PROPS-END Revision-number: 443 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.435966Z PROPS-END Revision-number: 444 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.443846Z PROPS-END Revision-number: 445 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.452180Z PROPS-END Revision-number: 446 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.460108Z PROPS-END Revision-number: 447 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.468352Z PROPS-END Revision-number: 448 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.476554Z PROPS-END Revision-number: 449 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.483396Z PROPS-END Revision-number: 450 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.491950Z PROPS-END Revision-number: 451 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.498512Z PROPS-END Revision-number: 452 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.505820Z PROPS-END Revision-number: 453 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.513332Z PROPS-END Revision-number: 454 Prop-content-length: 163 Content-length: 163 K 7 svn:log V 63 Enable high-half characters (>=160) in usernames and passwords K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-11T10:39:58.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8e67ba1314e02498b240e239c451363f Text-content-length: 105 Text-content-md5: b9cdb90720e358f2a5cd0f5ffce6f03c Content-length: 145 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN伔]伕L7酜耲魋((c >= ' ' && c <= '~') || (c >= 160))((c >= ' ' && c <= '~') || (c >= 160)) Revision-number: 455 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.561554Z PROPS-END Revision-number: 456 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.569484Z PROPS-END Revision-number: 457 Prop-content-length: 166 Content-length: 166 K 7 svn:log V 66 Update copyright dates in About box to match those in Licence box K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-13T12:07:37.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6c8b066aa1da2a24a571b460077fd7ec Text-content-length: 25 Text-content-md5: 5303916179fcaa5096c6f02302b91fe3 Content-length: 65 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN 賫2000 Revision-number: 458 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.719376Z PROPS-END Revision-number: 459 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.726431Z PROPS-END Revision-number: 460 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.732964Z PROPS-END Revision-number: 461 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.740426Z PROPS-END Revision-number: 462 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.747925Z PROPS-END Revision-number: 463 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.768490Z PROPS-END Revision-number: 464 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.775811Z PROPS-END Revision-number: 465 Prop-content-length: 159 Content-length: 159 K 7 svn:log V 59 Environment settings were broken. Fix due to Andros Tantas K 10 svn:author V 5 simon K 8 svn:date V 27 2000-04-26T08:07:08.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6918fc95c07030c2b56b13a66eb84fba Text-content-length: 32 Text-content-md5: cbe4e1226e7e2ea2a2ca85eab1fca2c1 Content-length: 72 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN傏~傏y偂N0 q Revision-number: 466 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.841498Z PROPS-END Revision-number: 467 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:03.848652Z PROPS-END Revision-number: 468 Prop-content-length: 182 Content-length: 182 K 7 svn:log V 82 Ahem. This time high-half characters really _do_ work in username and password... K 10 svn:author V 5 simon K 8 svn:date V 27 2000-05-09T08:56:30.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b9cdb90720e358f2a5cd0f5ffce6f03c Text-content-length: 109 Text-content-md5: 701e815d7d920830b85ca6f9881a1824 Content-length: 149 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN伕伕MP酫8酳聇 ((unsigned char) ((unsigned char) Revision-number: 469 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.176962Z PROPS-END Revision-number: 470 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.197547Z PROPS-END Revision-number: 471 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.203971Z PROPS-END Revision-number: 472 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.211154Z PROPS-END Revision-number: 473 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.217472Z PROPS-END Revision-number: 474 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.224053Z PROPS-END Revision-number: 475 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.231030Z PROPS-END Revision-number: 476 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.238604Z PROPS-END Revision-number: 477 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.246204Z PROPS-END Revision-number: 478 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.253641Z PROPS-END Revision-number: 479 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.261369Z PROPS-END Revision-number: 480 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.271156Z PROPS-END Revision-number: 481 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.279009Z PROPS-END Revision-number: 482 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.286412Z PROPS-END Revision-number: 483 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.294316Z PROPS-END Revision-number: 484 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.302645Z PROPS-END Revision-number: 485 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.309242Z PROPS-END Revision-number: 486 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.316744Z PROPS-END Revision-number: 487 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.324376Z PROPS-END Revision-number: 488 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.332774Z PROPS-END Revision-number: 489 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Security improvement: check CRC on incoming packets K 10 svn:author V 5 simon K 8 svn:date V 27 2000-05-31T10:18:24.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 701e815d7d920830b85ca6f9881a1824 Text-content-length: 354 Text-content-md5: fb9a66a9690057f1d099dfaeeac9fa27 Content-length: 394 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN伕M伝侫朖 朒仐燦 static unsigned long realcrc, gotcrcrealcrc = crc32(pktin.data, biglen-4); gotcrc = (pktin.data[biglen-4] << 24); gotcrc |= (pktin.data[biglen-3] << 16); gotcrc |= (pktin.data[biglen-2] << 8); gotcrc |= (pktin.data[biglen-1] << 0); if (gotcrc != realcrc) { fatalbox("Incorrect CRC received on packet"); } Revision-number: 490 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.506294Z PROPS-END Revision-number: 491 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.513441Z PROPS-END Revision-number: 492 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.520562Z PROPS-END Revision-number: 493 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.528210Z PROPS-END Revision-number: 494 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:04.535450Z PROPS-END Revision-number: 495 Prop-content-length: 263 Content-length: 263 K 7 svn:log V 162 Hack to work around the rootshell.com xterm DoS problem. A better fix might be possible, but it's unclear whether this is a productive strategy in the long term. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-05T16:33:58.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 20af9a59c4e8902a09a1530259f3f095 Text-content-length: 677 Text-content-md5: 510b6fd7a81623e50073db42936d9267 Content-length: 717 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN傸#儉 剋丯侸H乂倐D丼,倓wunsigned int newrows = def(esc_args[0], 24); /* Hack: prevent big-resize DoS attack. */ if (newrows > max(512, cfg.height)) newrows = max(512, cfg.height); request_resize (cols, newrowsunsigned int newrows = def(esc_args[0], cfg.height); /* Hack: prevent big-resize DoS attack. */ if (newrows > max(512, cfg.height)) newrows = max(512, cfg.height); request_resize (cols, newrowsunsigned int newcols = def(esc_args[0], cfg.width); /* Hack: prevent big-resize DoS attack. */ if (newcols > max(512, cfg.width)) newcols = max(512, cfg.width); request_resize (newcols, rows Revision-number: 496 Prop-content-length: 279 Content-length: 279 K 7 svn:log V 178 Security improvement: check that string length field in SSH_SMSG_{STDOUT,STDERR}_DATA packets is consistent with length field in packet header. (Helps prevent insertion attack.) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-06T08:57:55.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fb9a66a9690057f1d099dfaeeac9fa27 Text-content-length: 158 Text-content-md5: 9d45e2fe05c26da068563cdc09855a28 Content-length: 198 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN伝伡亯G盠亯Gif (len+4 != pktin.length) { logevent("Received data packet with bogus string length" ", ignoring"); } else Revision-number: 497 Prop-content-length: 142 Content-length: 142 K 7 svn:log V 42 "pscp" was spelled "scp" in usage message K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-06T09:51:27.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0d0a579185932b910eadd0d9671a3e6d Text-content-length: 171 Text-content-md5: 64eda7348f4a0b19eb2761eda4f22a1e Content-length: 211 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN仠o仠r亷J亸Vpscp [options] [user@]host:source target\n"); printf(" pscp [options] source [source...] [user@]host:target\n"); printf(" p Revision-number: 498 Prop-content-length: 246 Content-length: 246 K 7 svn:log V 145 Security fixes, copied from ssh.c: check string length versus packet length on incoming SSH_SMSG_*_DATA, and check CRCs on all incoming packets. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-06T10:54:41.000000Z PROPS-END Node-path: putty/scpssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: dc5f234a38fe937c9846e266ceb94395 Text-content-length: 756 Text-content-md5: d8fad965237ccc65b9f9d50170b64fb7 Content-length: 795 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN&鰋"匜悀嘠恷.穥楪5俍蠪丅! unsigned long realcrc, gotcrcrealcrc = crc32(pktin.data, biglen-4); gotcrc = (pktin.data[biglen-4] << 24); gotcrc |= (pktin.data[biglen-3] << 16); gotcrc |= (pktin.data[biglen-2] << 8); gotcrc |= (pktin.data[biglen-1] << 0); if (gotcrc != realcrc) { fatalbox("Incorrect CRC received on packet"); } if (plen+4 != pktin.length) { fprintf(stderr, "Received data packet with bogus string length" ", ignoring\n"); } else if (plen+4 != pktin.length) { fprintf(stderr, "Received data packet with bogus string length" ", ignoring\n"); } else Revision-number: 499 Prop-content-length: 245 Content-length: 245 K 7 svn:log V 144 Joris van Rantwijk knows how to cause a Borland-built PuTTY to release the console! Hooray! Let's do that then. It's the -aa option on ilink32. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-21T16:08:08.000000Z PROPS-END Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 779285c42a82b24a0d85f42e0686cb64 Text-content-length: 25 Text-content-md5: 9c02df22be0b611d694eec089062e2c6 Content-length: 64 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN.2 漥嘍漥 -aa Revision-number: 500 Prop-content-length: 153 Content-length: 153 K 7 svn:log V 53 Rename nossh_res.rc to nosshres.rc for 8.3 cleanness K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-21T16:28:18.000000Z PROPS-END Node-path: putty/nosshres.rc Node-kind: file Node-action: add Node-copyfrom-rev: 499 Node-copyfrom-path: putty/nossh_res.rc Text-copy-source-md5: 02d089ca2a8c5635aeb3096266f3354c Text-delta: true Text-delta-base-md5: 02d089ca2a8c5635aeb3096266f3354c Text-content-length: 12 Text-content-md5: 02d089ca2a8c5635aeb3096266f3354c Content-length: 12 SVNYYY Node-path: putty/nossh_res.rc Node-action: delete Revision-number: 501 Prop-content-length: 199 Content-length: 199 K 7 svn:log V 99 Remove the underscore from nossh_res.rc for 8.3 cleanness; also add MOBJS in the pscp dependencies K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-21T16:29:44.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 88ca3a0b5c442475777a91abcc236eb4 Text-content-length: 103 Text-content-md5: 067f412cdaef6410deaf6b09ecb4aa0d Content-length: 143 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVNB6 7::AK8乬Mres.$(RES): nosshres.rc win_res.rc win_res.h putty.ico ##-- nossh Revision-number: 502 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Change a `GLOBAL' to an `extern' for Borland sanity K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-22T08:41:25.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 319a5804d24b2b566383c1eb12ac9f0f Text-content-length: 27 Text-content-md5: 0cd02c4ff6e42835367733899184bb24 Content-length: 67 K 15 cvs2svn:cvs-rev V 4 1.32 PROPS-END SVN縌縌 8>extern Revision-number: 503 Prop-content-length: 144 Content-length: 144 K 7 svn:log V 44 This ought to fix the scp protocol problems K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-22T08:51:51.000000Z PROPS-END Node-path: putty/be_none.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: baa0956335f552ce87e08fbd42cba366 Text-content-length: 246 Text-content-md5: a68d50fd4f75d3bcdffa2a03d10aa471 Content-length: 285 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN 侺 乤k)[/* * Linking module for PSCP: list the available backends, but * without accompanying function suites. Used only for name * lookupsPROT_SSH, "ssh", NULL}, {PROT_TELNET, "telnet", NULL}, {PROT_RAW, "raw", NULL}, }; Revision-number: 504 Prop-content-length: 166 Content-length: 166 K 7 svn:log V 66 Joris van Rantwijk's unified SSH code suitable for PuTTY and PSCP K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-22T12:18:34.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 067f412cdaef6410deaf6b09ecb4aa0d Text-content-length: 25 Text-content-md5: 4a37b5b02a84b59a953eb004c87a6ef9 Content-length: 65 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN奿妉咰, Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 64eda7348f4a0b19eb2761eda4f22a1e Text-content-length: 754 Text-content-md5: 8517827df5aeec27e71f4a8f20d180b7 Content-length: 794 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN仠r仧N凣M1`俒n%嘽[孹孯)亂?>70瑂乑!粂凱;舃3D >覵訷:輘2,鏫墂亯p` 亾b仈nSimon Tathamstatic This function is needed to link with ssh.c, but it never gets called. */ void term_out(void) { abort(); }cp_send_eof(); ssh_scp_recv(&ch, 1); } exit(1); } static void get_password(const scpscpscpcpcpcpcpcpcpcpcp_send("", 1); while (1) { settime = 0; gottime: if (ssh_scpscpcpcpcpscpcpscpdefault_protocol = PROT_TELNET; scp_flags = SCP_FLAG; ssh_get_password = &get_password;, scp_flags |= SCP_VERBOSEcp_send_eof(); ssh_scp_recv(&ch, 1); } WSACleanup(); random_save_seed(); return (errs == 0 ? 0 : 1); } /* end */ Node-path: putty/scp.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 31f3ef3a098332f095625b75ecb38c0b Text-content-length: 484 Text-content-md5: 4ef97d2d7c8656ab3f02b154bac42c75 Content-length: 523 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN僥僓僓僓/* * scp.h * Joris van Rantwijk, Aug 1999, Jun 2000. */ #define SCP_FLAG 1 #define SCP_VERBOSE 2 #define IS_SCP ((scp_flags & SCP_FLAG) != 0) /* Exported from ssh.c */ extern int scp_flags; extern void (*ssh_get_password)(const char *prompt, char *str, int maxlen); char * ssh_scp_init(char *host, int port, char *cmd, char **realhost); int ssh_scp_recv(unsigned char *buf, int len); void ssh_scp_send(unsigned char *buf, int len); void ssh_scp_send_eof(void); Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9d45e2fe05c26da068563cdc09855a28 Text-content-length: 13532 Text-content-md5: 2603dd52287d7f8377a0e87efc23c564 Content-length: 13572 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN伡侀x4;(=媣d$-廔6侶怱_2U8峯:2 7{仈Rw仏@%仐5+仢宭6+絛乑<刴WJ9L藆4藼 亊踘亀L遳郱*鏶俁)1乵靭F:颱僐(%}1 倃亙P亞y働亰Id亷]]亼HYy仌LH仹=伜/榮]仌h\H仹=俌d伝1#include #include #include #include #include #include "putty.h" #include "ssh.h" #include "scp.h" #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #define logevent(s) { logevent(s); \ if (IS_SCP && (scp_flags & SCP_VERBOSE) != 0) \ fprintf(stderr, "%s\n", s); } #define SSH_MSG_DISCONNECT 1 #define SSH_SMSG_PUBLIC_KEY 2 #define SSH_CMSG_SESSION_KEY 3 #define SSH_CMSG_USER 4 #define SSH_CMSG_AUTH_PASSWORD 9 #define SSH_CMSG_REQUEST_PTY 10 #define SSH_CMSG_WINDOW_SIZE 11 #define SSH_CMSG_EXEC_SHELL 12 #define SSH_CMSG_EXEC_CMD 13 #define SSH_SMSG_SUCCESS 14 #define SSH_SMSG_FAILURE 15 #define SSH_CMSG_STDIN_DATA 16 #define SSH_SMSG_STDOUT_DATA 17 #define SSH_SMSG_STDERR_DATA 18 #define SSH_CMSG_EOF 19 #define SSH_SMSG_EXIT_STATUS 20 #define SSH_CMSG_EXIT_CONFIRMATION 33 #define SSH_MSG_IGNORE 32 #define SSH_MSG_DEBUG 36 #define SSH_CMSG_AUTH_TIS 39 #define SSH_SMSG_AUTH_TIS_CHALLENGE 40 #define SSH_CMSG_AUTH_TIS_RESPONSE 41 #define SSH_AUTH_TIS 5 #define GET_32BIT(cp) \ (((unsigned long)(unsigned char)(cp)[0] << 24) | \ ((unsigned long)(unsigned char)(cp)[1] << 16) | \ ((unsigned long)(unsigned char)(cp)[2] << 8) | \ ((unsigned long)(unsigned char)(cp)[3])) #define PUT_32BIT(cp, value) { \ (cp)[0] = (unsigned char)((value) >> 24); \ (cp)[1] = (unsigned char)((value) >> 16); \ (cp)[2] = (unsigned char)((value) >> 8); \ (cp)[3] = (unsigned char)(value); } enum { PKT_END, PKT_INT, PKT_CHAR, PKT_DATA, PKT_STR };#define crWaitUntil(c) do { crReturn(0); } while (!(c)) static SOCKET s = INVALID_SOCKET; static unsigned char session_key[32]; static struct ssh_cipher *cipher = NULL; int scp_flags = 0; void (*ssh_get_password)(const char *prompt, char *str, int maxlen)IS_SCP) { noise_ultralight(i); if (i <= 0) fatalbox("Lost connection while sending"); }IS_SCP) noise_ultralight(iif (IS_SCP) { if (len > 0 && buf[len-1] == '\n') len--; if (len > 0 && buf[len-1] == '\r') len--; if (len > 0) { fwrite(buf, len, 1, stderr); fputc('\n', stderr); } return; }NULL, NULL, 0 }; static struct Packet pktout = { 0, 0, NULL, NULL, 0 }; static void ssh_protocol(unsigned char *in, int inlen, int ispkt); static void ssh_size(void); /* * Collect incoming data in the incoming packet buffer. * Decihper and verify the packet when it is completely read. * Drop SSH_MSG_DEBUG and SSH_MSG_IGNORE packets. * Update the *data and *datalen variables. * Return the additional nr of bytes needed, or 0 when * a complete packet is available. */ static int s_rdpkt(unsigned char **data, int *datalen) { static long len, pad, biglen, to_read; static unsigned long realcrc, gotcrc; static unsigned char *p; static int i; crBegin; next_packet: pktin.type = 0; pktin.length = 0; for (i = len = 0; i < 4; i++) { while ((*datalen) == 0) crReturn(4-i); len = (len << 8) + **data; (*data)++, (*datalen)--; } #ifdef FWHACK if (len == 0x52656d6f) { /* "Remo"te server has closed ... */ len = 0x300; /* big enough to carry to end */ } #endif pad = 8 - (len % 8); biglen = len + pad; pktin.length = len - 5; if (pktin.maxlen < biglen) { pktin * for MS CryptEncrypt() */ pktin.data = (pktin.data == NULL ? malloc(biglen+8) : realloc(pktin.data, biglen+8)); #else pktin.data = (pktin.data == NULL ? malloc(biglen) : realloc(pktin.data, biglen)); #endif if (!pktin.data) fatalbox("Out of memory"); } to_read = biglen; p = pktin.data; while (to_read > 0) { static int chunk; chunk = to_read; while ((*datalen) == 0) crReturn(to_read); if (chunk > (*datalen)) chunk = (*datalen); memcpy(p, *data, chunk); *data += chunk; *datalen -= chunk; p += chunk; to_read -= chunk; } if (cipher) cipher->decrypt(pktin.data, biglen); pktin.type = pktin.data[pad]; pktin.body = pktin.data + pad + 1; realcrc = crc32(pktin.data, biglen-4); gotcrc = GET_32BIT(pktin.data+biglen-4); if (gotcrc != realcrc) { fatalbox("Incorrect CRC received on packet"); } if (pktin.type == SSH_SMSG_STDOUT_DATA || pktin.type == SSH_SMSG_STDERR_DATA || pktin.type == SSH_MSG_DEBUG || pktin.type == SSH_SMSG_AUTH_TIS_CHALLENGE) { long strlen = GET_32BIT(pktin.body); if (strlen + 4 != pktin.length) fatalbox("Received data packet with bogus string length"); } if (pktin.type == SSH_MSG_DEBUG) { /* log debug message */ char buf[80]; int strlen = GET_32BIT(pktin.body); strcpy(buf, "Remote: "); if (strlen > 70) strlen = 70; memcpy(buf+8, pktin.body+4, strlen); buf[8+strlen] = '\0'; logevent(buf); goto next_packet; } else if (pktin.type == SSH_MSG_IGNORE) { /* do nothing */ goto next_packet; } crFinish(0); } static void ssh_gotdata(unsigned char *data, int datalen) { while (datalen > 0) { if ( s_rdpkt(&data, &datalen) == 0 ) ssh_protocol(NULL, 0, 1); } } * for MS CryptEncrypt() */ pktout.data = (pktout.data == NULL ? malloc(biglen+12) : realloc(pktout.data, biglen+12 PUT_32BIT(pktout.data+biglen, crc); PUT_32BIT(pktout.data, len); if (cipher) cipher->encrypt(pktout.data+4, biglen); s_write(pktout.data, biglen+4); } /* * Construct a packet with the specified contents and * send it to the server. */ static void send_packet(int pkttype, ...) { va_list args; unsigned char *p, *argp, argchar; unsigned long argint; int pktlen, argtype, arglen; pktlen = 0; va_start(args, pkttype); while ((argtype = va_arg(args, int)) != PKT_END) { switch (argtype) { case PKT_INT: (void) va_arg(args, int); pktlen += 4; break; case PKT_CHAR: (void) va_arg(args, char); pktlen++; break; case PKT_DATA: (void) va_arg(args, unsigned char *); arglen = va_arg(args, int); pktlen += arglen; break; case PKT_STR: argp = va_arg(args, unsigned char *); arglen = strlen(argp); pktlen += 4 + arglen; break; default: assert(0); } } va_end(args); s_wrpkt_start(pkttype, pktlen); p = pktout.body; va_start(args, pkttype); while ((argtype = va_arg(args, int)) != PKT_END) { switch (argtype) { case PKT_INT: argint = va_arg(args, int); PUT_32BIT(p, argint); p += 4; break; case PKT_CHAR: argchar = va_arg(args, unsigned char); *p = argchar; p++; break; case PKT_DATA: argp = va_arg(args, unsigned char *); arglen = va_arg(args, int); memcpy(p, argp, arglen); p += arglen; break; case PKT_STR: argp = va_arg(args, unsigned char *); arglen = strlen(argp); PUT_32BIT(p, arglen); memcpy(p + 4, argp, arglen); p += 4 + arglen; break; } } va_end(args); s_wrpkt(); } /* * Connect to specified host and port. * Returns an error message, or NULL on success. * Also places the canonical host name into `realhost'. */ static char *connect_to_host(char *host, int port, char **realhost) if (port < 0) port = 22; /* default ssh port */return NULL/* * Handle the key exchange and user authentication phases. */ static int do_ssh_login(unsigned char *in, int inlen, int ispkt) if (!ispkt) crWaitUntil(ispkt)GET_32BIT(pktin.body+12+i+j); supported_auths_mask = GET_32BIT(pktin.body+16+i+j); end_packet(SSH_CMSG_SESSION_KEY, PKT_CHAR, cipher_type, PKT_DATA, cookie, 8, PKT_CHAR, (len*8) >> 8, PKT_CHAR, (len*8) & 0xFF, PKT_DATA, rsabuf, len, PKT_INT, 0, PKT_END); crWaitUntil(IS_SCP && crWaitUntil(!if (!IS_SCP) { sprintf(stuff, "Sent username \"%s\".\r\n", username); c_write(stuff, strlen(stuff)); } } send_packet(SSH_CMSG_USER, PKT_STR, username, PKT_END } crWaitUntil( if (IS_SCP) { char prompt[200]; sprintf(prompt, "%s@%s's password: ", cfg.username, savedhost); ssh_get_password(prompt, password, sizeof(password)); } else { send_packet(SSH_CMSG_AUTH_TIS, PKT_END); crWaitUntil(crWaitUntil(! } send_packet(pwpkt_type, PKT_STR, password, PKT_END); logevent("Sent password"); memset(password, 0, strlen(password)); crWaitUntil(ispkt); if (pktin.type == SSH_SMSG_FAILURE) { c_write("Access denied\r\n", 15); logevent("Authentication refused"); } else if (pktin.type == SSH_MSG_DISCONNECT) { logevent("Received disconnect request"); crReturn(0); } else if (pktin.type != SSH_SMSG_SUCCESScrFinish(1); } static void ssh_protocol(unsigned char *in, int inlen, int ispkt) { crBegin; random_init(); while (!do_ssh_login(in, inlen, ispkt)) crReturnV; if (!cfg.nopty) { send_packet(SSH_CMSG_REQUEST_PTY, PKT_STR, cfg.termtype, PKT_INT, rows, PKT_INT, cols, PKT_INT, 0, PKT_INT, 0, PKT_CHAR, 0, PKT_ENDend_packet(SSH_CMSG_EXEC_SHELL, PKT_ENDGET_32BIT(pktin.body); _STATUS) { send_packet(SSH_CMSG_EXIT_CONFIRMATION, PKT_ENDend_packet(SSH_CMSG_STDIN_DATA, PKT_INT, inlen, PKT_DATA, in, inlen, PKT_END/ static char *ssh_init (HWND hwnd, char *host, int port, char **realhost) { char *p;p = connect_to_host(host, port, realhost); if (p != NULL) return p; send_packet(SSH_CMSG_WINDOW_SIZE, PKT_INT, rows, PKT_INT, cols, PKT_INT, 0, PKT_INT, 0, PKT_END /* * Read and decrypt one incoming SSH packet. * (only used by pSCP) */ static void get_packet(void) { unsigned char buf[4096], *p; long to_read; int len; assert(IS_SCP); p = NULL; len = 0; while ((to_read = s_rdpkt(&p, &len)) > 0) { if (to_read > sizeof(buf)) to_read = sizeof(buf); len = s_read(buf, to_read); if (len != to_read) { closesocket(s); s = INVALID_SOCKET; return; } p = buf; } assert(len == 0); } /* * Receive a block of data over the SSH link. Block until * all data is available. Return nr of bytes read (0 if lost connection). * (only used by pSCP) */ int ssh_scp_recv(unsigned char *buf, int len) { static int pending_input_len = 0; static unsigned char *pending_input_ptr; int to_read = len; assert(IS_SCP); if (pending_input_len >= to_read) { memcpy(buf, pending_input_ptr, to_read); pending_input_ptr += to_read; pending_input_len -= to_read; return len; } if (pending_input_len > 0) { memcpy(buf, pending_input_ptr, pending_input_len); buf += pending_input_len; to_read -= pending_input_len; pending_input_len = 0; } if (s == INVALID_SOCKET) return 0; while (to_read > 0) { get_packet(); if (s == INVALID_SOCKET) return 0; if (pktin.type == SSH_SMSG_STDOUT_DATA) { int plen = GET_32BIT(pktin.body); if (plen <= to_read) { memcpy(buf, pktin.body + 4, plen); buf += plen; to_read -= plen; } else { memcpy(buf, pktin.body + 4, to_read); pending_input_len = plen - to_read; pending_input_ptr = pktin.body + 4 + to_read; to_read = 0; } } else if (pktin.type == SSH_SMSG_STDERR_DATA) { int plen = GET_32BIT(pktin.body); fwrite(pktin.body + 4, plen, 1, stderr); } else if (pktin.type == SSH_MSG_DISCONNECT) { logevent("Received disconnect request"); } else if (pktin.type == SSH_SMSG_SUCCESS || pktin.type == SSH_SMSG_FAILURE) { /* ignore */ } else if (pktin.type == SSH_SMSG_EXIT_STATUS) { char logbuf[100]; sprintf(logbuf, "Remote exit status: %d", GET_32BIT(pktin.body)); logevent(logbuf); send_packet(SSH_CMSG_EXIT_CONFIRMATION, PKT_END); logevent("Closing connection"); closesocket(s); s = INVALID_SOCKET; } else { fatalbox("Strange packet received: type %d", pktin.type); } } return len; } /* * Send a block of data over the SSH link. * Block until all data is sent. * (only used by pSCP) */ void ssh_scp_send(unsigned char *buf, int len) { assert(IS_SCP); if (s == INVALID_SOCKET) return; send_packet(SSH_CMSG_STDIN_DATA, PKT_INT, len, PKT_DATA, buf, len, PKT_END); } /* * Send an EOF notification to the server. * (only used by pSCP) */ void ssh_scp_send_eof(void) { assert(IS_SCP); if (s == INVALID_SOCKET) return; send_packet(SSH_CMSG_EOF, PKT_END); } /* * Set up the connection, login on the remote host and * start execution of a command. * Returns an error message, or NULL on success. * (only used by pSCP) */ char *ssh_scp_init(char *host, int port, char *cmd, char **realhost) { char buf[160], *p; assert(IS_SCP); #ifdef MSCRYPTOAPI if p = connect_to_host(host, port, realhost); if (p != NULL) return p; random_init();/* Exchange keys and login */ do { get_packet(); if (s == INVALID_SOCKET) return "Connection closed by remote host"; } while (!do_ssh_login(NULL, 0, 1)); /* Execute command */ sprintf(buf, "Sending command: %.100s", cmd); logevent(buf); send_packet(SSH_CMSG_EXEC_CMD, PKT_STR, cmd, PKT_END); return NULL; } Node-path: putty/scpssh.c Node-action: delete Revision-number: 505 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Fix subtle problem with scp protocol/port selection K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-23T09:44:15.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cbe4e1226e7e2ea2a2ca85eab1fca2c1 Text-content-length: 38 Text-content-md5: 256bace9216bcfd4a2fc4bd9d990a4ca Content-length: 78 K 15 cvs2svn:cvs-rev V 4 1.28 PROPS-END SVN傏y傏s擷擾偋 砽namename Revision-number: 506 Prop-content-length: 137 Content-length: 137 K 7 svn:log V 37 Oops - add a terminator to the array K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-23T10:58:17.000000Z PROPS-END Node-path: putty/be_none.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a68d50fd4f75d3bcdffa2a03d10aa471 Text-content-length: 33 Text-content-md5: 3436475773e0696a6d0ea7684f754a7a Content-length: 72 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN侺俍侷 {0, NULL} }; Revision-number: 507 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Make beep optional - thanks to Antal Novak K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-24T17:00:49.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0cd02c4ff6e42835367733899184bb24 Text-content-length: 29 Text-content-md5: d1206588dfa6aabadf9877e7179d3f77 Content-length: 69 K 15 cvs2svn:cvs-rev V 4 1.33 PROPS-END SVN縌縚 燨int beep Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 510b6fd7a81623e50073db42936d9267 Text-content-length: 55 Text-content-md5: ef926aa7bf1899b1162d44c250ba6a35 Content-length: 95 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN儉 儉( 亴?侒L亴A if(cfg.beep) Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fbb30648927a5e43f4a177c70f683d3b Text-content-length: 49 Text-content-md5: b2a6d33b6253295b602a3648eddcd994 Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN;淴 岻巗岺#define IDC1_BEEP 1021 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5303916179fcaa5096c6f02302b91fe3 Text-content-length: 110 Text-content-md5: 37da8d5b0a783a54ad2d5c3fb353b642 Content-length: 150 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN達TTr梟 AUTOCHECKBOX "Bee&p enabled", IDC1_BEEP, 3, 153, 162, 10 END IDD_PANEL2 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 256bace9216bcfd4a2fc4bd9d990a4ca Text-content-length: 356 Text-content-md5: ce9153e0d89658284a100fab74687c50 Content-length: 396 K 15 cvs2svn:cvs-rev V 4 1.29 PROPS-END SVN傏s傒F&05爚譪;仚e乚K亼v伋z仸yBeep", cfg.beepBeep", 1, &cfg.beep CheckDlgButton (hwnd, IDC1_BEEP, cfg.beep case IDC1_BEEP: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.beep = IsDlgButtonChecked (hwnd, IDC1_BEEP); break; Revision-number: 508 Prop-content-length: 241 Content-length: 241 K 7 svn:log V 140 Avoid the ldisc passing zero-length strings to back->send(). VMS sshd has interesting behaviour on receiving a zero-length SSH data packet. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-06-26T12:55:47.000000Z PROPS-END Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 55265948a373533716ec11e7053678fe Text-content-length: 76 Text-content-md5: 68af2fcdebdb91e7c6105ed4a0f4027f Content-length: 115 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN焗"2.匽*eif (term_buflen > 0) if (len > 0) Revision-number: 509 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 66 This commit was manufactured by cvs2svn to create tag 'beta-0-49'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 2000-06-26T12:55:47.000000Z PROPS-END Node-path: putty-0.49 Node-kind: dir Node-action: add Node-copyfrom-rev: 502 Node-copyfrom-path: putty Node-path: putty-0.49/be_none.c Node-kind: file Node-action: delete Node-path: putty-0.49/be_none.c Node-kind: file Node-action: add Node-copyfrom-rev: 506 Node-copyfrom-path: putty/be_none.c Text-copy-source-md5: 3436475773e0696a6d0ea7684f754a7a Node-path: putty-0.49/ldisc.c Node-kind: file Node-action: delete Node-path: putty-0.49/ldisc.c Node-kind: file Node-action: add Node-copyfrom-rev: 508 Node-copyfrom-path: putty/ldisc.c Text-copy-source-md5: 68af2fcdebdb91e7c6105ed4a0f4027f Node-path: putty-0.49/windlg.c Node-kind: file Node-action: delete Node-path: putty-0.49/windlg.c Node-kind: file Node-action: add Node-copyfrom-rev: 505 Node-copyfrom-path: putty/windlg.c Text-copy-source-md5: 256bace9216bcfd4a2fc4bd9d990a4ca Revision-number: 510 Prop-content-length: 170 Content-length: 170 K 7 svn:log V 68 This commit was manufactured by cvs2svn to create branch 'zlib-dll'. K 10 svn:author V 7 cvs2svn K 8 svn:date V 27 2000-06-26T12:55:47.000000Z PROPS-END Node-path: putty-zlib-dll Node-kind: dir Node-action: add Node-copyfrom-rev: 508 Node-copyfrom-path: putty Revision-number: 511 Prop-content-length: 256 Content-length: 256 K 7 svn:log V 155 SSH compression by linking with zlib.dll if present (compression quietly becomes unavailable if zlib.dll not found). Thanks to Joris van Rantwijk (again). K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-04T09:15:12.000000Z PROPS-END Node-path: putty-zlib-dll/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: d1206588dfa6aabadf9877e7179d3f77 Text-content-length: 189 Text-content-md5: e4362123b3f2f8eafd3268989362945f Content-length: 233 K 15 cvs2svn:cvs-rev V 8 1.33.2.1 PROPS-END SVN縚 !  機int ssh_compressionNeeded for PuTTY Secure Copy */ #define SCP_FLAG 1 #define SCP_VERBOSE 2 #define IS_SCP ((scp_flags & SCP_FLAG) != 0) GLOBAL int scp_flags; Node-path: putty-zlib-dll/scp.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 4ef97d2d7c8656ab3f02b154bac42c75 Text-content-length: 105 Text-content-md5: 4679f0ca1e48a511bcad36e77c4f950d Content-length: 148 K 15 cvs2svn:cvs-rev V 7 1.3.2.1 PROPS-END SVN僓俬WW丏/* * scp.h * Joris van Rantwijk, Aug 1999, Jun 2000. */ /* Exported from ssh.c */ Node-path: putty-zlib-dll/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 2603dd52287d7f8377a0e87efc23c564 Text-content-length: 1651 Text-content-md5: 475a33438ca10e8ebce7a8eace6c12cb Content-length: 1695 K 15 cvs2svn:cvs-rev V 8 1.22.2.1 PROPS-END SVN侀x侇X 乴凞 >塐?孋jj秠#瀄俹〣/瑊乺圚亄筶俛雓 %P仸y仹uREQUEST_COMPRESSION 37#define COMPRESSION_LEVELstatic int use_compressionstatic void pktalloc(struct Packet *pkt, long newlen) { if (pkt->maxlen < newlen) { pkt->maxlen = new->data = (pkt->data == NULL ? malloc(newlen+8) : realloc(pkt->data, newlen+8)); #else pkt->data = (pkt->data == NULL ? malloc(newlen) : realloc(pkt->data, newlen)); #endif if (!pkt->data) fatalbox("Out of memory"); } } if (pktin.maxlen < biglen) pktalloc(&pktin, biglen);use_compression) { ssh_decompress(pktin.data + pad, len - 4, &p, &len); pktin.length = len - 1; pktin.type = p[0]; pktin.body = p + 1; } else { pktin.length = len - 5; pktin.type = pktin.data[pad]; pktin.body = pktin.data + pad + 1 + 4) pktalloc(&pktout, biglen + 4); pktout.body[-1] = pktout.type; if (use_compression) { unsigned char *p; unsigned int n; pktout.body = NULL; ssh_compress(pktout.data + 4 + pad, pktout.length + 1, &p, &n); len = n + 4; pad = 8 - (len%8); biglen = len + pad; if (pktout.maxlen < biglen + 4) pktalloc(&pktout, biglen + 4); memcpy(pktout.data + 4 + pad, p, n); } if (cfg.ssh_compression && ssh_compression_init(COMPRESSION_LEVEL)) { send_packet(SSH_CMSG_REQUEST_COMPRESSION, PKT_INT, COMPRESSION_LEVEL, PKT_END); crWaitUntil(ispkt); if (pktin.type == SSH_SMSG_SUCCESS) { use_compression = 1; logevent("Enabled SSH packet compression"); } else if (pktin.type == SSH_SMSG_FAILURE) { logevent("Server does not support packet compression"); } else Node-path: putty-zlib-dll/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 43 Text-delta: true Text-delta-base-md5: 2bf4cc7847cedad3604faa7b4ca42a8d Text-content-length: 302 Text-content-md5: 576754c5857c4089adec58f38121253b Content-length: 345 K 15 cvs2svn:cvs-rev V 7 1.9.2.1 PROPS-END SVN7 int ssh_compression_init(int); void ssh_compress(unsigned char *src, unsigned int srclen, unsigned char **dest, unsigned int *destlen); void ssh_decompress(unsigned char *src, unsigned int srclen, unsigned char **dest, unsigned int *destlen); Node-path: putty-zlib-dll/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: b2a6d33b6253295b602a3648eddcd994 Text-content-length: 47 Text-content-md5: 195c707bf58e931eb8bd480a39b1cc94 Content-length: 91 K 15 cvs2svn:cvs-rev V 8 1.14.2.1 PROPS-END SVN淴渟 匟#define IDC3_COMPRESS 1024 Node-path: putty-zlib-dll/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: 37da8d5b0a783a54ad2d5c3fb353b642 Text-content-length: 117 Text-content-md5: e2439123be31a60006935d419419b66d Content-length: 161 K 15 cvs2svn:cvs-rev V 8 1.27.2.1 PROPS-END SVN達+[綴[r3縕 AUTOCHECKBOX "Enable packet compression", IDC3_COMPRESS, 3, 70, 162, 10 END IDD_PANEL4 Node-path: putty-zlib-dll/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: ce9153e0d89658284a100fab74687c50 Text-content-length: 455 Text-content-md5: 3376d07dd641fa67e747509e853ae392 Content-length: 499 K 15 cvs2svn:cvs-rev V 8 1.29.2.1 PROPS-END SVN傒F傖 ;倊渕爔淰仱d7乬佀佄P倢$佸l*輛侁K擹側lSSHCompression", cfg.ssh_compressionSSHCompression", 0, &cfg.ssh_compressionCheckDlgButton (hwnd, IDC3_COMPRESS, cfg.ssh_compressionNOPTY case IDC3_COMPRESS: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.ssh_compression = IsDlgButtonChecked (hwnd, IDC3_COMPRESIS_SCP && (scp_flags & SCP_VERBOSE) != 0) fprintf(stderr, "%s\n", string); Revision-number: 512 Prop-content-length: 299 Content-length: 299 K 7 svn:log V 198 Silly mistake - restore-cursor-pos doesn't make sure the cursor position is inside the screen (it might not be if the screen has shrunk since the save of cursor position). Thanks to Robert de Bath. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-08T16:09:39.000000Z PROPS-END Node-path: putty-zlib-dll/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 44 Text-delta: true Text-delta-base-md5: ef926aa7bf1899b1162d44c250ba6a35 Text-content-length: 157 Text-content-md5: e6960991e0053e8ee17a8b40bf53f082 Content-length: 201 K 15 cvs2svn:cvs-rev V 8 1.20.2.1 PROPS-END SVN儉(儊- &倶#/* Make sure the window hasn't shrunk since the save */ if (curs_x >= cols) curs_x = cols-1; if (curs_y >= rows) curs_y = rows-1 Revision-number: 513 Prop-content-length: 264 Content-length: 264 K 7 svn:log V 163 PSCP: After a password supplied with `-pw' fails to authenticate, we should _not_ fall back to console input for a second attempt, because this hangs batch files. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-21T09:17:05.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8517827df5aeec27e71f4a8f20d180b7 Text-content-length: 292 Text-content-md5: b1b7e8c55aa49e4c7dce304baa98cea5 Content-length: 332 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN仧N仩x亊岯}岶乶刧亱T搝int static int tried_once = 0; if (tried_once) { return 0; } else { strncpy(str, password, maxlen); str[maxlen-1] = '\0'; tried_once = 1; return 1; } return 1 Node-path: putty/scp.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4ef97d2d7c8656ab3f02b154bac42c75 Text-content-length: 24 Text-content-md5: bb1f3285c68d0ed29b6c6791ee6797c4 Content-length: 63 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN僓僒 丩丳int Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2603dd52287d7f8377a0e87efc23c564 Text-content-length: 1075 Text-content-md5: c260e08ac944ae639ff9a090bd0672e7 Content-length: 1115 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN侀x侌x<噄!:%釯磣僉嶡仐|侹仸KD?仼 伳V佺cint { ssh_protocol(NULL, 0, 1); if (ssh_state == SSH_STATE_CLOSED) { return; } }if (!ssh_get_password(prompt, password, sizeof(password))) { /* * get_password failed to get a password (for * example because one was supplied on the command * line which has already failed to work). * Terminate. */ logevent("No more passwords to try"); ssh_state = SSH_STATE_CLOSED; crReturn(1); } ssh_state = SSH_STATE_CLOSED; crReturn(1 { crReturnV; } if (ssh_state == SSH_STATE_CLOSED) if (ssh_state == SSH_STATE_CLOSED) { closesocket(s); s = INVALID_SOCKET; return 0; } if (ssh_state == SSH_STATE_CLOSED) { closesocket(s); s = INVALID_SOCKET; return "Session initialisation error"; } Revision-number: 514 Prop-content-length: 150 Content-length: 150 K 7 svn:log V 50 Enable handling of telnet:// URLs on command line K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-21T10:53:24.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8f94bf64afc33a2bf2b0c1057e3f5ba2 Text-content-length: 1081 Text-content-md5: 794f3e699de96f494d6204cf2f7aacb0 Content-length: 1121 K 15 cvs2svn:cvs-rev V 4 1.42 PROPS-END SVN儹 兂/ 儔E /* * If the hostname starts with "telnet://", set the * protocol to Telnet and process the string as a * Telnet URL. */ if (!strncmp(q, "telnet://", 9)) { q += 9; cfg.protocol = PROT_TELNET; p = q; while (*p && *p != ':') p++; if (*p) { *p++ = '\0'; cfg.port = atoi(p); } else cfg.port = -1; strncpy (cfg.host, q, sizeof(cfg.host)-1); cfg.host[sizeof(cfg.host)-1] = '\0'; } else { while (*p && !isspace(*p)) p++; if (*p) *p++ = '\0'; strncpy (cfg.host, q, sizeof(cfg.host)-1); cfg.host[sizeof(cfg.host)-1] = '\0'; while (*p && isspace(*p)) p++; if (*p) cfg.port = atoi(p); else cfg.port = -1; } Revision-number: 515 Prop-content-length: 147 Content-length: 147 K 7 svn:log V 47 Oops; telnet:// URLs can have a trailing slash K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-21T10:58:33.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 794f3e699de96f494d6204cf2f7aacb0 Text-content-length: 174 Text-content-md5: 00bf0aeac97bf0d227476139db152587 Content-length: 214 K 15 cvs2svn:cvs-rev V 4 1.43 PROPS-END SVN兂/兇 2n▄儘Kchar c; && *p != '/') p++; c = *p; if (*p) *p++ = '\0'; if (c == ':' Revision-number: 516 Prop-content-length: 135 Content-length: 135 K 7 svn:log V 35 Robert de Bath's Big Patch, part 1 K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-26T12:13:51.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4a37b5b02a84b59a953eb004c87a6ef9 Text-content-length: 22 Text-content-md5: 023ae877c1f204f9bb0b31d8906db67b Content-length: 62 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN +,D Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 68af2fcdebdb91e7c6105ed4a0f4027f Text-content-length: 62 Text-content-md5: 1412bc4e98b9ee4decb269e43aac26d2 Content-length: 101 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN"#8僋侻檁咰 c_write1(*buf++);_write1(c Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d1206588dfa6aabadf9877e7179d3f77 Text-content-length: 789 Text-content-md5: f80d507c0d6da83658145583e06a3968 Content-length: 829 K 15 cvs2svn:cvs-rev V 4 1.34 PROPS-END SVN縚羪I匑刏哴凥丂丷 W峳峝廘<=乁焤5 ?俀4﹖:%LATTR_NORM 0x00000000UL #define LATTR_WIDE 0x01000000UL #define LATTR_TOP 0x02000000UL #define LATTR_BOT 0x03000000UL #define LATTR_MODE 0x03c_write1(_C) do { if (inbuf_head >= INBUF_SIZE) term_out(); \ inbuf[inbuf_head++] = (_C) ; } while(0) #define INBUF_SIZE 2048 GLOBAL unsigned char inbuf[INBUF_SIZE]; GLOBAL int inbuf_head, vt52_mode; GLOBAL int repeat_off, cr_lf_returnfunky_typescroll_on_key; /* Terminal options */ int savelines; int dec_om; int wrap_mode; int lfhascr; int blink_cur; int beep; int scrollbar; int locksize; int bce; int blinktexttranslations */ VT_Mode vtmode;, intintvoid term_paste(void); void term_nopaste(void Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9a964ff0c5e8e5554801e915ef3fd0d2 Text-content-length: 52 Text-content-md5: 1b936a9a2cc22100dbb25b6840c755c1 Content-length: 91 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN. 丷! c_write1(*buf++); Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c260e08ac944ae639ff9a090bd0672e7 Text-content-length: 50 Text-content-md5: a0cf58cdfc14d9403a0e8b1694fc9ac3 Content-length: 90 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN侌x侊 佋d c_write1(*buf++); Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5dc5b693f1d85f0fae34f5d8d4b3bdbb Text-content-length: 324 Text-content-md5: 8543ddc2988c41c20cb68e3ed18d4f38 Content-length: 364 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN仱3仮v) 񟋜亃7.=汱隺>渪亣;if (!in_synch) c_write1(cc_write1(csrealloc(sb_buf, sb_size) : s/* This needs to be larger than the packet size now that inbuf * cannot overflow, in fact the fewer calls we make to windows * the faster we will run! */ char buf[16384]; Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ef926aa7bf1899b1162d44c250ba6a35 Text-content-length: 9305 Text-content-md5: 55f8a42d8fa80e9ab09d88324d68de38 Content-length: 9345 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN儉(儺g臖o o刴 哊V僉奡夿u旵欯K猰D僡甉 .n稶 窶'巠0厈 侫-慥凙丄凙躂丵嘊郿僋$e/雞& @9",,亝僾亪I*亶.亾;亊仐朩仚l仚-N伈x俍伇@伌'v 佌Z佖 O-侞 =倎倕':倛v協倞5B瀦倧}1嶳偘Q.嘫偪"^偲w偳T丆3側V俔偹俌偼^俕匩傃D傋l\弡傠 |傷g傹% $Codes in all ANSI like terminals.SCOANSI 0x1000 /* SCOANSI not in ANSIMIN. */ #define CL_ANSI 0x2000 /* ANSI ECMA-48 not in the VT100..VT420 */ #define CL_OTHER 0x4|CL_VT100) #define TM_VT100AVO (TM_VT100|CL_VT100AVO) #define TM_VT102 (TM_VT100AVO|CL_VT102) #define TM_VT220 (TM_VT102|CL_VT220) #define TM_VTXXX (TM_VT220|CL_VT340TEXT|CL_VT510|CL_VT420|CL_VT320) #define TM_SCOANSI (CL_ANSIMIN|CL_SCOANSI) #define TM_PUTTY (0xFFFF#define compatibility2(x,y) \ if ( ((CL_##x|CL_##y)&compatibility_level) == 0 ) { sbbot; /* furthest extenttblinker; /* When the blinking text is on */ static int blink_is_real; /* Actually blink blinking textchar id_string[1024] = "\033[?6c"static char * paste_buffer = 0; static int paste_len, paste_pos, paste_holdcfg.bce; blink_is_real = cfg.blinktextcfg.scroll_on_key)) || (seen_disp_event && (!cfg.scroll_on_keybbotsbboterase_charif (newrows>crows) disptop = newtext; else disptop = newtext + (crows-newrows)*(newcols+1); ccols = (cols < newcols ? cols : newcols); for (i=0; i botline - topline + 1) lines = botline - topline + 1effect the scrollback buffer. * * This is normally done by moving the position the screen * painter reads from to reduce the amount of memory copying * required. */ if (scroll_size >= 0 && !recursive) { newscr = scrtop + lines * (cols+1); if (newscr > sbbot && botline == rows-1) { /* We've hit the bottom of memory, so we have to do a * physical scroll. But instead of just 1 line do it * by 10% of the available memory. * * If the scroll region isn't the whole screen then we can't * do this as it stands. We would need to recover the bottom * of the screen from the scroll buffer after being sure that * it doesn't get deleted. */ i = (rows+savelines)/10; /* Make it simple and ensure safe recursion */ if ( i scroll_top && disptop < scroll_top + size + scroll_size) { disptop -= size; if (disptop < scroll_top) disptop if (scrtop_is_disptop) disptop = scrtop; else if (disptop > scroll_top && disptop < scroll_top + size + scroll_size) { disptop += size; if (disptop > scroll_top + size + scroll_size) disptop/* Make sure the window hasn't shrunk since the save */ if (curs_x >= cols) curs_x = cols-1; if (curs_y >= rows) curs_y = rows-1; ; /* I've removed the +1 so that the Wide screen stuff is not * removed when it shouldn't be. */8: /* auto key repeat */ repeat_off = ! case 20: /* Return sends ... */ cr_lf_return = state, inbuf_reap; static int beep_overload = 0; int beep_count = 0; for(inbuf_reap = 0; inbuf_reap < inbuf_head; inbuf_reap++) { c = inbuf[inbuf_reap]; (c&0x60) == 0 || c == '\177') && beep_count++; if(beep_count>6) beep_overload=1; disptop = scrtop; break; case '\b': if (curs_x == 0 && curs_y == 0) ; else paste_hold = 0paste_hold = 0; break; case '\t': { unsigned long *old_cpos = cpos; unsigned long *p = scrtop + curs_y * (cols+1) + cols; do { curs_x++; } while (curs_x < cols-1 && !tabs[curs_x]); if ((*p & LATTR_MODE) != LATTR_NORM) { if (curs_x >= cols/2) curs_x = cols/2-1; } else { if (curs_x >= cols) curs_x = cols-1; } |id_string, strlen(id_string)id_string, strlen(id_string)); break; case 'n': /* cursor position query */ if (esc_args[0] == 6) { (' '| (curr_attr&(ATTR_FGMASK|ATTR_BGMASK|ATTR_BLINK)) request_resize (cols, def(esc_args[0], 24)0) { request_resize (cols, def(esc_args[0], cfg.height)request_resize (def(esc_args[0], cfg.width)ANSIMINE','='): compatibility(OTHER); blink_is_real = (esc_args[0]>=1{ unsigned long *p; unsigned long nlattr; int n; switch (c) { case '8': p = scrtop; n = rows * (cols+1); while (n--) *p++ = ATTR_DEFAULT | 'E'; disptop = scrtop; seen_disp_event = TRUE; check_selection (scrtop, scrtop + rows * (cols+1)); break; case '3': nlattr = LATTR_TOP; if(0) { case '4': nlattr = LATTR_BOT; } if(0) { case '5': nlattr = LATTR_NORM; } if(0) { case '6': nlattr = LATTR_WIDE; } p = scrtop + curs_y * (cols+1) + cols; *p &= ~LATTR_MODE; *p |= nlattr; } inbuf_head = 0; if (beep_overload) { if(!beep_count) beep_overload=0; } else if(beep_count && beep_count<5 && cfg.beep) beep(beep_count/3);int lattr = (disptop[idx+cols] & LATTR_MODElattr | if (blink_is_real) { if (has_focus && tblinker && (wanttext[idx]&ATTR_BLINK) ) { wanttext[idx] &= ATTR_MASK; wanttext[idx] += ' '; } wanttext[idx] &= ~ATTR_BLINK; }int lattr = (wanttext[idx+cols] & LATTR_MODE, lstatic long last_tblink = 0; long now, blink_diff; now = GetTickCount(); blink_diff = now-last_tblink; /* Make sure the text blinks no more than 2Hz */ if (blink_diff<0 || blink_diff>450) { last_tblink = now; tblinker = !tblinker; } if (flg) { blinker = 1; last_blink = now; return; } { if ( (disptext[i*(cols+1)+cols]&LATTR_MODE) == LATTR_NORM) for (j = left; j <= right && j < cols ; j++) disptext[i*(cols+1)+j] = ATTR_INVALID; else for (j = left/2; j <= right/2+1 && j < cols ; j++) disptext[i*(cols+1)+j] = ATTR_INVALID; }; if ((selpoint[cols]&LATTR_MODE) != LATTR_NORM) selpoint += x/2; else selpoint += if (paste_buffer) sfree(paste_buffer); paste_pos = paste_hold = paste_len = 0; paste_buffer = smalloc(len); paste_buffer[paste_len++] = cpaste_buffer[paste_len++] = '\r'; p += sizeof(sel_nl); } q = p; } /* Assume a small paste will be OK in one go. */ if (paste_len<256) { ldisc->send (paste_buffer, paste_len); if (paste_buffer) sfree(paste_buffer); paste_buffer = 0; paste_pos = paste_hold = paste_len = 0; } } get_clip(NULL, NULL); } term_update(); } void term_nopaste() { if(paste_len == 0) return; sfree(paste_buffer); paste_buffer = 0; paste_len = 0; } void term_paste() { static long last_paste = 0; long now, paste_diff; if(paste_len == 0) return; /* Don't wait forever to paste */ if(paste_hold) { now = GetTickCount(); paste_diff = now-last_paste; if (paste_diff>=0 && paste_diff<450) return; } paste_hold = 0; while(paste_possend (&c, 1); if (c =='\r') { paste_hold = 1; return; } } sfree(paste_buffer); paste_buffer = 0; paste_len = 0 Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b2a6d33b6253295b602a3648eddcd994 Text-content-length: 555 Text-content-md5: e70fe4c77016862fb222c56127f5bc2b Content-length: 595 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN淴潂侶俼峗5奰憄怌團UNCXTERM 1010 #define IDC1_KPSTATIC 1011 #define IDC1_KPNORMAL 1012 #define IDC1_KPAPPLIC 1013 #define IDC1_KPNH 1014 #define IDC1_CURSTATIC 1015 #define IDC1_CURNORMAL 1016 #define IDC1_CURAPPLIC 1017 #define IDC1_ALTF4 1018 #define IDC1_ALTSPACE 1019 #define IDC1_LDISCTERM 1020 #define IDC1_SCROLLKEYLFHASCR 1018 #define IDC1_BLINKCUR 1020 #define IDC1_BEEP 1021 #define IDC2_SCROLLBAR 1022 #define IDC2_LOCKSIZE 1023 #define IDC2_BCE 1024 #define IDC2_BLINKTEXT 1025 #endif Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 37da8d5b0a783a54ad2d5c3fb353b642 Text-content-length: 7509 Text-content-md5: 3b0114679f1a79c7d13b8ab7de6711dd Content-length: 7549 K 15 cvs2svn:cvs-rev V 4 1.28 PROPS-END SVN達 f筩峵4h3y楿[e&凬j h3塻x疈坺i2匔h3縐[纕o]7x#%iWR?.慞 BEGIN LTEXT "Host &Name", IDC0_HOSTSTATIC, 3, 3, 119, 8 EDITTEXT IDC0_HOST, 3, 11, 119, 12, ES_AUTOHSCROLL LTEXT "&Port", IDC0_PORTSTATIC, 129, 3, 35, 8 EDITTEXT IDC0_PORT, 129, 11, 35, 12 #ifdef FWHACK RTEXT "Protocol:", IDC0_PROTSTATIC, 3, 27, 35, 8 AUTORADIOBUTTON "&Raw", IDC0_PROTRAW, 45, 27, 35, 8, WS_GROUP AUTORADIOBUTTON "&Telnet", IDC0_PROTTELNET, 87, 27, 35, 8 AUTORADIOBUTTON "SS&H/hack", IDC0_PROTSSH, 129, 27, 35, 8 #else RTEXT "Protocol:", IDC0_PROTSTATIC, 3, 27, 35, 8 AUTORADIOBUTTON "&Raw", IDC0_PROTRAW, 45, 27, 35, 8, WS_GROUP AUTORADIOBUTTON "&Telnet", IDC0_PROTTELNET, 87, 27, 35, 8 #ifndef NO_SSH AUTORADIOBUTTON "SS&H", IDC0_PROTSSH, 129, 27, 35, 8 #endif #endif LTEXT "Stor&ed Sessions", IDC0_SESSSTATIC, 3, 37, 162, 8 EDITTEXT IDC0_SESSEDIT, 3, 45, 119, 12, ES_AUTOHSCROLL LISTBOX IDC0_SESSLIST, 3, 59, 119, 71, LBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "&Load", IDC0_SESSLOAD, 129, 59, 35, 14 PUSHBUTTON "&Save", IDC0_SESSSAVE, 129, 76, 35, 14 PUSHBUTTON "&Delete", IDC0_SESSDEL, 129, 93, 35, 14 AUTOCHECKBOX "Close &Window on Exit", IDC0_CLOSEEXIT, 3, 130, 162, 8 AUTOCHECKBOX "Warn on C&lose", IDC0_CLOSEWARN, 3, 140, 162, 8 END IDD_PANEL1 3, 49, 8, WS_GROUP AUTORADIOBUTTON "Control-&? (127)", IDC1_DEL127, 59, 13, 105, 8 IDC1_HOMETILDE, 3, 35, 49, 8, WS_GROUP AUTORADIOBUTTON "&rxvt", IDC1_HOMERXVT, 59, 35, 49, 8 LTEXT "Function key and keypad layout:", IDC1_FUNCSTATIC, 3, 47, 162, 8 AUTORADIOBUTTON "&VT400", IDC1_FUNCTILDE, 3, 57, 49, 8, WS_GROUP AUTORADIOBUTTON "&Linux", IDC1_FUNCLINUX, 59, 57, 49, 8 AUTORADIOBUTTON "&Xterm R6", IDC1_FUNCXTERM, 115, 57, 49, 8 LTEXT "Initial state of cursor keys:", IDC1_CURSTATIC, 3, 69, 162, 8 AUTORADIOBUTTON "&Normal", IDC1_CURNORMAL, 3, 79, 49, 8, WS_GROUP AUTORADIOBUTTON "A&pplication", IDC1_CURAPPLIC, 59, 79, 49, 8 IDC1_KPNORMAL, 3, 101, 49, 8, WS_GROUP AUTORADIOBUTTON "Appl&ication", IDC1_KPAPPLIC, 59, 101, 49, 8 AUTORADIOBUTTON "N&etHack", IDC1_KPNH, 115, 101, 49, 8 AUTOCHECKBOX "ALT-F&4 is special (closes window)", IDC1_ALTF4, 3, 113, 162, 8 AUTOCHECKBOX "ALT-Space is special (S&ystem menu)", IDC1_ALTSPACE, 3, 123, 162, 8 AUTOCHECKBOX "&Use local terminal line discipline", IDC1_LDISCTERM, 3, 133, 162, 8 AUTOCHECKBOX "Reset scrollback on &keypress", IDC1_SCROLLKEY, 3, 143, 162, 8 END IDD_PANEL2 BEGIN LTEXT "Terminal screen dimensions:", IDC2_DIMSTATIC, 3, 3, 162, 8 RTEXT "&Rows", IDC2_ROWSSTATIC, 3, 15, 35, 8 EDITTEXT IDC2_ROWSEDIT, 45, 13, 35, 12 RTEXT "Colu&mns", IDC2_COLSSTATIC, 87, 15, 35, 8 EDITTEXT IDC2_COLSEDIT, 129, 13, 35, 12 RTEXT "&Saved lines of scrollback", IDC2_SAVESTATIC, 3, 30, 119, 8 EDITTEXT IDC2_SAVEEDIT, 129, 28, 35, 12 RTEXT "Font:", IDC2_FONTSTATIC, 3, 48, 105, 8 PUSHBUTTON "C&hange...", IDC2_CHOOSEFONT, 115, 45, 49, 14 AUTOCHECKBOX "Auto &wrap mode initially on", IDC2_WRAPMODE, 3, 62, 162, 8 AUTOCHECKBOX "&DEC Origin Mode initially on", IDC2_DECOM, 3, 72, 162, 8 AUTOCHECKBOX "Avoid ever using &icon title", IDC2_WINNAME, 3, 82, 162, 8 AUTOCHECKBOX "Implicit CR in every &LF", IDC2_LFHASCR, 3, 92, 162, 8 AUTOCHECKBOX "&Blinking cursor", IDC1_BLINKCUR, 3, 102, 162, 8 AUTOCHECKBOX "Bee&p enabled", IDC1_BEEP, 3, 112, 162, 8 AUTOCHECKBOX "Displa&y scrollbar", IDC2_SCROLLBAR, 3, 122, 162, 8 AUTOCHECKBOX "Loc&k Window size", IDC2_LOCKSIZE, 3, 132, 162, 8 AUTOCHECKBOX "Use Backgroud colour erase", IDC2_BCE, 3, 142, 162, 8 AUTOCHECKBOX "Enable blinking text", IDC2_BLINKTEXT, 3, 152, 162, 8 BEGIN LTEXT "Terminal-&type string", IDC3_TTSTATIC, 3, 5, 77, 8 EDITTEXT IDC3_TTEDIT, 87, 3, 77, 12, ES_AUTOHSCROLL LTEXT "Terminal-&speed string", IDC3_TSSTATIC, 3, 19, 77, 8 EDITTEXT IDC3_TSEDIT, 87, 17, 77, 12, ES_AUTOHSCROLL LTEXT "Auto-login &username", IDC3_LOGSTATIC, 3, 33, 77, 8 EDITTEXT IDC3_LOGEDIT, 87, 31, 77, 12, ES_AUTOHSCROLL LTEXT "Environment variables:", IDC3_ENVSTATIC, 3, 53, 162, 8 LTEXT "&Variable", IDC3_VARSTATIC, 3, 65, 26, 8 EDITTEXT IDC3_VAREDIT, 36, 63, 26, 12, ES_AUTOHSCROLL LTEXT "Va&lue", IDC3_VALSTATIC, 70, 65, 26, 8 EDITTEXT IDC3_VALEDIT, 104, 63, 59, 12, ES_AUTOHSCROLL LISTBOX IDC3_ENVLIST, 3, 81, 119, 55, LBS_HASSTRINGS | LBS_USETABSTOPS | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "A&dd", IDC3_ENVADD, 129, 81, 35, 14 PUSHBUTTON "&Remove", IDC3_ENVREMOVE, 129, 98, 35, 14 LTEXT "ENVIRON interpretation:", IDC3_EMSTATIC, 3, 136, 77, 8 AUTORADIOBUTTON "&BSD", IDC3_EMBSD, 87, 136, 35, 8, WS_GROUP AUTORADIOBUTTON "R&FC", IDC3_EMRFC, 129, 136, 35, 8 END IDD_PANEL3 BEGIN LTEXT "Terminal-&type string", IDC3_TTSTATIC, 3, 5, 77, 8 EDITTEXT IDC3_TTEDIT, 87, 3, 77, 12, ES_AUTOHSCROLL AUTOCHECKBOX "Don't allocate a &pseudo-terminal", IDC3_NOPTY, 3, 19, 162, 8 LTEXT "Auto-login &username", IDC3_LOGSTATIC, 3, 31, 77, 8 EDITTEXT IDC3_LOGEDIT, 87, 29, 77, 12, ES_AUTOHSCROLL LTEXT "Cipher:", IDC3_CIPHERSTATIC, 3, 45, 35, 8 AUTORADIOBUTTON "&3DES", IDC3_CIPHER3DES, 45, 45, 35, 8, WS_GROUP AUTORADIOBUTTON "&Blowfish", IDC3_CIPHERBLOWF, 87, 45, 35, 8 AUTORADIOBUTTON "&DES", IDC3_CIPHERDES, 129, 45, 35, 8 AUTOCHECKBOX "Attempt TIS authentication", IDC3_AUTHTIS, 3, 55, 162, 8 END IDD_PANEL4 BEGIN 3, 162, 83, 162, 8 LTEXT "Character classes:", IDC4_CCSTATIC, 3, 37, 162, 8 LISTBOX IDC4_CCLIST, 3, 47 PUSHBUTTON "&Set", IDC4_CCSET, 33, 147, 34, 14 LTEXT "&to class", IDC4_CCSTATIC2, 73, 147+3, 26, 8 EDITTEXT IDC4_CCEDIT, 105, 147+1, 36, 12 BEGIN AUTOCHECKBOX "&Bolded text is a different colour", IDC5_BOLDCOLOUR, 3, 3, 162, 8 AUTOCHECKBOX "Attempt to use &logical palettes", IDC5_PALETTE, 3, 19, 162, 8 LTEXT "C&olours:", IDC5_STATIC, 3, 35, 162, 8 LISTBOX IDC5_LIST, 3, 45, 100, 110, LBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP LTEXT "Red:", IDC5_RSTATIC, 109, 45, 27, 8 RTEXT "", IDC5_RVALUE, 138, 45, 27, 8 LTEXT "Green:", IDC5_GSTATIC, 109, 45+8, 27, 8 RTEXT "", IDC5_GVALUE, 138, 45+8, 27, 8 LTEXT "Blue:", IDC5_BSTATIC, 109, 45+16, 27, 8 RTEXT "", IDC5_BVALUE, 138, 45+16, 27, 8 PUSHBUTTON "C&hange...", IDC5_CHANGE, 109, 135, 56, 14 BEGIN LTEXT "Handling of VT100 line drawing characters:",IDC2_VTSTATIC, 3, 33, 162, 8, WS_GROUP AUTORADIOBUTTON "Use font in &both ANSI and OEM modes", IDC2_VTOEMANSI, 3, 23, 162, 8 AUTORADIOBUTTON "Use font in O&EM mode only", IDC2_VTOEMONLY, 3, 33, 162, 8 AUTORADIOBUTTON "&Poor man's line drawing (""+"", ""-"" and ""|"")", IDC2_VTPOORMAN, 3, 43, 162, 8 LTEXT "Character set translation:", IDC6_XLATSTATIC, 3, 59, 162, 8 AUTORADIOBUTTON "&None", IDC6_NOXLAT, 3, 69, 162, 8, WS_GROUP AUTORADIOBUTTON "&KOI8 / Win-1251", IDC6_KOI8WIN1251, 3, 79, 162, 8 AUTORADIOBUTTON "&ISO-8859-2 / Win-1250", IDC6_88592WIN1250, 3, 89, 162, 8 AUTOCHECKBOX "CA&PS LOCK acts as cyrillic switch", IDC6_CAPSLOCKCYR, 3, 105, 162, 8 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ce9153e0d89658284a100fab74687c50 Text-content-length: 2905 Text-content-md5: 4aff3976fabc62bd2483f1299a2bf87b Content-length: 2945 K 15 cvs2svn:cvs-rev V 4 1.30 PROPS-END SVN傒F傤]/*峯7乪抶#梍(7 e僋仏P仛in嘚仦<\仭y圙仺p侹H佀Q倠伌5 l佪2}侂y伻`俌倲x乪伇1僯倵Q侴伳8丩倹=/倽慚偁Hu,偛坅偳.傂-funky_type wppi (sesskey, "ScrollBar", cfg.scrollbar); wppi (sesskey, "ScrollOnKey", cfg.scroll_on_key); wppi (sesskey, "LockSize", cfg.locksize); wppi (sesskey, "BCE", cfg.bce); wppi (sesskey, "BlinkText", cfg.blinktextfunky_type gppi (sesskey, "ScrollBar", 1, &cfg.scrollbar); gppi (sesskey, "ScrollOnKey", 0, &cfg.scroll_on_key); gppi (sesskey, "LockSize", 0, &cfg.locksize); gppi (sesskey, "BCE", 0, &cfg.bce); gppi (sesskey, "BlinkText", 0, &cfg.blinktext); RegCloseKey(sesskey); } static void force_normal(HWND hwnd) { static int recurse = 0; WINDOWPLACEMENT wp; if(recurse) return; recurse = 1; wp.length = sizeof(wp); if (GetWindowPlacement(hwnd, &wp)) { wp.showCmd = SW_SHOWNORMAL; SetWindowPlacement(hwnd, &wp); } recurse = 0XTERM, cfg.funky_type ? (cfg.funky_type==2 ? IDC1_FUNCXTERM : IDC1_FUNCLINUX ) SCROLLKEY, cfg.scroll_on_keyXTERM: cfg.funky_type = 2; break; case IDC1_FUNCTILDE: case IDC1_FUNCLINUX: cfg.funky_typeSCROLLKEYscroll_on_key = IsDlgButtonChecked (hwnd, IDC1_SCROLLKEYDlgButton (hwnd, IDC1_BLINKCUR, cfg.blink_cur); CheckDlgButton (hwnd, IDC1_BEEP, cfg.beep); CheckDlgButton (hwnd, IDC2_SCROLLBAR, cfg.scrollbar); CheckDlgButton (hwnd, IDC2_LOCKSIZE, cfg.locksize); CheckDlgButton (hwnd, IDC2_BCE, cfg.bce); CheckDlgButton (hwnd, IDC2_BLINKTEXT, cfg.blinktext2_WRAPMOD case IDC1_BLINKCUR: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.blink_cur = IsDlgButtonChecked (hwnd, IDC1_BLINKCUR); break; case IDC1_BEEP: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.beep = IsDlgButtonChecked (hwnd, IDC1_BEEP); break; case IDC2_SCROLLBAR: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.scrollbar = IsDlgButtonChecked (hwnd, IDC2_SCROLLBAR); break; case IDC2_LOCKSIZE: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.locksize = IsDlgButtonChecked (hwnd, IDC2_LOCKSIZE); break; case IDC2_BLINKTEXT: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.blinktext = IsDlgButtonChecked (hwnd, IDC2_BLINKTEXT); break; case IDC2_BCE: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.bce = IsDlgButtonChecked (hwnd, IDC2_BCE); TelnetTranslationTranslationTranslation /* Grrr Explorer will maximize Dialogs! */ case WM_SIZE: if (wParam == SIZE_MAXIMIZED) force_normal(hwndelse force_normal(hwnd); smalloc(len); mungedhost = s Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 00bf0aeac97bf0d227476139db152587 Text-content-length: 15810 Text-content-md5: 3cd6fbe67b0c8267d9b6655a64100f04 Content-length: 15850 K 15 cvs2svn:cvs-rev V 4 1.44 PROPS-END SVN兇兿j丅鵴% %俔=籞%1榙蒣E僝3> 鍵]仦g9噃仯s=伀i咥築伭%侞e~倗|倣G倧/倯c 偞y6偢乯偤9 偧$滱亃偭^瑌C儑>巀>傦U僴儞 T$儣A倂UINT message, { int winmode = WS_OVERLAPPEDWINDOW|WS_VSCROLL; if (!cfg.scrollbar) winmode &= ~(WS_VSCROLL); if (cfg.locksize) winmode &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX); hwnd = CreateWindow (appname, appname, winmode, CW_USEDEFAULT, CW_USEDEFAULT, guess_width, guess_height, NULL, NULL, inst, NULL); }ALLhead = 0; outbuf_reap = outbuf_head = 0Send the paste buffer if there's anything to send */ term_paste(head) term_out(); term_update(); if (!has_focus) timer_id = SetTimer(hwnd, 1, 2000, NULL); else if (cfg.blinktext) timer_id = SetTimer(hwnd, 1, 250, NULL); else /* If the window is maximized supress resizing attempts */ if(IsZoomed(hwnd)) return else { static int first_time = 1; static RECT ss; switch(first_time) { case 1: /* Get the size of the screen */ if (GetClientRect(GetDesktopWindow(),&ss)) /* first_time = 0 */; else { first_time = 2; break; } case 0: /* Make sure the values are sane */ width = (ss.right-ss.left-extra_width ) / font_width; height = (ss.bottom-ss.top-extra_height ) / font_height; if (w>width) w=width; if (h>height) h=height; if (w<15) w = 15; if (h<1) w = 1; } /* Enable or disable the scroll bar, etc */ { LONG nflg, flag = GetWindowLong(hwnd, GWL_STYLE); nflg = flag; if (cfg.scrollbar) nflg |= WS_VSCROLL; else nflg &= ~WS_VSCROLL; if (cfg.locksize) nflg &= ~(WS_THICKFRAME|WS_MAXIMIZEBOX); else nflg |= (WS_THICKFRAME|WS_MAXIMIZEBOX); if (nflg != flag) { RECT cr, wr; SetWindowLong(hwnd, GWL_STYLE, nflg); SendMessage (hwnd, WM_IGNORE_SIZE, 0, 0); SetWindowPos(hwnd, NULL, 0,0,0,0, SWP_NOACTIVATE|SWP_NOCOPYBITS| SWP_NOMOVE|SWP_NOSIZE| SWP_NOZORDER| SWP_FRAMECHANGED); GetWindowRect (hwnd, &wr); GetClientRect (hwnd, &cr); extra_width = wr.right - wr.left - cr.right + cr.left; extra_height = wr.bottom - wr.top - cr.bottom + cr.top; } } case WM_KEYUP: case WM_SYSKEYUPmessage, , int lattr) { int fnt_width = font_width*(1+(lattr!=LATTR_NORM)); static int *IpDx = 0, IpDxLEN = 0;; if (len>IpDxLEN || IpDx[0] != fnt_widthIpDxLEN; i++) IpDx[i] = fnt_width; } x *= fnt_width; y *= font_height; if (attr & ATTR_ACTCURS) { attr &= (bold_mode == BOLD_COLOURS ? 0x300200 : 0x300 * * Or ... I could do a test print with "W", and use +1 or -1 for this * shift depending on if the leftmost column is blank... static int check_compose(int first, int second) { static char * composetbl[] = { "++#", "AA@", "(([", "//\\", "))]", "(-{", "-)}", "/^|", "!!", "C/", "C|", "L-", "L=", "XO", "X0", "Y-", "Y=", "||", "SO", "S!", "S0", "\"\"", "CO", "C0", "A_", "<<", ",-", "--", "RO", "-^", "0^", "+-", "2^", "3^", "''", "/U", "P!", ".^", ",,", "1^", "O_", ">>", "14", "12", "34", "??", "`A", "'A", "^A", "~A", "\"A", "*A", "AE", ",C", "`E", "'E", "^E", "\"E", "`I", "'I", "^I", "\"I", "-D", "~N", "`O", "'O", "^O", "~O", "\"O", "XX", "/O", "`U", "'U", "^U", "\"U", "'Y", "HT", "ss", "`a", "'a", "^a", "~a", "\"a", "*a", "ae", ",c", "`e", "'e", "^e", "\"e", "`i", "'i", "^i", "\"i", "-d", "~n", "`o", "'o", "^o", "~o", "\"o", ":-", "o/", "`u", "'u", "^u", "\"u", "'y", "ht", "\"y", 0}; char ** c; static int recurse = 0; int nc = -1; if(0) { char buf[256]; char * p; sprintf(buf, "cc(%d,%d)", first, second); for(p=buf; *p; p++) c_write1(*p); } for(c=composetbl; *c; c++) { if( (*c)[0] == first && (*c)[1] == second) { return (*c)[2] & 0xFF; } } if(recurse==0) { recurse=1; nc = check_compose(second, first); if(nc == -1) nc = check_compose(toupper(first), toupper(second)); if(nc == -1) nc = check_compose(toupper(second), toupper(first)); recurse=0; } return nc; } /* * Translate a WM_(SYS)?KEY(UP|DOWN) message into a string of ASCII * codes. Returns number of bytes used or zero to drop the message * or -1 to forward the message to windows. */ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, unsigned char *output) { BYTE keystate[256]; int scan, left_alt = 0, key_down, shift_state; int r, i, code; unsigned char * p = output; static WORD keys[3]; static int compose_state = 0; static int compose_char = 0; static WPARAM compose_key = 0; r = GetKeyboardState(keystate); if (!r) memset(keystate, 0, sizeof(keystate)); else { /* Note if AltGr was pressed and if it was used as a compose key */ if (wParam == VK_MENU && (HIWORD(lParam)&KF_EXTENDED)) { keystate[VK_RMENU] = keystate[VK_MENU]; if (!compose_state) compose_key = wParam; } if (wParam == VK_APPS && !compose_state) compose_key = wParam; if (wParam == compose_key) { if (compose_state == 0 && (HIWORD(lParam)&(KF_UP|KF_REPEAT))==0) compose_state = 1; else if (compose_state == 1 && (HIWORD(lParam)&KF_UP)) compose_state = 2; else compose_state = 0; } else if (compose_state==1 && wParam != VK_CONTROL) compose_state = 0; /* Nastyness with NUMLock - Shift-NUMLock is left alone though */ if ( (cfg.funky_type == 0 || (cfg.funky_type == 1 && app_keypad_keys)) && wParam==VK_NUMLOCK && !(keystate[VK_SHIFT]&0x80)) { wParam = VK_EXECUTE; /* UnToggle NUMLock */ if ((HIWORD(lParam)&(KF_UP|KF_REPEAT))==0) keystate[VK_NUMLOCK] ^= 1; } /* And write back the 'adjusted' state */ SetKeyboardState (keystate); } /* Disable Auto repeat if required */ if (repeat_off && (HIWORD(lParam)&(KF_UP|KF_REPEAT))==KF_REPEAT) return 0; if ((HIWORD(lParam)&KF_ALTDOWN) && (keystate[VK_RMENU]&0x80) == 0) left_alt = 1; key_down = ((HIWORD(lParam)&KF_UP)==0); /* Make sure Ctrl-ALT is not the same as AltGr for ToAscii */ if (left_alt && (keystate[VK_CONTROL]&0x80)) keystate[VK_MENU] = 0; scan = (HIWORD(lParam) & (KF_UP | KF_EXTENDED | 0xFF)); shift_state = ((keystate[VK_SHIFT]&0x80)!=0) + ((keystate[VK_CONTROL]&0x80)!=0)*2Make sure we're not pasting */ if (key_down) term_nopaste(); if (compose_state>1 && left_alt) compose_state = 0; /* Sanitize the number pad if not using a PC NumPad */ if( left_alt || (app_keypad_keys && cfg.funky_type != 2) || cfg.nethack_keypad || compose_state ) { if ((HIWORD(lParam)&KF_EXTENDED) == 0) { int nParam = 0; switch(wParam) { case VK_INSERT: nParam = VK_NUMPAD0; break; case VK_END: nParam = VK_NUMPAD1; break; case VK_DOWN: nParam = VK_NUMPAD2; break; case VK_NEXT: nParam = VK_NUMPAD3; break; case VK_LEFT: nParam = VK_NUMPAD4; break; case VK_CLEAR: nParam = VK_NUMPAD5; break; case VK_RIGHT: nParam = VK_NUMPAD6; break; case VK_HOME: nParam = VK_NUMPAD7; break; case VK_UP: nParam = VK_NUMPAD8; break; case VK_PRIOR: nParam = VK_NUMPAD9; break; case VK_DELETE: nParam = VK_DECIMAL; break; } if (nParam) { if (keystate[VK_NUMLOCK]&1) shift_state |= 1; wParam = nParam; } } } /* If a key is pressed and AltGr is not active */ if (key_down && (keystate[VK_RMENU]&0x80) == 0 && !compose_state) { /* Okay, prepare for most alts then ...*/ if (left_alt) *p++ = '\033'; /* Lets see if it's a pattern we know all about ... */ if (wParam == VK_PRIOR && shift_state == 1) { SendMessage (hwnd, WM_VSCROLL, SB_PAGEUP, 0); return 0; } if (wParam == VK_NEXT && shift_state == 1) { SendMessage (hwnd, WM_VSCROLL, SB_PAGEDOWN, 0); return 0; } if (left_alt && wParam == VK_F4 && cfg.alt_f4) { return -1; } if (left_alt && wParam == VK_SPACE && cfg.alt_space) { SendMessage (hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0); return -1; } /* Nethack keypad */ if (cfg.nethack_keypad && !left_alt) { switch(wParam) { case VK_NUMPAD1: *p++ = shift_state ? 'B': 'b'; return p-output; case VK_NUMPAD2: *p++ = shift_state ? 'J': 'j'; return p-output; case VK_NUMPAD3: *p++ = shift_state ? 'N': 'n'; return p-output; case VK_NUMPAD4: *p++ = shift_state ? 'H': 'h'; return p-output; case VK_NUMPAD5: *p++ = shift_state ? '.': '.'; return p-output; case VK_NUMPAD6: *p++ = shift_state ? 'L': 'l'; return p-output; case VK_NUMPAD7: *p++ = shift_state ? 'Y': 'y'; return p-output; case VK_NUMPAD8: *p++ = shift_state ? 'K': 'k'; return p-output; case VK_NUMPAD9: *p++ = shift_state ? 'U': 'u'; return p-output; } } /* Application Keypad */ if (!left_alt) { int xkey = 0; if ( cfg.funky_type == 0 || ( cfg.funky_type == 1 && app_keypad_keys)) switch(wParam) { case VK_EXECUTE: xkey = 'P'; break; case VK_DIVIDE: xkey = 'Q'; break; case VK_MULTIPLY:xkey = 'R'; break; case VK_SUBTRACT:xkey = 'S'; break; } if(app_keypad_keys) switch(wParam) { case VK_NUMPAD0: xkey = 'p'; break; case VK_NUMPAD1: xkey = 'q'; break; case VK_NUMPAD2: xkey = 'r'; break; case VK_NUMPAD3: xkey = 's'; break; case VK_NUMPAD4: xkey = 't'; break; case VK_NUMPAD5: xkey = 'u'; break; case VK_NUMPAD6: xkey = 'v'; break; case VK_NUMPAD7: xkey = 'w'; break; case VK_NUMPAD8: xkey = 'x'; break; case VK_NUMPAD9: xkey = 'y'; break; case VK_DECIMAL: xkey = 'n'; break; case VK_ADD: if(shift_state) xkey = 'm'; else xkey = 'l'; break; case VK_RETURN: if (HIWORD(lParam)&KF_EXTENDED) xkey = 'M'; break; } if(xkey) { if (vt52_mode) { if (xkey>='P' && xkey<='S') p += sprintf((char *)p, "\x1B%c", xkey); else p += sprintf((char *)p, "\x1B?%c", xkey); } else p += sprintf((char *)p, "\x1BO%c", xkey); return p - output; } } if (wParam == VK_BACK && shift_state == 0 ) /* Backspace */ { *p++ = (cfg.bksp_is_delete ? 0x7F : 0x08); return p-output; } if (wParam == VK_TAB && shift_state == 1 ) /* Shift tab */ { *p++ = 0x1B; *p++ = '['; *p++ = 'Z'; return p - output; } if (wParam == VK_SPACE && shift_state == 2 ) /* Ctrl-Space */ { *p++ = 0; return p - output; } if (wParam == VK_SPACE && shift_state == 3 ) /* Ctrl-Shift-Space */ { *p++ = 160; return p - output; } if (wParam == VK_CANCEL && shift_state == 2 ) /* Ctrl-Break */ { *p++ = 3; return p - output; } /* Control-2 to Control-8 are special */ if (shift_state == 2 && wParam >= '2' && wParam <= '8') { *p++ = "\000\033\034\035\036\037\177"[wParam-'2']; return p - output; } if (shift_state == 2 && wParam == 0xBD) { *p++ = 0x1F; return p - output; } if (shift_state == 2 && wParam == 0xDF) { *p++ = 0x1C; return p - output; } if (shift_state == 0 && wParam == VK_RETURN && cr_lf_return) { *p++ = '\r'; *p++ = '\n'; return p - output; } /* * Next, all the keys that do tilde codes. (ESC '[' nn '~', * for integer decimal nn.) * * We also deal with the weird ones here. Linux VCs replace F1 * to F5 by ESC [ [ A to ESC [ [ E. rxvt doesn't do _that_, but * does replace Home and End (1~ and 4~) by ESC [ H and ESC O w * respectively. */ code = 0; switch (wParam) { case VK_F1: code = (keystate[VK_SHIFT] & 0x80 ? 23 : 11); break; case VK_F2: code = (keystate[VK_SHIFT] & 0x80 ? 24 : 12); break; case VK_F3: code = (keystate[VK_SHIFT] & 0x80 ? 25 : 13); break; case VK_F4: code = (keystate[VK_SHIFT] & 0x80 ? 26 : 14); break; case VK_F5: code = (keystate[VK_SHIFT] & 0x80 ? 28 : 15); break; case VK_F6: code = (keystate[VK_SHIFT] & 0x80 ? 29 : 17); break; case VK_F7: code = (keystate[VK_SHIFT] & 0x80 ? 31 : 18); break; case VK_F8: code = (keystate[VK_SHIFT] & 0x80 ? 32 : 19); break; case VK_F10: code = (keystate[VK_SHIFT] & 0x80 ? 34 : 21); break; case VK_F11: code = 23; break; case VK_F12: code = 24; break; case VK_F13: code = 25; break; case VK_F14: code = 26; break; case VK_F15: code = 28; break; case VK_F16: code = 29; break; case VK_F17: code = 31; break; case VK_F18: code = 32; break; case VK_F19: code = 33; break; case VK_F20: code = 34; break; case VK_HOME: code = 1; break; case VK_INSERT: code = 2; break; case VK_DELETE: code = 3; break; case VK_END: code = 4; break; case VK_PRIOR: code = 5; break; case VK_NEXT: code = 6; break; } if (cfg.funky_type == 1 && code >= 11 && code <= 15) { p += sprintf((char *)p, "\x1B[[%c", code + 'A' - 11); return p - output; } if (cfg.funky_type == 2 && code >= 11 && code <= 14) { p += sprintf((char *)p, "\x1BO%c", code + 'P' - 11); return p - output; } if (cfg.rxvt_homeend && (code == 1 || code == 4)) { p += sprintf((char *)p, code == 1 ? "\x1B[H" : "\x1BOw"); return p - output; } if (code) { p += sprintf((char *)p, "\x1B[%d~", code); return p - output; } /* * Now the remaining keys (arrows and Keypad 5. Keypad 5 for * some reason seems to send VK_CLEAR to Windows...). */ { char xkey = 0; switch (wParam) { case VK_UP: xkey = 'A'; break; case VK_DOWN: xkey = 'B'; break; case VK_RIGHT: xkey = 'C'; break; case VK_LEFT: xkey = 'D'; break; case VK_CLEAR: xkey = 'G'; break; } if (xkey) { if (vt52_mode) p += sprintf((char *)p, "\x1B%c", xkey); else if (app_cursor_keys) p += sprintf((char *)p, "\x1BO%c", xkey); else p += sprintf((char *)p, "\x1B[%c", xkey); return p - output; } } } /* Okay we've done everything interesting; let windows deal with * the boring stuff */ {scan, keystate, keys, 0); if(r>0) { p = output; for(i=0; i' ') { compose_char = ch; compose_state ++; continue; } if (compose_state==3 && (ch&0x80) == 0 && ch>' ') { int nc; compose_state = 0; if ((nc=check_compose(compose_char,ch)) == -1) { c_write1('\007'); return 0; } *p++ = xlat_kbd2tty((unsigned char)nc); return p-output; } compose_state = 0; if( left_alt && key_down ) *p++ = '\033'; if (!key_down) *p++ = ch; else { if(capsOn) ch = xlat_latkbd2win(ch); *p++ = xlat_kbd2tty(ch); } } /* This is so the ALT-Numpad and dead keys work correctly. */ keys[0] = 0; return p-output; } } /* This stops ALT press-release doing a 'COMMAND MENU' function */ #if 0 if (message == WM_SYSKEYUP && wParam == VK_MENU) { keystate[VK_MENU] = 0; return 0; } #endif return -1 if (!cfg.scrollbar) return; si.cbSize = sizeof(si); si.fMask = SIF_ALLint errorbeep) { static long last_beep = 0; long now, beep_diff; now = GetTickCount(); beep_diff = now-last_beep; /* Make sure we only respond to one beep per packet or so */ if (beep_diff>=0 && beep_diff<50) return; if(errorbeep) MessageBeep(MB_ICONHAND); else MessageBeep(MB_OK); last_beep = GetTickCount(); } Revision-number: 517 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 46 Robert de Bath's automatic dialog-box creator K 10 svn:author V 5 simon K 8 svn:date V 27 2000-07-26T12:16:11.000000Z PROPS-END Node-path: putty/mkres.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 3232 Text-content-md5: a372af80d89a294fa24c970547bc4140 Content-length: 3348 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN,塰凞岹禘GEB丏圛$廐匘%淚哃uD凟e僋6D}匟侲eE咲$僆xE!\丮 凞$D侤D僁(嘍$匘凥e奆俤侲D乲H亃E凟h丟r咷3僉=丏僇丗0丏烡朎俓D凲咲僶J5DaD凜丏凥D(D凲PqO刪E 僂NE圗丩N刪D丮D-丏凥丏丏9M刬G*丏凥咷?N刬E剏丮2丏俍M刬僁-丏凥O丒#M刬凞-丏凥N唙侱-丟 L厏嘐凣I傾塐厈僁;E剘I僝M嘙L刱圗侳1侸 匫刧咹侲卪員*揈!嘍孌D&匜侱凢=匜5DaF?DaL塈僄塜僈塈D丮F?D丮K塈I塶N墄丠塛L塧僃?僈塈DF?DL奧侴奻侺僄"僋両丩塈GG塜G両塊K圚僊團I媄嘔坵D4僃KH!処凧<僈.僂BK孖侳LI凞9K丠宑H!咼侲I丠:丏F4團4僁塂峲咲1塂峼僄峬凢 侲侷 丠凞H僁F嶨僃慐5DE嶢圝巒E巙擠匘俶橢凟 G巬D2D&岶G巬咲G弍S奌%E廏嘑L廥揇(圗俓僆&咵%嘒怤凞恠咲乲侱丏<両 丠弤H峳処弣F巆匘恈丗巒朌 侱怐丱弣圡匘&DF慣DH峳侱0凢俼丏6E抐I憀乣憍侱廐J=D侷弙匥?僆弙H怬F怬塃憍D/D巓I弣圗奅嘦G團 D H搢E廘侱峆丏恀咵孎俴怐攕EE恜僁旸丒峬J廻N2I怓怽G攕D"塆塂1G慚僄&F塃%DG>_圤僅S*K扏侻巗V*_RR桸M:FHY桸匢晍G擸N3E搈塅侾巘僅<丏俌僅9侺僃慱_$侴梖処IK抈O*E揃LH揫R乀榏K搢嘓昰E3L憉J擸H檣K丏 僂侲 咶I橮D)Q侶僆=丗峫丩Q昢D凢慱I2僇慱nF3丠汬凣E5僋5G擼僉丏G丼$L"匜凬桟H淕F淕咲 匟(UX沚DE6E弒H淕丒淕FGG瀨丏J F2L坹丏晇侲扽侶'匛凲巗咹9丠烳丏汯丮扢F4丒侱烳G丠J$K歯EK凲擧G2E焗ED孯匟E侴咹爖EJ巗僅;並)I慦丏弔G爗H侶抝DUJ IJ乆並 H宼J両E:MTOW丮O#乫H#PI弣G爗F)凴丷凥K弜G>DaHH爗僇D8I:\G jGQ+S僅O&咲GJ丠?G岻丗0PLIG9I'NJG9M慱N&D9O9HMFLJMSe"乹J∣\D丮TT@|+KDG孉僁,G孨僁峧F揳NF猙MFI丒猦YFKE怋E猺D1P丮$凢猙匥爗E玘V)I\D%F玠T珸UI^N歯SIH猌侱-匜0D璷FQ3侳璹KT3並"G玕H#a玬丩獸D/F#匤両 I)X)FD瓁乀`瑻僡J0jJQRDaN玁J[H`Sc2I乀S俠X↘ZG;[DT侱&P)N=両盉I痭G^I痭J搑J硁亀硑亀1丳磇LGIK峘IY磈K圚NDM峘P磍/* Commands ...INIT(...) : Set configs. (rowstep, totwidth, stdheight)SPOS(V,Hurrent positionSCOL tandard column, for a singleincremNEXT : by s+ OL(K,NX,Ycol K of N (default 1of [same as last]Ssize (u numbercols) ADJAdjust nexorURX(CXpos+HY(VYV/ #include FILE * ifd;o char wordbuf[256]; #define T_ 100 /* Init the stylvalues11021,1), SS3Nl4Multi-5SADJ6/GRID7AP8URX 12 + offsetURYAVEPOSN 12avstatuRESTOR12Restor struct keys { * name;int token; }s[] ={"", , },COLCOLSADJADJAPAPURXURXYY,", 0,0} };bufcurxcuryolson_n_row_tguttervah}, saved_; ar_count,val[10main(argcgv)gc; **; cfd =in;outwhile(!feof(ifd)) (ferror fprintf(stderr, "E readinput file\n"); exit(1) }() < 0) breakcheck_ofd, "%s",continu/* To get here we hfound onour, somes will * bllowedanu./ = 0(ch =c != EOF && isspace(ch)ch'\n') putc(ch,) == '(' or(;;++get_(=) ,' } EOFelse un/* Ok gos, now doixecute_c0) his islexer - not lex(1) because tto compile under windows/wp; try_again:;"too big"and strinwp=/* Find a!isalpha"')"'goto return -1dowp>+of(-2*wp ch!= *wp++ =(num||= '_') wp-} signlue(+' )=1;lse-->='0'<='9* 10 +- '0'-}* p=; p-> p++strcmp,)0. = } < 1)= switchcas:> =12233 = (-) /2uryCOLd, %d"+,+col_po1+) *(-1) /wm, hm=0)h/*= wm-*ADJ AP>0+Yyy} } Revision-number: 518 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 telnet:// URLs don't always have the //. (Incorrect but common.) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-08-05T08:58:07.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3cd6fbe67b0c8267d9b6655a64100f04 Text-content-length: 134 Text-content-md5: aab5957ac4190c6f3e39979a6593e06b Content-length: 174 K 15 cvs2svn:cvs-rev V 4 1.45 PROPS-END SVN兿j冃hh儷z", 7)) { char c; q += 7; if (q[0] == '/' && q[1] == '/') q += 2 Revision-number: 519 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.050200Z PROPS-END Revision-number: 520 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.057733Z PROPS-END Revision-number: 521 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.066883Z PROPS-END Revision-number: 522 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.075481Z PROPS-END Revision-number: 523 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.104504Z PROPS-END Revision-number: 524 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.112243Z PROPS-END Revision-number: 525 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.120018Z PROPS-END Revision-number: 526 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.128923Z PROPS-END Revision-number: 527 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.137271Z PROPS-END Revision-number: 528 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.145702Z PROPS-END Revision-number: 529 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.154244Z PROPS-END Revision-number: 530 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.182167Z PROPS-END Revision-number: 531 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.190010Z PROPS-END Revision-number: 532 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.198239Z PROPS-END Revision-number: 533 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.208055Z PROPS-END Revision-number: 534 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.216836Z PROPS-END Revision-number: 535 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.226228Z PROPS-END Revision-number: 536 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.233471Z PROPS-END Revision-number: 537 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.240899Z PROPS-END Revision-number: 538 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.249434Z PROPS-END Revision-number: 539 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.258082Z PROPS-END Revision-number: 540 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.266467Z PROPS-END Revision-number: 541 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.275718Z PROPS-END Revision-number: 542 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.282059Z PROPS-END Revision-number: 543 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.289617Z PROPS-END Revision-number: 544 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.296744Z PROPS-END Revision-number: 545 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.303155Z PROPS-END Revision-number: 546 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.309069Z PROPS-END Revision-number: 547 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.316554Z PROPS-END Revision-number: 548 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.341387Z PROPS-END Revision-number: 549 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.349520Z PROPS-END Revision-number: 550 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.358521Z PROPS-END Revision-number: 551 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.366765Z PROPS-END Revision-number: 552 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.374437Z PROPS-END Revision-number: 553 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.381822Z PROPS-END Revision-number: 554 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.415745Z PROPS-END Revision-number: 555 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.423562Z PROPS-END Revision-number: 556 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.431562Z PROPS-END Revision-number: 557 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.439901Z PROPS-END Revision-number: 558 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.447361Z PROPS-END Revision-number: 559 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.455648Z PROPS-END Revision-number: 560 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.485794Z PROPS-END Revision-number: 561 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.493520Z PROPS-END Revision-number: 562 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.501845Z PROPS-END Revision-number: 563 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.509725Z PROPS-END Revision-number: 564 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.517467Z PROPS-END Revision-number: 565 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.524639Z PROPS-END Revision-number: 566 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.532284Z PROPS-END Revision-number: 567 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.562423Z PROPS-END Revision-number: 568 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:07.570282Z PROPS-END Revision-number: 569 Prop-content-length: 237 Content-length: 237 K 7 svn:log V 136 SSH 2 support, phase 1, debugging. Currently does Diffie-Hellman and gets the same results as the server, which is a pretty good start. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-05T14:28:17.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 023ae877c1f204f9bb0b31d8906db67b Text-content-length: 179 Text-content-md5: 50ca411a403c193264330d1c33aace3a Content-length: 219 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN#宊孹#弆<搙匑L唋漈 sshdh.$(OBJ) sshdss.$(OBJ) OBJS3 = sshbnOBJS3OBJS3OBJS3shdh.$(OBJ): sshdh.c ssh.h sshdss.$(OBJ): sshdss.c ssh.h sshbn.$(OBJ): sshbn Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a0cf58cdfc14d9403a0e8b1694fc9ac3 Text-content-length: 21517 Text-content-md5: 9711937c0121a61ad3f92f0141c48ec9 Content-length: 21557 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN侊儌R俕仴坮圼圓嘒t;"Q0DV+6烠s1.丆璪%V9丒N爎扲瓹眗噆09B?俆陎I擹 *亙g;亪乨亼L亾0剓仌H乬[仠&1仢卛仭2~仹仺)仼3i仾\伀E'伂T伅~丠伇x伋 伌c伒r伔3i仾\擩伖 佂c俕佡m佨K丣佭僁佮6併z卋佸侂a!來|1_MSG_DISCONNECT 1 #define SSH1_SMSG_PUBLIC_KEY 2 #define SSH1_CMSG_SESSION_KEY 3 #define SSH1_CMSG_USER 4 #define SSH1_CMSG_AUTH_PASSWORD 9 #define SSH1_CMSG_REQUEST_PTY 10 #define SSH1_CMSG_WINDOW_SIZE 11 #define SSH1_CMSG_EXEC_SHELL 12 #define SSH1_CMSG_EXEC_CMD 13 #define SSH1_SMSG_SUCCESS 14 #define SSH1_SMSG_FAILURE 15 #define SSH1_CMSG_STDIN_DATA 16 #define SSH1_SMSG_STDOUT_DATA 17 #define SSH1_SMSG_STDERR_DATA 18 #define SSH1_CMSG_EOF 19 #define SSH1_SMSG_EXIT_STATUS 20 #define SSH1_CMSG_EXIT_CONFIRMATION 33 #define SSH1_MSG_IGNORE 32 #define SSH1_MSG_DEBUG 36 #define SSH1_CMSG_AUTH_TIS 39 #define SSH1_SMSG_AUTH_TIS_CHALLENGE 40 #define SSH1_CMSG_AUTH_TIS_RESPONSE 41 #define SSH1_AUTH_TIS 5 #define SSH2_MSG_DISCONNECT 1 #define SSH2_MSG_IGNORE 2 #define SSH2_MSG_UNIMPLEMENTED 3 #define SSH2_MSG_DEBUG 4 #define SSH2_MSG_SERVICE_REQUEST 5 #define SSH2_MSG_SERVICE_ACCEPT 6 #define SSH2_MSG_KEXINIT 20 #define SSH2_MSG_NEWKEYS 21 #define SSH2_MSG_KEXDH_INIT 30 #define SSH2_MSG_KEXDH_REPLY 31extern struct ssh_cipher ssh_3des; extern struct ssh_cipher ssh_des; extern struct ssh_cipher ssh_blowfish; /* for ssh 2; we miss out single-DES because it isn't supported */ struct ssh_cipher *ciphers[] = { &ssh_3des, &ssh_blowfish }; extern struct ssh_kex ssh_diffiehellman; struct ssh_kex *kex_algs[] = { &ssh_diffiehellman }; extern struct ssh_hostkey ssh_dss; struct ssh_hostkey *hostkey_algs[] = { &ssh_dss }; extern struct ssh_mac ssh_sha1; SHA_State exhash; static void nullmac_sesskey(unsigned char *key, int len) { } static void nullmac_generate(unsigned char *blk, int len, unsigned long seq) { } static int nullmac_verify(unsigned char *blk, int len, unsigned long seq) { return 1; } struct ssh_mac ssh_mac_none = { nullmac_sesskey, nullmac_generate, nullmac_verify, "none", 0 }; struct ssh_mac *macs[] = { &ssh_sha1, &ssh_mac_none }; struct ssh_compress ssh_comp_none = { "none" }; struct ssh_compress *compressions[] = { &ssh_comp_none };static struct ssh_cipher *cscipher = NULL; static struct ssh_cipher *sccipher = NULL; static struct ssh_mac *csmac = NULL; static struct ssh_mac *scmac = NULL; static struct ssh_compress *cscomp = NULL; static struct ssh_compress *sccomp = NULL; static struct ssh_kex *kex = NULL; static struct ssh_hostkey *hostkeysavedpos(*ssh_protocol)(unsigned char *in, int inlen, int ispkt); static void ssh1_protocol(unsigned char *in, int inlen, int ispkt); static void ssh2static int (*s_rdpkt)(unsigned char **data, int *datalen);pher and verify the packet when it is completely read. * Drop SSH1_MSG_DEBUG and SSH1sh1 pktin.data = (pktin.data == NULL ? malloc(biglen+APIEXTRA) : realloc(pktin.data, biglen+APIEXTRA));1_SMSG_STDOUT_DATA || pktin.type == SSH1_SMSG_STDERR_DATA || pktin.type == SSH1_MSG_DEBUG || pktin.type == SSH111int ssh2_rdpkt(unsigned char **data, int *datalen) { static long len, pad, payload, packetlen, maclen; static int i; static int cipherblk; static unsigned long incoming_sequence = 0if (cipher) cipherblk = cipher->blksize; else cipherblk = 8; if (cipherblk < 8) cipherblk = 8; if (pktin.maxlen < cipherblk) { pktin.maxlen = cipherblk; pktin.data = (pktin.data == NULL ? malloc(cipherblk+APIEXTRA) : realloc(pktin.data, cipherblk+APIEXTRA)); if (!pktin.data) fatalbox("Out of memory"); } /* * Acquire and decrypt the first block of the packet. This will * contain the length and padding details. */ for (i = len = 0; i < cipherblk; i++) { while ((*datalen) == 0) crReturn(cipherblk-i); pktin.data[i] = *(*data)++; (*datalen)--; } #ifdef FWHACK if (!memcmp(pktin.data, "Remo", 4)) {/* "Remo"te server has closed ... */ /* FIXME */ } #endif if (sccipher) sccipher->decrypt(pktin.data, cipherblk); /* * Now get the length and padding figures. */ len = GET_32BIT(pktin.data); pad = pktin.data[4]; /* * This enables us to deduce the payload length. */ payload = len - pad - 1; pktin.length = payload + 5; /* * So now we can work out the total packet length. */ packetlen = len + 4; maclen = scmac ? scmac->len : 0; /* * Adjust memory allocation if packet is too big. */ if (pktin.maxlen < packetlen) { pktin.maxlen = packetlen; pktin.data = (pktin.data == NULL ? malloc(packetlen+APIEXTRA) : realloc(pktin.data, packetlen+APIEXTRA)); if (!pktin.data) fatalbox("Out of memory"); } /* * Read and decrypt the remainder of the packet. */ for (i = cipherblk; i < packetlen + maclen; i++) { while ((*datalen) == 0) crReturn(packetlen + maclen - i); pktin.data[i] = *(*data)++; (*datalen)--; } /* Decrypt everything _except_ the MAC. */ if (sccipher) sccipher->decrypt(pktin.data + cipherblk, packetlen - cipherblk); /* * Check the MAC. */ if (scmac && !scmac->verify(pktin.data, incoming_sequence++, len+4)) fatalbox("Incorrect MAC received on packet"); pktin.savedpos = 6; pktin.type = pktin.data[5]; #if 0 debug(("Got packet len=%d pad=%d\r\n", len, pad)); for (i = 0; i < payload; i++) debug((" %02x", (unsigned char)pktin.data[i])); debug(("\r\n")); #endif /* * FIXME: handle IGNORE and DEBUG messages. */ /* * Utility routine for putting an SSH-protocol `string' into a SHA * state. */ #include void sha_string(SHA_State *s, void *str, int len) { unsigned char lenblk[4]; static FILE *fp; PUT_32BIT(lenblk, len); if (!fp) fp = fopen("h:\\statham\\windows\\putty\\data","wb"); fwrite(lenblk, 4, 1, fp); SHA_Bytes(s, lenblk, 4); fwrite(str, len, 1, fp); fflush(fp); SHA_Bytes(s, str, len)if (ssh_versioncmp(version, "1.99") >= 0) { /* * This is a v2 server. Begin v2 protocol. */ char *verstring = "SSH-2.0-PuTTY"; SHA_Init(&exhash); /* * Hash our version string and their version string. */ sha_string(&exhash, verstring, strlen(verstring)); sha_string(&exhash, vstring, strcspn(vstring, "\r\n")); sprintf(vstring, "%s\n", verstring); sprintf(vlog, "We claim version: %s", verstring); logevent(vlog); logevent("Using SSH protocol version 2"); s_write(vstring, strlen(vstring)); ssh_protocol = ssh2_protocol; s_rdpkt = ssh2_rdpkt; } else { /* * This is a v1 server. Begin v1 protocol. */ sprintf(vstring, "SSH-%s-PuTTY\n", sprintf(vlog, "We claim version: %s", vstring); vlog[strcspn(vlog, "\r\n")] = '\0'; logevent(vlog); logevent("Using SSH protocol version 1"); s_write(vstring, strlen(vstring)); ssh_protocol = ssh1_protocol; s_rdpkt = ssh1_rdpkt; } return 1; } /* * Handle the key exchange and user authentication phases. */ static int do_ssh1crBegin; if (!ispkt) crWaitUntil(ispkt); if (pktin.type != SSH1111111_SMSG_FAILURE && cfg.try_tis_auth && (supported_auths_mask & (1<> 8) & 0xFF; p[i*2+2] = (b[n-i] ) & 0xFF; } i = 0; while (p[i] == 0 && (p[i+1] & 0x80) == 0) i++; memmove(p, p+i, n*2+1-i); *len = n*2+1-i; return p; } void ssh2_pkt_addmp(Bignum b) { unsigned char *p; int len; p = ssh2_mpint_fmt(b, &len); ssh2_pkt_addstring_start(); ssh2_pkt_addstring_data(p, len); free(p); } void ssh2_pkt_send(void) { int cipherblk, maclen, padding, i; unsigned long outgoing_sequence = 0; /* * Add padding. At least four bytes, and must also bring total * length (minus MAC) up to a multiple of the block size. */ cipherblk = cipher ? cipher->blksize : 8; /* block size */ cipherblk = cipherblk < 8 ? 8 : cipherblk; /* or 8 if blksize < 8 */ padding = 4; padding += (cipherblk - (pktout.length + padding) % cipherblk) % cipherblk; pktout.data[4] = padding; for (i = 0; i < padding; i++) pktout.data[pktout.length + i] = random_byte(); PUT_32BIT(pktout.data, pktout.length + padding - 4); if (csmac) csmac->generate(pktout.data, outgoing_sequence++, pktout.length + padding); if (cscipher) cscipher->encrypt(pktout.data, pktout.length + padding); maclen = csmac ? csmac->len : 0; #if 0 debug(("Sending packet len=%d\r\n", pktout.length+padding+maclen)); for (i = 0; i < pktout.length+padding+maclen; i++) debug((" %02x", (unsigned char)pktout.data[i])); debug(("\r\n")); #endif s_write(pktout.data, pktout.length + padding + maclen); } void sha_mpint(SHA_State *s, Bignum b) { unsigned char *p; int len; p = ssh2_mpint_fmt(b, &len); sha_string(s, p, len); free(p); } /* * SSH2 packet decode functions. */ void ssh2_pkt_getstring(char **p, int *length) { *p = NULL; if (pktin.length - pktin.savedpos < 4) return; *length = GET_32BIT(pktin.data+pktin.savedpos); pktin.savedpos += 4; if (pktin.length - pktin.savedpos < *length) return; *p = pktin.data+pktin.savedpos; pktin.savedpos += *length; } Bignum ssh2_pkt_getmp(void) { char *p; int i, j, length; Bignum b; ssh2_pkt_getstring(&p, &length); if (!p) return NULL; if (p[0] & 0x80) fatalbox("internal error: Can't handle negative mpints"); b = newbn((length+1)/2); for (i = 0; i < length; i++) { j = length - 1 - i; if (j & 1) b[j/2+1] |= ((unsigned char)p[i]) << 8; else b[j/2+1] |= ((unsigned char)p[i]); } return b; } void bndebug(char *string, Bignum b) { unsigned char *p; int i, len; p = ssh2_mpint_fmt(b, &len); debug(("%s", string)); for (i = 0; i < len; i++) debug((" %02x", p[i])); debug(("\r\n")); free(p); } /* * Utility routine for decoding comma-separated strings in KEXINIT. */ int in_commasep_string(char *needle, char *haystack, int haylen) { int needlen = strlen(needle); while (1) { /* * Is it at the start of the string? */ if (haylen >= needlen && /* haystack is long enough */ !memcmp(needle, haystack, needlen) && /* initial match */ (haylen == needlen || haystack[needlen] == ',') /* either , or EOS follows */ ) return 1; /* * If not, search for the next comma and resume after that. * If no comma found, terminate. */ while (haylen > 0 && *haystack != ',') haylen--, haystack++; if (haylen == 0) return 0; haylen--, haystack++; /* skip over comma itself */ } } /* * Handle the SSH2 key exchange phase. */ static int do_ssh2_kex(unsigned char *in, int inlen, int ispkt) { static int i, len; static char *str; static Bignum e, f, K; static struct ssh_cipher *cscipher_tobe = NULL; static struct ssh_cipher *sccipher_tobe = NULL; static struct ssh_mac *csmac_tobe = NULL; static struct ssh_mac *scmac_tobe = NULL; static struct ssh_compress *cscomp_tobe = NULL; static struct ssh_compress *sccomp_tobe = NULL; static char *hostkeydata, *sigdata; static int hostkeylen, siglen; static unsigned char exchange_hash[20]; crBegin; /* * Construct and send our key exchange packet. */ ssh2_pkt_init(SSH2_MSG_KEXINIT); for (i = 0; i < 16; i++) ssh2_pkt_addbyte((unsigned char)random_byte()); /* List key exchange algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(kex_algs); i++) { ssh2_pkt_addstring_str(kex_algs[i]->name); if (i < lenof(kex_algs)-1) ssh2_pkt_addstring_str(","); } /* List server host key algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(hostkey_algs); i++) { ssh2_pkt_addstring_str(hostkey_algs[i]->name); if (i < lenof(hostkey_algs)-1) ssh2_pkt_addstring_str(","); } /* List client->server encryption algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(ciphers); i++) { ssh2_pkt_addstring_str(ciphers[i]->name); if (i < lenof(ciphers)-1) ssh2_pkt_addstring_str(","); } /* List server->client encryption algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(ciphers); i++) { ssh2_pkt_addstring_str(ciphers[i]->name); if (i < lenof(ciphers)-1) ssh2_pkt_addstring_str(","); } /* List client->server MAC algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(macs); i++) { ssh2_pkt_addstring_str(macs[i]->name); if (i < lenof(macs)-1) ssh2_pkt_addstring_str(","); } /* List server->client MAC algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(macs); i++) { ssh2_pkt_addstring_str(macs[i]->name); if (i < lenof(macs)-1) ssh2_pkt_addstring_str(","); } /* List client->server compression algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(compressions); i++) { ssh2_pkt_addstring_str(compressions[i]->name); if (i < lenof(compressions)-1) ssh2_pkt_addstring_str(","); } /* List server->client compression algorithms. */ ssh2_pkt_addstring_start(); for (i = 0; i < lenof(compressions); i++) { ssh2_pkt_addstring_str(compressions[i]->name); if (i < lenof(compressions)-1) ssh2_pkt_addstring_str(","); } /* List client->server languages. Empty list. */ ssh2_pkt_addstring_start(); /* List server->client languages. Empty list. */ ssh2_pkt_addstring_start(); /* First KEX packet does _not_ follow, because we're not that brave. */ ssh2_pkt_addbool(FALSE); /* Reserved. */ ssh2_pkt_adduint32(0); sha_string(&exhash, pktout.data+5, pktout.length-5); ssh2_pkt_send(); if (!ispkt) crWaitUntil(ispkt); sha_string(&exhash, pktin.data+5, pktin.length-5); /* * Now examine the other side's KEXINIT to see what we're up * to. */ if (pktin.type != SSH2_MSG_KEXINIT) fatalbox("expected key exchange packet from server"); kex = NULL; hostkey = NULL; cscipher_tobe = NULL; sccipher_tobe = NULL; csmac_tobe = NULL; scmac_tobe = NULL; cscomp_tobe = NULL; sccomp_tobe = NULL; pktin.savedpos += 16; /* skip garbage cookie */ ssh2_pkt_getstring(&str, &len); /* key exchange algorithms */ for (i = 0; i < lenof(kex_algs); i++) { if (in_commasep_string(kex_algs[i]->name, str, len)) { kex = kex_algs[i]; break; } } ssh2_pkt_getstring(&str, &len); /* host key algorithms */ for (i = 0; i < lenof(hostkey_algs); i++) { if (in_commasep_string(hostkey_algs[i]->name, str, len)) { hostkey = hostkey_algs[i]; break; } } ssh2_pkt_getstring(&str, &len); /* client->server cipher */ for (i = 0; i < lenof(ciphers); i++) { if (in_commasep_string(ciphers[i]->name, str, len)) { cscipher_tobe = ciphers[i]; break; } } ssh2_pkt_getstring(&str, &len); /* server->client cipher */ for (i = 0; i < lenof(ciphers); i++) { if (in_commasep_string(ciphers[i]->name, str, len)) { sccipher_tobe = ciphers[i]; break; } } ssh2_pkt_getstring(&str, &len); /* client->server mac */ for (i = 0; i < lenof(macs); i++) { if (in_commasep_string(macs[i]->name, str, len)) { csmac_tobe = macs[i]; break; } } ssh2_pkt_getstring(&str, &len); /* server->client mac */ for (i = 0; i < lenof(macs); i++) { if (in_commasep_string(macs[i]->name, str, len)) { scmac_tobe = macs[i]; break; } } ssh2_pkt_getstring(&str, &len); /* client->server compression */ for (i = 0; i < lenof(compressions); i++) { if (in_commasep_string(compressions[i]->name, str, len)) { cscomp_tobe = compressions[i]; break; } } ssh2_pkt_getstring(&str, &len); /* server->client compression */ for (i = 0; i < lenof(compressions); i++) { if (in_commasep_string(compressions[i]->name, str, len)) { sccomp_tobe = compressions[i]; break; } } debug(("key exchange is %s\r\n", kex ? kex->name : NULL)); debug(("host key alg is %s\r\n", hostkey ? hostkey->name : NULL)); debug(("cscipher alg is %s\r\n", cscipher_tobe ? cscipher_tobe->name : NULL)); debug(("sccipher alg is %s\r\n", sccipher_tobe ? sccipher_tobe->name : NULL)); debug(("csmac alg is %s\r\n", csmac_tobe ? csmac_tobe->name : NULL)); debug(("scmac alg is %s\r\n", scmac_tobe ? scmac_tobe->name : NULL)); debug(("cscomp alg is %s\r\n", cscomp_tobe ? cscomp_tobe->name : NULL)); debug(("sccomp alg is %s\r\n", sccomp_tobe ? sccomp_tobe->name : NULL)); /* * Currently we only support Diffie-Hellman and DSS, so let's * bomb out if those aren't selected. */ if (kex != &ssh_diffiehellman || hostkey != &ssh_dss) fatalbox("internal fault: chaos in SSH 2 transport layer"); /* * Now we begin the fun. Generate and send e for Diffie-Hellman. */ e = dh_create_e(); bndebug("e=", e); ssh2_pkt_init(SSH2_MSG_KEXDH_INIT); ssh2_pkt_addmp(e); ssh2_pkt_send(); crWaitUntil(ispkt); if (pktin.type != SSH2_MSG_KEXDH_REPLY) fatalbox("expected key exchange packet from server"); ssh2_pkt_getstring(&hostkeydata, &hostkeylen); f = ssh2_pkt_getmp(); bndebug("f=", f); ssh2_pkt_getstring(&sigdata, &siglen); K = dh_find_K(f); bndebug("K=", K); sha_string(&exhash, hostkeydata, hostkeylen); sha_mpint(&exhash, e); sha_mpint(&exhash, f); sha_mpint(&exhash, K); SHA_Final(&exhash, exchange_hash); debug(("Exchange hash is:\r\n")); for (i = 0; i < 20; i++) debug((" %02x", exchange_hash[i])); debug(("\r\n")); /* * FIXME: verify hostkeydata and sigdata. */ crWaitUntil(0); crFinish(1); } static void ssh22_kex(in, inlen, ispkt)) { crReturnV;1111_MSG_DISCONNECT) { logevent("Received disconnect request"); } else if (pktin.type == SSH1_SMSG_SUCCESS || pktin.type == SSH1_SMSG_FAILURE) { /* ignore */ } else if (pktin.type == SSH111111 Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2bf4cc7847cedad3604faa7b4ca42a8d Text-content-length: 1214 Text-content-md5: 291fded180d223a2c23b2f8bc5a48ab3 Content-length: 1254 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN%tqE嘓乽&圗3塱俛#include /* * Useful thing. */ #ifndef lenof #define lenof(x) ( (sizeof((x))) / (sizeof(*(x)))) #endif#ifdef MSCRYPTOAPI #define APIEXTRA 8 #else #define APIEXTRA 0 #endiftypedef struct { uint32 h[5]; unsigned char block[64]; int blkused; uint32 lenhi, lenlo; } SHA_State; void SHA_Init(SHA_State *s); void SHA_Bytes(SHA_State *s, void *p, int len); void SHA_Final(SHA_State *s, unsigned char *outpu char *name; int blksize; }; struct ssh_mac { void (*sesskey)(unsigned char *key, int len); void (*generate)(unsigned char *blk, int len, unsigned long seq); int (*verify)(unsigned char *blk, int len, unsigned long seq); char *name; int len; }; struct ssh_kex { char *name; }; struct ssh_hostkey { char *name; }; struct ssh_compress { char *name /* * A Bignum is stored as a sequence of `unsigned short' words. The * first tells how many remain; the remaining ones are digits, LS * first. */ typedef unsigned short *Bignum; Bignum newbn(int length); void freebn(Bignum b); void modpow(Bignum base, Bignum exp, Bignum mod, Bignum result); Bignum dh_create_e(void); Bignum dh_find_K(Bignum f); Node-path: putty/sshblowf.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: dc8b7147c65bbc568c793514e4289514 Text-content-length: 50 Text-content-md5: e62d72a8e506731af86effe1ae0d5eac Content-length: 89 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN亾T亾o亾P, "blowfish-cbc", 8 }; Node-path: putty/sshbn.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 3131 Text-content-md5: b677953c6f2cc22c152fc6f9ecd48812 Content-length: 3247 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN8嶸塝濶4働D凞DJ4疍o咲婭.圖*婩/E乕岻乣婩匟嶩処 婬圗 侷俒嘐%圖侸圙俥僃%侲乕塉咵俷丗俥揊$咶侸丏僤丗俥D僂 孖僈孏僽I僈侱僼丣亃侲咶丒"丩僈侳僟D僺F僉嶪乣匟凪H凥丟$哠匢F%丒7I'L凲亃P凘QQ匜H乻丟咶!凥俋H侾婩哶婲 丟僽D廌俓婦0D=孌O侶D 侴哵F俥F)侱=丒7嘝侾DD9僁汫8S嘖G D 凟凥D侲<丗慏.塂圵D圗凟哴婨F<匛塅F)侼塉侻塜丗.M0匫凱 俁奒侳8N妛G哰侹俍僃俥I 孞僿丗噡嘍凟嘍噠丩6丩婥丟婸D匘媢團媏乛=DD妛丏5侱M#匘I孒P孷嘓宨H丩宼F両宩岲媅乄D妛丷"丒5僉=乂 F塭S塕F僞 僁俀+岴=嘐;沄!俤9侾O 哋D!GG丟6奅圸E儃D婩凥坋FF怺F F僃宍丏 塂恴丏E 丒 F L)丗7侱唘I 侲慓D N媖D侲匛孋N#D0M"婦丏怽両孋丟+侱厏L7処 F扽H扏僁嘇奃侱慏侳丳孷丩ED丒 D/E;丒揂E抲丗乧孌塧奃.僄DDD 侲恅FF宍DH侳*僐丮)丏G孍僆宩侲E宭D揋扗怐塃H恊丏O孷匭妑g:僃攊G抯擠2凟D4I"丩婥丟婸丮孉IDH侻宨丠M9H恊PE昛D擹嘕抇僁攖R%J奌圵D塧咵D匛哾I朶D揅I儀]朄丒孡G杦F楾F桳D榐G桳VEN丏 W峜侱匛侷 E>E凞唜咶塋嘔 匘 匘俵僂;侷橽凞E=塂檒丒塎丗塺匘塆D圗凟坹侳歒DE歊F.E7咺%侸侻僆侼僆侼F欿WD奍D奬咼俥匞峘E沨凣H怈丏唞D揾丏塧E歞F泑凟歰凥坋丒6僁2丏乽侱泈嘔坋E恗D*J慘J唘E渆丠坹VI=D婽侲渄僁憑僁榲D渓F渓僁宧I怈D沶嘐1嘓1H坋E億F沴F-G凥僃丏慗DF沴F 婮!H濦丟$J慽F渄F媫E.E慞G岼EK=丒D嘒濦咲渆F抜J烡I=M8L 乀E>凥坋E渉j渳D媢G瀨DI P'丟;丗滳G僁P'H燶H爗侲滵E燶G燶O漇IG塭I侱渆匛峺I恅D峼G&丏cK唗hP瀕FG憍EI侳F抜並漍僁匩丏搙DD1E塦処恆H-丏#E%ED瀘丏D?凞G塂焂僇1丒攋DD3D5DI丠$H焝侱圶E-処QE瀏GF婳I擿G3丏E泒J侲D烜H侱嘩丯1E3\丠 丟3両D#J1E僁N1J扜JG汵I 侳侳4H0丗9F!僉4O匟欽H梷K檙匛沵侺恆T瀉K瀨IPG丒NGR2NLK焃V"I瀕MDGEQ侽"G╙N5N焑丏*G欿塎GH瀤HF欿丟&HF榚D K漌嶧歴乆VF丮僽W猼D%KDTKGH乥玂丯獲D6/* * Bignum routines for RSA and DHstuff. */ #include libring"ssh.h" static unsigned short Zero[1] = { 0 };f defiTESTMODE ||RSADEBUGndef DLVL # 10000 #endifdebug(x) bn#x,x)int level = 0;voidchar *name,b) { i;w = 50--strlen()-5*b[0]f (>=) returnw < 0)0dprintf("%*s%s%*s",, "", w)(i= i>0; i--) %04x", b[i]\n}msdo {if<{", x;}} while(0)enter;+= 4; leave-else newbn(ngth = malloc((+1)*sizeof()!b) abort(); /* FIXMEmemset(b, 0,*b = b freebn(* Bthe evidence, just in case.) * + 1(b Compute c = a * b Input isfirs words of aResuled2*cigmul *a,*bc,) , jlong ai, t; j - 1; j0; jc[j+len0ii { aa[i]; t tai) b[jc[i+j+1 t= t >> 16; }i}a% mnOut(ofchwill be zero)The MSW MUST have its high bit setodm,m0, m1k/* Special== 1(((a<< 16) + ) }m0m1 <; i++q, r, c; i0h} a[i- ind q = h: /*/(ht%Rour estimateq by lookit :mq;t >r+q---=(r + m0) & 0xffff;overflow?rm0 && Substract q * m from...]kkk[kck]) c+++k]Add back mborrowc != }(b^ expodbe ser thamodulusmost ificaordodnon-We assumetrarraysame amodpowasexpmod*n, *mmshiflen,Amcopyto m/use anernally* <; jm[j - m leftake msb< 15++)(8000) break{|>> (16-); m[nto nini+2*. Set2a[1kipdexp.=<&& (- i] & (1j))j Maatioab,odm! bod(a;b;}} Fixup was ed(>>Cto buffer[Free temporarysamn} Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 19a36719af89d601af74c8600d045dd6 Text-content-length: 132 Text-content-md5: 275cbe6c906897e41b26e843254d7eb0 Content-length: 171 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN佨/佪i佖6僽佖6R, "3des-cbc", 8, "des-cbc", /* should never be used - not a valid cipher in ssh2 */ 8 }; Node-path: putty/sshdh.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1727 Text-content-md5: be3c0898554db1461de4ae85cb98cca5 Content-length: 1843 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN?9唞燛桭%丟+\I2僂6嘯6凞=凞=僂乗凥1侳乧凞=僂乗僂<凟乁僂乪侲僆乼凟=侲乨僂乨侳;僂凟乵侲(凥1僃乨僁=僂乨僂 僂 侳乲僂侱処乽丗俴僂<侳7僂僂凞=凟僅1僂侱凟僓侲(僂僼凟僝侲億僃俆僅1僂僃俵僂 侲0僂乗凢 丗僱僆処丗僂刣僂0僝慓4嘐媨廏慟塅慠D\D僂8孌怐咲奺凟奷廐凢#丟丒D妉桭D慤侱%侳3丏:奊2G僄#侴慟J憓凞抣孍憅W扱乑抜凟凧抷D-咶慓丏抌丒抩圗揚J抷処憁V;侱恾e揥G抪塇慏M哊$O擿Q丼昑K2丳<塋KM扲D朓F慭丗慶D旹塂怐凥慺丟 僎怞圝恉侷匥朜M*嘒>丠慏G>D桲X杊丠丟杛G丏#include "ssh.h" struct ssh_kexdiffiehellman = { "--group1-sha1" }; /* * The prime p used in the key exchange. */ static unsigned short P[]64,0xFFFF,5381ECE666549281F7C4B241AE99FA5A89BFEE3B7ED405CB0BED6A6372EF44C7EC25EB57E48C246D3564FE14F250A302431CD3A19B3F9504D8E34875149B22B1BEA20BCC78A6E08901CD80DC84C62216DAAC90order q of: (p-1)/2.Q29C067332498FF292D74CFDAD435F715BFA0AE5856BD217A23F612DABF24E1B6A9AA7F0AF9853981218E69CD7CA26C7104328CD91DDF5010E6453270940EC0312636110BEE487bitmask covering q (for easegenerationx)or g = G 1, 2 VariablesBignum x, eDH stage 1: invent a number x between 1 and q,compute e =g^x mod p. Return edh_create_e(void)int i; x = newbn(Q[0])tryagain:* C a potentialby ANDa stof random byteswith./(i = 1; i <= x[0]; i++)[i((_() << 8) +) &i]If x1, go round 2if (!= 0break;f> && x[1]goto>= > 0; i--> Q[i]<}Done. NowPmodpow(G,P, er; }2: givenf,K = ffind_K(ffKK Node-path: putty/sshdss.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 72 Text-content-md5: b4a0c491a1cf43fb4dbd7d6a3fa7cc75 Content-length: 188 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVNB8婨#include "ssh.h" struct ssh_hostkeydss = { -dss" }; Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3d9ba38ff01ac8ed934e2bb514a77c47 Text-content-length: 42 Text-content-md5: 23681d826a66de1e3498922e7b12bff7 Content-length: 81 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN焌乄!2榊珼#include "ssh.h" Node-path: putty/sshsha.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 77d1c7ac26672ca3371d525f300a15bc Text-content-length: 5145 Text-content-md5: d95d30d0a12b0e5f7c8a80243627af89 Content-length: 5184 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN妢皕 刾坸/* * SHA1 hash algorithm. Used in SSH2 as a MAC, and the transform is * also used as a `stirring' function for the PuTTY random number * pool. Implemented directly from the specification by Simon * Tatham. */ #include "ssh.h" typedef unsigned int uint32; /* ---------------------------------------------------------------------- * Core SHA algorithm: processes 16-word blocks into a message digest. */ #define rol(x,y) ( ((x) << (y)) | (((uint32)x) >> (32-y)) ) void SHA_Core_Init(uint32 h[5]) { h[0] = 0x67452301; h[1] = 0xefcdab89; h[2] = 0x98badcfe; h[3] = 0x10325476; h[4] = 0xc3d2e1f0; } /* ---------------------------------------------------------------------- * Outer SHA algorithm: take an arbitrary length byte string, * convert it into 16-word blocks with the prescribed padding at * the end, and pass those blocks to the core SHA algorithm. */ void SHA_Init(SHA_State *s) { SHA_Core_Init(s->h); s->blkused = 0; s->lenhi = s->lenlo = 0; } void SHA_Bytes(SHA_State *s, void *p, int len) { unsigned char *q = (unsigned char *)p; uint32 wordblock[16]; uint32 lenw = len; int i; /* * Update the length field. */ s->lenlo += lenw; s->lenhi += (s->lenlo < lenw); if (s->blkused && s->blkused+len < 64) { /* * Trivial case: just add to the block. */ memcpy(s->block + s->blkused, q, len); s->blkused += len; } else { /* * We must complete and process at least one block. */ while (s->blkused + len >= 64) { memcpy(s->block + s->blkused, q, 64 - s->blkused); q += 64 - s->blkused; len -= 64 - s->blkused; /* Now process the block. Gather bytes big-endian into words */ for (i = 0; i < 16; i++) { wordblock[i] = ( ((uint32)s->block[i*4+0]) << 24 ) | ( ((uint32)s->block[i*4+1]) << 16 ) | ( ((uint32)s->block[i*4+2]) << 8 ) | ( ((uint32)s->block[i*4+3]) << 0 ); } SHATransform(s->h, wordblock); s->blkused = 0; } memcpy(s->block, q, len); s->blkused = len; } } void SHA_Final(SHA_State *s, unsigned char *output) { int i; int pad; unsigned char c[64]; uint32 lenhi, lenlo; if (s->blkused >= 56) pad = 56 + 64 - s->blkused; else pad = 56 - s->blkused; lenhi = (s->lenhi << 3) | (s->lenlo >> (32-3)); lenlo = (s->lenlo << 3); memset(c, 0, pad); c[0] = 0x80; SHA_Bytes(s, &c, pad); c[0] = (lenhi >> 24) & 0xFF; c[1] = (lenhi >> 16) & 0xFF; c[2] = (lenhi >> 8) & 0xFF; c[3] = (lenhi >> 0) & 0xFF; c[4] = (lenlo >> 24) & 0xFF; c[5] = (lenlo >> 16) & 0xFF; c[6] = (lenlo >> 8) & 0xFF; c[7] = (lenlo >> 0) & 0xFF; SHA_Bytes(s, &c, 8); for (i = 0; i < 5; i++) { output[i*4 ] = (s->h[i] >> 24) & 0xFF; output[i*4+1] = (s->h[i] >> 16) & 0xFF; output[i*4+2] = (s->h[i] >> 8) & 0xFF; output[i*4+3] = (s->h[i] ) & 0xFF; } } void SHA_Simple(void *p, int len, unsigned char *output) { SHA_State s; SHA_Init(&s); SHA_Bytes(&s, p, len); SHA_Final(&s, output); } /* ---------------------------------------------------------------------- * The above is the SHA-1 algorithm itself. Now we implement the * HMAC wrapper on it. */ static SHA_State sha1_mac_s1, sha1_mac_s2; static void sha1_sesskey(unsigned char *key, int len) { unsigned char foo[64]; int i; memset(foo, 0x36, 64); for (i = 0; i < len && i < 64; i++) foo[i] ^= key[i]; SHA_Init(&sha1_mac_s1); SHA_Bytes(&sha1_mac_s1, foo, 64); memset(foo, 0x5C, 64); for (i = 0; i < len && i < 64; i++) foo[i] ^= key[i]; SHA_Init(&sha1_mac_s2); SHA_Bytes(&sha1_mac_s2, foo, 64); memset(foo, 0, 64); /* burn the evidence */ } static void sha1_do_hmac(unsigned char *blk, int len, unsigned long seq, unsigned char *hmac) { SHA_State s; unsigned char intermediate[20]; intermediate[0] = (unsigned char)((seq >> 24) & 0xFF); intermediate[1] = (unsigned char)((seq >> 16) & 0xFF); intermediate[2] = (unsigned char)((seq >> 8) & 0xFF); intermediate[3] = (unsigned char)((seq ) & 0xFF); s = sha1_mac_s1; /* structure copy */ SHA_Bytes(&s, intermediate, 4); SHA_Bytes(&s, blk, len); SHA_Final(&s, intermediate); s = sha1_mac_s2; /* structure copy */ SHA_Bytes(&s, intermediate, 20); SHA_Final(&s, hmac); } static void sha1_generate(unsigned char *blk, int len, unsigned long seq) { sha1_do_hmac(blk, len, seq, blk+len); } static int sha1_verify(unsigned char *blk, int len, unsigned long seq) { unsigned char correct[20]; sha1_do_hmac(blk, len, seq, correct); return !memcmp(correct, blk+len, 20); } struct ssh_mac ssh_sha1 = { sha1_sesskey, sha1_generate, sha1_verify, "hmac-sha1", 20 }; Revision-number: 570 Prop-content-length: 172 Content-length: 172 K 7 svn:log V 72 Second attempt. Can successfully decrypt the _first block_ of a packet. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-05T16:23:36.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9711937c0121a61ad3f92f0141c48ec9 Text-content-length: 2207 Text-content-md5: 3961aa285291715dbc481a02007af7b8 Content-length: 2247 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN儌R儜GB怬楬乕榢璚欽俛園萟I襷Y乑伝{$8刜倫礹倲p穀偸ykey(unsigned char *keykey, nullmac_debug(("Got initblk:")); for (i = 0; i < cipherblk; i++) debug((" %02x", (unsigned char)pktin.data[i])); debug(("\r\n")); if (sccipher) sccipher->decrypt(pktin.data, cipherblk); debug(("Decrypted initblk:")); for (i = 0; i < cipherblk; i++) debug((" %02x", (unsigned char)pktin.data[i])); debug(("\r\n")cketlen; i++) debug((" %02x", (unsigned char)pktin.data[i])); debug(("\r\n")SSH2 key creation method. */ void ssh2_mkkey(Bignum K, char *H, char chr, char *keyspace) { SHA_State s; /* First 20 bytes. */ SHA_Init(&s); sha_mpint(&s, K); SHA_Bytes(&s, H, 20); SHA_Bytes(&s, &chr, 1); SHA_Bytes(&s, H, 20); SHA_Final(&s, keyspace); /* Next 20 bytes. */ SHA_Init(&s); sha_mpint(&s, K); SHA_Bytes(&s, H, 20); SHA_Bytes(&s, keyspace, 20); SHA_Final(&s, keyspace+20); static unsigned char keyspace[4 key. This bit will be moderately * unpleasant, because of having to rewrite it to work * alongside the old scheme. */ /* * FIXME: verify signature of exchange hash. */ /* * Send SSH2_MSG_NEWKEYS. Expect it from server. */ ssh2_pkt_init(SSH2_MSG_NEWKEYS); ssh2_pkt_send(); crWaitUntil(ispkt); if (pktin.type != SSH2_MSG_NEWKEYS) fatalbox("expected new-keys packet from server"); /* * Create and initialise session keys. */ cscipher = cscipher_tobe; sccipher = sccipher_tobe; csmac = csmac_tobe; scmac = scmac_tobe; cscomp = cscomp_tobe; sccomp = sccomp_tobe; /* * Set IVs after keys. */ ssh2_mkkey(K, exchange_hash, 'C', keyspace); cscipher->setcskey(keyspace); ssh2_mkkey(K, exchange_hash, 'D', keyspace); cscipher->setsckey(keyspace); ssh2_mkkey(K, exchange_hash, 'A', keyspace); cscipher->setcsiv(keyspace); ssh2_mkkey(K, exchange_hash, 'B', keyspace); sccipher->setsciv(keyspace); ssh2_mkkey(K, exchange_hash, 'E', keyspace); csmac->setcskey(keyspace); ssh2_mkkey(K, exchange_hash, 'F', keyspace); scmac->setsckey(keyspace); Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 291fded180d223a2c23b2f8bc5a48ab3 Text-content-length: 355 Text-content-md5: 93cbd9b4a82921c03da332c394908752 Content-length: 395 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN%朑侱(((D3峳 /* for ssh 1 */ void (*setcsiv)(unsigned char *key); /* for ssh 2 */ void (*setcskey)(unsigned char *key); /* for ssh 2 */ void (*setsciv)(unsigned char *key); /* for ssh 2 */ void (*setsckey)(unsigned char *key); /* for ssh 2 */tcskey)(unsigned char *key); void (*setsckey)(unsigned char *key Node-path: putty/sshblowf.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: e62d72a8e506731af86effe1ae0d5eac Text-content-length: 643 Text-content-md5: a81469309443cc5eacfaba38b8f2dd31 Content-length: 682 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN亾o仒y刟亸H-儂亸1V亾cskey(unsigned char *key) { blowfish_setkey(&ectx, key, 16); logevent("Initialised Blowfish client->server encryption"); } static void blowfish_sckey(unsigned char *key) { blowfish_setkey(&dctx, key, 16); logevent("Initialised Blowfish server->client encryption"); } static void blowfish_csiv(unsigned char *key) { ectx.iv0 = GET_32BIT_LSB_FIRST(key); ectx.iv1 = GET_32BIT_LSB_FIRST(key+4); } static void blowfish_sciv(unsigned char *key) { dctx.iv0 = GET_32BIT_LSB_FIRST(key); dctx.iv1 = GET_32BIT_LSB_FIRST(key+4); }csiv, blowfish_cskey, blowfish_sciv, blowfish_sc Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 275cbe6c906897e41b26e843254d7eb0 Text-content-length: 1036 Text-content-md5: 0f213a1c60fc6715ecf80a65cc4242a4 Content-length: 1076 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN佪佷]O/佉bv佊h佊vi佋^u佖fh佊vi佋^j佒gn乀佖佡[h佢y{{佨cskeys[3], sckeys[3]; static void des3_ccscscskeys[2]); logevent("Initialised triple-DES client->server encryption"); } static void des3_csiv(unsigned char *key) { cskeys[0].eiv0 = GET_32BIT_MSB_FIRST(key); cskeys[0].eiv1 = GET_32BIT_MSB_FIRST(key+4); } static void des3_sciv(unsigned char *key) { sckeys[0].div0 = GET_32BIT_MSB_FIRST(key); sckeys[0].div1 = GET_32BIT_MSB_FIRST(key+4); } static void des3_scscscsckeys[2]); logevent("Initialised triple-DES server->client encryption"); } static void des3_sesskey(unsigned char *key) { des3_cskey(key); des3_sckey(key); } static void des3_encrypt_blk(unsigned char *blk, int len) { des_3cbc_encrypt(blk, blk, len, cssckeys); } struct ssh_cipher ssh_3des = { des3_sesskey, des3_csiv, des3_cskey, des3_sciv, des3_sccscscskeys); } struct ssh_cipher ssh_des = { des_sesskey, NULL, NULL, NULL, NULL, /* SSH 2 bits - unused */ Node-path: putty/sshsha.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d95d30d0a12b0e5f7c8a80243627af89 Text-content-length: 833 Text-content-md5: 03578f9f6464b060a0ef42a5bf3cff19 Content-length: 872 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN皕2'0y- 7玁丗琹2D6cs_mac_s1, sha1_cs_mac_s2; static SHA_State sha1_sc_mac_s1, sha1_sc_mac_s2; static void sha1_key(SHA_State *s1, SHA_State *s2, s1); SHA_Bytes(s2); SHA_Bytes(s2, foo, 64); memset(foo, 0, 64); /* burn the evidence */ } static void sha1_cskey(unsigned char *key) { sha1_key(&sha1_cs_mac_s1, &sha1_cs_mac_s2, key, 20); } static void sha1_sckey(unsigned char *key) { sha1_key(&sha1_sc_mac_s1, &sha1_sc_mac_s2, key, 20); } static void sha1_do_hmac(SHA_State *s1, SHA_State *s2, *s1; *s2; &sha1_cs_mac_s1, &sha1_cs_mac_s2, &sha1_sc_mac_s1, &sha1_sc_mac_s2, blk, len, seq, correct); return !memcmp(correct, blk+len, 20); } struct ssh_mac ssh_sha1 = { sha1_cskey, sha1_sc Revision-number: 571 Prop-content-length: 174 Content-length: 174 K 7 svn:log V 74 SSH2 transport layer now enables encryption and MAC successfully for 3DES K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-06T09:55:32.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3961aa285291715dbc481a02007af7b8 Text-content-length: 543 Text-content-md5: 63fe247d682f2d1896726580fbab0036 Content-length: 583 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN儜G償?2僟9攠6仮j 侙i =侢64穃傎k3des_ssh2_ssh2len+4, incoming_sequence)) fatalbox("Incorrect MAC received on packet"); incoming_sequence++; /* whether or not we MACed */staticpktout.length + padding, outgoing_sequence); outgoing_sequence++; /* whether or not we MACed *//* * Now we're encrypting. Send a test packet (FIXME). */ crWaitUntil(!ispkt); ssh2_pkt_init(SSH2_MSG_IGNORE); ssh2_pkt_addstring("oo-er"); ssh2_pkt_send( Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0f213a1c60fc6715ecf80a65cc4242a4 Text-content-length: 1228 Text-content-md5: 209dd94714f4d886c3b784bc7f029093 Content-length: 1268 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN佷]侓hP坣佇$~佇@s5伵Kt佁73佇$佇=b伾c/伿\x丣佁媈佉K僟匭佭 #include #include /* FIXME */ #include /* FIXME */ #include "putty.h" /* FIXME */ #include "ssh.h" cbc3_enword32 out[2], iv0, iv1; unsigned int i; assert((len & 7) == 0); iv0 = scheds->eiv0; iv1 = scheds&scheds[0]); des_decipher(out, out[0], out[1], &scheds[1]); des_encipher(out, out[0], out[1], &scheds[2]); iv0 = out[0]; iv1 } scheds->eiv0 = iv0; scheds->eiv1 = iv1void des_cbc3s->div0; iv1 = scheds&scheds[2]); des_encipher(out, out[0], out[1], &scheds[1]); des_decipher(out, out[0], out[1], &scheds[0]s->div0 = iv0; scheds->div1 = iv1atic void des3_ssh2_encrypt_blk(unsigned char *blk, int len) { des_cbc3_encrypt(blk, blk, len, cskeys); } static void des3_ssh2_decrypt_blk(unsigned char *blk, int len) { des_cbc3_decrypt(blk, blk, len, sckeys); } struct ssh_cipher ssh_3des_ssh2 = { NULL, des3_csiv, des3_cskey, des3_sciv, des3_sckey, des3_ssh2_encrypt_blk, des3_ssh2_decrypt_blk, "3des-cbc", 8 }; struct ssh_cipher ssh_3des = { des3_sesskey, NULL, NULL, NULL, NULL Node-path: putty/sshsha.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 03578f9f6464b060a0ef42a5bf3cff19 Text-content-length: 1044 Text-content-md5: bb354e257aaac9ce0d6d5a548d05d72a Content-length: 1083 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN簃噆a 妉p3倉%瞛#include /* FIXME */ #include /* FIXME */ #include "putty.h" /* FIXME */ {int j; debug(("Key supplied is:\r\n")); for (j=0; j 伮U丂伱cY凷伵!SG伿;&`佂v_佄n`伣' 佌w奪倢i僃倵q倹7?倻=F 偝:俲偵4偺4丼/傁?傂m乨 傇X9傉P塲h伖""伜 P伬0)伵%區c伣'T佒u 併]乵\佺2祕傓DRSA 6 #define SSH1_SMSG_AUTH_RSA_CHALLENGE 7 #define SSH1_CMSG_AUTH_RSA_RESPONSE 8#define SSH2_MSG_USERAUTH_REQUEST 50 #define SSH2_MSG_USERAUTH_FAILURE 51 #define SSH2_MSG_USERAUTH_SUCCESS 52 #define SSH2_MSG_USERAUTH_BANNER 53 #define SSH2_MSG_USERAUTH_PK_OK 60 #define SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ 60 #define SSH2_MSG_GLOBAL_REQUEST 80 #define SSH2_MSG_REQUEST_SUCCESS 81 #define SSH2_MSG_REQUEST_FAILURE 82 #define SSH2_MSG_CHANNEL_OPEN 90 #define SSH2_MSG_CHANNEL_OPEN_CONFIRMATION 91 #define SSH2_MSG_CHANNEL_OPEN_FAILURE 92 #define SSH2_MSG_CHANNEL_WINDOW_ADJUST 93 #define SSH2_MSG_CHANNEL_DATA 94 #define SSH2_MSG_CHANNEL_EXTENDED_DATA 95 #define SSH2_MSG_CHANNEL_EOF 96 #define SSH2_MSG_CHANNEL_CLOSE 97 #define SSH2_MSG_CHANNEL_REQUEST 98 #define SSH2_MSG_CHANNEL_SUCCESS 99 #define SSH2_MSG_CHANNEL_FAILURE 100 #define SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED 1 #define SSH2_OPEN_CONNECT_FAILED 2 #define SSH2_OPEN_UNKNOWN_CHANNEL_TYPE 3 #define SSH2_OPEN_RESOURCE_SHORTAGE 4 #define SSH2_EXTENDED_DATA_STDERR , PKT_BIGNUM#define crWaitUntilV(c) do { crReturnVif (sccipher) sccipher->decrypt(pktin.data, cipherblk#if 0#endifif (pktin.type == SSH2_MSG_IGNORE || pktin.type == SSH2_MSG_DEBUG) goto next_packet; /* FIXME: print DEBUG message Bignum bn; int icase PKT_BIGNUM: bn = va_arg(args, Bignum); i = 16 * bn[0] - 1; while ( i > 0 && (bn[i/16+1] >> (i%16)) == 0 ) i--; pktlen += 2 + (i+7)/8 case PKT_BIGNUM: bn = va_arg(args, Bignum); i = 16 * bn[0] - 1; while ( i > 0 && (bn[i/16+1] >> (i%16)) == 0 ) i--; *p++ = (i >> 8) & 0xFF; *p++ = i & 0xFF; i = (i + 7) / 8; while (i-- > 0) { if (i % 2) *p++ = bn[i/2+1] >> 8; else *p++ = bn[i/2+1] & 0xFF; } #if 0 debug(("Sending packet len=%d\r\n", pktout.length+padding)); for (i = 0; i < pktout.length+padding s_write(pktout.data, pktout.length + padding + maclen); } #if 0%02x", p[i])); debug(("\r\n")); free(p); } #endif void sha_mpint(SHA_State *s, unsigned long ssh2_pkt_getuint32(void) { unsigned long value; if (pktin.length - pktin.savedpos < 4) return 0; /* arrgh, no way to decline (FIXME?) */ value = GET_32BIT(pktin.data+pktin.savedpos); pktin.savedpos += 4; return value; }2.0" /* FIXME: "1.99" */ static int tried_publickey; static unsigned char session_id[16], 0); j = makekey(pktin.body+8+i, &hostkey, &keystr2, 0tried_publickey = 0 if (*cfg.keyfile && !tried_publickey) pwpkt_type = SSH1_CMSG_AUTH_RSA if (pktin.type == SSH1_SMSG_FAILURE && cfg.try_tis_auth && pwpkt_type = SSH1_CMSG_AUTH_TIS_RESPONSE; logevent("Requested TIS authentication"); send_packet(SSH1_CMSG_AUTH_TIS, PKT_END); crWaitUntil(ispkt); if (pktin.type != SSH1_SMSG_AUTH_TIS_CHALLENGE) { logevent("TIS authentication declined"); c_write("TIS authentication refused.\r\n", 29); } else { (pktin.body[1] << 16) | (pktin.body[3])); logevent("Received TIS challenge"); c_write(pktin.body+4, challengelen); } } if (pwpkt_type == SSH1_CMSG_AUTH_PASSWORD) c_write("password: ", 10); if (pwpkt_type == SSH1_CMSG_AUTH_RSA) { c_write("Trying public key authentication.\r\n", 35); if (!rsakey_encrypted(cfg.keyfile)) { c_write("No passphrase required.\r\n", 25); goto tryauth; } c_write("passphrase: ", 12); } pos = 0; while (pos >= 0) { crWaitUntil(!ispkt); while (inlen--) switch (c = *in++) { case 10: case 13: password[pos] = 0; pos = -1; break; case 8: case 127: if (pos > 0) pos--; break; case 21: case 27: pos = 0; break; case 3: case 4: random_save_seed(); exit(0); break; default: sizeof(password)) password[pos++] = c; break; } } c_write("\r\n", 2); } tryauth: if (pwpkt_type == SSH1_CMSG_AUTH_RSA) { /* * Try public key authentication with the specified * key file. */ static struct RSAKey pubkey; static Bignum challenge, response; static int i; static unsigned char buffer[32]; tried_publickey = 1; i = loadrsakey(cfg.keyfile, &pubkey, password); if (i == 0) { c_write("Couldn't load public key from ", 30); c_write(cfg.keyfile, strlen(cfg.keyfile)); c_write(".\r\n", 3); continue; /* go and try password */ } if (i == -1) { c_write("Wrong passphrase.\r\n", 19); tried_publickey = 0; continue; /* try again */ } /* * Send a public key attempt. */ send_packet(SSH1_CMSG_AUTH_RSA, PKT_BIGNUM, pubkey.modulus, PKT_END); crWaitUntil(ispkt); if (pktin.type == SSH1_SMSG_FAILURE) { c_write("Server refused our public key.\r\n", 32); continue; /* go and try password */ } if (pktin.type != SSH1_SMSG_AUTH_RSA_CHALLENGE) fatalbox("Bizarre response to offer of public key"); ssh1_read_bignum(pktin.body, &challenge); response = rsadecrypt(challenge, &pubkey); freebn(pubkey.private_exponent); /* burn the evidence */ for (i = 0; i < 32; i += 2) { buffer[i] = response[16-i/2] >> 8; buffer[i+1] = response[16-i/2] & 0xFF; } MD5Init(&md5c); MD5Update(&md5c, buffer, 32); MD5Update(&md5c, session_id, 16); MD5Final(buffer, &md5c); send_packet(SSH1_CMSG_AUTH_RSA_RESPONSE, PKT_DATA, buffer, 16, PKT_END); crWaitUntil(ispkt); if (pktin.type == SSH1_SMSG_FAILURE) { c_write("Failed to authenticate with our public key.\r\n", 45); continue; /* go and try password */ } else if (pktin.type != SSH1_SMSG_SUCCESS) { fatalbox("Bizarre response to RSA authentication response"); } break; /* we're through! */ } else { send_packet(pwpkt_type, PKT_STR, password, PKT_END); }transport layer. */ static int do_ssh2_transport, *keystr random_init(); begin_key_exchange: { fatalbox("expected key exchange packet from server"); } { fatalbox("expected key exchange packet from server"); } ssh2_pkt_getstring(&hostkeydata, &hostkeylen); f = ssh2_pkt_getmp(); ssh2_pkt_getstring(&sigdata, &siglen); K = dh_find_K(f#if 0#endif hostkey->setkey(hostkeydata, hostkeylen); if (!hostkey->verifysig(sigdata, siglen, exchange_hash, 20)) fatalbox("Server failed host key check"); /* * Expect SSH2_MSG_NEWKEYS from server. */Authenticate remote host: verify host key. (We've already * checked the signature of the exchange hash.) */ keystr = hostkey->fmtkey(); verify_ssh_host_key(savedhost, keystr); free(keystr); /* * Send SSH2_MSG_NEWKEYS. */ ssh2_pkt_init(SSH2_MSG_NEWKEYS); ssh2_pkt_send(Begin returning 1 to the protocol main * function so that other things can run on top of the * transport. If we ever see a KEXINIT, we must go back to the * start. */ do { crReturn(1); } while (!(ispkt && pktin.type == SSH2_MSG_KEXINIT)); goto begin_key_exchange; crFinish(1); } /* * Handle the SSH2 userauth and connection layers. */ static void do_ssh2_authconn(unsigned char *in, int inlen, int ispkt) { static unsigned long their_channel; static unsigned long remote_winsize; static unsigned long remote_maxpkt; crBegin; /* * Request userauth protocol, and await a response to it. */ ssh2_pkt_init(SSH2_MSG_SERVICE_REQUEST); ssh2_pkt_addstring("ssh-userauth"); ssh2_pkt_send(); crWaitUntilV(ispkt); if (pktin.type != SSH2_MSG_SERVICE_ACCEPT) fatalbox("Server refused user authentication protocol"); /* * FIXME: currently we support only password authentication. * (This places us technically in violation of the SSH2 spec. * We must fix this.) */ while (1) { /* * Get a username and a password. */ static char username[100]; static char password[100]; static int pos = 0; static char c; VUsingV; } } else { c_write("password: ", 10); pos = 0; while (pos >= 0) { crWaitUntilV(!ispkt); while (inlen--) switch (c = *in++) { case 10: case 13: password[pos] = 0; pos = -1; break; case 8: case 127: if (pos > 0) pos--; break; case 21: case 27: pos = 0; break; case 3: case 4: random_save_seed(); exit(0); break; default: password[pos++] = c; break; } } c_write("\r\n", 2); } ssh2_pkt_init(SSH2_MSG_USERAUTH_REQUEST); ssh2_pkt_addstring(username); ssh2_pkt_addstring("ssh-connection"); /* service requested */ ssh2_pkt_addstring("password"); ssh2_pkt_addbool(FALSE); ssh2_pkt_addstring(password); ssh2_pkt_send(); crWaitUntilV(ispkt); if (pktin.type != SSH2_MSG_USERAUTH_SUCCESS } else break; } /* * Now we're authenticated for the connection protocol. The * connection protocol will automatically have started at this * point; there's no need to send SERVICE_REQUEST. */ /* * So now create a channel with a session in it. */ ssh2_pkt_init(SSH2_MSG_CHANNEL_OPEN); ssh2_pkt_addstring("session"); ssh2_pkt_adduint32(100); /* as good as any */ ssh2_pkt_adduint32(0xFFFFFFFFUL); /* very big window which we ignore */ ssh2_pkt_adduint32(0xFFFFFFFFUL); /* very big max pkt size */ ssh2_pkt_send(); crWaitUntilV(ispkt); if (pktin.type != SSH2_MSG_CHANNEL_OPEN_CONFIRMATION) { fatalbox("Server refused to open a session"); /* FIXME: error data comes back in FAILURE packet */ } if (ssh2_pkt_getuint32() != 100) { fatalbox("Server's channel confirmation cited wrong channel"); } their_channel = ssh2_pkt_getuint32(); remote_winsize = ssh2_pkt_getuint32(); remote_maxpkt = ssh2_pkt_getuint32(); logevent("Opened channel for session"); /* * Now allocate a pty for the session. */ ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST); ssh2_pkt_adduint32(their_channel); /* recipient channel */ ssh2_pkt_addstring("pty-req"); ssh2_pkt_addbool(1); /* want reply */ ssh2_pkt_addstring(cfg.termtype); ssh2_pkt_adduint32(cols); ssh2_pkt_adduint32(rows); ssh2_pkt_adduint32(0); /* pixel width */ ssh2_pkt_adduint32(0); /* pixel height */ ssh2_pkt_addstring_start(); ssh2_pkt_addstring_data("\0", 1); /* TTY_OP_END, no special options */ ssh2_pkt_send(); do { /* FIXME: pay attention to these */ crWaitUntilV(ispkt); } while (pktin.type == SSH2_MSG_CHANNEL_WINDOW_ADJUST); if (pktin.type != SSH2_MSG_CHANNEL_SUCCESS) { if (pktin.type != SSH2_MSG_CHANNEL_FAILURE) { fatalbox("Server got confused by pty request"); } c_write("Server refused to allocate pty\r\n", 32); } else { logevent("Allocated pty"); } /* * Start a shell. */ ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST); ssh2_pkt_adduint32(their_channel); /* recipient channel */ ssh2_pkt_addstring("shell"); ssh2_pkt_addbool(1); /* want reply */ ssh2_pkt_send(); do { /* FIXME: pay attention to these */ crWaitUntilV(ispkt); } while (pktin.type == SSH2_MSG_CHANNEL_WINDOW_ADJUST); if (pktin.type != SSH2_MSG_CHANNEL_SUCCESS) { if (pktin.type != SSH2_MSG_CHANNEL_FAILURE) { fatalbox("Server got confused by shell request"); } fatalbox("Server refused to start a shell"); } else { logevent("Started a shell"); } /* * Transfer data! */ while (1) { crReturnV; if (ispkt) { if (pktin.type == SSH2_MSG_CHANNEL_DATA || pktin.type == SSH2_MSG_CHANNEL_EXTENDED_DATA) { char *data; int length; if (ssh2_pkt_getuint32() != 100) continue; /* wrong channel */ if (pktin.type == SSH2_MSG_CHANNEL_EXTENDED_DATA && ssh2_pkt_getuint32() != SSH2_EXTENDED_DATA_STDERR) continue; /* extended but not stderr */ ssh2_pkt_getstring(&data, &length); if (data) c_write(data, length); } else if (pktin.type == SSH22_MSG_CHANNEL_REQUEST) { continue; /* exit status et al; ignore (FIXME?) */ } else if (pktin.type == SSH2_MSG_CHANNEL_WINDOW_ADJUST) { continue; /* ignore for now (FIXME!) */ /* FIXME: for now, ignore window size */ ssh2_pkt_init(SSH2_MSG_CHANNEL_DATA); ssh2_pkt_adduint32(their_channel); ssh2_pkt_addstring_start(); ssh2_pkt_addstring_data(in, inlen); ssh2_pkt_send(); } } crFinishV; } /* * Handle the top-level SSH2 protocol. */ static void ssh2_protocol(unsigned char *in, int inlen, int ispkt) { if (do_ssh2_transport(in, inlen, ispkt) == 0) return; do_ssh2_authconn(in, inlen, ispkt) Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 93cbd9b4a82921c03da332c394908752 Text-content-length: 1478 Text-content-md5: 533354c115c11bf89aef20d2c45af59d Content-length: 1518 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN朑烪,,7揼,:刢婹僔乵憐[5.Bignum modulus; Bignum exponent; Bignum private_exponent; #endif }; int makekey(unsigned char *data, struct RSAKey *result, unsigned char **keystr, int order); int makeprivate(unsigned char *data, struct RSAKey *result); void rsaencrypt(unsigned char *data, int length, struct RSAKey *key); Bignum rsadecrypt(Bignum input, struct RSAKey *key); void rsasign(unsigned char *data, int length, struct RSAKey *key); void rsasanitise(void SHA_Simple(void *p, int len/* * Plugging in another KEX algorithm requires structural chaos, * so it's hard to abstract them into nice little structures * like this. Hence, for the moment, this is just a * placeholder. I claim justification in the fact that OpenSSH * does this too :-) */ char *name; }; struct ssh_hostkey { void (*setkey)(char *data, int len); char *(*fmtkey)(void); int (*verifysig)(char *sig, int siglen, char *data, int datalen);Bignum newbn(int length); Bignum copybn(Bignum bvoid modmul(Bignum a, Bignum b, Bignum mod, Bignum result); void decbn(Bignum n); extern Bignum Zero, One; int ssh1_read_bignum(unsigned char *data, Bignum *result); Bignum dh_create_e(void); Bignum dh_find_K(Bignum f); int loadrsakey(char *filename, struct RSAKey *key, char *passphrase); int rsakey_encrypted(char *filename); void des3_decrypt_pubkey(unsigned char *key, unsigned char *blk, int len); Node-path: putty/sshbn.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b677953c6f2cc22c152fc6f9ecd48812 Text-content-length: 2849 Text-content-md5: d099e1191cf34016f86621a10d947339 Content-length: 2888 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN8羏Q旸z乺丯哃-e巚亂揫憉t侸4:▇ 檥v僽泏厀Kf'. /* FIXME */ #include /* FIXME */ #include /* FIXME */ #include "putty.h" /* FIXME */ #include "ssh.h" unsigned short bnZero[1] = { 0 }; unsigned short bnOne[2] = { 1, 1 }; Bignum Zero = bnZero, One = bnOne;Bignum copybn(Bignum orig) { Bignum b = malloc((orig[0]+1)*sizeof(unsigned short)); if (!b) abort(); /* FIXME */ memcpy(b, orig, (orig[0]+1)*sizeof(*b))len2 words of a and first len words of m. * Output in first len2 words of a * (of which first len2- int len, int len22-, mlen*2); if ((exp[exp[0] - i] & (1 << j)) != 0) { bigmul(b + mlen, n, a, mlen); bigmod(a, m, mlen, mlen*2, mlen*2 /* * Compute (p * q) % modmul(Bignum p, Bignum q, Bignum mod, Bignum result) { unsigned short *a, *n, *m, *o; int mshift; int pqlen,pqlen = (p[0] > q[0] ? p[0] : q[0]); /* Allocate n of size pqlen, copy p to n */ n = malloc(pqlen * sizeof(unsigned short)); i = pqlen - p[0]; for (j = 0; j < i; j++) n[j] = 0; for (j = 0; j < p[0]; j++) n[i+j] = p[p[0] - j]; /* Allocate o of size pqlen, copy q to o */ o = malloc(pqlen * sizeof(unsigned short)); i = pqlen - q[0]; for (j = 0; j < i; j++) o[j] = 0; for (j = 0; j < q[0]; j++) o[i+j] = q[q[0] - j]; /* Allocate a of size 2*pqlen for result */ a = malloc(2 * pqlen * sizeof(unsigned short)); /* Main computation */ bigmul(n, o, a, pqlen); bigmod(a, m, mlen, 2*pqlen); /* Fixup result in case the modulus was shifted */ if (mshift) { for (i = 2*pqlen - mlen - 1; i < 2*pqpqlen-1] = a[2*pqlen-1] << mshift; bigmod(a, m, mlen, pqlen*2); for (i = 2*pqlen - 1; i >= 2*pqlen -2*pqlen-mlen]; /* Free temporary arrays */ for (i = 0; i < 2*pqlen; i++) a[i] = 0; free(a); for (i = 0; i < mlen; i++) m[i] = 0; free(m); for (i = 0; i < pqlen; i++) n[i] = 0; free(n); for (i = 0; i < pqlen; i++) o[i] = 0; free(o); } /* * Decrement a number. */ void decbn(Bignum bn) { int i = 1; while (i < bn[0] && bn[i] == 0) bn[i++] = 0xFFFF; bn[i]--; } /* * Read an ssh1-format bignum from a data buffer. Return the number * of bytes consumed. */ int ssh1_read_bignum(unsigned char *data, Bignum *result) { unsigned char *p = data; Bignum bn; int i; int w, b; w = 0; for (i=0; i<2; i++) w = (w << 8) + *p++; b = (w+7)/8; /* bits -> bytes */ w = (w+15)/16; /* bits -> words */ bn = newbn(w); for (i=1; i<=w; i++) bn[i] = 0; for (i=b; i-- ;) { unsigned char byte = *p++; if (i & 1) bn[1+i/2] |= byte<<8; else bn[1+i/2] |= byte; } *result = bn; return p - data; } Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 209dd94714f4d886c3b784bc7f029093 Text-content-length: 290 Text-content-md5: b5ddecb70a34cfb76aae22a712b7ac1d Content-length: 330 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN侓h侙s 乼來\佹h佹^\佹嘮來#include #include /* FIXME */void des3_decrypt_pubkey(unsigned char *key, unsigned char *blk, int len) { DESContext ourkeys[3];ourourkeys[1]);ourkeys[2]); des_3cbc_decrypt(blk, blk, len, our Node-path: putty/sshdss.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b4a0c491a1cf43fb4dbd7d6a3fa7cc75 Text-content-length: 4567 Text-content-md5: d9ade49397ab82cb3a3324ba50bebc3b Content-length: 4606 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVNB0#include #include #include "ssh.h" #define GET_32BIT(cp) \ (((unsigned long)(unsigned char)(cp)[0] << 24) | \ ((unsigned long)(unsigned char)(cp)[1] << 16) | \ ((unsigned long)(unsigned char)(cp)[2] << 8) | \ ((unsigned long)(unsigned char)(cp)[3])) static void getstring(char **data, int *datalen, char **p, int *length) { *p = NULL; if (*datalen < 4) return; *length = GET_32BIT(*data); *datalen -= 4; *data += 4; if (*datalen < *length) return; *p = *data; *data += *length; *datalen -= *length; } static Bignum getmp(char **data, int *datalen) { char *p; int i, j, length; Bignum b; getstring(data, datalen, &p, &length); if (!p) return NULL; if (p[0] & 0x80) return NULL; /* negative mp */ b = newbn((length+1)/2); for (i = 0; i < length; i++) { j = length - 1 - i; if (j & 1) b[j/2+1] |= ((unsigned char)p[i]) << 8; else b[j/2+1] |= ((unsigned char)p[i]); } return b; } static Bignum get160(char **data, int *datalen) { char *p; int i, j, length; Bignum b; p = *data; *data += 20; *datalen -= 20; length = 20; while (length > 0 && !p[0]) p++, length--; b = newbn((length+1)/2); for (i = 0; i < length; i++) { j = length - 1 - i; if (j & 1) b[j/2+1] |= ((unsigned char)p[i]) << 8; else b[j/2+1] |= ((unsigned char)p[i]); } return b; } static Bignum dss_p, dss_q, dss_g, dss_y; static void dss_setkey(char *data, int len) { char *p; int slen; getstring(&data, &len, &p, &slen); if (!p || memcmp(p, "ssh-dss", 7)) { dss_p = NULL; return; } dss_p = getmp(&data, &len); dss_q = getmp(&data, &len); dss_g = getmp(&data, &len); dss_y = getmp(&data, &len); } static char *dss_fmtkey(void) { char *p; int len; int i; if (!dss_p) return NULL; len = 7 + 4 + 1; /* "ssh-dss", punctuation, \0 */ len += 4 * (dss_p[0] + dss_q[0] + dss_g[0] + dss_y[0]); /* digits */ p = malloc(len); if (!p) return NULL; strcpy(p, "ssh-dss:"); for (i = dss_p[0]; i > 0; i--) sprintf(p+strlen(p), "%04X", dss_p[i]); strcat(p, "/"); for (i = dss_q[0]; i > 0; i--) sprintf(p+strlen(p), "%04X", dss_q[i]); strcat(p, "/"); for (i = dss_g[0]; i > 0; i--) sprintf(p+strlen(p), "%04X", dss_g[i]); strcat(p, "/"); for (i = dss_y[0]; i > 0; i--) sprintf(p+strlen(p), "%04X", dss_y[i]); return p; } static int dss_verifysig(char *sig, int siglen, char *data, int datalen) { char *p; int i, slen; char hash[20]; Bignum qm2, r, s, w, i1, i2, i3, u1, u2, sha, v; int ret; if (!dss_p) return 0; getstring(&sig, &siglen, &p, &slen); if (!p || memcmp(p, "ssh-dss", 7)) { return 0; } sig += 4, siglen -= 4; /* skip yet another length field */ r = get160(&sig, &siglen); s = get160(&sig, &siglen); if (!r || !s) return 0; /* * Step 1. w <- s^-1 mod q. */ w = newbn(dss_q[0]); qm2 = copybn(dss_q); decbn(qm2); decbn(qm2); /* Now qm2 is q-2, and by Fermat's Little Theorem, s^qm2 == s^-1 (mod q). * This is a silly way to do it; may fix it later. */ modpow(s, qm2, dss_q, w); /* * Step 2. u1 <- SHA(message) * w mod q. */ u1 = newbn(dss_q[0]); SHA_Simple(data, datalen, hash); p = hash; slen = 20; sha = get160(&p, &slen); modmul(sha, w, dss_q, u1); /* * Step 3. u2 <- r * w mod q. */ u2 = newbn(dss_q[0]); modmul(r, w, dss_q, u2); /* * Step 4. v <- (g^u1 * y^u2 mod p) mod q. */ i1 = newbn(dss_p[0]); i2 = newbn(dss_p[0]); i3 = newbn(dss_p[0]); v = newbn(dss_q[0]); modpow(dss_g, u1, dss_p, i1); modpow(dss_y, u2, dss_p, i2); modmul(i1, i2, dss_p, i3); modmul(i3, One, dss_q, v); /* * Step 5. v should now be equal to r. */ ret = 1; for (i = 1; i <= v[0] || i <= r[0]; i++) { if ((i > v[0] && r[i] != 0) || (i > r[0] && v[i] != 0) || (i <= v[0] && i <= r[0] && r[i] != v[i])) ret = 0; } freebn(w); freebn(qm2); freebn(sha); freebn(i1); freebn(i2); freebn(i3); freebn(v); freebn(r); freebn(s); return ret; } struct ssh_hostkey ssh_dss = { dss_setkey, dss_fmtkey, dss_verifysig, Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 23681d826a66de1e3498922e7b12bff7 Text-content-length: 861 Text-content-md5: 1992a98269db34c6f6206fc0f289f798 Content-length: 900 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN焌18嘳b*凱,3$=, int order) { unsigned char *p = data; int i/* * order=0 means exponent then modulus (the keys sent by the * server). order=1 means modulus then exponent (the keys * stored in a keyfile). */ if (order == 0) p += ssh1_read_bignum(p, &result->exponent); result->bytes = (((p[0] << 8) + p[1]) + 7) / 8; if (keystr) *keystr = p+2; p += ssh1_read_bignum(p, &result->modulus); if (order == 1) p += ssh1_read_bignum(p, &result->exponent); return p - data; } int makeprivate(unsigned char *data, struct RSAKey *result) { return ssh1_read_bignum(data, &result->private_exponent)Bignum rsadecrypt(Bignum input, struct RSAKey *key) { Bignum ret; ret = newbn(key->modulus[0]); modpow(input, key->private_exponent, key->modulus, ret); return ret Node-path: putty/sshsha.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bb354e257aaac9ce0d6d5a548d05d72a Text-content-length: 176 Text-content-md5: 03578f9f6464b060a0ef42a5bf3cff19 Content-length: 215 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN簃a妅Gp礫G%笻sha1_do_hmac(&sha1_cs_mac_s1, &sha1_cs_mac_s2, blk, len, seq, blk+len);sha1_do_hmac(&sha1_sc_mac_s1, &sha1_sc_mac_s2, blk, len, seq, correct); Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e70fe4c77016862fb222c56127f5bc2b Text-content-length: 108 Text-content-md5: ebd10553ea872f702e53c40b2068833d Content-length: 148 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN潂濽 V&V哬%#define IDC3_PKSTATIC 1024 #define IDC3_PKEDIT 1025 #define IDC3_PKBUTTON 1026 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3b0114679f1a79c7d13b8ab7de6711dd Text-content-length: 216 Text-content-md5: 58797294d054a990d5aca2d53b8856d1 Content-length: 256 K 15 cvs2svn:cvs-rev V 4 1.29 PROPS-END SVN 鍷 丂縱丂縰 LTEXT "Public key file:", IDC3_PKSTATIC, 3, 75, 119, 8 EDITTEXT IDC3_PKEDIT, 3, 83, 119, 12, ES_AUTOHSCROLL PUSHBUTTON "C&hange...", IDC3_PKBUTTON, 129, 83, 35, 12 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4aff3976fabc62bd2483f1299a2bf87b Text-content-length: 1262 Text-content-md5: c9a144c6d41ac72ebf947bb8f6dd6299 Content-length: 1302 K 15 cvs2svn:cvs-rev V 4 1.31 PROPS-END SVN傤]傴cK渀淰A伀佊h;侂H伕y佖佢8P倵9$侎%I佢;4"侖;s (sesskey, "PublicKeyFile", cfg.keyfiles (sesskey, "PublicKeyFile", "", cfg.keyfile, sizeof(cfg.keyfile)OPENFILENAME of; char filename[sizeof(cfg.keyfile)]SetDlgItemText (hwnd, IDC3_PKEDIT, cfg.keyfileNOPTY case IDC3_PKPKEDIT, cfg.keyfile, sizeof(cfg.keyfile)-1); break; case IDC3_PKBUTTON: /* * FIXME: this crashes. Find out why. */ memset(&of, 0, sizeof(of)); #ifdef OPENFILENAME_SIZE_VERSION_400 of.lStructSize = OPENFILENAME_SIZE_VERSION_400; #else of.lStructSize = sizeof(of); #endif of.hwndOwner = hwnd; of.lpstrFilter = "All Files\0*\0\0\0"; of.lpstrCustomFilter = NULL; of.nFilterIndex = 1; of.lpstrFile = filename; strcpy(filename, cfg.keyfile); of.nMaxFile = sizeof(filename); of.lpstrFileTitle = NULL; of.lpstrInitialDir = NULL; of.lpstrTitle = "Select Public Key File"; of.Flags = 0; if (GetOpenFileName(&of)) { strcpy(cfg.keyfile, filename); SetDlgItemText (hwnd, IDC3_PKEDIT, cfg.keyfile); } Revision-number: 573 Prop-content-length: 153 Content-length: 153 K 7 svn:log V 53 Add sshpubk.c to load authenticating keys from files K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-07T16:40:50.000000Z PROPS-END Node-path: putty/sshpubk.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1867 Text-content-md5: 459ab615ffe2dbe4d54a72ca12834336 Content-length: 1983 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN唀嘮‥瓼 奅侲僃T嘑 匛嘓G圖%昑3塂0M5僙乆嘫乆塎乕K(璂&凧倅匘俵孖俻b倆丒俷$丒乶$凧俌凞倈嘍 桪`擠侱 孌n塃廍俽E刯凟俽M 婽匭僃卐G卬E剘侸 怞 嘑匭G慐俽婮匞 嘐俽D圙哸扙D僁卍凞0D僁唈揇嘺匞嘔噖DD嘨咶嘦丩噄SGO圝侳:岲<侲0N G噅M凨処咶嘺M凨I噃N唌1僁刄嶥侸坲両$NJ!朑S凞0FD奩廔嘙G員D圝J*侲卍丠 僈?D塠僉>侱 孹'僊 E!乴1I匛坙丏F%HF婰F媐侳婯侾丳丗}:岻匥奍侲0欶\KJD凞 咲塏 E!m岻嘔坲I奝D1僁8F宯I嘙僈俠E巙S凨:F侳9DD怉G乚孌嘍:匞怈I廞H怈侲U岺嘑I恗R婽H匒D慍塂哴GG慏咶慜D H9E凨7N慤咶侾慞咶凞 H#G巙F咾慤咺扤丮噃丒圕嘐廯圚&丳恥孎僁>凞D1E嶾侱9D/凥怈D奭圖G揷De咵 R J1PM I,OH=僄=僈:乀H怈嶧D奩嘍坋岾搝G扏D妏嘑廜 H巌凞慺J巙UPF>丗9凟)G抲Y_僁團侱3丒昑侶nD昬ISF.E:E両SO i匒乁4P v哻G>乑圕慗&@r(U&b$D坢E橬凟坱LK噅僎歗乑圕JSN7丏桯/* * Read SSH public keys from files. First implementation: only supports unencrypte1.1 formatSA. Eion, an2 DSS, to beed later/ #include /* FIXMEargwindows"putty.h"ssh.h" #define GET_32BIT(cp) \ (((unsignong)char)[0] << 24) |116283]))rsa_ature "PRIVATE KEY FILE FORMAT\n" int loadrsakey( *name, structKey *key, *passphrase) {*fp; buf[16384]keyeni, j, ciphertyperet = 0MD5Context md5c; fp = fopen("rb")f (!fp)goto end/* Slurp the wholeo afer.lenread(buf, 1, sizeof), fpfclose(< 0 ||=/*too big or noad) ||memcmp) != 0ailto have sig atnt Next, one byte giving ion reserved uint32-i < 1 =if ( &&!=_CIPHER_3DESi++4fieldp||+123nzero, panic! += 4owserious stuff. An ordinarymakebuf+i,, NULL, 1overrancomj =4+j)+j: might needuse thiring.De remainder ofMD5Init(&Updatelen(Final(, des3_d_pub+7)&~7memset0)/* burnevidence}We are now isecpartThfours should a, b,) {-1;}After that, wefurthernum which is modulusthen we're donepriv1end:retret; } Seean_+0doesn't even exisvali-1]10 Revision-number: 574 Prop-content-length: 155 Content-length: 155 K 7 svn:log V 55 Public key authentication now works in pscp too - oops K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-08T08:33:52.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e248050e6f762fd5d1d08dd838dc0f51 Text-content-length: 67 Text-content-md5: e6d164ecef6a29a8673e6fca5f9b05d5 Content-length: 107 K 15 cvs2svn:cvs-rev V 4 1.29 PROPS-END SVN剙(剙Q )侞_倓I侞_pwpkt_type == SSH1_CMSG_AUTH_PASSWORD && Revision-number: 575 Prop-content-length: 169 Content-length: 169 K 7 svn:log V 69 Added a fourth application: plink, a command line connection utility K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-08T14:45:20.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: db41cb7611369eeac5846017b92d13dd Text-content-length: 1137 Text-content-md5: 3e662e12a893de76314ed72214390184 Content-length: 1177 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN5璂Y ^塭u-G侺媇丳 抆乸揚1.6+桼哹檟匼燳 GOBJS2 = xlat.$(OBJ) sizetip.$(OBJ) ##-- objects putty puttytel plink LOBJS1 = telnet.$(OBJ) raw.$(OBJ) ldisc.$(OBJ) ##-- objects putty plinklink PLOBJS = plink.$(OBJ) windlg plink MOBJS = misc.$(OBJ) version.$(OBJ) ##-- objects putty pscp plink resources plink LRESRC = plinkcomctl32.lib comdlg32.lib SOCK1 = wsock32.lib SOCK2 = ws2_32.lib all: putty.exe puttytel.exe pscp.exe plink.exe putty.exe: $(GOBJS1) $(GOBJS2) $(LOBJS1LOBJS1link.exe: $(LOBJS1) $(POBJS) $(PLOBJS) $(MOBJS) $(OBJS1) $(OBJS2) $(OBJS3) $(LRESRC) plink.rsp link $(LFLAGS) -out:plink.exe @plinkLOBJS1 echo $(SOCK1LOBJS1 echo $(SOCK1 echo $(SOCK1) >> pscp.rsp plink.rsp: makefile echo /nologo /subsystem:console > plink.rsp echo $(LOBJS1) >> plink.rsp echo $(POBJS) >> plink.rsp echo $(PLOBJS) >> plink.rsp echo $(MOBJS) >> plink.rsp echo $(OBJS1) >> plink.rsp echo $(OBJS2) >> plink.rsp echo $(OBJS3) >> plink.rsp echo $(LRESRC) >> plink.rsp echo $(LIBS1) >> plink.rsp echo $(LIBS2) >> plink.rsp echo $(SOCK2) >> plinkplink.$(OBJ): plink.c putty.h Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d9a1a24a82950e861ba66bebb58ec627 Text-content-length: 224 Text-content-md5: 4b98622d6df4d70dfb5c6daf86e6ee76 Content-length: 264 K 15 cvs2svn:cvs-rev V 4 1.36 PROPS-END SVN胉丅2巓/(殅 SOCKET (*socket) (void/* * Some global flags denoting the type of application. */ #define FLAG_VERBOSE 0x0001 #define FLAG_WINDOWED 0x0002 #define FLAG_CONNECTION 0x0004 GLOBAL int flags; Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1b936a9a2cc22100dbb25b6840c755c1 Text-content-length: 91 Text-content-md5: 6836427a70f2c78711876c9546872cf1 Content-length: 130 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN 猒@9a;攈wnd && SOCKET raw_socket(void) { return s; , raw_socket }; Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b1b7e8c55aa49e4c7dce304baa98cea5 Text-content-length: 54 Text-content-md5: d3ecb6b888ff81ad9c142e93b183a1f4 Content-length: 94 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN仩x仩j仐 5仐仒cflags = 0flags |= FLAG Node-path: putty/scp.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bb1f3285c68d0ed29b6c6791ee6797c4 Text-content-length: 77 Text-content-md5: cf2c840e585b4c14f4214ecf2b4c307d Content-length: 116 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN僒倉<侫/* * scp.h * Joris van Rantwijk, Aug 1999, Jun 2000. */ Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e6d164ecef6a29a8673e6fca5f9b05d5 Text-content-length: 1085 Text-content-md5: 922f4bb68a131f2d867969739a6ca967 Content-length: 1125 K 15 cvs2svn:cvs-rev V 4 1.30 PROPS-END SVN剙Q剛~,#╤侹倂獸g%)癛伝M哤侇qq卶侖1侟倝/慡倞+嘨倹n僾偅~鏼偋u[侇q侊LP侕r侟矪儧e 兿'刋冣H-冪5乺凈v俆凍| 凒e`m!(flags & FLAG_CONNECTION) && (flags & FLAG_VERBOSE) noise_ultralight(i); if (i <= 0) fatalbox("Lost connection while sending"); !(flags & FLAG_CONNECTION)) { int i; for (i = 0; i < len; i++) if (buf[i] != '\r') fputc(buf[i], stderr);(flags & FLAG_CONNECTION) if (flags & FLAG_VERBOSE) { sprintf(stuff, "Sent username \"%s\".\r\n", username); !FLAG_WINDOWEDif (flags & FLAG_VERBOSE) if (flags & FLAG_VERBOSE) if (flags & FLAG_VERBOSE) if (flags & FLAG_VERBOSE) c_write("Failed to authenticate with our public key.\r\n", if (flags & FLAG_VERBOSE) (flags & FLAG_CONNECTION)Vflags & FLAG_VERBOSE) { sprintf(stuff, "Usingif (!(flags & FLAG_WINDOWED)hwnd && SOCKET ssh_socket(void) { return s; }, ssh_socket }; Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8543ddc2988c41c20cb68e3ed18d4f38 Text-content-length: 106 Text-content-md5: 6c3019609df45127f53737a60d3d9b13 Content-length: 146 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN仮v仯:F廗5亶Ms仭梙wnd && SOCKET telnet_socket(void) { return s; , telnet_socket }; Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: aab5957ac4190c6f3e39979a6593e06b Text-content-length: 82 Text-content-md5: ef8f04f66dbb79146ddba5884382b09d Content-length: 122 K 15 cvs2svn:cvs-rev V 4 1.46 PROPS-END SVN冃冃R :慻兙1慹 flags = FLAG_VERBOSE | FLAG_WINDOWED | FLAG_CONNECTION Revision-number: 576 Prop-content-length: 173 Content-length: 173 K 7 svn:log V 73 plink can now execute a specific command instead of just a shell session K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-08T15:24:19.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4b98622d6df4d70dfb5c6daf86e6ee76 Text-content-length: 42 Text-content-md5: c7606f004951f00c7220d03525bd3d1c Content-length: 82 K 15 cvs2svn:cvs-rev V 4 1.37 PROPS-END SVN胉脄 泋泂char remote_cmd[512]; Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 922f4bb68a131f2d867969739a6ca967 Text-content-length: 892 Text-content-md5: f480ef894e966c9c9311f1606a3f96e4 Content-length: 932 K 15 cvs2svn:cvs-rev V 4 1.31 PROPS-END SVN剛~剤"T;仏 3僼佀1鋃佅m謗偝pb儕Z儗!儽兂,巬兓4楥兪6僿!冦]int ssh_version;sh_version = 2sh_version = 1if (*cfg.remote_cmd) send_packet(SSH1_CMSG_EXEC_CMD, PKT_STR, cfg.remote_cmd, PKT_END); else SSH2: remote identifier for the main session channel. */ static unsigned long ssh_remote_channel;ssh_remotessh_remotessh_remotessh_remoteSend Telnet special codes. TS_EOF is useful for `plink', so you * can send an EOF and collect resulting output (e.g. `plink * hostname sort'). */ static void ssh_special (Telnet_Special code) { if (code == TS_EOF) { if (ssh_version = 1) { send_packet(SSH1_CMSG_EOF, PKT_END); } else { ssh2_pkt_init(SSH2_MSG_CHANNEL_EOF); ssh2_pkt_adduint32(ssh_remote_channel); ssh2_pkt_send(); } } else { /* do nothing */ } Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c9a144c6d41ac72ebf947bb8f6dd6299 Text-content-length: 127 Text-content-md5: c611753bad46a90dd9e3ca73cfc078d4 Content-length: 167 K 15 cvs2svn:cvs-rev V 4 1.32 PROPS-END SVN傴c債a`)F偦A"RemoteCmd", cfg.remote_cmdgpps (sesskey, "RemoteCmd", "", cfg.remote_cmd, sizeof(cfg.remote_cmd) Revision-number: 577 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Stop plink losing data at start of session K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-08T16:42:11.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c7606f004951f00c7220d03525bd3d1c Text-content-length: 37 Text-content-md5: a763b63a29301ad7d8238bdae77602b9 Content-length: 77 K 15 cvs2svn:cvs-rev V 4 1.38 PROPS-END SVN脄 極5楨 int (*sendok Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 6836427a70f2c78711876c9546872cf1 Text-content-length: 126 Text-content-md5: 81154764b9f437bedeccf52f97dfd8a1 Content-length: 165 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN猒! h〧Ts﹉攕tatic SOCKET raw_socket(void) { return s; } static int raw_sendok(void) { return 1, raw_sendok }; Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f480ef894e966c9c9311f1606a3f96e4 Text-content-length: 239 Text-content-md5: 1f225b8439b4ccf0dd44014c515840c8 Content-length: 279 K 15 cvs2svn:cvs-rev V 4 1.32 PROPS-END SVN剤"剦E)8仯q>佇 亱z偠B腞兟7^s剣+攕tatic int ssh_send_okssh_send_ok = 0;ssh_send_ok = 1;ssh_send_ok = 1;static SOCKET ssh_socket(void) { return s; } static int ssh_sendok(void) { return ssh_send_ok, ssh_sendok }; Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6c3019609df45127f53737a60d3d9b13 Text-content-length: 140 Text-content-md5: 7d860ab78b23c87bb64dd439791d1779 Content-length: 180 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN仯:仱q仮 Z仮.梥tatic SOCKET telnet_socket(void) { return s; } static int telnet_sendok(void) { return 1, telnet_sendok }; Revision-number: 578 Prop-content-length: 138 Content-length: 138 K 7 svn:log V 38 Oops - remove SHA debugging from ssh2 K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-09T08:21:34.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 1f225b8439b4ccf0dd44014c515840c8 Text-content-length: 80 Text-content-md5: 1865fe31409e752d4201e355b8889621 Content-length: 120 K 15 cvs2svn:cvs-rev V 4 1.33 PROPS-END SVN剦E剤6 6仐傪y仒L PUT_32BIT(lenblk, len); SHA_Bytes(s, lenblk, 4 Revision-number: 579 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:08.731953Z PROPS-END Revision-number: 580 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Actually _commit_ plink. It now works as a CVS transport! K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T08:27:15.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 4303 Text-content-md5: a8bd8e2afb1afb36efafa18e4ce8c74e Content-length: 4419 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN򹎽XNB凬UD丵j僁U匘揊0岶塂>IC狣0婨 嘍楩婯=P凨?処俻孎&G侤婫侤滸乮塂乲侳咹婨 D僸凢嘐 孒E僫嶪僄丗&丏僸G刄E,丗刔孖4F匥I揇>HE 侳D丟僪H別F擥F儃僃匯E亃孎匯G傽婦僲咲奃哛E僠嘓R卶侲厏丏Q唖丒哾M)侷僇F僫F僇奅僈婩傽丟;G凟凣H嘊侲侳塎 侻H=丟 僅剎K2凞7H!E6G侤丟F%E峊F%凟/哛$僃9P4凞丠乢D*H 侹俇丏峊凱J宨凣NQ2匛婽D 匛侸旸婽T廆I媨凟弐丏媇並婲婽廆G"僄媏M廎J=HH%丏-侺弌丮圵L0E亃丟1P慖丏匥丷,H凟塇憓NQ慛乂慲T峊匞6P抜D宻乂抎G侱圗G"嘩4D宼S+JZ媀抎D=丒乕K崀匟?P攎DU揨O擱俈攈E 凥僆I丏9X擝D 丷昑乊GR1L?S怓朌婽嶸丏僅8怐刄D俋D杘孍(D婾侱塈咵廧S恇F廚匤嘓7嶺廍榵侲(侱3僁桰UF廚廌厏匛,侷;YG:F 塅_I機WR恦J宨僁檚凞0僕昮D=丏丒8侱歭D剒D咵楺J榺X歂IE剒W8\朘G'I楤W8[欿O9乊攅I,H晘G憒俀S侱弞D楿圙 丏梪HE丷Y2J;K旻乲昍}晆W擩D X=F匵m"E廚乢P D梫D廮P H&^4L:LK>b瀜RJf,}濾cR>N>Y2D僲FK>嶴'F亃丏宻NR$G丼慍ID俀丏塟DF歮圗侳侲匤FWR孾P汼D僙咲>F乄LG寃h @@1R>D孏侷媂匛僕凾歂D丏5丏僗I侲漜E)嘐媊GT歂匯D2D楢E弅僂O漲D巁L坽J婥咺僁漐塂僃D塂桰G怌凞哾僂嶧匛圖杒G,N媏J1D僲丣凥'ID漊侲E゛圙D$F*僋D=LJ媨N峈T沴G゜SRFO,P)X沝Q僁(侲孊嘍丒+F媬圤昮G8K'W<丗榽婲媏K嘍匞昮D=凞侹僈僄塻F:奅孒凢"侶榺K琒凣琖塃.嘍瓇婦9凬#G匵奊塻匘=丏$嘮7乄3H璲丗瓼D╤塂E弅僅瓀P璱_瓇N"QP―D侹D/F婾圥;丗亃丏璼丠=凟漗僂癊G猶侱榼丟瑽J旼H崀E剅F癠D痶D1E癊E;U玆J璊凨#團G J#N;H塅坓F瑿匢K孖J)j I,丯4J廭嘙圖 匞嘰G昮I僄T嘕僐嘸J婥奆EE゜D$侱奀D3匩媏F奧I癲F奧H,J婥丏;圗檢僁1嘍杛侱咵D漎H婨僁玭塂漝匜僁"侱婸奃<侶婨DEN媏DD7F⊿丗奧並塂5凞噄DH夽D憒IN禝EP)GD+D!M丩沴D僲GE橠G夽I嘓禛H 丏狪E畆L 奅丏-僋F=岴丼#丗+U$D1F+侻窴侶5VF癵匢4S昮_F禖W8P笯L禖c SM I僗O昮F%G侶碯哢$V>F侸F哤D璓E籿凢秜S8D杇F╢朌"圖T僁璓哠TD 岺噛僆(嘦D;E侱#侱礛僂>僂W紻J5FI)慤榁E絍D+丏奊妚嶶D1E?侺D哛D:HD俉綛峊綛WW稢JGSM絍D窷J礑嘍丳G DW;塃+丟絙丏刄DFD 僒E侱*丒檢E糑G*E梟IZ:E厏凞侲塆*丼MF-V-T恥E?H>P)QFD杋侴丟'L哘V0T8E肏丠奿Y$[,丗籧凟%D?RI攙H5bJEW篻KEM#HFHW猌F.G舖HI舗O膥Y2G峆1Q,VL8/* * PLink - a command-line (stdin/stdout) variant of PuTTY. */ #include dowsoarg #defPUTTY_DO_GLOBALS /* actually __ globals"putty.h" void fatalbox (char *p, ...) { va_list ap;fprintferr, "FATAL ERROR: ", p)va_start(app, aend(fputc('\n', WSACleanup(exit(1); } HANDLE outhandle;term_out() int reDWORD ret; = 0while (< inbuf_headf (!WriteFile(,+-&ret, NULL))turn;/* give up in panic+=}} struct input_datalenbuffer[4096]event; }; WINAPIin_read_th *param*i=)in = GetStdH(STD_INPUT_)Read, ->, sizeof(),&lenSetE}main(argc,**argvWSADATA wsa_verEVENT netins[2SOCKET idsendingflags = FLAG_CONNECTION* Process the .default_protocol = DEFAULT_PROTOCOLortORTos(-- = *++= '-'strcmp(p, "-ssh" cfg._SSH;22; } elseloglogf= *p*hostq = * Ifname s with "telnet:", setto T pstring as aURLnq,7cq7q[0]/' && q[12TELNEq*p*p != ':/') p++*p++ = '\0'c:atoi(-1py (, q-[]hree cases. Either (a)re's a nonzero*gthfollowed by an @ch that's userreder isOr (bonly on, not countinga potential ini@,itstssaved-sessions base.c)_doesn't_r =rchr'@'rp, /* dis \0Nos for th;prremote_cmd) - c2,); cp[lenlen(cp);-= c> 0len--, nopty = TRUE/*=> noinall_/* like abreakcmdSelect. Tis farmedo a table* sete to enan ssh-fiback(iends[i].i++Intl : Unsupefound\n"Iise WinSock = MAKE(2, 0WSASup(, &MessageBox, "Uto", " Error", MB_OK |ICONEXCLAMA); f (LOBYTE(.wVer)2 || HI0vincompati2.0nnection e;real -> open:\n%s", = CreateFALSE!SetConsoleMode(, ENABLECESSEOUTNow we musoostuffToff ECHOLINput modWe't carcalils, becawe knarenearily runnin(,FD_READ |CLOS1 = WaitForMultipleObjectsINFINITnWSANETWORKSngsSAEnumNetworks&.l &msg(0&&endok( afroma total pain, but I cafind anowaydo it:n overlapped orEx just hn;getureblocks despite benOVERLAPPEDure. Perhaps wdoHYTHE HELL NOT?it signwhen _any_smoumosto bad- so we'rtad0&csecopecial(TS_EOF Node-path: putty/plink.rc Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 31 Text-content-md5: a4f6e7df7066180cf02df9f0e8b8dea8 Content-length: 147 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN200 ICON "putty.ico" Revision-number: 581 Prop-content-length: 163 Content-length: 163 K 7 svn:log V 63 Add further types of garbage to .cvsignore and to "make clean" K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T09:23:23.000000Z PROPS-END Node-path: putty Node-kind: dir Node-action: change Prop-delta: true Prop-content-length: 152 Content-length: 152 K 10 svn:ignore V 119 *.pdb *.ilk *.res *.RES *.pch *.rsp *.obj *.exe *.ncb *.plg *.dsw *.opt *.dsp mkres mkres.exe Makefile.bor Makefile.cyg PROPS-END Node-path: putty/.cvsignore Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4d47ac536c682d87d0df551b59b2bfa7 Text-content-length: 102 Text-content-md5: bc2eaa10b5e1013d626b5a52b2a6bb40 Content-length: 141 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVNJxYY+*.pdb *.ilk *.res *.RES *.pch *.rsp *.obj *.exe *.ncb *.plg *.dsw *.opt *.dsp mkres mkres Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3e662e12a893de76314ed72214390184 Text-content-length: 71 Text-content-md5: a0583e6538e0c3d480060174e422674f Content-length: 111 K 15 cvs2svn:cvs-rev V 4 1.28 PROPS-END SVN璂瓄7璂 del *.dsp del *.dsw del *.ncb del *.opt del *.plg Revision-number: 582 Prop-content-length: 197 Content-length: 197 K 7 svn:log V 97 Saner handling of WM_SYSCOMMAND:SC_KEYMENU to avoid problems on an isolated press of the Alt key K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T09:23:52.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ef8f04f66dbb79146ddba5884382b09d Text-content-length: 1048 Text-content-md5: 84c8e2cd8474134bcbd2df298ef0307f Content-length: 1088 K 15 cvs2svn:cvs-rev V 4 1.47 PROPS-END SVN冃R冋I/嘯嘚伀4嘗#刋伋$伔oP亣8侀y'8傯#define WM_IGNORE_KEYMENU (WM_XUSER + 3ignore_keymenu = TRUE; static int just_reconfigged = FALSE; if (message != 275) debug(("msg=%d wParam=%08x lParam=%08x\r\n", message, wParam, lParam)) case SC_KEYMENU: if (ignore_keymenu) return 0; /* don't put up system menu on Alt */ break;IGNORE_KEYMENU: ignore_keymenu = wParam; /* do or don't ignore SC_KEYMENU SendMessage (hwnd, WM_VSCROLL, SB_PAGEUP, 0); return 0; } if (wParam == VK_NEXT && shift_state == 1) { SendMessage (hwnd, WM_VSCROLL, SB_PAGEDOWN, 0); return 0; } if (left_alt && wParam == VK_F4 && cfg.alt_f4) { return -1; } if (left_alt && wParam == VK_SPACE && cfg.alt_space) { SendMessage (hwnd, WM_IGNORE_KEYMENU, FALSE, 0); SendMessage (hwnd, WM_SYSCOMMAND, SC_KEYMENU, 0); SendMessage (hwnd, WM_IGNORE_KEYMENU, TRUE, 0); Revision-number: 583 Prop-content-length: 130 Content-length: 130 K 7 svn:log V 30 Oops - remove diagnostics :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T09:36:12.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 84c8e2cd8474134bcbd2df298ef0307f Text-content-length: 25 Text-content-md5: 59a8c7ace5f99de1e155cc4253613b55 Content-length: 65 K 15 cvs2svn:cvs-rev V 4 1.48 PROPS-END SVN冋I冊d 伋n偁v伌S Revision-number: 584 Prop-content-length: 183 Content-length: 183 K 7 svn:log V 83 Add switch to choose SSH v1-versus-v2 protocol preference where both are available K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T09:37:43.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a763b63a29301ad7d8238bdae77602b9 Text-content-length: 91 Text-content-md5: 6e584b06781d247d27a43311ae520c29 Content-length: 131 K 15 cvs2svn:cvs-rev V 4 1.39 PROPS-END SVN腷 EEsshprot; /* use v1 or v2 when both available */ Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 1865fe31409e752d4201e355b8889621 Text-content-length: 227 Text-content-md5: cd2284751b0b3052865e7b5d302958d0 Content-length: 267 K 15 cvs2svn:cvs-rev V 4 1.34 PROPS-END SVN剤6剦F丗伵3丗偮M伵i/* * Server version "1.99" means we can choose whether we use v1 * or v2 protocol. Choice is based on cfg.sshprot. */ if (ssh_versioncmp(version, cfg.sshprot == 1 ? "2.0" : "1.99" Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ebd10553ea872f702e53c40b2068833d Text-content-length: 111 Text-content-md5: 0fab443d8db4248bb212bdf04e3a1663 Content-length: 151 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN濽/ Y梷Y哬梶#define IDC3_SSHPROTSTATIC 1027 #define IDC3_SSHPROT1 1028 #define IDC3_SSHPROT2 1029 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 58797294d054a990d5aca2d53b8856d1 Text-content-length: 389 Text-content-md5: cc2623630a81f2732a09231d5efe5b12 Content-length: 429 K 15 cvs2svn:cvs-rev V 4 1.30 PROPS-END SVN鍷 俶 俶-refer protocol version:", IDC3_SSHPROTSTATIC, 3, 75, 105, 8 AUTORADIOBUTTON "&1", IDC3_SSHPROT1, 115, 75, 21, 8, WS_GROUP AUTORADIOBUTTON "&2", IDC3_SSHPROT2, 143, 75, 21, 8 LTEXT "Public key file:", IDC3_PKSTATIC, 3, 85, 119, 8 EDITTEXT IDC3_PKEDIT, 3, 93, 119, 12, ES_AUTOHSCROLL PUSHBUTTON "C&hange...", IDC3_PKBUTTON, 129, 9 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c611753bad46a90dd9e3ca73cfc078d4 Text-content-length: 422 Text-content-md5: b3dae620e14beb0fcfa436bdaa742ece Content-length: 462 K 15 cvs2svn:cvs-rev V 4 1.33 PROPS-END SVN債a傹P*俷'伅#園侊QU亝亖r侘oi (sesskey, "SshProt", cfg.sshprotSshProt", 1, &cfg.sshprot); IDC3_CIPHER3DES); CheckRadioButton (hwnd, IDC3_SSHPROT1, IDC3_SSHPROT2, cfg.sshprot == 1 ? IDC3_SSHPROT1 : IDC3_SSHPROT2SSHPROT1: case IDC3_SSHPROT2if (IsDlgButtonChecked (hwnd, IDC3_SSHPROT1)) cfg.sshprot = 1; else if (IsDlgButtonChecked (hwnd, IDC3_SSHPROT2)) cfg.sshprot = 2 Revision-number: 585 Prop-content-length: 148 Content-length: 148 K 7 svn:log V 48 Fix cutting-off of "Blowfish" in SSH config box K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T11:06:17.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cc2623630a81f2732a09231d5efe5b12 Text-content-length: 230 Text-content-md5: 741b2726b907751d7e647a86b3ab08b6 Content-length: 270 K 15 cvs2svn:cvs-rev V 4 1.31 PROPS-END SVN! 丯結丯▃23, 8 AUTORADIOBUTTON "&3DES", IDC3_CIPHER3DES, 33, 45, 38, 8, WS_GROUP AUTORADIOBUTTON "&Blowfish", IDC3_CIPHERBLOWF, 79, 45, 38, 8, WS_GROUP AUTORADIOBUTTON "&DES", IDC3_CIPHERDES, 125, 45, 38 Revision-number: 586 Prop-content-length: 155 Content-length: 155 K 7 svn:log V 55 Yet another pedantic fix for scroll margin setting :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-11T14:47:57.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 55f8a42d8fa80e9ab09d88324d68de38 Text-content-length: 308 Text-content-md5: 2dadeca619208d591af502f1e1945403 Content-length: 348 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN儺g儹_価|伃L倎top = def(esc_args[0], 1) - 1; bot = (esc_nargs <= 1 || esc_args[1] == 0 ? rows : def(esc_args[1], rows)) - 1; if (bot >= rows) bot = rows-1; /* VTTEST Bug 9 - if region is less than 2 lines * don't change region. */ if (bot-top > 1 Revision-number: 587 Prop-content-length: 130 Content-length: 130 K 7 svn:log V 30 Add CryptoCard authentication K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-12T08:44:30.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cd2284751b0b3052865e7b5d302958d0 Text-content-length: 882 Text-content-md5: 14b5634450d5e8408b7934c7bc339a34 Content-length: 922 K 15 cvs2svn:cvs-rev V 4 1.35 PROPS-END SVN剦F創Z31:(絯塖伋d茾B侞?|倎p俔倕f個<倝 #define SSH1_CMSG_AUTH_CCARD 70 #define SSH1_SMSG_AUTH_CCARD_CHALLENGE 71 #define SSH1_CMSG_AUTH_CCARD_RESPONSE 72 #define SSH1_AUTH_TIS 5 #define SSH1_AUTH_CCARD 16 || pktin.type == SSH1_SMSG_AUTH_CCARDor CryptoCard exchange if we're doing TIS or CryptoCard *CCARD))) { pwpkt_type = SSH1_CMSG_AUTH_CCARD_RESPONSE; logevent("Requested CryptoCard authentication"); send_packet(SSH1_CMSG_AUTH_CCARD, PKT_END); crWaitUntil(ispkt); if (pktin.type != SSH1_SMSG_AUTH_CCARD_CHALLENGE) { logevent("CryptoCard authentication declined"); c_write("CryptoCardCryptoCard challenge"); c_write(pktin.body+4, challengelen); c_write("\r\nResponse : ", 13 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 741b2726b907751d7e647a86b3ab08b6 Text-content-length: 34 Text-content-md5: 9799016c837117b8a019a1cde10e0351 Content-length: 74 K 15 cvs2svn:cvs-rev V 4 1.32 PROPS-END SVN!/ 縎∣縍or CryptoCard Revision-number: 588 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 36 Header file for 2-3-4 tree routines K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-14T15:02:50.000000Z PROPS-END Node-path: putty/tree234.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1180 Text-content-md5: de582ee4fc80bcf1e55ad2ce7581d303 Content-length: 1296 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN岺僱$璉汦並E丗旸%揓-嘑7Go婦 凥:丳+GE丅GQ丯凥乧G丠aG禗凞俈.丏%匘侱侸廍俢D侫侱)嘡 D7DhD&凟丏 F4旸9塂僡怓7S亅匟:侱;丒凱岻+D刪擣両丟俰咵乯G&F匞?丠凧僋+侱#咵僁圖僲丗7ED H匥I?丣咹丒俢M卬濫俓嘍H哘慓唎凨凬2H並卂侽哃俌哴嘐"匛僠擠7孍員D俥匛圸凥俌孖 D圛坈僁俋J;D僡D丏噡圖lE僨E#J凟塃E卾咲僡凞!僂*H嘇僗嘖丏圼S匳凞俵[噑咶!E唃J丏僡岲3咵俇丏妀L塢D;丩僡嘗凞俴凪D丠乯E6匘7D僡両D刟D團圛H2奃2僂:凟&凞區LK8H嘥HE嘺FH孮M 奐E/* * tree234.h: header defining functions inc. */ #ifndef TREE234_H #e These typedefs are noally opaque outside itself struct nod_Tag;enum; must be declared here because client code needs to beablecreate automatic instances of it. Thisa doesnonstitute licencitternalstentture may change withoutice. YOUHAVE BEEN WARNED{ *;int posn; }; (*cmpfn234)(void *, )C 2-3-4 *new( cmpFre (includreethe elem)tAdd an t. Returns e on success, or ifn existcompares equal, rthat*addeininNULL iffounde is always passed ae first argump, s cann asymmetricdesired.als,which cafromproperwillusefin,Dele. Does,merely removel linkisdelIteroveraorder for (p =, &e); p; nex&e))ume( #endif /* */ Revision-number: 589 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Added Pageant, a first-attempt PuTTY authentication agent K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-14T15:02:50.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a0583e6538e0c3d480060174e422674f Text-content-length: 1099 Text-content-md5: a452ebbab8f6fed39c0ef5d8c2806dfd Content-length: 1139 K 15 cvs2svn:cvs-rev V 4 1.29 PROPS-END SVN瓄碶A噡&*7媅,v 巌乶"(]噡揅 /:K琡 ssh.$(OBJ) pageantc.$(OBJ) ##-- objects pageant PAGE1 = pageant.$(OBJ) sshrsa.$(OBJ) sshpubk.$(OBJ) sshdes.$(OBJ) sshbn.$(OBJ) PAGE2 = sshmd5.$(OBJ) version.$(OBJ) tree234ageant PAGERC = pageant pageant ##-- console-apps # pscp # plink ##-- LIBS1 = advapi32.lib user32.lib gdi32.lib LIBS2 = comctl32.lib comdlg32.lib LIBS3 = shell32.lib SOCK1 = wsock32.lib SOCK2 = ws2_32.lib all: putty.exe puttytel.exe pscp.exe plink.exe pageantageant.exe: $(PAGE1) $(PAGE2) $(PAGERC) pageant.rsp link $(LFLAGS) -out:pageant.exe @pageantageant.rsp: makefile echo /nologo /subsystem:windows > pageant.rsp echo $(PAGE1) >> pageant.rsp echo $(PAGE2) >> pageant.rsp echo $(PAGERC) >> pageant.rsp echo $(LIBS1) >> pageant.rsp echo $(LIBS2) >> pageant.rsp echo $(LIBS3) >> pageantpageant.$(OBJ): pageant.c ssh.h tree234.h tree234.$(OBJ): tree234.c tree234##-- dependencies pageant.$(RES): pageant.rc pageant.ico pageants.ico ##-- pageant.$(RES): rc $(FWHACK) $(RCFL) -r -DWIN32 -D_WIN32 -DWINVER=0x0400 pageant Node-path: putty/pageant.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 7534 Text-content-md5: 42f4e794dbf5a3aeb4c5a1d860a23aba Content-length: 7650 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN亷($=HK3慏/I4塛[咾g嘍橫-凣>丣,塂乹凟乵塋乣僁丼G乻F乴僒丯丮圢僉,G俍D乹匧丒奅 侸,塆K+團;扚塊+乹丷O匞乷俇婨I乄3咶K3丼3哖/E卙丼3咵-P 乀僉DG咲乂凾5燝僁儂桮"孎橢濪岶噈淕侴丏桭嘸朌-D奊 D坰僁坆揓侲圷咲儈圚+咲7丏?扙圶淗坹咶-僄+丏3塂咲婦揌7塂D>嘐奯D咹嘠丏嘼凟#侲嘯D嘵P噂僂噝両嘪侲塕僁塐揊-D奨揇奬丣,廍奯奃"僇孾D-丏孨孖孯b孿丒俷丒乶僈倀侸孏奌孯G寊侾宩丟;侱丩嶤乢嶱侼巕乢嶱丯巕乀嶱F;侹:旽嘠奐婣僂嶧-嘍奌奍怈匢婨奯_婦 丗/丒6H奬G怱F-J?侳慚嘒3F丏怓嶪 K?侴,丗慏F%D扐K慯凧<咼扴H奌憄嘑5丏奬丟抦匘丏,並慯嘑#丟妌僃(嘓奷凟/E)J抇J丏丟'Q揂S搊JE凾嘍怚D/I)侺 咲剏僅奬L嶪揓侱 H怉丷丏揜PJ旻丼昍D嶱凬昮丮昰K搙僘抇D俔俁揁E搊N抇F,J抇W4侱丏!孍侲K嘍桭G,D桭僁?E昰E-\晉丗昮咲噕團昮D奌D嘰侱旻J=僇=嘍嘜DJ楪侱凣 僆梥F昮H榟J扱D;怐9丟侹D.J楪PD奌僆榌HF侴"僂6丠旸圵c歈匫恌f歄丗=並3N昮D.丗T匘橩R昮F抇丼擳侱塦D$丏 D D/V 丗揨L歈N扚NFD3FI丏5L旸K泈H榟侴D圽凟侷昪D.G漀丩K奷F歶侱坾D塝D3嘍5並T歅[W沰G KD.嘒嘔E凟I淲J沷U歈旹塜咲1侽D嘽塂)J婣E0塅奺丩梀E"凟奧匛嘑燝凢燨D燽僅梴M宬侷榌O爗匞瀢D奌僅慼D燽侲歵V6E烰楨/FF淲燛嶥0僄F9D.E燯嘖孌丒PE燯僇#H瀝O僃F奺E1ND2嘒哋慽D2O憑a JHF匜噈_u嘨繣丒焏D塝丗E侺匛噈]纏丏8丟纐GJG0X*孒4働G匰V纏R絍乑猠OP昫S*G匰JUGG漗LG=MG爈丗痆J孍DH瀤I4D5圖4P/咲"DD噖DJ夿僁G燜侶燴侸慗M-丏+O:僓%乀艼丟芲G8D 丟;E榙E燱丣矻咺;F丏;丱茾J丒臸DK E╓丯D)丯I侴臚D/X丠4EE#E;丠僂揨J萡丯萲侾荿僄臶E莟FD罽匛/R F萪D侺凬6D D糺EH纙G滸D萫凬漢E榙D僁K+EN窧D D萫KE:O蔔丷蔨EE丗蕂W萷E丱"HFK#D侼蒐MG怱E燝丏G,I檖Q奷乥I4\#DE]怞噝恞d.OX+圗;侳E-H梥丠>DHq憄@H凣.G奷J9匘縜哹歄侷.MKJ@M抇OL7G"HM?圗?E妌R5M抌K擟乆擮僂^攑奃礰俇襋咷襢TG筯僂箏G機侱畕哅9慟匛;僁蕋]覮D聈P淭U觱J8O聈M觩D嘒T觠圗詞廌7乑咺!R裋G觱丗!圙W D蕋H梥丣梣UH誽僄*G機OX僂,Y誫ED竡匽誧EH塅D5D*V=凷I礕匘匘/Y琫L梐[謗N,V蟜O蟷孍箏D0Q秞@O/@M蟡k/J 俠蟡D貴團.凴賁X,j=丗罯@X褹侲楥D0a蟢丣踐G賀侲檆D漄咲E輑E漣丒)K揵F搉E)G)俁y賗U歅E檆侳輡Y歅M)K俀 V秜G F2[沷@倈#c朌`袲U裩b杴G怱嘕怾僁恞丷恥F奺c歄d.M榃K怱D9圖極N蝜F奺R憑GJ6D.F慏D漄孮丏圙荋K#丒匢O遉凬.K5丣侺鎤L遈\K5N錭丯&PN&R 峕裲扡1c歄怑鑪咷k鑉Fc歄H5F慏E輂F恵E猭P筞O鐁K_I抴Q-R抴F5嘍嶡J咲D焁侳婻F裲丯GQ/HQ鎊E朻U貾Q0I隞HN>E鏜G"TJ袻咹揇\1乬歂J歲K.T僃裲E祍D儂嶱 N,O0_奃鎆僅鎉G搈Z抇咼6NH奜%J燝F燽J L'G燯F爉N賅咵0僋賅E-僂蝀丏Q飁丱侱鐌丳.Q5VG2D僁#D籜僞$丏.嘍*P匜4E較f歄R鬌S遉SM丏鬛僂乁飡O綴L鰕侲飠H飠W瓺僊鮠J臗V泎E餗_痺R淩M衊Q咲処 d5G俔X*E_乣纐GG 僃裲F*F恵H銨O閜F蘞D鰗咲4匩唦侸唦凞;婩燨凥梴嶪楴GH僪F僁G4HE#D'I萛丏鶱EH鷟咺鱲E,J鸓凥'D鹒G'L鹝奡鹍匵侶.F鹍F8L麶僈鸰凟黸E靯G9DO丠7嘍儃丒㖞僅鷟I臚ED丒M袿LF靜H韒I\$G鋎擠r嘯歄侱亂圤亐-Z歅EEF歶F歶F>G GDD丒0僁4侱黺G纚J凞(J匛乂D僉丒>丏亖%丏2E覩僁踍G觀ID亖\咲$O扲D鐌孌黸丯亖僁亖\J訸N亗 侼訨N亖M僋亗 侲EO亙僂 U咵噈E6D坵F2E#K纚F亗H岴亜E>F亜 僎亙/圚頷E鍄GJF亙E黸丗亖oQW5侺鯡僁E亗匤 侳丯E 侺竈[亗1僆亗V丣亗fD.E亖p丣亙K鉚E亗CF亞.L亞L1I7J鐱K丏>丏鐶丯鐺婦齠J-僁鮢D鞪丏亝kr亣G雥侲坕僅亣HGL韎F恵咲鮅P莀E靝HE僰N蒐J昁馽匜I謎侺亝(昍誧廍,僈腯H亪TI7丟亪U丩僑G侷亯(GJG?圖頻D賗KL藇F嘕E 丟"丟H亪7G滸侷鎉丏G亐tE賀D2丩咲亰 K亱$K亣I圫亱VI亰7咹b亖U亖M@I亗gV亙1J亴UU亗7凞R亞G裩Q鐶N亴E+凣D蘟/* * Pageant: the PuTTY Authentication Agent. */ #include stdio.h> /* FIXME"putty.h"ssh.h"tree234 #define IDI_MAINICON 200TRAY1WM_XUSER (WM_+ 0x2000)SYS+ 627CLOSEMEM10)0x001M_VIEWKEYS20APPNAME "MAILSLOT\\\\.\\mailslot\\p_listenerSSH_AGENTC_REQUEST_RSA_IDENTITIES1_ANSW 2SA_CHALLENG3RESPON4FAILUR5SUCCES6ADD7MOVE8 HINSTANCE instance; HWND hwndkey; HMENU systray_menu; *rsakeys; We need this to link withRSA code, because rsaencrypt()pads its datarandom bytes. Since we only de,which is deterministic,should never be calledIf it _is_erea _serious_ problemiton't gate truenumberomust scream, panicand exit immediately if thathappenint_(void) { MessageBox(, "Internal Error",, MB_OK |ERROR);(0); }TfuncisDES.nohav do anything at all logevent(char *msg}GET_32BIT(cp) \(((unsigneng))[0] << 24) |116283])PU, value) {= (>>;116283; PASSPHRASE_MAXLEN 512Dialog-boxforpassphrase boxstatic CALLBACK PProc(, UINT msg,WPARAM wParLl; witch (cWM_INITDIALOG:= ) = 0returnCOMMAND: LOWORD() IDOK: () End 1);else eep CL102:/* editHI == ENNGEGetDlgItemText02,-['\0'}} : loa from a fileadadd_keynam]structKey *keys_retattempt =key_ed(= malloc(sizeof()dodlg =Box(, MAKEINTRESOURCE(210NULL,()!free(;opc},++le (= 0"C public.add234() !=/* already present, dwaste */he main aanswers ms_msg *in,inlen, *outlen *p = ityp =default `no go' response* Basic sanity checks. len >= 5,len[0:4] holds-4. < 5 ||p-4)Get = p[4]p += 5Replyenumen* Count upgth ofs=or = first&nex&e+= 4/*fielssh1_bignum_->exponentmodulus4 +lencomm}Packet headerobv five, plourc + 4ret,[4+5et +p,bitwritememcpy(p+4breakeio*, dependon whekeyorreqBle,_source[48]_md5[16MD5Contmd5c&.+3,161 ||n,bn(goto failuri i < 32; i++i, 31-i)MD5Init(&MD5Update, 48Finalmd5, memset, 0bevidenaty sommory ...we'reitsixteenof#if 0: impleAd,wasformmoveperhapsiitostart#fUnrecognised. R5 comparis2-3-4 cmpavbva)avbbbbam = abbCi amb)+1;<-1Nowmselv / 8-- >, bb>lpcb&ouidprintf(,%08x", ++iMapping(INVALID__VALUAGE_READWRITE, 0+int= = MapViewOf, _MAP_( *)=+1Unminvaliques!DefWINAPIMain(, prevSTR cmdlineshowWNDCLASS wndclMSG!.stylelpfncbClsExtracbWndhIconLoadIDC_IBEAMbrBack =StockObj(BLACK_BRUSHlpszC=; Regr (& S_OVERLAPPEDWINDOW |VSCROLLCWDEFAULT,aem iBOOLNOTIF tnHh;NIM.uVersShell_Notify(, &cb); hWuIDuniqueNIF_MESSAGE |TIPCallback=01strszTip (a)"ADD )Ad MF_ENABLED, "s"TateSW_HIDSECURITY_ATTRIBUTES ssa.nLsaa.lpSecurityDescriptosa.bInheritHandTRUM( &ise storw(Ge&1TranslDispatch CleanDELEmsg. Node-path: putty/pageant.ico Node-kind: file Node-action: add Prop-content-length: 88 Text-delta: true Text-content-length: 460 Text-content-md5: 8c20e7258f00f854018808c30d31dcbd Content-length: 548 K 15 cvs2svn:cvs-rev V 3 1.1 K 13 svn:mime-type V 24 application/octet-stream PROPS-END SVN6=奃 奆扗丒 侲 S@丒R僃VDa圖f侲r僃vDDtDq両丂丒侱丵匥並D乪丏pD G乺丒乲丠侲乲侴丂侳 丗乺丗乑匘3丂y)F丗 H丣侳丣m僘L僃E乶LNI/@S:H乺怐"怺6岲t匞単咷卼丏厊凢乺D&DD*H2乊:@CTE丂E僌嘒丗丏圖5X E乀M嘍丗嘍俒:奆噟丏並丗丏噞丗 丟' &(( @览坧鱳x噲坸 糖饂w?c?瘌cwx噣xL烫xw Node-path: putty/pageant.rc Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 646 Text-content-md5: d67d08382cb09ef0ffa4d8b01bc43eba Content-length: 762 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN5丒5ZJ,q丗欴4乂嘑乂圚乬侳y紽両岲8D=圠=E俛丗俫丯俶凟侰僃俫丠俶廍=婦孌俼凞<侲=L僌嘐僞塏僪僁乑!丏俥侤K丄塪嘕俢E+D凟=E匜岶乂嘑乂嘡僽僁H丒 丟8S僼咺.D(E卄O?O僉咼僞E僶匤#/* Some compilers, like Borland, don't have winresrc.h */ #ifndef NO_WINRESRC_H #include <> #endif 200 ICON "pageant.ico" 201s 210 DIALOG DISCARDABLE 0,140, 60 STYLE DS_MODALFRAME | WS_POPUPCAPTIONSYSMENU "P: Enter Passphrase" FONT 8, "MS Sans Serif" BEGIN CTEXT "p for key", 10, 120, 811EDIT102212, ES_PASSWORDDEFPUSHBUTTO&K", IDOK, 42, 14&CancelCANCEL, 8END1320 Key ListLISTBOX155,BS_HASSTRINGSVSCROLLTABSTOPAdd62Remove&Close82, 5 Node-path: putty/pageantc.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 2157 Text-content-md5: 6934af9031a104bb46180d590ad5ede2 Content-length: 2273 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN;嘺扗 濳匭1僁1睶l癊丂D丣圗+侴僆乫丗丯匘丣丒丂D孎丯E G H塂9G+匛8咲(嘑俆凢俓D俹僁=匢l燜奅*朏丯奌'丟+H'F丯岾侳丯塃俤奍5凞俓凟*D俹嘑丯G倅凣刅N僿嶭怚*X匑擲僄丏刣b7嶧匵I働哻丗僣EG亃Fu揗P僽並亃P奆僣哖 G刅D凴廌凩僅亃匞刅朑亃桵刟揋9F唟丟>E坖F丏乀F扗 G亃D塢DH塭朘塪両塪K僯I丟(G!丒:両圓L唡IKF"K僯H6塎W嘡F丯婫F1D7匛!嘑俛F丯婩1L亃丠=D匜坹L K奅LO(J奆H噐EG'嘑妀G學僂寈丟婼凞俓D俓FN唟匧6僄N僿処0丯9E唘D丩H凨F?L哋<凥-凬弐E侶1F怚E唘nRDH婮両婽 奜!t恛I奝E2侱H峟H6@L媞V凟M僯Q峞F凩J僆塪I揗D-G;KG刔G$N刯F-LZG S丄E 僋G僣咷$F俆咷E俕侱I,抝刅m乀HE乀侶E`亃G攊塃剈T匑圚 D杒侴杚K媐D杒侷$G&D匜慭丏丣匟旲塅D卛E梤凮GD6F5丮朇凬HG攖J乷匞塉M塙G 嘍圗匶僄卌E丠攕K學I慞僁匢榸J6I楺G L$I凨圖 侺$DH榹丗刡僆榸乄嘡KH扙塃G G4JFG /* * Pageant clieode. */ #include stdiolib #ifdef TESTMODE #define debug(x) (printf x) #else #endif int agent_exists(void) { HWND hwnd; = FindW("", )if (!)return FALSETRUE; } query *in, inlen, *outlen#if 0MAILSLOTNAME "\\\\.\\mailslot\\p_listener"SECURITY_ATTRIBUTES saHANDLE my_,char name[64]*pDWORD msgbyteswrittreadid; = NULL = 0 = CreateFile(, GENERIC_WRITE,FILE_SHARE_READ, (LP)OPEN_EXISTING,_NORMA(("opened %s: %p\n",)= INVALID__VALUE = GetCurrentThId(nid--sa.nLength = sizeof(sasa.lpSecurityDescriptorsa.bInheritHandle =o(,_request_%08x", ++* Five-minute timeout./M0&} while (Sleep(3000)trlen) + 1 +p = malloc(pClosetrcpy(pmem+p)+1oh\n"Wri, p,&0eek!free(paaWaitForSingleObject, waited!GetInfo &=_NO_MESSAGEno message=%Read &&mapfilemap, *red,COPYDATASTRUCT cdsisds.dwData/* FIXMEcblpSendM(, WM_, (WPARAM&cdsiid >Reply = OpenMapping(MAP,ame`%s',rrorGetLastE()! &&!MapViewOf*()retret, (Unm: tell to c its htoo}mainmsg"\01\1", 5, &%d:",or (ii < i++ %02((unsig)msg)[i]0 Node-path: putty/pageants.ico Node-kind: file Node-action: add Prop-content-length: 88 Text-delta: true Text-content-length: 205 Text-content-md5: fe0b946e4fcf82c5462e395b52615006 Content-length: 293 K 15 cvs2svn:cvs-rev V 3 1.1 K 13 svn:mime-type V 24 application/octet-stream PROPS-END SVN>jY奃 匘 僁侱丒 丒 T/丒B僃FDQ圖V侲b僃fDqDdDvH~丏孌凞塠%侱+L丮丗丮俉-E&塅丏 並丗丏丗(丟/( 纮览wwwx噣xpL烫xwww Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6e584b06781d247d27a43311ae520c29 Text-content-length: 137 Text-content-md5: 9ba3512f9741c4dd85a2597ae50e6bd6 Content-length: 177 K 15 cvs2svn:cvs-rev V 4 1.40 PROPS-END SVN腷臸 ss僈Exports from pageantc.c */ void agent_query(void *in, int inlen, void **out, int *outlen); int agent_exists(void); Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 14b5634450d5e8408b7934c7bc339a34 Text-content-length: 4706 Text-content-md5: c6d7993141003b99b8baf57f829103e4 Content-length: 4746 K 15 cvs2svn:cvs-rev V 4 1.36 PROPS-END SVN創Z劥<=妎俵鍃奲=僂駎咶>yt優[侎}1G儽~倳c価w_AGENTC_REQUEST_RSA_IDENTITIES 1 #define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 #define SSH_AGENTC_RSA_CHALLENGE 3 #define SSH_AGENT_RSA_RESPONSE 4 #define SSH_AGENT_FAILURE 5 #define SSH_AGENT_SUCCESS 6 #define SSH_AGENTC_ADD_RSA_IDENTITY 7 #define SSH_AGENTC_REMOVE_RSA_IDENTITY 8 pktlen = 0;pktlen += ssh1_bignum_length(bn)p += ssh1_write_bignum(p, bn);agent_exists()) { /* * Attempt RSA authentication using Pageant. */ static unsigned char request[5], *response, *p; static int responselen; static int i, nkeys; static int authed = FALSE; void *r; logevent("Pageant is running. Requesting keys."); /* Request the keys held by the agent. */ PUT_32BIT(request, 1); request[4] = SSH_AGENTC_REQUEST_RSA_IDENTITIES; agent_query(request, 5, &r, &responselen); response = (unsigned char *)r; if (response) { p = response + 5; nkeys = GET_32BIT(p); p += 4; { char buf[64]; sprintf(buf, "Pageant has %d keys", nkeys); logevent(buf); } for (i = 0; i < nkeys; i++) { static struct RSAKey key; static Bignum challenge; { char buf[64]; sprintf(buf, "Trying Pageant key #%d", i); logevent(buf); } p += 4; p += ssh1_read_bignum(p, &key.exponent); p += ssh1_read_bignum(p, &key.modulus); send_packet(SSH1_CMSG_AUTH_RSA, PKT_BIGNUM, key.modulus, PKT_END); crWaitUntil(ispkt); if (pktin.type != SSH1_SMSG_AUTH_RSA_CHALLENGE) { logevent("Key refused"); continue; } logevent("Received RSA challenge"); ssh1_read_bignum(pktin.body, &challenge); { char *agentreq, *q, *ret; int len, retlen; len = 1 + 4; /* message type, bit count */ len += ssh1_bignum_length(key.exponent); len += ssh1_bignum_length(key.modulus); len += ssh1_bignum_length(challenge); len += 16; /* session id */ len += 4; /* response format */ agentreq = malloc(4 + len); PUT_32BIT(agentreq, len); q = agentreq + 4; *q++ = SSH_AGENTC_RSA_CHALLENGE; PUT_32BIT(q, ssh1_bignum_bitcount(key.modulus)); q += 4; q += ssh1_write_bignum(q, key.exponent); q += ssh1_write_bignum(q, key.modulus); q += ssh1_write_bignum(q, challenge); memcpy(q, session_id, 16); q += 16; PUT_32BIT(q, 1); /* response format */ agent_query(agentreq, len+4, &ret, &retlen); free(agentreq); if (ret) { if (ret[4] == SSH_AGENT_RSA_RESPONSE) { logevent("Sending Pageant's response"); send_packet(SSH1_CMSG_AUTH_RSA_RESPONSE, PKT_DATA, ret+5, 16, PKT_END); free(ret); crWaitUntil(ispkt); if (pktin.type == SSH1_SMSG_SUCCESS) { logevent("Pageant's response accepted"); authed = TRUE; } else logevent("Pageant's response not accepted"); } else { logevent("Pageant failed to answer challenge"); free(ret); } } else { logevent("No reply received from Pageant"); } } freebn(key.exponent); freebn(key.modulus); freebn(challenge); if (authed) if (authed) break; } Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 533354c115c11bf89aef20d2c45af59d Text-content-length: 222 Text-content-md5: f5e2e25715f37d90b6dd45ccaddd7c12 Content-length: 262 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN烪9.僛-擬坰 = char *comment;void freersakey(int ssh1_bignum_bitcount(Bignum bn); int ssh1_bignum_length(Bignum bn); int bignum_byte(Bignum bn, int i); int ssh1_write_bignum(void *data, Bignum bn Node-path: putty/sshbn.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d099e1191cf34016f86621a10d947339 Text-content-length: 1164 Text-content-md5: 6f710c9415dc629689bd6f87bcdf9f91 Content-length: 1203 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN羏蔩坹羏坹 /* * Return the bit count of a bignum, for ssh1 encoding. */ int ssh1_bignum_bitcount(Bignum bn) { int bitcount = bn[0] * 16 - 1; while (bitcount >= 0 && (bn[bitcount/16+1] >> (bitcount % 16)) == 0) bitcount--; return bitcount + 1; } /* * Return the byte length of a bignum when ssh1 encoded. */ int ssh1_bignum_length(Bignum bn) { return 2 + (ssh1_bignum_bitcount(bn)+7)/8; } /* * Return a byte from a bignum; 0 is least significant, etc. */ int bignum_byte(Bignum bn, int i) { if (i >= 2*bn[0]) return 0; /* beyond the end */ else if (i & 1) return (bn[i/2+1] >> 8) & 0xFF; else return (bn[i/2+1] ) & 0xFF; } /* * Write a ssh1-format bignum into a buffer. It is assumed the * buffer is big enough. Returns the number of bytes used. */ int ssh1_write_bignum(void *data, Bignum bn) { unsigned char *p = data; int len = ssh1_bignum_length(bn); int i; int bitc = ssh1_bignum_bitcount(bn); *p++ = (bitc >> 8) & 0xFF; *p++ = (bitc ) & 0xFF; for (i = len-2; i-- ;) *p++ = bignum_byte(bn, i); return len; } Node-path: putty/sshpubk.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 459ab615ffe2dbe4d54a72ca12834336 Text-content-length: 214 Text-content-md5: ae6bfa1da5c6f67f065c8775eb81ef6b Content-length: 253 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN淴85恥坬 += 4; if (len-i < j) goto end; key->comment = malloc(j+1); if (key->comment) { memcpy(key->comment, buf+i, j); key->comment[j] = '\0'; } i += j;key Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1992a98269db34c6f6206fc0f289f798 Text-content-length: 254 Text-content-md5: bb5cda05cde45eeaf57652a1432339e3 Content-length: 293 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN1 乫乫void freersakey(struct RSAKey *key) { if (key->modulus) freebn(key->modulus); if (key->exponent) freebn(key->exponent); if (key->private_exponent) freebn(key->private_exponent); if (key->comment) free(key->comment) Revision-number: 590 Prop-content-length: 120 Content-length: 120 K 7 svn:log V 20 2-3-4 tree routines K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-14T15:02:50.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 7018 Text-content-md5: 4eacf573dcf0735e21b9ce3b5d81454d Content-length: 7134 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN亽_嶨〦擠珼j漀僁J丠橠丩扙丼処>侱+D亇D'塈>桹廐嶥 嘐俖匘俬嘔侷G俤T俌侱G6K奛L巃K7EG5K朣I媣I9ED.丗旲侲嶥丏巘O晈侲昷V F _(REMEL(K昺KJ極K婾丟,L楰並榅乣榙並榅乀榙H僆0D1圙3W1`5丂U昖F0Q1E婤M恲J朤H朆I@7S晄DV 堾XuZ4乪桹\RE朆ME朆@9L楰並榅亄>G7I俤乀1D1丩榚H婾O橩匛僄昖H凲D扤G塷E刞両檃W>HED塙F E塷Dd両旲F0丒7旾昪丣旲D橸丏扝嶥咲.圗扝I旲丒7D匵咶昞孒%圛旲唊昪丼D!P H"N杬I7T朸H"S朆D塊W>EW"H3I&P)M慮f淏M"M7JNNL4OMN漋@D1@IM廥XI╭Q 凢塊F桺M+WtT:丟桹@}$Q"R%[N杬MEK楡HMOJ妀GT3P9N6DJ"両M榗丼瑀DJ*_D1JW@V極HE抺DT寍F凨丣珻丏峌JD岹KM!D恉O甋F P甮F E!X&L痾D廋G=G抺HH D榩両F+L*J癗K8匛晐P癶丏"J6KW皔乆F>U皗丠QEE宐K7U#侱侱圥凟梠塃檍孌瞖侶0凟#DdF?塐;F睶婬0D剕DI擨F凲侲E剈僂;EJ乧 乁.I丯K>孌縑僂耞侲侲凟I)H旳丏丒 凞睩塃tE莚塒昪R慾H莢F攑僆$僈&侶E僈;M渃H莢T丩E%塊丏4N3H荳H旳丏%僂,扙憓侱蒔J$Q 凣憑D E蒔咼$圠矪E両蒆E罷D J$侱莭J$J$O薴匬薴G藂侹薘N丒丒係!J$丏揊M蘕匜蘪I$D桼N*丯丗汫H塕凞僑D癮侷0咵F=K蚐丏蚠匛蒼G LJ J9M.HLN J;K3O,N¦M6J EE蚐E傽H虶丣9NH*F僑H虶J蝟T.J祡P蚸I蟜O IF/E,I1K淔哊蓕D 侱蚮K峓E衳iE Q;F蔙E蔭L蔢IE蕇D衳KG丒,J$O2俙薒EU藍M薾NL-KK9Q蘂R蘾H蘵E覲R蘝F蘕jK?D塚乆(KS蜭FI.J蝞L訞N蟈K蝞K詃M*J9D砢侳*匘蓕K蚐丏?凢;丣D誢M*侳F誱G誜OE誢G丩L誷WE\2E P蠷Z丮裃L裧FD裋侸$咵縊僂D坔丏裧E凩J譱E凞E譻嘐丣$H裭E莕E罷E菷丏扐E縢F渳J襲d褸[襲J9乊-O観僒薙咲攃D罝咺%丏僊並賠凞侱F憊丗肐E譻S KF筀僃讂丒0E匛.K丏匘睻ED奅-L蔞D縕凣,F丗#E剈F縠K跠E丏豩侳蠩侴;F扞嘖裖E剈Dd咼,廗踭F憒奭OH侳誋M衚P誢IL朇H-J獽E5匤詖E誼丮謒H9M-LD)E E榊e謈丟1K丩:F説E"丒G踙僂$E7D擩E罫丏踭D鈠F<丏襲丗鄒J葽僂翿D俶D蒭F蒻K磇E7DDP媁侸J醬G楧G楧DF鉩G癏哅嶴丟赼E巗GF-僅巟G&丒|E鈚DD僪圗蠩丗)丗'D裩咵渧咵鋧H砫丗趠I砫E剈凣癛丟蒔D,J豄D錣I=L譙丏傽E鍄H9D昪D鄓H鈄G媁僇鈈E衶E>LM疩F'E虵L扱DL橿KK穚N6H侸鋢F5G(J匶H&丏躪I'僃D9侴D圙砡丣鎣DEGD裓G裡侲躃D俤D侴%J+H遀F蓗M3O荳E.丟錎D蠰丏H贕M讀R丏罯揇 FWF錔E鋁僈侱莑丷昩D扺O甋E蠪丩橿E>D*凩術F僑E輑凞躸J阓MGM詓E陗R,L銲H 丒(N檙E傽侾T侶丏"匞踈H8M踛OG縒H#F蒓U1J侳^D鏦匘.僂塽僄踓E躓G踆I8E豨DF莣僇>E睶僅:僂#I8凣菾D鏦F翹侱篕D.E碐匘M)H莢E譻丒%D躕J靣G昹M K隲GF僊F頑T(侺橿G孴L瑌ED癮K丩FKE蚟KQ颵E蛕K並丠6MF頑G=K蚗L餑I颵L1L餜HI=P丒陗M題LJ頼D塊I題U隥RU雟僇筜匛蕇侱.丒 丮閨侹 丟+塂+F%侱乗D騥E$c頛J a顆H釵` J"NI=KqJ T馤X駗乤 G鞟D罫L韒F霴E8H條E縗丗(P M靤凞丆E砫丒萿E羈H)G躊H$JD譼咲莖H匼G P?DdO/H豯丗韚俓韠D6H韕J>丗2丟瞙b?丯頱僉軫L鬘IR丩驦乂朧J頼丩M蝔M6H鴆K L鳺E婤MJD遼P]丗#奆2I"X郙僂鯽丠鄅M騶I>D闞I認M醎K誦N'N鶽K5G誼JPU'MM O荳D5侴UEG7J!EE閥J扝I$E鯽G瞙E$俀昩D丒=FI&丠iDL匵D踤丠'E匩篵働坾凟SP OSJ鍽II遜E鬡侲'E癇G﨓僁齰丮M侴羖僂齁_齕G蘒J塒僃,D⺌K籠H9凣9LF`丣L)V糔L﨡D亐(J⺌H&MK#D)E@両蓒M3J亐7D T絴K#侲宊IGI:ET並籮P繶K銳丏縇丗耝D頟F@侺7F盿丏餪GI亗J)乀亗(J盷匢G丠$G亐h丏'NoI籮G籠[蘒僔㧐僃䙡L丒J鈌K亜哃亜+丠亜6MT榯N亜UD岹[亜gE亝Im亝I哰P%N亜UD峟[亜gE亞Am亝I唜P.N亜U丮亞T丗亙vDS:K僃亙{G剅丒E亙)E慛H亞vF HE䙌E塚僄坰丠 侶 凢鱢丗亪_僄俼E亪`D軫H亪i丟亪rG僁亪A僁遼G亪:D(E亪DQ E癅M G亪E亪H坹匘亪y丏亪6O亯c係亯y凷亯y凷亯y匱亰;丒亪5O亯c僒亰i嘥亯yT亰i刄亰%僒亰i匲亰U匲亰S塃亱F亜F亣`G亰kH羢F]P亯j丗 G亰kd亴:俿亴eE亰!r亴fE亰8r亴fG亰Or亴f丏p亴hE亰}r亷wH亱s亴ft亸,E亱Ct亶RE亱\s亷 E亱tt亷BH亴 s亷wJ亴(X亷w丠侭/* * tree234.c: reasonably generic 2-3-4 routines. Currentlysupports insert, delete, find and iterate opions. */ #include lib"h" #define mknew(typ) ( *) malloc (sizeof)) )sffdef TESTLOG(x) (printf x) #else #endif struct_Tag { nod *root;cmpfncmp; };pakids[4]void *elems[3]Crea *new()ret =)("cd%p\n", ret)ret-> = NULLcmp =urn; }F (not ingthe ents)static(nif (!n) ->0]123(n)tAd e tot. Rs e on success, or ifxistcoms equalthatadd,, **np, *left, *righorig_e = ei; ad %pe, );->1] = 23e; }n&while (*n n = *np:[%p] n, 11](ccmp(e)) < 0); c; /* alreadys ||111222movo child %d (%p)np -,* We neonewin n at posi np./a%de,* Iin; simple./ponof\n" =;} {1]n1122donbreak; 3in middle233mmsplita 4ma,move focus up a level 'ink it mattersch waynd we pu23. Foricity, we'll 3 firstalwaysm /* 3)m, ,0}= n ?:12Ifvee ouhere by `', n will stbenon-finished.ecause n is aforold one has justtwois overloaded,isif fs passed arst argump, s canasymmetfuncif desiralso beincafromprbe use,ourhe bottom knowwwe wouldisi wano. But itiserD. Doet,merely rel linksdelei = -1%p1kisub; k00;11223Recurse downsubkiitonlywvdo stransformtart with kisubkisub!ki > 0 &&-C3a,-handed variant. Cki buttwo ormore. Soato. C .B /\->[] a A b B c d D e c Ci-lastsi2] ? 211 : 0+ki < 3&&M+1j(jj < 2j j++ j+}bnoneighbithnpickergeki, takng|C d(Sincepointsaedesca sutreducogness, _unless_veryiIatweow-emptreplacits single largas shown.) ki--sib)That's builbiib. Now wrefereibkij<2 ?:b! is bd hif ei==-1;; `' special:iremaintem in.(no , && },ei] *arrangedain..1as's _really easy_. Jand'rn1ei; i++!ei2anernalSopredeor e (), e c isthenon agaip2a?:)eb, to 2as///s//or/. (And/schcombwtheir ,re,ea, *caaadestroyed b ()goamaIaorderrstenum->pos0} nexpospos+;=donef(n012 : 3}3pospos t("%*s*4, "+1\"%s\"+3}) ,mp(vbvchar()avbstra, , "RidOfYorkGaveBattlIVaiRabbitsYourrdeBringvisibVegetable,OfI} Revision-number: 591 Prop-content-length: 126 Content-length: 126 K 7 svn:log V 26 Source form of win_res.rc K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-14T15:04:05.000000Z PROPS-END Node-path: putty/win_res.inp Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 5736 Text-content-md5: f1f92c466a83d2631b551ad7a6edfb40 Content-length: 5852 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN楢ZJ,奌嘒 獿6廏M;嘔eIP欵 奅侱俫嘑俫圚倄籇滶傽L僅孎僘孎僥丏侷F僷嘑FD2匛哃,G=嘑処丠凮侺,矱傽F匜H凘丗処侸剒僃!DW,侱 園C係E巘!凧僙D凮匘匽R僷嘐=咲侸乢3EF嘪F&侼噂匘俰嘑,咷刡丏0丏9D>塈匓業匓乁坘Eh丯丵E俬G1ED噂丏匽侸単咢k厁傽@哾匑R(@=員/凟剘D僱侴係D倁凢5凞?丠)哬"汯:孍傽丗2塅僘楧 丗%凟2I?圢嶰扡&凣 匨嶨丗嶶乂嶾D7M巚I廏丗%凩匟圦咵傽丟2圛/係嶨E傽D匢僉僉>僃嶯丒嶶丏5凢7R恆匤.塅嶯D X怹塎>侺廇K坿@).K:僙慥^憉EhGR匨%怘<凥嶩僃G凣$N巇D擱D巇N嶯V P凣%侲+ID昅PJ岹>FM5M攂凢%M僅咲匥H昗僉廇J2M僅僁僘K擫僣朶匢;D擱丏嘺T朸圢DH匘,丒僓廔.嘍 I擽N凞侷僔H(凣4N寎丂m 丗峺丱F攆M G+侱唋岹=匭擵Q恆G坮丠搄E:僉嶯`I歛嘖歬僉丟嶿DH汷Q丏嘔3刡?圖朖I凣f凣 F僄昦F X汻僃!僂泋岻3刢 匧滿r淒匧滿匭 R恆圠滿匭慗S沇岲&咲>両3僣 匞嘩E焁匞桲f嘑唊J凥嶭^Q5嘒>I3俠?凨俿凮燞俉燴R?処憆EGWN廌9侱僔丏+僆4匶4D丏/M侲w匧1僁W6婦瀥咲咲8H燨丏7F W6怐丏?僄擨侳僓榣丂PL梩G+丠0孍擡G=匵擵凢梲G.凣擨匢擴D巟丮巬U廚F7J G汭I弣G.咹擧匱V/U4丵╙乪磘G$G係旹E礣U昢丵晎D晎僄1~僄7E礣俤朳凟H刋E梑丩梙HL-怑唊J礛IR?R恆僇0侴朳F慞`凧0侻廆JO?丂癗G&@ 眔_(丒"侱)岺/H筂凥\糴@E)S咺礛匢焅d築凬D繴M D瞇_圢匜0乮纒Q繵I纈丠纒WW1燤燞丏凨玸NE檛N 圙6凞擡I礛僔怓H穠R恆丱2丗0乫 丱2丩7SS凢凥2刪嶩DF k巟J攇H#\猚DF僉U廼P=丂c:J 奐刢 F凞1淕咷耺a纚丒瀥G7G萂I菵F>L萒G MN$廔礙僐漍G(匯旻D蓋F昢E萯S3M Q窮E4E?匵乊.丠6E蓋D慔D噁凣匷F僷H祘侳蒱P蓂D#G>咹刄L巇D蓋F 僄藈僁侻俋?@籜\:P璄匛D圖礍F疊F筂奙璹K-V)僁莢丏D+嘒薬圠玶K-H蒟丒疌H侻擵P旽侳昢I>侱倃晀G+侶"侷焅僅?D汚F刉G.I(匘侸D歺O?G+丏I'I-I9俒蠦丳衈N!G+僅2侷 JD剎Y蠨丵?ND-丟 \猚嘍衎J:丏/F僷D-D2N寎乀/l@X匘琝圙7僂璝H蒨DE 両/Z欸D嘓/匛E萕D詆乵萡D%丏D塃泋僂玅並(僁誷\詑L誥侴諁僁L僉綬R恆奛訧凞蠺匛泋匟萒D詆侱H榢W I蒨D哃*卌詊僅凞讅g萭咲凣胢侱豜僁豩]奐豠G侱 丗豿乨/咲嶥膓匞#丏倃丏係.I卙僗,D蟔F剗E蟕丂I侱礍傽B!丏僱丏僪K薍I昇丣螻D噂嘡晍\窮K/FW,D貱D貱丏侶.@B!Hr"侷僙丏"侷M蒘僂0乕丒蟎DG辡侲M腷D0E擠D揊烝咲蝂圗燤侱踼E辬D F辳K裏咲琝咲訞D 團泈廌?H燡侱%H匵R逹D膟奊遾僂1凞読D郖H郠匘侱E!丗!D匽D侲乀0FQD琝H鄓凢E鄅G0F蝃丒遪丏玅侱醏丏.F!丗EQ逺丏膐僁<奅膐侱醂匘譪侱遪丗L鄆G醦D/D醷E!IG+D泍侱9僄9E酳凬鄅奃丏侴醦丟処U逳咵蝁D郖匜訰凞唋E丒歷D鈇D塊S農圖H>匜泈E遷EF G;嘍 侶辥丣辭Q"侱読D鋉H釧丏(凟8僂銄P釭D獂僄凥F R烡蠺嘑錑G'丏&R鈏‵醦D&E辥乁岴)婦錵G:匘*僄醱丏#R鈏僁襨咲綫凞鎀怓5G鈄E衑R鈏扗橣5G鉈俇逳扙>E鐁廌0GG E$R鈏匛G鏲僂镹圗倇侳媐僄鎎丠剅U凞鎃E镸奃 侱4僁閞D鎄丒5E剗D3D&R鈏匜閙DE#I錹侲#侱F關G凥俇F镸凟侻F錐D鎞E闥D1H錢D卙/* Some compilers, like Borland, don't have winresrc.h */ #ifndef NO_WINRESRC_H #include <> #endif systemsdefine this, so I do it myself if necessaryTCS_MULTILINE # 0x0200"win_res.h" IDI_MAINICON "putty.icoD_ABOUTBOX DIALOG DISCARDABLE 140, 136, 70 STYLE DS_MODALFRAME | WS_POPUPCAPTIONSYSMENU "About PuTTY" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTT&Close", IDOK, 82, 52, 48, 14View &LicencA_LICENCE, 67CTEXT "1, 10120, 8VERSION116\251 1997-2000 Simon Tatham. All rights reserved.",234END0,180, 216 ConfigurationOpen99, 4&CancelCANCEL3, , NOTTABSTOPONTROLC,ASCIICTLS"SysTabControl32", #elseL 793RECONFRecApplyPANEL06, 363HILDVISI|BORDERINIT(0,176,4,162) SPOS(3,3)GRID(4,4,24)LHost &NamC0_HOSTSTATIC, COL(1), S2EDIT, ADJ(8)3), ES_AUTOHSCROLL&Por0_POR413NEXT8,10)FWHACKRrotocol:RORADIORawRAW2,GROUTelneROTTELNETSS&H/hackSHSSH1,8,8Stor&ed SessionsSESSSCO12,171,0ISBS_HASSTRINGS4,17Load",OADSavAVEDeletDGAP(20) CHECK" &Window on ExiCLOSEEXWarnC&WARN118Ac of Backspace1_DEL-008? (127)127(Hand EndHOME&StandarTILD&rxvRXVFunkeykeypad layoutFUNCVT400LinuxLINUXXterm R6XTERMInitial statecursorsCURNormaNORMAA&pplicAPPLnumericKPNor&KPppl&KP&etHALT-F&4 is spec(csdowALTF4SS& menuSPA&Use local inal ldiscipLReset scrollback&res1_KEY2Tscreen dimen2_DIM4,15&Row2_ROW2Colu&m2_COL ds,8Fon2_3C&hange...HOOSE(1Auto &wrap mode ily 2_WRAPMODEC Origin MDECOAvoid ever using &icon titl2NAMImit CR iny &LFLFHASCRBlinkBLINKCUBee&p enableBEEPDispla&y2BALoc&k sizLOCKSIZgroud colour era2_BE btex2AP(632-&type string3_Tspeed-lo&usern3_LOGLOGEnvironment vari3_ENV5&VVAVARVa&luL255 USEA&dADRemoREMO1NVIRON interpretBSDBSR&FCRF5Dalte a &pseudo-NOPTCipherCIPHE3DESBlowfishBLOWF69ttempt TIS or CryptoCard authent3HTISPrefer p verSSH11522Publ fil3_PK4mouse butt4_MBs (R pastes, Middle extends)", WINDOWxCharacter class4_C96,10PLESE1SCURYto+3, 261051, 12oldeda differ5_BOLDCOLOto &palette5_PALETT&5_5_1010Re5_109VALUEG+8GBlu5_B95_CHANG56Handlof VT100rawV has &XencodXfboth ANSIOEMsOEMO& onONLPoor man's(""+""-""""|""POtransl6_XLA&No6_NOKOI8 /-1256_WINISO-8859-26_20CA&PS acts as cyrilswitc6SCYLOG9EvLog50N54, 95,222OK903opy "20hereby granted, freharge,any pers10obtaina copy softwarassociated docu10s (the ""S"")deal withre,2limi,,ife5psh,tribute, senand/ollitomitwhomis furnishoso7subjecfolloondi1The abovnoticshall b109edrstanpor101HE SOFTWARE IS PROVIDED ""AS ISWITHOUT1WARRANTY OF ANY KIND, EXPRESS OR IMPLIED2INCLUDING BUTLIMITED TO IES O1011MERTABILIFITNFOR A PARTICULARPURPOSE AND NONINFEMENT. IN NO EVENT SHALL14SIMON TATHAM BE LINY CLAIM, DAMAGOTHERWHEIN AN ACOFACT9TORTWISE, ARISFROUTNCONNEORUS17DEALIN Revision-number: 592 Prop-content-length: 160 Content-length: 160 K 7 svn:log V 60 Pageant now accepts an initial key list on the command line K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T10:48:42.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a452ebbab8f6fed39c0ef5d8c2806dfd Text-content-length: 43 Text-content-md5: a4b1ed7222c594e0f0108f3db9c12fe3 Content-length: 83 K 15 cvs2svn:cvs-rev V 4 1.30 PROPS-END SVN碶磚歏媥╠ tree234 tree234 Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 42f4e794dbf5a3aeb4c5a1d860a23aba Text-content-length: 615 Text-content-md5: f4e4924cc5ee157bd7a22674e5587d63 Content-length: 654 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN亷(亸P凚僑鰙 *凚亱Initialise storage for RSA keys. */ rsakeys = newtree234(cmpkeys); /* * Process the command line and add RSA keys as listed on it. * FIXME: we don't support spaces in filenames here. We should. */ { char *p = cmdline; while (*p) { while (*p && isspace(*p)) p++; if (*p && !isspace(*p)) { char *q = p; while (*p && !isspace(*p)) p++; if (*p) *p++ = '\0'; add_keyfile(q); } } } /* * Main message loop. */ Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c6d7993141003b99b8baf57f829103e4 Text-content-length: 6140 Text-content-md5: 2dedae0dfd9227f74bf0257a208609ac Content-length: 6180 K 15 cvs2svn:cvs-rev V 4 1.37 PROPS-END SVN劥<勬B,t噉3 咶偑W>0乴傒l唘傐 俢傖z佅`備\tree234MSG_CHANNEL_OPEN_CONFIRMATION 21 #define SSH1_MSG_CHANNEL_OPEN_FAILURE 22 #define SSH1_MSG_CHANNEL_DATA 23 #define SSH1_MSG_CHANNEL_CLOSE 24 #define SSH1_MSG_CHANNEL_CLOSE_CONFIRMATION 25 #define SSH1_CMSG_AGENT_REQUEST_FORWARDING 30 #define SSH1_SMSG_AGENT_OPEN 31static /* * 2-3-4 tree storing channels. */ struct ssh_channel { int remoteid, localid; int type; int closes; union { struct ssh_agent_channel { unsigned char *message; unsigned char msglen[4]; int lensofar, totallen; } a; } u; }; static tree234 *ssh_channels; /* indexed by local id */ static int ssh_channelcmp(void *av, void *bv) { struct ssh_channel *a = (struct ssh_channel *)av; struct ssh_channel *b = (struct ssh_channel *)bv; if (a->localid < b->localid) return -1; if (a->localid > b->localid) return +1; return 0; } static int ssh_channelfind(void *av, void *bv) { int *a = (int *)av; struct ssh_channel *b = (struct ssh_channel *)bv; if (*a < b->localid) return -1; if (*a > b->localid) return +1; return 0; }1 /* FIXME: agent exists && agent forwarding configured */ ) { logevent("Requesting agent forwarding"); send_packet(SSH1_CMSG_AGENT_REQUEST_FORWARDING, PKT_END)logevent("Agent forwarding refused"); } else logevent("Agent forwarding enabled"); }ssh_channels = newtree234(ssh_channelcmp) } else if (pktin.type == SSH1_SMSG_AGENT_OPEN) { /* Remote side is trying to open a channel to talk to our * agent. Give them back a local channel number. */ int i = 1; struct ssh_channel *c; enum234 e; for (c = first234(ssh_channels, &e); c; c = next234(&e)) { if (c->localid > i) break; /* found a free number */ i = c->localid + 1; } c = malloc(sizeof(struct ssh_channel)); c->remoteid = GET_32BIT(pktin.body); c->localid = i; c->type = SSH1_SMSG_AGENT_OPEN; /* identify channel type */ add234(ssh_channels, c); send_packet(SSH1_MSG_CHANNEL_OPEN_CONFIRMATION, PKT_INT, c->remoteid, PKT_INT, c->localid, PKT_END); } else if (pktin.type == SSH1_MSG_CHANNEL_CLOSE || pktin.type == SSH1_MSG_CHANNEL_CLOSE_CONFIRMATION) { /* Remote side closes a channel. */ int i = GET_32BIT(pktin.body); struct ssh_channel *c; c = find234(ssh_channels, &i, ssh_channelfind); if (c) { int closetype; closetype = (pktin.type == SSH1_MSG_CHANNEL_CLOSE ? 1 : 2); send_packet(pktin.type, PKT_INT, c->remoteid, PKT_END); c->closes |= closetype; if (c->closes == 3) { del234(ssh_channels, c); free(c); } } } else if (pktin.type == SSH1_MSG_CHANNEL_DATA) { /* Data sent down one of our channels. */ int i = GET_32BIT(pktin.body); int len = GET_32BIT(pktin.body+4); unsigned char *p = pktin.body+8; struct ssh_channel *c; c = find234(ssh_channels, &i, ssh_channelfind); if (c) { switch(c->type) { case SSH1_SMSG_AGENT_OPEN: /* Data for an agent message. Buffer it. */ while (len > 0) { if (c->u.a.lensofar < 4) { int l = min(4 - c->u.a.lensofar, len); memcpy(c->u.a.msglen + c->u.a.lensofar, p, l); p += l; len -= l; c->u.a.lensofar += l; } if (c->u.a.lensofar == 4) { c->u.a.totallen = 4 + GET_32BIT(c->u.a.msglen); c->u.a.message = malloc(c->u.a.totallen); memcpy(c->u.a.message, c->u.a.msglen, 4); } if (c->u.a.lensofar >= 4 && len > 0) { int l = min(c->u.a.totallen - c->u.a.lensofar, len); memcpy(c->u.a.message + c->u.a.lensofar, p, l); p += l; len -= l; c->u.a.lensofar += l; } if (c->u.a.lensofar == c->u.a.totallen) { void *reply, *sentreply; int replylen; agent_query(c->u.a.message, c->u.a.totallen, &reply, &replylen); if (reply) sentreply = reply; else { /* Fake SSH_AGENT_FAILURE. */ sentreply = "\0\0\0\1\5"; replylen = 5; } send_packet(SSH1_MSG_CHANNEL_DATA, PKT_INT, c->remoteid, PKT_INT, replylen, PKT_DATA, sentreply, replylen, PKT_END); if (reply) free(reply); free(c->u.a.message); c->u.a.lensofar = 0; } } break; } } Revision-number: 593 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 Delete should be void not void *. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T10:48:42.000000Z PROPS-END Node-path: putty/tree234.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: de582ee4fc80bcf1e55ad2ce7581d303 Text-content-length: 20 Text-content-md5: 4a01108a8e9d9717e10c123aa9a38ad6 Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN岺岹 > ? Revision-number: 594 Prop-content-length: 171 Content-length: 171 K 7 svn:log V 71 Delete should be void not void *; also use correct compare fn in find. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T10:48:42.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4eacf573dcf0735e21b9ce3b5d81454d Text-content-length: 37 Text-content-md5: 9b8b6f515d5820c63a62633571e32321 Content-length: 76 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN亽_亽U036衛羢 Revision-number: 595 Prop-content-length: 127 Content-length: 127 K 7 svn:log V 27 A couple of small cleanups K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T10:57:15.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2dedae0dfd9227f74bf0257a208609ac Text-content-length: 455 Text-content-md5: 22c608fcf68365983c04320d1ded25ec Content-length: 495 K 15 cvs2svn:cvs-rev V 4 1.38 PROPS-END SVN勬勯j&倣~T$倣|T慹倫 乤偂H侇?傳D static char *commentp; static int commentlencommentlen = GET_32BIT(p); p += 4; commentp = p; p += commentlenc_write("Authenticated using RSA key \"", 29); c_write(commentp, commentlen); c_write("\" from agent\r\n", 14closes = 0 Revision-number: 596 Prop-content-length: 141 Content-length: 141 K 7 svn:log V 41 Rationalise accelerators in dialog boxes K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T11:17:31.000000Z PROPS-END Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f1f92c466a83d2631b551ad7a6edfb40 Text-content-length: 919 Text-content-md5: fd6e5b9bb7bad7d558561b8ea532f155 Content-length: 958 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN颸 #僈"僱卨k厁5奙m5峺4榳*CH瘄5紅圫瞷5匨糿:;丏膗 85丱蚎價$哣d,4 躝/* Accelerators used: cl *//* Accelerators used: aco *//* Accelerators used: ac */ IDD_RECONF/* Accelerators used: [aco] dehlnprstwx */ IDD_PANEL0Window on E&xit", IDC0_CLOSEEXIT, SCOL AUTOCHECKBOX "&Warn on Close", IDC0_CLOSEWARN, SCOL END /* Accelerators used: [aco] 4?ehiklmnprsuvxy *//* Accelerators used: [aco] bdghiklmnprswy */&ground colour erase", IDC2_BCE, SCOL AUTOCHECKBOX "Enable bli&/* Accelerators used: [aco] bdflrstuv */ IDD_PANEL32,4,14/* Accelerators used: [aco] 123bdhkmptu */ IDD_PANEL35&&/* Accelerators used: [aco] stwx *//* Accelerators used: [aco] bhlu */ IDD_PANEL5olo&/* Accelerators used: [aco] beiknpsx */P&S LOCK acts as cyrillic switch", IDC6_CAPSLOCKCYR, SCOL GAP(6) END /* Accelerators used: c *//* No accelerators used */ Revision-number: 597 Prop-content-length: 142 Content-length: 142 K 7 svn:log V 42 Configuration option for agent forwarding K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T11:26:18.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9ba3512f9741c4dd85a2597ae50e6bd6 Text-content-length: 33 Text-content-md5: b8e0dea85bf5a2e2829b35339b40f37f Content-length: 73 K 15 cvs2svn:cvs-rev V 4 1.41 PROPS-END SVN臸舘 ;(5int agentfwd Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 22c608fcf68365983c04320d1ded25ec Text-content-length: 56 Text-content-md5: 13c2a2d45f242f0db87c5e2fda35a46e Content-length: 96 K 15 cvs2svn:cvs-rev V 4 1.39 PROPS-END SVN勯j勯M 傜b倎M傝cfg.agentfwd && agent_exists() Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0fab443d8db4248bb212bdf04e3a1663 Text-content-length: 49 Text-content-md5: 831a19512b1585538799f9e3c6ec8d31 Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN/烲 榃哬榁#define IDC3_AGENTFWD 1030 Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: fd6e5b9bb7bad7d558561b8ea532f155 Text-content-length: 118 Text-content-md5: 90112215051bf8a7ade349a052f40c91 Content-length: 157 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN颸7Z絯妕絯Y萰a NEXT GRID(1,8,10) AUTOCHECKBOX "Allow &agent forwarding", IDC3_AGENTFWD, SCOL Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9799016c837117b8a019a1cde10e0351 Text-content-length: 1122 Text-content-md5: 609eae5377eba7777f34c20d78c62342 Content-length: 1162 K 15 cvs2svn:cvs-rev V 4 1.33 PROPS-END SVN/靉 嘗#僈"僱卨k厁5奙i痺1島2u痺媏 痺圢5塩痩乿痺儃籔+縆%羦i痺剈i痺丠蓒僞薌唖$h,謉 /* Accelerators used: cl *//* Accelerators used: aco *//* Accelerators used: ac */ IDD_RECONF/* Accelerators used: [aco] dehlnprstwx */ IDD_PANEL0Window on E&xit", IDC0_CLOSEEXIT, 3, 130, 162, 8 AUTOCHECKBOX "&Warn on Close", IDC0_CLOSEWARN, 3, 140, 162, 8 END /* Accelerators used: [aco] 4?ehiklmnprsuvxy */ IDD_PANEL1/* Accelerators used: [aco] bdghiklmnprswy */ IDD_PANEL2&ground colour erase", IDC2_BCE, 3, 142, 162, 8 AUTOCHECKBOX "Enable bli&nking text", IDC2_BLINKTEXT, 3, 152, 162, 8 END /* Accelerators used: [aco] bdflrstuv *//* Accelerators used: [aco] 123abdhkmptu */ IDD_PANEL35&& AUTOCHECKBOX "Allow &agent forwarding", IDC3_AGENTFWD, 3, 109, 162, 8 END /* Accelerators used: [aco] stwx */ IDD_PANEL4/* Accelerators used: [aco] bhlu */ IDD_PANEL5olo&/* Accelerators used: [aco] beiknpsx */P&S LOCK acts as cyrillic switch", IDC6_CAPSLOCKCYR, 3, 105, 162, 8 END /* Accelerators used: c *//* No accelerators used */ Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b3dae620e14beb0fcfa436bdaa742ece Text-content-length: 230 Text-content-md5: 155046afb078a70357243264dec1876c Content-length: 270 K 15 cvs2svn:cvs-rev V 4 1.34 PROPS-END SVN傹P儉&2伆|7侇rW伨亣C侖 i (sesskey, "AgentFwd", cfg.agentfwdi (sesskey, "AgentFwd", 0, &cfg.agentfwdDlgButton (hwnd, IDC3_AGENTFWD, cfg.agentfwdAGENTFWDagentfwd = IsDlgButtonChecked (hwnd, IDC3_AGENTFWD Revision-number: 598 Prop-content-length: 140 Content-length: 140 K 7 svn:log V 40 Lars Gunnarsson's GUI interface changes K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-15T15:54:04.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d3ecb6b888ff81ad9c142e93b183a1f4 Text-content-length: 5469 Text-content-md5: 256c4cbe10b546528fdd8bae13f2c7b3 Content-length: 5509 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN仩j伡8;乁H}丷F侤侸.匭}嘺6奌乕]仧8 /+嘖俁渉則坵%/#塶+'6俁鰎抆鵎T亴-0亶>p咥仌du 仠5# * Adaptations to enable connecting a GUI by L. Gunnarsson - Sept 2000/* GUI Adaptation - Sept 2000 */ #include #include 0) str[0] = '\0'; } else { hin = GetStdHandle(STD_INPUT_HANDLE); hout = GetStdHandle(STD_OUTPUT_HANDLE); if (hin == INVALID_HANDLE_VALUE || hout == INVALID_HANDLE_VALUE) bump("Cannot get standard input/output handles"); GetConsoleMode(hin, &savemode); SetConsoleMode(hin, (savemode & (~ENABLE_ECHO_INPUT)) | ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT); WriteFile(hout, prompt, strlen(prompt), &i, NULL); ReadFile(hin, str, maxlen-1, &i, NULL); SetConsoleMode(hin, savemode); if ((int)i > maxlen) i = maxlen-1; else i = i - 2; str[i] = '\0'; WriteFile(hout, "\r\n", 2, &i, NULL); }tell_user/* GUI Adaptation - Sept 2000 */ if (gui_mode) gui_update_stats(name, size, ((done *100) / size), now-start); else { if (now > start) ratebs = (float) done / (now - start); else ratebs = (float) done; if (ratebs < 1.0) eta = size - done; else eta = (unsigned long) ((size - done) / ratebs); sprintf(etastr, "%02ld:%02ld:%02ld", eta / 3600, (eta % 3600) / 60, eta % 60); pct = (int) (100.0 * (float) done / size); printf("\r%-25.25s | %10ld kB | %5.1f kB/s | ETA: %8s | %3d%%", name, done / 1024, ratebs / 1024.0, etastr, pct); if (done == size) printf("\n"); }tell_usertell_user(stderr, "%s",strtell_usertell_usertell_usertell_user(stderr,tell_usertell_char(stdout, c);/* GUI Adaptation - Sept 2000 */ printf(" -gui hWnd GUI mode with the windows handle for receiving messagesgui") == 0 && i+1 < argc) { gui_hwnd = argv[++i]; gui_mode = 1; } else if (strcmp(argv[i], "-ls") == 0) /* GUI Adaptation - August 2000 */ if (gui_mode) { unsigned int msg_id = WM_RET_ERR_CNT; if (list) msg_id = WM_LS_RET_ERR_CNT; while (!PostMessage( (HWND)atoi(gui_hwnd), msg_id, (WPARAM)errs, 0/*lParam*/ ) ) SleepEx(1000,TRUE); } return (errs == 0 ? 0 : 1); } /* end */ Revision-number: 599 Prop-content-length: 179 Content-length: 179 K 7 svn:log V 79 Jacob Nevins provided this workaround for a bug in mingw32's resource compiler K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-17T07:30:56.000000Z PROPS-END Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 90112215051bf8a7ade349a052f40c91 Text-content-length: 252 Text-content-md5: d6f029a30680a7678526252470da52b3 Content-length: 291 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN7餾W弇t弆#恄揊r16碕 礧乮禼w窴咥笰乿卭羦噁莇爊螴"","","","", IDC2_ROWSEDIT, COL(2), SS(1,3) RTEXT "Colu&mns", IDC2_COLSSTATIC, ADJ(2) COL(3), SS(1,2) EDITTEXT "","","","","","","","","","","", Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 609eae5377eba7777f34c20d78c62342 Text-content-length: 354 Text-content-md5: bb6487532dfe5b59decc3bdc6ac89990 Content-length: 394 K 15 cvs2svn:cvs-rev V 4 1.34 PROPS-END SVN靉P廌q-,>c╥z㎏狣矪碄丗>t卋穚乆絈<(+腸燭 "", IDC0_HOST, 3, 11, 119, 12, ES_AUTOHSCROLL LTEXT "&Port", IDC0_PORTSTATIC, 129, 3, 35, 8 EDITTEXT "","","","","","","","","", IDC3_VAREDIT, 36, 63, 26, 12, ES_AUTOHSCROLL LTEXT "Va&lue", IDC3_VALSTATIC, 70, 65, 26, 8 EDITTEXT "","","","","", Revision-number: 600 Prop-content-length: 215 Content-length: 215 K 7 svn:log V 114 Fix Jacob's fix for mingw32 resource compiler so that it _only_ happens when using the mingw32 resource compiler! K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-19T08:24:51.000000Z PROPS-END Node-path: putty/mkfiles.pl Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9c02df22be0b611d694eec089062e2c6 Text-content-length: 44 Text-content-md5: 6cf132a87ec05478cc044ad990637400 Content-length: 83 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN2 廆時廆 --define MINGW32_FIX=1 Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d6f029a30680a7678526252470da52b3 Text-content-length: 143 Text-content-md5: d407e85db20c48a8d44aba459892d4e9 Content-length: 182 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN餾餿R2乸乪s弎"恏揈k¦狥玂 磄 祒乭v竧咢筺乽2卬+噀爉fdef MINGW32_FIX #define EDITTEXT EDITTEXT "", Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: bb6487532dfe5b59decc3bdc6ac89990 Text-content-length: 244 Text-content-md5: ecef997bb230ec4a1ad458320f2bc4f7 Content-length: 284 K 15 cvs2svn:cvs-rev V 4 1.35 PROPS-END SVNM乸峗乪i5+昁b▃yー垀猐~砡~碼丒礳m,卆乄;縘*燬蘆fdef MINGW32_FIX #define EDITTEXT EDITTEXT "",IDC0_HOST, 3, 11, 119, 12, ES_AUTOHSCROLL LTEXT "&Port", IDC0_PORTSTATIC, 129, 3, 35, 8 EDITTEXT Revision-number: 601 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 46 Improved means of IPC between agent and PuTTY K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-19T16:29:28.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f4e4924cc5ee157bd7a22674e5587d63 Text-content-length: 3964 Text-content-md5: 7246ec9596d43ab7eb50161a17e33fb0 Content-length: 4003 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN亸P仒^=1S E倁唊/亁X玥俙峃疦p刬綰D 晅."aclapi #define AGENT_COPYDATA_ID 0x804e50ba /* random goop */ /* * FIXME: maybe some day we can sort this out ... */ #define AGENT_MAX_MSGLEN 8192msg) { unsigned char *p = msg; unsigned char *ret = msg; int type; /* * Get the message type. */ type = p[4]; p += 5;len > AGENT_MAX_MSGLEN) goto failure; /* aaargh! too much stuff! */ PUT_32BIT(ret, len-4); ret[4] = SSH_AGENT_RSA_IDENTITIES_ANSWER; PUT_32BIT(ret+5, nkeys); p = ret + 5 + 4; PUT_32BIT(p, ssh1_bignum_bitcount(key->modulus)); p += 4; p += ssh1_write_bignum(p, key->exponent); p += ssh1_write_bignum(p, key->modulus); PUT_32BIT(p, strlen(key->comment)); memcpy(p+4, key->comment, strlen(key->comment)); p += 4 + strlen(key->comment);PUT_32BIT(ret, len-4); ret[4] = SSH_AGENT_RSA_RESPONSE; memcpy(ret+5, response_md5, 16);PUT_32BIT(ret, 1); ret[4] = SSH_AGENT_FAILURE; breakchar *mapname; void *p; HANDLE filemap, proc; PSID mapowner, procowner; PSECURITY_DESCRIPTOR psd1 = NULL, psd2 = NULL; int ret = 0; cds = (COPYDATASTRUCT *)lParam; if (cds->dwData != AGENT_COPYDATA_ID) return 0; /* not our message, mate */ mapname = (char *)cds->lpData; if (mapname[cds->cbData - 1] != '\0') return 0; /* failure to be ASCIZ! */ #ifdef DEBUG_IPC debug(("mapname is :%s:\r\n", mapname)); #endif filemap = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, mapname); #ifdef DEBUG_IPC debug(("filemap is %p\r\n", filemap)); #endif if (filemap != NULL && filemap != INVALID_HANDLE_VALUE) { int rc; if ((proc = OpenProcess(MAXIMUM_ALLOWED, FALSE, GetCurrentProcessId())) == NULL) { #ifdef DEBUG_IPC debug(("couldn't get handle for process\r\n")); #endif return 0; } if (GetSecurityInfo(proc, SE_KERNEL_OBJECT, OWNER_SECURITY_INFORMATION, &procowner, NULL, NULL, NULL, &psd2) != ERROR_SUCCESS) { #ifdef DEBUG_IPC debug(("couldn't get owner info for process\r\n")); #endif CloseHandle(proc); return 0; /* unable to get security info */ } CloseHandle(proc); if ((rc = GetSecurityInfo(filemap, SE_KERNEL_OBJECT, OWNER_SECURITY_INFORMATION, &mapowner, NULL, NULL, NULL, &psd1) != ERROR_SUCCESS)) { #ifdef DEBUG_IPC debug(("couldn't get owner info for filemap: %d\r\n", rc)); #endif return 0; } #ifdef DEBUG_IPC debug(("got security stuff\r\n")); #endif if (!EqualSid(mapowner, procowner)) return 0; /* security ID mismatch! */ #ifdef DEBUG_IPC debug(("security stuff matched\r\n")); #endif LocalFree(psd1); LocalFree(psd2); p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0); #ifdef DEBUG_IPC debug(("p is %p\r\n", p)); {int i; for(i=0;i<5;i++)debug(("p[%d]=%02x\r\n", i, ((unsigned char *)p)[i]));} #endif answer_msg(p); ret = 1; UnmapViewOfFile(p); } CloseHandle(filemap); return ret; } Node-path: putty/pageantc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 6934af9031a104bb46180d590ad5ede2 Text-content-length: 1198 Text-content-md5: ad52755f8895ffa8b0e163dab29c22fe Content-length: 1237 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN;!"^ 乛&J丯桬(define AGENT_COPYDATA_ID 0x804e50ba /* random goop */ #define AGENT_MAX_MSGLEN 8192 #ifdef TESTMODE #define debug(x) (printf x) #else #define debug(x) #endif #define GET_32BIT(cp) \ (((unsigned long)(unsigned char)(cp)[0] << 24) | \ ((unsigned long)(unsigned char)(cp)[1] << 16) | \ ((unsigned long)(unsigned char)(cp)[2] << 8) | \ ((unsigned long)(unsigned char)(cp)[3])) HWND hwnd; char mapname[64]; HANDLE filemap; unsigned charsprintf(mapname, "PageantRequest%08x", GetCurrentThreadId()); filemap = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, AGENT_MAX_MSGLEN, mapname); if (!filemap) return; p = MapViewOfFile(filemap, FILE_MAP_WRITE, 0, 0, 0); memcpy(p, in, inlen); cds.dwData = AGENT_COPYDATA_ID; cds.cbData = 1+strlen(mapname); cds.lpData = mapnameretlen = 4 + GET_32BIT(p); debug(("len is %d\n", retlen)); ret = malloc(retlen); if (ret) { memcpy(ret, p, retlen); *out = ret; *outlen = retlen; } } UnmapViewOfFile(p); CloseHandle(filemap); Revision-number: 602 Prop-content-length: 123 Content-length: 123 K 7 svn:log V 23 A couple of SSH2 fixes K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-20T10:59:24.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 13c2a2d45f242f0db87c5e2fda35a46e Text-content-length: 199 Text-content-md5: ef927865423f3956a8e15d74874f107d Content-length: 239 K 15 cvs2svn:cvs-rev V 4 1.40 PROPS-END SVN勯M勯a錺儴}鎦L剰w 剱D+maclen) { pktin.maxlen = packetlen+maclen; pktin.data = (pktin.data == NULL ? malloc(pktin.maxlen+APIEXTRA) : realloc(pktin.data, pktin.max77 Revision-number: 603 Prop-content-length: 210 Content-length: 210 K 7 svn:log V 109 Ensure backend netevent handlers are never reentered - fixes many strange problems with the ssh.c coroutines K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-20T11:40:23.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 59a8c7ace5f99de1e155cc4253613b55 Text-content-length: 279 Text-content-md5: 728405ee3fd84a30c472652b280bd6f6 Content-length: 319 K 15 cvs2svn:cvs-rev V 4 1.49 PROPS-END SVN冊d冎 亅亅傛 頩static int reentering = 0; if (reentering) return; /* don't unpend the pending */ pending_netevent = FALSE; reentering = 1; i = back->msg (pend_netevent_wParam, pend_netevent_lParam); reentering = 0 Revision-number: 604 Prop-content-length: 174 Content-length: 174 K 7 svn:log V 74 SSH2 is now more plausible - window sizes listened to, basic non-crashing K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-20T14:29:52.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ef927865423f3956a8e15d74874f107d Text-content-length: 10211 Text-content-md5: 731f1d4747b35b93f536dcac30179b19 Content-length: 10251 K 15 cvs2svn:cvs-rev V 4 1.41 PROPS-END SVN勯a厱h"2傽╣ 3乢矦( /偨z笴嘩傳@韆冺egh剮dz剱p俓-剶Z噞剸劄&俁%劆A丠劊Ep俍劌,儃劏1=劑<+]儨j歊劗;燘勆 1 /* 0x1 */ #define SSH1_SMSG_PUBLIC_KEY 2 /* 0x2 */ #define SSH1_CMSG_SESSION_KEY 3 /* 0x3 */ #define SSH1_CMSG_USER 4 /* 0x4 */ #define SSH1_CMSG_AUTH_RSA 6 /* 0x6 */ #define SSH1_SMSG_AUTH_RSA_CHALLENGE 7 /* 0x7 */ #define SSH1_CMSG_AUTH_RSA_RESPONSE 8 /* 0x8 */ #define SSH1_CMSG_AUTH_PASSWORD 9 /* 0x9 */ #define SSH1_CMSG_REQUEST_PTY 10 /* 0xa */ #define SSH1_CMSG_WINDOW_SIZE 11 /* 0xb */ #define SSH1_CMSG_EXEC_SHELL 12 /* 0xc */ #define SSH1_CMSG_EXEC_CMD 13 /* 0xd */ #define SSH1_SMSG_SUCCESS 14 /* 0xe */ #define SSH1_SMSG_FAILURE 15 /* 0xf */ #define SSH1_CMSG_STDIN_DATA 16 /* 0x10 */ #define SSH1_SMSG_STDOUT_DATA 17 /* 0x11 */ #define SSH1_SMSG_STDERR_DATA 18 /* 0x12 */ #define SSH1_CMSG_EOF 19 /* 0x13 */ #define SSH1_SMSG_EXIT_STATUS 20 /* 0x14 */ #define SSH1_MSG_CHANNEL_OPEN_CONFIRMATION 21 /* 0x15 */ #define SSH1_MSG_CHANNEL_OPEN_FAILURE 22 /* 0x16 */ #define SSH1_MSG_CHANNEL_DATA 23 /* 0x17 */ #define SSH1_MSG_CHANNEL_CLOSE 24 /* 0x18 */ #define SSH1_MSG_CHANNEL_CLOSE_CONFIRMATION 25 /* 0x19 */ #define SSH1_CMSG_AGENT_REQUEST_FORWARDING 30 /* 0x1e */ #define SSH1_SMSG_AGENT_OPEN 31 /* 0x1f */ #define SSH1_CMSG_EXIT_CONFIRMATION 33 /* 0x21 */ #define SSH1_MSG_IGNORE 32 /* 0x20 */ #define SSH1_MSG_DEBUG 36 /* 0x24 */ #define SSH1_CMSG_AUTH_TIS 39 /* 0x27 */ #define SSH1_SMSG_AUTH_TIS_CHALLENGE 40 /* 0x28 */ #define SSH1_CMSG_AUTH_TIS_RESPONSE 41 /* 0x29 */ #define SSH1_CMSG_AUTH_CCARD 70 /* 0x46 */ #define SSH1_SMSG_AUTH_CCARD_CHALLENGE 71 /* 0x47 */ #define SSH1_CMSG_AUTH_CCARD_RESPONSE 72 /* 0x48 */ #define SSH1_AUTH_TIS 5 /* 0x5 */ #define SSH1_AUTH_CCARD 16 /* 0x10 */ #define SSH_AGENTC_REQUEST_RSA_IDENTITIES 1 /* 0x1 */ #define SSH_AGENT_RSA_IDENTITIES_ANSWER 2 /* 0x2 */ #define SSH_AGENTC_RSA_CHALLENGE 3 /* 0x3 */ #define SSH_AGENT_RSA_RESPONSE 4 /* 0x4 */ #define SSH_AGENT_FAILURE 5 /* 0x5 */ #define SSH_AGENT_SUCCESS 6 /* 0x6 */ #define SSH_AGENTC_ADD_RSA_IDENTITY 7 /* 0x7 */ #define SSH_AGENTC_REMOVE_RSA_IDENTITY 8 /* 0x8 */ #define SSH2_MSG_DISCONNECT 1 /* 0x1 */ #define SSH2_MSG_IGNORE 2 /* 0x2 */ #define SSH2_MSG_UNIMPLEMENTED 3 /* 0x3 */ #define SSH2_MSG_DEBUG 4 /* 0x4 */ #define SSH2_MSG_SERVICE_REQUEST 5 /* 0x5 */ #define SSH2_MSG_SERVICE_ACCEPT 6 /* 0x6 */ #define SSH2_MSG_KEXINIT 20 /* 0x14 */ #define SSH2_MSG_NEWKEYS 21 /* 0x15 */ #define SSH2_MSG_KEXDH_INIT 30 /* 0x1e */ #define SSH2_MSG_KEXDH_REPLY 31 /* 0x1f */ #define SSH2_MSG_USERAUTH_REQUEST 50 /* 0x32 */ #define SSH2_MSG_USERAUTH_FAILURE 51 /* 0x33 */ #define SSH2_MSG_USERAUTH_SUCCESS 52 /* 0x34 */ #define SSH2_MSG_USERAUTH_BANNER 53 /* 0x35 */ #define SSH2_MSG_USERAUTH_PK_OK 60 /* 0x3c */ #define SSH2_MSG_USERAUTH_PASSWD_CHANGEREQ 60 /* 0x3c */ #define SSH2_MSG_GLOBAL_REQUEST 80 /* 0x50 */ #define SSH2_MSG_REQUEST_SUCCESS 81 /* 0x51 */ #define SSH2_MSG_REQUEST_FAILURE 82 /* 0x52 */ #define SSH2_MSG_CHANNEL_OPEN 90 /* 0x5a */ #define SSH2_MSG_CHANNEL_OPEN_CONFIRMATION 91 /* 0x5b */ #define SSH2_MSG_CHANNEL_OPEN_FAILURE 92 /* 0x5c */ #define SSH2_MSG_CHANNEL_WINDOW_ADJUST 93 /* 0x5d */ #define SSH2_MSG_CHANNEL_DATA 94 /* 0x5e */ #define SSH2_MSG_CHANNEL_EXTENDED_DATA 95 /* 0x5f */ #define SSH2_MSG_CHANNEL_EOF 96 /* 0x60 */ #define SSH2_MSG_CHANNEL_CLOSE 97 /* 0x61 */ #define SSH2_MSG_CHANNEL_REQUEST 98 /* 0x62 */ #define SSH2_MSG_CHANNEL_SUCCESS 99 /* 0x63 */ #define SSH2_MSG_CHANNEL_FAILURE 100 /* 0x64 */ #define SSH2_OPEN_ADMINISTRATIVELY_PROHIBITED 1 /* 0x1 */ #define SSH2_OPEN_CONNECT_FAILED 2 /* 0x2 */ #define SSH2_OPEN_UNKNOWN_CHANNEL_TYPE 3 /* 0x3 */ #define SSH2_OPEN_RESOURCE_SHORTAGE 4 /* 0x4 */ #define SSH2_EXTENDED_DATA_STDERR 1 /* 0x1 */unsigned struct ssh2_data_channel { unsigned char *outbuffer; unsigned outbuflen, outbufsize; unsigned remwindow, remmaxpkt; } v2unsigned *a = (unsignedstruct ssh_channel *mainchan; /* primary session channel */unsignedunsignedmainchan = malloc(sizeof(struct ssh_channel)); mainchan->localid = 100; /* as good as anymainchan->localid); ssh2_pkt_adduint32(0x7FFFFFFFUL); /* our window size */ ssh2_pkt_adduint32(0x4000UL); /* ourmainchan->localid) { fatalbox("Server's channel confirmation cited wrong channel"); } mainchan->remoteid = ssh2_pkt_getuint32(); mainchan->u.v2.remwindow = ssh2_pkt_getuint32(); mainchan->u.v2.remmaxpkt = ssh2_pkt_getuint32(); mainchan->u.v2.outbuffer = NULL; mainchan->u.v2.outbuflen = mainchan->u.v2.outbufsize = 0mainchan->remoteidmainchan->remoteid crWaitUntilV(ispkt); if (pktin.type == SSH2_MSG_CHANNEL_WINDOW_ADJUST) { /* FIXME: be able to handle other channels here */ if (ssh2_pkt_getuint32() != mainchan->localid) continue; /* wrong channel */ mainchan->u.v2.remwindow += ssh2_pkt_getuint32(); } static int try_send; crReturnV; try_send = FALSE/* FIXME: be able to handle other channels here */ if (ssh2_pkt_getuint32() != mainchan->localid { c_write(data, length); /* * Enlarge the window again at the remote side, * just in case it ever runs down and they fail * to send us any more data. */ ssh2_pkt_init(SSH2_MSG_CHANNEL_WINDOW_ADJUST); ssh2_pkt_adduint32(mainchan->remoteid); ssh2_pkt_adduint32(length); ssh2_pkt_send(); }messageEOF) { continue; /* remote sends EOF; ignore */ } else if (pktin.type == SSH2_MSG_CHANNEL_CLOSE) { /* FIXME: be able to handle other channels here */ if (ssh2_pkt_getuint32() != mainchan->localid) continue; /* wrong channel */ ssh2_pkt_init(SSH2_MSG_CHANNEL_CLOSE); ssh2_pkt_adduint32(mainchan->remoteid); ssh2_pkt_send(); /* FIXME: mark the channel as closed */ if (1 /* FIXME: "all channels are closed" */) { logevent("All channels closed. Disconnecting"); ssh2_pkt_init(SSH2_MSG_DISCONNECT); ssh2_pkt_send(); } continue; /* remote sends close; ignore (FIXME) */ } else if (pktin.type == SSH2_MSG_CHANNEL_WINDOW_ADJUST) { /* FIXME: be able to handle other channels here */ if (ssh2_pkt_getuint32() != mainchan->localid) continue; /* wrong channel */ mainchan->u.v2.remwindow += ssh2_pkt_getuint32(); try_send = TRUE /* * We have spare data. Add it to the channel buffer. */ if (mainchan->u.v2.outbufsize < mainchan->u.v2.outbuflen + inlen) { mainchan->u.v2.outbufsize = mainchan->u.v2.outbuflen + inlen + 1024; mainchan->u.v2.outbuffer = srealloc(mainchan->u.v2.outbuffer, mainchan->u.v2.outbufsize); } memcpy(mainchan->u.v2.outbuffer + mainchan->u.v2.outbuflen, in, inlen); mainchan->u.v2.outbuflen += inlen; try_send = TRUE; } if (try_send) { /* * Try to send data on the channel if we can. (FIXME: * on _all_ channels.) */ while (mainchan->u.v2.remwindow > 0 && mainchan->u.v2.outbuflen > 0) { unsigned len = mainchan->u.v2.remwindow; if (len > mainchan->u.v2.outbuflen) len = mainchan->u.v2.outbuflen; if (len > mainchan->u.v2.remmaxpkt) len = mainchan->u.v2.remmaxpkt; ssh2_pkt_init(SSH2_MSG_CHANNEL_DATA); ssh2_pkt_adduint32(mainchan->remoteid); ssh2_pkt_addstring_start(); ssh2_pkt_addstring_data(mainchan->u.v2.outbuffer, len); ssh2_pkt_send(); mainchan->u.v2.outbuflen -= len; memmove(mainchan->u.v2.outbuffer, mainchan->u.v2.outbuffer+len, mainchan->u.v2.outbuflen); mainchan->u.v2.remwindow -= len; } mainchan->remoteid Revision-number: 605 Prop-content-length: 127 Content-length: 127 K 7 svn:log V 27 Remove a spurious WS_GROUP K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-20T14:58:26.000000Z PROPS-END Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d407e85db20c48a8d44aba459892d4e9 Text-content-length: 20 Text-content-md5: 676fa655ddf176f714bb33dc0871701f Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN餿餵 91腃 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ecef997bb230ec4a1ad458320f2bc4f7 Text-content-length: 20 Text-content-md5: 1e20ad01c6474db1ad075990e53489ee Content-length: 60 K 15 cvs2svn:cvs-rev V 4 1.36 PROPS-END SVN 罼<羈 Revision-number: 606 Prop-content-length: 178 Content-length: 178 K 7 svn:log V 78 Fix Blowfish-with-SSH2 combination, and enable user cipher selection for SSH2 K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-20T15:15:02.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 731f1d4747b35b93f536dcac30179b19 Text-content-length: 1066 Text-content-md5: a40240ea2dfa7e4312f4c84725e25d6a Content-length: 1106 K 15 cvs2svn:cvs-rev V 4 1.42 PROPS-END SVN厱h厹g噠禬佅r穂伔|倗M僪佒%兛C_ssh1; extern struct ssh_cipher ssh_blowfish_ssh2; /* * Ciphers for SSH2. We miss out single-DES because it isn't * supported; also 3DES and Blowfish are both done differently from * SSH1. (3DES uses outer chaining; Blowfish has the opposite * endianness and different-sized keys.) * * The first entry in this array is set up to be whatever the user * asks for as a cipher. Thereafter there is a fixed preference * order of fallback ciphers. */ struct ssh_cipher *ciphers[] = { NULL, &ssh_blowfish_ssh2, &ssh_3des_ssh2_ssh1/* * Set up the preferred cipher. */ if (cfg.cipher == CIPHER_BLOWFISH) { ciphers[0] = &ssh_blowfish_ssh2; } else if (cfg.cipher == CIPHER_DES) { logevent("Single DES not supported in SSH2; using 3DES"); ciphers[0] = &ssh_3des_ssh2; } else if (cfg.cipher == CIPHER_3DES) { ciphers[0] = &ssh_3des_ssh2; } else { /* Shouldn't happen, but we do want to initialise to _something_. */ ciphers[0] = &ssh_3des_ssh2; } Node-path: putty/sshblowf.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a81469309443cc5eacfaba38b8f2dd31 Text-content-length: 2065 Text-content-md5: 8c696f4edfa743bd0f57516c5ea5c410 Content-length: 2104 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN仒y仾R1;5,Q乷⺷/Q⺷Q.⺷#i亗(Q.⺷}亐K怉亖p2亾c#define GET_32BIT_MSB_FIRST(cp) \ (((unsigned long)(unsigned char)(cp)[0] << 24) | \ ((unsigned long)(unsigned char)(cp)[1] << 16) | \ ((unsigned long)(unsigned char)(cp)[2] << 8) | \ ((unsigned long)(unsigned char)(cp)[3])) #define PUT_32BIT_MSB_FIRST(cp, value) do { \ (cp)[0] = (value) >> 24; \ (cp)[1] = (value) >> 16; \ (cp)[2] = (value) >> 8; \ (cp)[3] = (value)lsb_encrypt_cbc(unsigned char *blk, int len, lsb_decrypt_cbc(unsigned char *blk, int len, msb_encrypt_cbc(unsigned char *blk, int len, MSB_FIRST(blk); xR = GET_32BIT_MMSB_FIRST(blk, iv0); PUT_32BIT_MSB_FIRST(blk+4, iv1)msb_decrypt_cbc(unsigned char *blk, int len, MSB_FIRST(blk); xR = GET_32BIT_MMSB_FIRST(blk, iv0); PUT_32BIT_MMSB_FIRST(key); ectx.iv1 = GET_32BIT_MSB_FIRST(key+4); } static void blowfish_sciv(unsigned char *key) { dctx.iv0 = GET_32BIT_MSB_FIRST(key); dctx.iv1 = GET_32BIT_Mssh1_encrypt_blk(unsigned char *blk, int len) { blowfish_lsb_encrypt_cbc(blk, len, &ectx); } static void blowfish_ssh1_decrypt_blk(unsigned char *blk, int len) { blowfish_lsb_decrypt_cbc(blk, len, &dctx); } static void blowfish_ssh2_encrypt_blk(unsigned char *blk, int len) { blowfish_msb_encrypt_cbc(blk, len, &ectx); } static void blowfish_ssh2_decrypt_blk(unsigned char *blk, int len) { blowfish_msb_decrypt_cbc(blk, len, &dctx); } struct ssh_cipher ssh_blowfish_ssh1 = { blowfish_sesskey, blowfish_csiv, blowfish_cskey, blowfish_sciv, blowfish_sckey, blowfish_ssh1_encrypt_blk, blowfish_ssh1_decrypt_blk, "blowfish-cbc", 8 }; struct ssh_cipher ssh_blowfish_ssh2 = { blowfish_sesskey, blowfish_csiv, blowfish_cskey, blowfish_sciv, blowfish_sckey, blowfish_ssh2_encrypt_blk, blowfish_ssh2_decrypt_blk, "blowfish-cbc", 8 }; Revision-number: 607 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:10.634637Z PROPS-END Revision-number: 608 Prop-content-length: 155 Content-length: 155 K 7 svn:log V 55 Miscellaneous ssh2 fixes. plink is now relatively sane K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-21T14:34:32.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a8bd8e2afb1afb36efafa18e4ce8c74e Text-content-length: 1329 Text-content-md5: 7c48a7b23680de8c11d87e1010e15efa Content-length: 1368 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN0袵咥坖刧?俶=> 瀖–static int get_password(const char *prompt, char *str, int maxlen) { HANDLE hin, hout; DWORD savemode, i; #if 0 /* this allows specifying a password some other way */ if (password) { static int tried_once = 0; if (tried_once) { return 0; } else { strncpy(str, password, maxlen); str[maxlen-1] = '\0'; tried_once = 1; return 1; } } #endif hin = GetStdHandle(STD_INPUT_HANDLE); hout = GetStdHandle(STD_OUTPUT_HANDLE); if (hin == INVALID_HANDLE_VALUE || hout == INVALID_HANDLE_VALUE) { fprintf(stderr, "Cannot get standard input/output handles"); return 0; } GetConsoleMode(hin, &savemode); SetConsoleMode(hin, (savemode & (~ENABLE_ECHO_INPUT)) | ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT); WriteFile(hout, prompt, strlen(prompt), &i, NULL); ReadFile(hin, str, maxlen-1, &i, NULL); SetConsoleMode(hin, savemode); if ((int)i > maxlen) i = maxlen-1; else i = i - 2; str[i] = '\0'; WriteFile(hout, "\r\n", 2, &i, NULL); return 1; }ssh_get_password = get_password; flags = FLAG_STDERRv")) { flags |= FLAG_VERBOSEif (!*cfg.remote_cmd) flags |= FLAG_INTERACTIVE; Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b8e0dea85bf5a2e2829b35339b40f37f Text-content-length: 640 Text-content-md5: dc9e1535975e6a35ad0c38f773671db9 Content-length: 680 K 15 cvs2svn:cvs-rev V 4 1.42 PROPS-END SVN舘刟 C穁 * FLAG_VERBOSE is set when the user requests verbose details. * * FLAG_STDERR is set in command-line applications (which have a * functioning stderr that it makes sense to write to) and not in * GUI applications (which don't). * * FLAG_INTERACTIVE is set when a full interactive shell session is * being run, _either_ because no remote command has been provided * _or_ because the application is GUI and can't run non- * interactively. */ #define FLAG_VERBOSE 0x0001 #define FLAG_STDERR 0x0002 #define FLAG_INTERACTIVEint (*ssh_get_password)(const char *prompt, char *str, int maxlen); Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 256c4cbe10b546528fdd8bae13f2c7b3 Text-content-length: 36 Text-content-md5: c47a78eebacbd91ec5dc6ba5308f9386 Content-length: 76 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN伡8伡B 伆5伆FLAG_STDERR Node-path: putty/scp.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: cf2c840e585b4c14f4214ecf2b4c307d Text-content-length: 19 Text-content-md5: 6fdc43bbb6ac570482f9bf35d4aa48c1 Content-length: 58 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN倉2n丏9 Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a40240ea2dfa7e4312f4c84725e25d6a Text-content-length: 2102 Text-content-md5: adc95f037da02d18c8a6e28da1ef18c4 Content-length: 2142 K 15 cvs2svn:cvs-rev V 4 1.43 PROPS-END SVN厹g叄 {-8?俀伜@)]3値(玗倲o榯偫[K+剻?伂^傔(]$剬ED~創偫[]<剺l侤勑}8劧'劮z乊匉z匋N(flags & FLAG_STDERR(flags & FLAG_STDERRINTERACTIVE) && !*cfg.username) { c_write("login as: ", 10); ssh_send_ok = 1(flags & FLAG_VERBOSE) || (flags & FLAG_INTERACTIVE) !(flags & FLAG_INTERACTIVE)ssh_send_ok = 1; while (pos >= 0) { crWaitUntilINTERACTIVE) && !*cfg.username) { c_write("login as: ", 10); ssh_send_ok = 1 if ((flags & FLAG_VERBOSE) || (flags & FLAG_INTERACTIVE)INTERACTIVE)V; } } else { c_write("password: ", 10); ssh_send_ok = 1if (!cfg.nopty) { ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST); ssh2_pkt_adduint32(mainchan->remoteid); /* recipient channel */ ssh2_pkt_addstring("pty-req"); ssh2_pkt_addbool(1); /* want reply */ ssh2_pkt_addstring(cfg.termtype); ssh2_pkt_adduint32(cols); ssh2_pkt_adduint32(rows); ssh2_pkt_adduint32(0); /* pixel width */ ssh2_pkt_adduint32(0); /* pixel height */ ssh2_pkt_addstring_start(); ssh2_pkt_addstring_data("\0", 1);/* TTY_OP_END, no special options */ ssh2_pkt_send(); do { crWaitUntilV(ispkt); } } while (pktin.type == SSH2_MSG_CHANNEL_WINDOW_ADJUST); if (pktin.type != SSH2_MSG_CHANNEL_SUCCESS) { if (pktin.type != SSH2_MSG_CHANNEL_FAILURE) { fatalbox("Server got confused by pty request"); } c_write("Server refused to allocate pty\r\n", 32); } else { logevent("Allocated pty"); } } /* * Start a shell or a remote commandif (*cfg.remote_cmd) { ssh2_pkt_addstring("exec"); ssh2_pkt_addbool(1); /* want reply */ ssh2_pkt_addstring(cfg.remote_cmd); } else { ssh2_pkt_addstring("shell"); ssh2_pkt_addbool(1); /* want reply */ } logevent("Sent EOF message"); Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 728405ee3fd84a30c472652b280bd6f6 Text-content-length: 35 Text-content-md5: 76dfa3e54624f900017842b9a6d7a674 Content-length: 75 K 15 cvs2svn:cvs-rev V 4 1.50 PROPS-END SVN冎冋y 0兠>扟INTERACTIVE Revision-number: 609 Prop-content-length: 148 Content-length: 148 K 7 svn:log V 48 Work around the missing underline in some fonts K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T09:30:11.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 76dfa3e54624f900017842b9a6d7a674 Text-content-length: 2128 Text-content-md5: 05f2e117455eac5c2ff94f13fa8c976b Content-length: 2168 K 15 cvs2svn:cvs-rev V 4 1.51 PROPS-END SVN冋y冩3$`寍$亷 亴R倸]W仒<偨=int font_needs_hand_underlining/* * Some fonts, e.g. 9-pt Courier, draw their underlines * outside their character cell. We successfully prevent * screen corruption by clipping the text output, but then * we lose the underline completely. Here we try to work * out whether this is such a font, and if it is, we set a * flag that causes underlines to be drawn by hand. * * Having tried other more sophisticated approaches (such * as examining the TEXTMETRIC structure or requesting the * height of a string), I think we'll do this the brute * force way: we create a small bitmap, draw an underlined * space on it, and test to see whether any pixels are * foreground-coloured. (Since we expect the underline to * go all the way across the character cell, we only search * down a single column of the bitmap, half way across.) */ { HDC und_dc; HBITMAP und_bm, und_oldbm; int i, gotit; COLORREF c; und_dc = CreateCompatibleDC(hdc); und_bm = CreateCompatibleBitmap(hdc, font_width, font_height); und_oldbm = SelectObject(und_dc, und_bm); SelectObject(und_dc, fonts[FONT_UNDERLINE]); SetTextAlign(und_dc, TA_TOP | TA_LEFT | TA_NOUPDATECP); SetTextColor (und_dc, RGB(255,255,255)); SetBkColor (und_dc, RGB(0,0,0)); SetBkMode (und_dc, OPAQUE); ExtTextOut (und_dc, 0, 0, ETO_OPAQUE, NULL, " ", 1, NULL); gotit = FALSE; for (i = 0; i < font_height; i++) { c = GetPixel(und_dc, font_width/2, i); if (c != RGB(0,0,0)) gotit = TRUE; } SelectObject(und_dc, und_oldbm); DeleteObject(und_bm); DeleteDC(und_dc); font_needs_hand_underlining = !gotit; } font_needs_hand_underlining && (attr & ATTR_UNDER)) force_manual_underline = 1; Revision-number: 610 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Saved-session name box now persists over panel switches K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T09:35:06.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 155046afb078a70357243264dec1876c Text-content-length: 377 Text-content-md5: 2cd4805c54f33650dbdc0a77a3c7bb6b Content-length: 417 K 15 cvs2svn:cvs-rev V 4 1.35 PROPS-END SVN儉儌M,?"乀廼鮛S亱s乭S佮佭K亣>傛Tchar savedsession[2048];Text (hwnd, IDC0_SESSEDIT, savedsession { GetDlgItemText (hwnd, IDC0_SESSEDIT, savedsession, sizeof(savedsession)-1); savedsession[sizeof(savedsession)-1] = '\0'; } break; case IDC0_SESSSAVEsavedsession[0] = '\0' Revision-number: 611 Prop-content-length: 228 Content-length: 228 K 7 svn:log V 127 Closing the About box now returns focus to the config box, and likewise closing the Licence box returns focus to the About box K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T09:38:35.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2cd4805c54f33650dbdc0a77a3c7bb6b Text-content-length: 138 Text-content-md5: 3287b4641c73f3ebfc8a655c6433a048 Content-length: 178 K 15 cvs2svn:cvs-rev V 4 1.36 PROPS-END SVN儌M儍a?O侅4傒 SetActiveWindowGeneralPanelProc (HWND hwnd, UINT msg, SetActiveWindow(hwnd Revision-number: 612 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Num Lock shouldn't send anything in non-app-keypad mode K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T09:49:34.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 05f2e117455eac5c2ff94f13fa8c976b Text-content-length: 45 Text-content-md5: 073e50376d1c04a2f99bbfbe6b668c66 Content-length: 85 K 15 cvs2svn:cvs-rev V 4 1.52 PROPS-END SVN冩3冩H 儜6詞儜5if (app_keypad_keys) Revision-number: 613 Prop-content-length: 173 Content-length: 173 K 7 svn:log V 73 Prevent network errors from summarily closing the window when CoE is off K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T11:04:57.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7c48a7b23680de8c11d87e1010e15efa Text-content-length: 42 Text-content-md5: af685a5b1b012888e4a40fe56c8b868d Content-length: 81 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN袵# ?螼亁void connection_fatal Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: dc9e1535975e6a35ad0c38f773671db9 Text-content-length: 49 Text-content-md5: 892b47bc89688f8679d94088bb88f34e Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.43 PROPS-END SVN) 眫眝connection_fatal(char *, ... Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 81154764b9f437bedeccf52f97dfd8a1 Text-content-length: 244 Text-content-md5: 8ad86c5841d71af0d56a337887f5ba3a Content-length: 283 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN!%乁烮G烼坧1 { closesocket(s); s = INVALID_SOCKET; return 1; } { /* any _other_ error */ closesocket(s); s = INVALID_SOCKET; return -10000-WSAGetLastError(); } Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c47a78eebacbd91ec5dc6ba5308f9386 Text-content-length: 50 Text-content-md5: a4023caecfd97517ce63c3bad4115d18 Content-length: 90 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN伡B伨Z燼亁9仜l燰void connection_fatal Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: adc95f037da02d18c8a6e28da1ef18c4 Text-content-length: 2779 Text-content-md5: cab235a1c9277564b1fc1fc2be03678d Content-length: 2819 K 15 cvs2svn:cvs-rev V 4 1.44 PROPS-END SVN叄 叓乣搇(蘪X$?A侱f朹M亖 `佡aK榓侒*P遡倢=s嘫傡kX剓傯~Q刄傶0凙#璿儎T玙儾0I抅冝Bb凂cI凞凈&P|凒X巑凓R]剨@劔IQ劖J坲劰8乧(劽LT歂勞,`丣匁滺匃.O峳厱.bombout(msg) ( ssh_state == SSH_STATE_CLOSED, closesocket(s), \ s = INVALID_SOCKET, connection_fatal msg ) { bombout(("Lost connection while sending")); return; }bombout(("Incorrect CRC received on packet")); crReturn(0 { bombout(("Received data packet with bogus string length")); crReturn(0); } { bombout(("Incorrect MAC received on packet")); crReturn(0); } { bombout(("internal error: Can't handle negative mpints")); return NULL; } { bombout(("Public key packet not received")); crReturn(0); } { bombout(("Encryption not successfully enabled")); crReturn(0); } { bombout(("Bizarre response to offer of public key")); crReturn(0); }bombout(("Bizarre response to RSA authentication response")); crReturn(0bombout(("Strange packet received, type %d", pktin.type)); crReturn(0bombout(("Protocol confusion")); crReturnVbombout(("Protocol confusion")); crReturnVbombout(("Strange packet received: type %d", pktin.type)); crReturnVbombout(("expected key exchange packet from server")); crReturn(0 { bombout(("internal fault: chaos in SSH 2 transport layer")); crReturn(0); }bombout(("expected key exchange packet from server")); crReturn(0 { bombout(("Server failed host key check")); crReturn(0); } { bombout(("expected new-keys packet from server")); crReturn(0); } { bombout(("Server refused user authentication protocol")); crReturnV; }bombout(("Server refused to open a session")); crReturnVbombout(("Server's channel confirmation cited wrong channel")); crReturnVbombout(("Server got confused by pty request")); crReturnVbombout(("Server got confused by shell/command request")); crReturnV; } bombout(("Server refused to start a shell/command")); crReturnV; } else { logevent("Started a shell/commandbombout(("Strange packet received: type %d", pktin.type)); crReturnV { closesocket(s); s = INVALID_SOCKET; return -WSAGETSELECTERROR(lParam); } { /* any _other_ error */ closesocket(s); s = INVALID_SOCKET; return -10000-WSAGetLastError(); }bombout(("Strange packet received: type %d", pktin.type)); return 0 Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7d860ab78b23c87bb64dd439791d1779 Text-content-length: 299 Text-content-md5: f831e1f9e709c6b4a99dcaef470ac0f1 Content-length: 339 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN仱仴亯4`倀亯X'杘亶 { closesocket(s); s = INVALID_SOCKET; return -WSAGETSELECTERROR(lParam); } { /* any _other_ error */ closesocket(s); s = INVALID_SOCKET; return -10000-WSAGetLastError(); } Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 073e50376d1c04a2f99bbfbe6b668c66 Text-content-length: 308 Text-content-md5: 6f5ecc07107e2c12b27fcc4607d183c4 Content-length: 348 K 15 cvs2svn:cvs-rev V 4 1.53 PROPS-END SVN冩H冮8 .G丣冡b刟$傮T騮Print a message box and close the connection. */ void connection_fatalif (cfg.close_on_exit) PostQuitMessage(1); else { session_closed = TRUE; SetWindowText (hwnd, "PuTTY (inactive)"); } connection_fatal(buf); } if (i < Revision-number: 614 Prop-content-length: 233 Content-length: 233 K 7 svn:log V 132 Bug fix: line discipline selection is not enabled until after ssh authentication phase to stop user/password prompts behaving oddly K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T13:10:19.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: af685a5b1b012888e4a40fe56c8b868d Text-content-length: 289 Text-content-md5: 8ba90dabd3611ed0302f8b7374bcf357 Content-length: 328 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN#誂亇.n綻卋D%緙DWORD orig_console_mode; void begin_session(void) {else SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), orig_console_mode); } void term_out(void) { int reap; DWORD ret;GetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), &orig_console_mode); Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 892b47bc89688f8679d94088bb88f34e Text-content-length: 44 Text-content-md5: ff8262c56d88abb25dce48022364e401 Content-length: 84 K 15 cvs2svn:cvs-rev V 4 1.44 PROPS-END SVN)蔆 睰梐睭void begin_session(void Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 8ad86c5841d71af0d56a337887f5ba3a Text-content-length: 90 Text-content-md5: 8f89751a2f390098b7d44dc0838b7d00 Content-length: 129 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN%琽 D歾D1歵/* * We have no pre-session phase. */ begin_session(); Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a4023caecfd97517ce63c3bad4115d18 Text-content-length: 163 Text-content-md5: b744fbb2c378b1ac90e1001bffe3a544 Content-length: 203 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN伨Z伨u (伂EThese functions are needed to link with ssh.c, but never get called. */ void term_out(void) { abort(); } void begin_session(void) { Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cab235a1c9277564b1fc1fc2be03678d Text-content-length: 62 Text-content-md5: 2d8d3efc8aca9a689521c731d927fda7 Content-length: 102 K 15 cvs2svn:cvs-rev V 4 1.45 PROPS-END SVN叓叓=儖m伨k儖f郒勈Kbegin_session(begin_session() Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f831e1f9e709c6b4a99dcaef470ac0f1 Text-content-length: 100 Text-content-md5: 3d4ac8ef03988953759ccba93bd08eba Content-length: 140 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN仴仴i J亗zJ%亗y /* * We have no pre-session phase. */ begin_session(); Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6f5ecc07107e2c12b27fcc4607d183c4 Text-content-length: 332 Text-content-md5: 4bdbfef85a5ca5f7c19c5d01f36276dd Content-length: 372 K 15 cvs2svn:cvs-rev V 4 1.54 PROPS-END SVN冮8冸.*;O爅9乕兎_盰static Ldisc *real_ldisc; void begin_session(void) { ldisc = real_ldisc; }real_ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple); /* To start with, we use the simple line discipline, so we can * type passwords etc without fear of them being echoed... */ ldisc = &ldisc_simple Revision-number: 615 Prop-content-length: 167 Content-length: 167 K 7 svn:log V 67 Enable better build-time flexibility over which WinSock to include K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T13:16:49.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a4b1ed7222c594e0f0108f3db9c12fe3 Text-content-length: 366 Text-content-md5: bf82352084fdd64aa3c21b2d177eecfe Content-length: 406 K 15 cvs2svn:cvs-rev V 4 1.31 PROPS-END SVN磚稶 俈俈癲COMPAT=/DAUTO_WINSOCK # Causes PuTTY to assume that includes its own WinSock # header file, so that it won't try to include . # # - COMPAT=/DWINSOCK_TWO # Causes the PuTTY utilities to include instead of # , except Plink which _needs_ WinSock 2 so it already # does thi Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 8ba90dabd3611ed0302f8b7374bcf357 Text-content-length: 66 Text-content-md5: 94f92ee7b3783355208e71b69e3df781 Content-length: 105 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN誂誡/E詉Xfndef AUTO_WINSOCK #include #endif Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8f89751a2f390098b7d44dc0838b7d00 Text-content-length: 181 Text-content-md5: 94ef4dca366198129d98b608db87f65e Content-length: 221 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN琽瑼""P#include #include #include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b744fbb2c378b1ac90e1001bffe3a544 Text-content-length: 125 Text-content-md5: b7450dd26886730311465c2a7db818aa Content-length: 165 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN伨u伩G d:d伡)侺fndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2d8d3efc8aca9a689521c731d927fda7 Text-content-length: 123 Text-content-md5: ebaf4d0d10da5cfaf29eafea870f6e73 Content-length: 163 K 15 cvs2svn:cvs-rev V 4 1.46 PROPS-END SVN叓=叕 dQd叒Zcfndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3d4ac8ef03988953759ccba93bd08eba Text-content-length: 184 Text-content-md5: 61798a53184385608fa668f74c6d4f7e Content-length: 224 K 15 cvs2svn:cvs-rev V 4 1.17 PROPS-END SVN仴i仸;""仴P#include #include #include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3287b4641c73f3ebfc8a655c6433a048 Text-content-length: 123 Text-content-md5: 54f1933dae8a32a4f5666ecf624f8979 Content-length: 163 K 15 cvs2svn:cvs-rev V 4 1.37 PROPS-END SVN儍儍a dBd儌;Tfndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4bdbfef85a5ca5f7c19c5d01f36276dd Text-content-length: 167 Text-content-md5: 3ebfe510382501e86a19ae7405258230 Content-length: 207 K 15 cvs2svn:cvs-rev V 4 1.55 PROPS-END SVN冸.冹冴o?#include #include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Revision-number: 616 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Everyone's favourite trivial change: Shift-Ins now pastes K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T13:23:35.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3ebfe510382501e86a19ae7405258230 Text-content-length: 217 Text-content-md5: 8a40897a592194afb3fac3b17add84d1 Content-length: 257 K 15 cvs2svn:cvs-rev V 4 1.56 PROPS-END SVN冹冺?=儗b= 儗` if (wParam == VK_INSERT && shift_state == 1) { term_mouse (MB_PASTE, MA_CLICK, 0, 0); term_mouse (MB_PASTE, MA_RELEASE, 0, 0); return 0; Revision-number: 617 Prop-content-length: 154 Content-length: 154 K 7 svn:log V 54 Avoid rapid-fire resize events during NT opaque drags K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T14:10:58.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8a40897a592194afb3fac3b17add84d1 Text-content-length: 488 Text-content-md5: 1a408e1b243cf5435aef1aea7d7f6da5 Content-length: 528 K 15 cvs2svn:cvs-rev V 4 1.57 PROPS-END SVN冺?凁H;伿 伿倢X!佈e倹Z static int resizingresizing = TRUE; break; case WM_EXITSIZEMOVE: EnableSizeTip(0); resizing = FALSE; back->size( /* * Don't call back->size in mid-resize. (To prevent * massive numbers of resize events getting sent * down the connection during an NT opaque drag.) */ if (!resizing) Revision-number: 618 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 61 Make the Event Log scroll down when more things appear on it K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T14:24:27.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 54f1933dae8a32a4f5666ecf624f8979 Text-content-length: 268 Text-content-md5: efc447614efdfa73911fdd48e0fe36d2 Content-length: 308 K 15 cvs2svn:cvs-rev V 4 1.38 PROPS-END SVN儍a儏乸傪g乸*傫7 { int count; SendDlgItemMessage (logbox, IDN_LIST, LB_ADDSTRING, 0, (LPARAM)string); count = SendDlgItemMessage (logbox, IDN_LIST, LB_GETCOUNT, 0, 0); SendDlgItemMessage (logbox, IDN_LIST, LB_SETCURSEL, count-1, 0); } Revision-number: 619 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 29 Enable copying the Event Log K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-22T14:46:26.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 94f92ee7b3783355208e71b69e3df781 Text-content-length: 139 Text-content-md5: 4eb0ae3619d01040da076906b26cce49 Content-length: 178 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN誡諹 u8u(5/* * Stubs for linking with other modules. */ void write_clip (void *data, int len) { } void term_deselect(void) { Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b7450dd26886730311465c2a7db818aa Text-content-length: 211 Text-content-md5: 2cc6229111dbcc4ebffbe16e54686f67 Content-length: 251 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN伩G伬 8"8伂Dother modules, but * (should) never get called. */ void term_out(void) { abort(); } void begin_session(void) { } void write_clip (void *data, int len) { } void term_deselect(void) { Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 831a19512b1585538799f9e3c6ec8d31 Text-content-length: 49 Text-content-md5: 6a34c6dbd5854eee64a786eeb92b445d Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN烲焛 僨沢僥#define IDN_COPY 1002 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 1e20ad01c6474db1ad075990e53489ee Text-content-length: 102 Text-content-md5: 4a41603525d0a25647400c8b6e9e6d82 Content-length: 142 K 15 cvs2svn:cvs-rev V 4 1.37 PROPS-END SVN鞾F+丟+`躷廇軸o85, 102, 44, 14 PUSHBUTTON "C&opy", IDN_COPY, 31 | LBS_EXTENDEDSE Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: efc447614efdfa73911fdd48e0fe36d2 Text-content-length: 1623 Text-content-md5: 756ccadb10f99f01f3bd91fa731204ef Content-length: 1663 K 15 cvs2svn:cvs-rev V 4 1.39 PROPS-END SVN儏儝 /+S侟;倢 >傭C case IDN_COPY int selcount; int *selitems; selcount = SendDlgItemMessage(hwnd, IDN_LIST, LB_GETSELCOUNT, 0, 0); selitems = malloc(selcount * sizeof(int)); if (selitems) { int count = SendDlgItemMessage(hwnd, IDN_LIST, LB_GETSELITEMS, selcount, (LPARAM)selitems); int i; int size; char *clipdata; static unsigned char sel_nl[] = SEL_NL; size = 0; for (i = 0; i < count; i++) size += strlen(events[selitems[i]]) + sizeof(sel_nl); clipdata = malloc(size); if (clipdata) { char *p = clipdata; for (i = 0; i < count; i++) { char *q = events[selitems[i]]; int qlen = strlen(q); memcpy(p, q, qlen); p += qlen; memcpy(p, sel_nl, sizeof(sel_nl)); p += sizeof(sel_nl); } write_clip(clipdata, size); term_deselect(); free(clipdata); } free(selitems); } } TOPINDEX Revision-number: 620 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Enable PuTTY command line to deal with "user@host" format K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T09:27:26.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 1a408e1b243cf5435aef1aea7d7f6da5 Text-content-length: 421 Text-content-md5: 4b031950c69415d1937ba4715225798d Content-length: 461 K 15 cvs2svn:cvs-rev V 4 1.58 PROPS-END SVN凁H凅^ 璯 兟m璠 /* See if host is of the form user@host */ if (cfg.host[0] != '\0') { char *atsign = strchr(cfg.host, '@'); /* Make sure we're not overflowing the user field */ if (atsign) { if (atsign-cfg.host < sizeof cfg.username) { strncpy (cfg.username, cfg.host, atsign-cfg.host); cfg.username[atsign-cfg.host] = '\0'; } memmove(cfg.host, atsign+1, 1+strlen(atsign+1)) Revision-number: 621 Prop-content-length: 241 Content-length: 241 K 7 svn:log V 140 Rationalise ordering of authentication operations. Still some work to do, but at least pscp no longer hangs when prompting for a passphrase K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T10:14:53.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7246ec9596d43ab7eb50161a17e33fb0 Text-content-length: 134 Text-content-md5: 44093ddd0896065459cb5a14c61b3826 Content-length: 173 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN仒^仚& n?n⺻檈/* FIXME: we can acquire comment here and use it in dialog */ needs_pass = rsakey_encrypted(filename, NULL Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ebaf4d0d10da5cfaf29eafea870f6e73 Text-content-length: 2930 Text-content-md5: 3b64fc60d3088891f1b686e16ddc6df8 Content-length: 2970 K 15 cvs2svn:cvs-rev V 4 1.47 PROPS-END SVN叕叜lH倻倻僷Q偺}剎I傃@I傄=奻K傰{乤僝偱92傒, 備`偨t傤char prompt[2 if (pktin.type == SSH1_SMSG_FAILURE && cfg.try_tis_auth && (supported_auths_mask & (1< sizeof(prompt)-1) challengelen = sizeof(prompt)-1; /* prevent overrun */ memcpy(prompt, pktin.body+4, challengelen); prompt[challengelen] = '\0'; } } if (pktin.type == SSH1_SMSG_FAILURE && cfg.try_tis_auth && pwpkt_type = SSH1_CMSG_AUTH_CCARD_RESPONSE; send_packet(SSH1_CMSG_AUTH_CCARD, PKT_END); crWaitUntil(ispkt); if (pktin.type != SSH1_SMSG_AUTH_CCARD_CHALLENGE) { logevent("CryptoCard authentication declined"); c_write("CryptoCard authentication refused.\r\n", 29); } else { int challengelen = ((pktin.body[0] << 24) | (pktin.body[1] << 16) | (pktin.body[2] << 8) | (pktin.body[3])); logevent("Received CryptoCard challenge"); if (challengelen > sizeof(prompt)-1) challengelen = sizeof(prompt)-1; /* prevent overrun */ memcpy(prompt, pktin.body+4, challengelen); strncpy(prompt + challengelen, "\r\nResponse : ", sizeof(prompt)-challengelen); prompt[sizeof(prompt)-1] = '\0'; } } if (pwpkt_type == SSH1_CMSG_AUTH_PASSWORD) { sprintf(prompt, "%.90s@%.90s's password: ", cfg.username, savedhost); } if (pwpkt_type == SSH1_CMSG_AUTH_RSA) { char *comment = NULL; if (flags & FLAG_VERBOSE) c_write("Trying public key authentication.\r\n", 35); if (!rsakey_encrypted(cfg.keyfile, &comment)No passphrase required.\r\n", 25); goto tryauth; } sprintf(prompt, "Passphrase for key \"%.100s\": ", comment); free(comment); } if (!(flags & FLAG_INTERACTIVE)) { c_write(prompt, strlen(prompt)); Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f5e2e25715f37d90b6dd45ccaddd7c12 Text-content-length: 36 Text-content-md5: e8a3d375008838cf793c6e5b1206e114 Content-length: 76 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN* 2h2, char **comment Node-path: putty/sshbn.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 6f710c9415dc629689bd6f87bcdf9f91 Text-content-length: 103 Text-content-md5: 088abad638fc834ab8dffc982239a0af Content-length: 142 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN蔩6 Q縙Q縓if (!result) /* just return length */ return b + 2; Node-path: putty/sshpubk.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ae6bfa1da5c6f67f065c8775eb81ef6b Text-content-length: 2434 Text-content-md5: c3acefe8c48e19014337fcc7aab6805d Content-length: 2473 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN淴.扝倈5侶.匯B丂?卍奪哰慘k剘1/* * Generic SSH public-key handling operations. In particular, * reading of SSH public-key files, and also the generic `sign' * operation for ssh2 (which checks the type of the key and * dispatches to the appropriate key-type specific function). */ #include #include #include /* FIXME */ #include /* FIXME */ #include "putty.h"#define dss_signature "-----BEGIN DSA PRIVATE KEY-----\n" #define BASE64_TOINT(x) ( (x)-'A'<26 ? (x)-'A'+0 :\ (x)-'a'<26 ? (x)-'a'+26 :\ (x)-'0'<10 ? (x)-'0'+52 :\ (x)=='+' ? 62 : \ (x)=='/' ? 63 : 0 ) static int loadrsakey_main(FILE *fp, struct RSAKey *key, char **commentptr, char *passphrase) { char *comment; /* Slurp the whole file (minus the header) = 0; /* * A zero byte. (The signature includes a terminating NUL.) */ if (len-i < 1 || buf[i] != 0) goto end; i++; /* Ocomment = malloc(j+1); if (comment) { memcpy(comment, buf+i, j); comment[j] = '\0'; } i += j; if (commentptr) *commentptr = comment; if (key) key->comment = comment; if (!key) { return ciphertype != 0; }64]; fp = fopen(filename, "rb"); if (!fp) return 0; /* doesn't even exist */ /* * Read the first line of the file and see if it's a v1 private * key file. */ if (fgets(buf, sizeof(buf), fp) && !strcmp(buf, rsa_signature)) { return loadrsakey_main(fp, key, NULL, passphrase); } /* * Otherwise, we have nothing. Return empty-handed. */ fclose(fp); return 0; } /* * See whether an RSA key is encrypted. Return its comment field as * well. */ int rsakey_encrypted(char *filename, char **comment) { FILE *fp; unsigned char buf[64]; fp = fopen(filename, "rb"); if (!fp) return 0; /* doesn't even exist */ /* * Read the first line of the file and see if it's a v1 private * key file. */ if (fgets(buf, sizeof(buf), fp) && !strcmp(buf, rsa_signature)) { return loadrsakey_main(fp, NULL, comment, NULL); } return 0; /* wasn't the right kind of file */ } Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bb5cda05cde45eeaf57652a1432339e3 Text-content-length: 361 Text-content-md5: 0bb36e0ff34277c096bf88a5315f4ec2 Content-length: 400 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN 侲乨坢p奺y杗.if (result) { result->bits = 0; for (i=0; i<4; i++) result->bits = (result->bits << 8) + *p++; } else p += 4result ? &result->exponent : NULL); if (result) result ? &result->modulus : NULL); if (order == 1) p += ssh1_read_bignum(p, result ? &result->exponent : NULL Revision-number: 622 Prop-content-length: 171 Content-length: 171 K 7 svn:log V 71 Double-clicking on the Pageant systray icon now brings up the key list K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T10:50:54.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 44093ddd0896065459cb5a14c61b3826 Text-content-length: 506 Text-content-md5: 5b42bfe4ae573b4a39aebbd56072fa88 Content-length: 545 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN仚&仢僗銻 銯侷璮隌 else if (lParam == WM_LBUTTONDBLCLK) { /* Equivalent to IDM_VIEWKEYS. */ PostMessage(hwnd, WM_COMMAND, IDM_VIEWKEYS, 0 /* * Sometimes the window comes up minimised / hidden * for no obvious reason. Prevent this. */ SetForegroundWindow(keylist); SetWindowPos (keylist, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW Revision-number: 623 Prop-content-length: 176 Content-length: 176 K 7 svn:log V 76 Pageant now allows filenames with spaces on cmdline. Thanks to Brian Coogan K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T10:55:00.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 5b42bfe4ae573b4a39aebbd56072fa88 Text-content-length: 511 Text-content-md5: 7b6565309a1103f82eae0f2ab1562921 Content-length: 550 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN仢仧E僜仏_仐9!億仚/ { char *p; int inquotes = 0; , *pp = p; while (*p && (inquotes || !isspace(*p))) { if (*p == '"') { inquotes = !inquotes; p++; continue; } *pp++ = *p++; } if (*pp) { if (*p) p++; *pp++ = '\0'; } Revision-number: 624 Prop-content-length: 172 Content-length: 172 K 7 svn:log V 72 Pageant now detects if it is already running and refuses to start if so K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T10:56:56.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7b6565309a1103f82eae0f2ab1562921 Text-content-length: 277 Text-content-md5: fe96a5ca5282801a46eded994868da25 Content-length: 316 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN仧E仭D亂亪'亂$亪!/* * First bomb out totally if we are already running. */ if (FindWindow("Pageant", "Pageant")) { MessageBox(NULL, "Pageant is already running", "Pageant Error", MB_ICONERROR | MB_OK); return 0; } Revision-number: 625 Prop-content-length: 224 Content-length: 224 K 7 svn:log V 123 Robert de Bath has a better alternative to revs 1.47/48 [r582,r583]; back out those changes and commit the simpler version K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T11:11:46.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4b031950c69415d1937ba4715225798d Text-content-length: 179 Text-content-md5: 01fdef928162f2421f62906ee4cca72b Content-length: 219 K 15 cvs2svn:cvs-rev V 4 1.59 PROPS-END SVN凅^凁,z 伳圛佂#佊4亸2倖A儣d兿sSYSCOMMAND, SC_KEYMENU if (message == WM_SYSKEYUP && wParam == VK_MENU) { keystate[VK_MENU] = 0; return 0; } Revision-number: 626 Prop-content-length: 127 Content-length: 127 K 7 svn:log V 27 Implement "putty -cleanup" K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T15:47:57.000000Z PROPS-END Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9fba2931b8b8f8268f74c6bc2fc4ba79 Text-content-length: 180 Text-content-md5: 570ddbaba855561e24b69ebb9fb02bc4 Content-length: 219 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN> 揜圥0from `putty -cleanup'. It removes the * random seed file. */ void random_destroy_seed(void) { if (!seedpath[0]) get_seedpath(); remove(seedpath); Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ff8262c56d88abb25dce48022364e401 Text-content-length: 248 Text-content-md5: 834d7f3a6642ddedb842d9c0a76771b5 Content-length: 288 K 15 cvs2svn:cvs-rev V 4 1.45 PROPS-END SVN蔆+乂b)砱`:搗禡#define PUTTY_REG_PARENT "Software\\SimonTatham" #define PUTTY_REG_PARENT_CHILD "PuTTY" #define PUTTY_REG_GPARENT "Software" #define PUTTY_REG_GPARENT_CHILD "SimonTathamvoid random_destroyvoid registry_cleanup(void Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 756ccadb10f99f01f3bd91fa731204ef Text-content-length: 1741 Text-content-md5: f25e764c6e257f89303ca654001c3815 Content-length: 1781 K 15 cvs2svn:cvs-rev V 4 1.40 PROPS-END SVN儝 儫B7儝 7 /* * Recursively delete a registry key and everything under it. */ static void registry_recursive_remove(HKEY key) { DWORD i; char name[MAX_PATH+1]; HKEY subkey; i = 0; while (RegEnumKey(key, i, name, sizeof(name)) == ERROR_SUCCESS) { if (RegOpenKey(key, name, &subkey) == ERROR_SUCCESS) { registry_recursive_remove(subkey); RegCloseKey(subkey); } RegDeleteKey(key, name); } } /* * Destroy all registry information associated with PuTTY. */ void registry_cleanup(void) { HKEY key; int ret; char name[MAX_PATH+1]; /* * Open the main PuTTY registry key and remove everything in it. */ if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_POS, &key) == ERROR_SUCCESS) { registry_recursive_remove(key); RegCloseKey(key); } /* * Now open the parent key and remove the PuTTY main key. Once * we've done that, see if the parent key has any other * children. */ if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_PARENT, &key) == ERROR_SUCCESS) { RegDeleteKey(key, PUTTY_REG_PARENT_CHILD); ret = RegEnumKey(key, 0, name, sizeof(name)); RegCloseKey(key); /* * If the parent key had no other children, we must delete * it in its turn. That means opening the _grandparent_ * key. */ if (ret != ERROR_SUCCESS) { if (RegOpenKey(HKEY_CURRENT_USER, PUTTY_REG_GPARENT, &key) == ERROR_SUCCESS) { RegDeleteKey(key, PUTTY_REG_GPARENT_CHILD); RegCloseKey(key); } } } /* * Now we're done. */ } Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 01fdef928162f2421f62906ee4cca72b Text-content-length: 1178 Text-content-md5: 3bf303d828d542fa23212ef36059fb13 Content-length: 1218 K 15 cvs2svn:cvs-rev V 4 1.60 PROPS-END SVN凁凒 滼円B滲 else if (q == p + 7 && tolower(p[0]) == 'c' && tolower(p[1]) == 'l' && tolower(p[2]) == 'e' && tolower(p[3]) == 'a' && tolower(p[4]) == 'n' && tolower(p[5]) == 'u' && tolower(p[6]) == 'p') { /* * `putty -cleanup'. Remove all registry entries * associated with PuTTY, and also find and delete * the random seed file. */ if (MessageBox(NULL, "This procedure will remove ALL Registry\n" "entries associated with PuTTY, and will\n" "also remove the PuTTY random seed file.\n" "\n" "THIS PROCESS WILL DESTROY YOUR SAVED\n" "SESSIONS. Are you really sure you want\n" "to continue?", "PuTTY Warning", MB_YESNO | MB_ICONWARNING) == IDYES) { random_destroy_seed(); registry_cleanup(); } exit(0) Revision-number: 627 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Add an invisible System Caret for blind-helper-software to track K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T16:17:53.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 834d7f3a6642ddedb842d9c0a76771b5 Text-content-length: 49 Text-content-md5: fba5cfa33b84eb1c376d77e618a1a69d Content-length: 89 K 15 cvs2svn:cvs-rev V 4 1.46 PROPS-END SVN+蘆  void sys_cursor(int x, int y Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2dadeca619208d591af502f1e1945403 Text-content-length: 96 Text-content-md5: a5024346ee3f59a84868adc0ee410124 Content-length: 136 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN儹_儺"A?A偔[<薌傗 sys_cursor(curs_x, curs_y + (scrtop - disptop) / (cols+1) Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3bf303d828d542fa23212ef36059fb13 Text-content-length: 486 Text-content-md5: f6050df7f0a3909a93e08278fe926a3b Content-length: 526 K 15 cvs2svn:cvs-rev V 4 1.61 PROPS-END SVN凒 凕傽倱m"倲=伬偢} CreateCaret(hwnd, NULL, font_width, font_height); term_out(); term_update(); break; case WM_KILLFOCUS: has_focus = FALSE; DestroyCaret()Move the system caret. (We maintain one, even though it's * invisible, for the benefit of blind people: apparently some * helper software tracks the system caret, so we should arrange to * have one.) */ void sys_cursor(int x, int y) { SetCaretPos(x * font_width, y * font_height Revision-number: 628 Prop-content-length: 166 Content-length: 166 K 7 svn:log V 66 Oops - puttytel now needs a stub random_destroy_seed() to compile K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-25T16:25:12.000000Z PROPS-END Node-path: putty/be_nossh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: c6bc2ee9a9f9fc950576f7ba78c6a7bf Text-content-length: 87 Text-content-md5: 325b9d2fe6a49a5be846c18d623dc30f Content-length: 126 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN/僒FFrandom_destroy_seed(void) { } void noise_ultralight(DWORD data) { } Revision-number: 629 Prop-content-length: 175 Content-length: 175 K 7 svn:log V 75 Pageant should now not fail for lack of security APIs on 95-type platforms K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T09:22:40.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: fe96a5ca5282801a46eded994868da25 Text-content-length: 2632 Text-content-md5: 5a2dee7b1f56ceaad0aa8c63aeed678e Content-length: 2671 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN仭D伃uL搉亂6h:lvc鸰並I齳J>k%刯凪亙U嘥乹亪 *亰仭+int has_security; typedef DWORD (WINAPI *gsi_fn_t) (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID *, PSID *, PACL *, PACL *, PSECURITY_DESCRIPTOR *); gsi_fn_t getsecurityinfohas_security) { GetCurrentProcessId())) == NULL) { #ifdef DEBUG_IPC debug(("couldn't get handle for process\r\n")); #endif return 0; } if (getsecurityinfo(proc, SE_KERNEL_OBJECT, &procowner, NULL, NULL, NULL, &psd2) != ERROR_SUCCESS) { #ifdef DEBUG_IPC CloseHandle(proc); return 0; /* unable to get security info */ } CloseHandle(proc); if ((rc = getsecurityi &mapowner, NULL, NULL, NULL, debug(("couldn't get owner info for filemap: %d\r\n", rc)); #endif return 0; } #ifdef DEBUG_IPC debug(("got security stuff\r\n")); #endif if (!EqualSid(mapowner, procowner)) return 0; /* security ID mismatch! */ #ifdef DEBUG_IPC debug(("security stuff matched\r\n")); #endif LocalFree(psd1); LocalFree(psd2); } else { #ifdef DEBUG_IPC debug(("security APIs not present\r\n")); #endif } OSVERSIONINFO osi; HMODULE advapi; /* * Determine whether we're an NT system (should have security * APIs) or a non-NT system (don't do security). */ memset(&osi, 0, sizeof(OSVERSIONINFO)); osi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); if (GetVersionEx(&osi) && osi.dwPlatformId==VER_PLATFORM_WIN32_NT) { has_security = TRUE; } else has_security = FALSE; if (has_security) { /* * Attempt to ge the security API we need. */ advapi = LoadLibrary("ADVAPI32.DLL"); getsecurityinfo = (gsi_fn_t)GetProcAddress(advapi, "GetSecurityInfo"); if (!getsecurityinfo) { MessageBox(NULL, "Unable to access security APIs. Pageant will\n" "not run, in case it causes a security breach.", "Pageant Fatal Error", MB_ICONERROR | MB_OK); return 1; } } else advapi = NULLif (advapi) FreeLibrary(advapiif (advapi) FreeLibrary(advapi); Revision-number: 630 Prop-content-length: 142 Content-length: 142 K 7 svn:log V 42 Fix a small bug in 2-3-4 tree enumeration K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T10:05:48.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 9b8b6f515d5820c63a62633571e32321 Text-content-length: 94 Text-content-md5: 39a8a2bc0e2b90a173e15d681d133c8d Content-length: 133 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN亽U亽b D亐bD<亖< 2 && n->elems[pos+1]) { e->posn = pos+1; return n->elems[e->posn Revision-number: 631 Prop-content-length: 171 Content-length: 171 K 7 svn:log V 71 The "Authenticated using key from agent" message is a verbose-only one K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T10:06:05.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3b64fc60d3088891f1b686e16ddc6df8 Text-content-length: 159 Text-content-md5: b45a1a45ce88f3c961661ab8855b5f38 Content-length: 199 K 15 cvs2svn:cvs-rev V 4 1.48 PROPS-END SVN叜l叝bx偦Kz偦'g偧&K傫>偨.if (flags & FLAG_VERBOSE) { 29); c_write("\" from agent\r\n", 14); } Revision-number: 632 Prop-content-length: 158 Content-length: 158 K 7 svn:log V 58 Fix tree corruption in the "really easy" case on deletion K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T11:16:33.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 39a8a2bc0e2b90a173e15d681d133c8d Text-content-length: 24 Text-content-md5: efb9084457b62facfc1add2a7aa6773d Content-length: 63 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN亽b亽b 關闝2 Revision-number: 633 Prop-content-length: 140 Content-length: 140 K 7 svn:log V 40 Fix a segfault in agent forwarding code K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T11:16:47.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b45a1a45ce88f3c961661ab8855b5f38 Text-content-length: 46 Text-content-md5: 14d2e4f62cc70910dfd7a062ac94e78d Content-length: 86 K 15 cvs2svn:cvs-rev V 4 1.49 PROPS-END SVN叝b叞 儥)倴J儥c->u.a.lensofar = 0; Revision-number: 634 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Accelerators and wording change in Pageant systray menu K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T12:54:43.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 5a2dee7b1f56ceaad0aa8c63aeed678e Text-content-length: 103 Text-content-md5: ec9608eadf11cb9bd00dbe3a5f7f950d Content-length: 142 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN伃u伃r M仮DM奱仯&View Keys"); AppendMenu (systray_menu, MF_ENABLED, IDM_CLOSE, "E&xit Revision-number: 635 Prop-content-length: 147 Content-length: 147 K 7 svn:log V 47 Remote addition and removal of keys in Pageant K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T13:18:43.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ec9608eadf11cb9bd00dbe3a5f7f950d Text-content-length: 1778 Text-content-md5: c9c0ea53f879a02816c4887bda9642ea Content-length: 1818 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN伃r伖-7檌$b3F檁:哫乻9僋 9褿+Update the visible key list. */ void keylist_update(void) { struct RSAKey *key; enum234 e; if (keylist) { SendDlgItemMessage(keylist, 100, LB_RESETCONTENT, 0, 0); for (key = first234(rsakeys, &e); key; key = next234(&e)) { SendDlgItemMessage (keylistSendDlgItemMessage (keylist, 100, LB_SETCURSEL, (WPARAM) -1, 0); }{ struct RSAKey *key; char *comment; key = malloc(sizeof(struct RSAKey)); memset(key, 0, sizeof(key)); p += makekey(p, key, NULL, 1); p += makeprivate(p, key); p += ssh1_read_bignum(p, NULL); /* p^-1 mod q */ p += ssh1_read_bignum(p, NULL); /* p */ p += ssh1_read_bignum(p, NULL); /* q */ comment = malloc(GET_32BIT(p)); if (comment) { memcpy(comment, p+4, GET_32BIT(p)); key->comment = comment; } PUT_32BIT(ret, 1); ret[4] = SSH_AGENT_FAILURE; if (add234(rsakeys, key) == key) { keylist_update(); ret[4] = SSH_AGENT_SUCCESS; } else { freersakey(key); } }{ struct RSAKey reqkey, *key; p += makekey(p, &reqkey, NULL, 0); key = find234(rsakeys, &reqkey, NULL); freebn(reqkey.exponent); freebn(reqkey.modulus); PUT_32BIT(ret, 1); ret[4] = SSH_AGENT_FAILURE; if (key) { del234(rsakeys, key); keylist_update(); ret[4] = SSH_AGENT_SUCCESS; } } break; keylist_update(); } Revision-number: 636 Prop-content-length: 139 Content-length: 139 K 7 svn:log V 39 Oops - free the key after removing it! K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T13:31:15.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c9c0ea53f879a02816c4887bda9642ea Text-content-length: 707 Text-content-md5: 800a3917b489df2f24f3b80e02697a08 Content-length: 747 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN伖伡.抋I丳抇乺 乗乬2M9鐻9struct PassphraseProcStruct { char *passphrase; char *comment; }; struct PassphraseProcStruct *p; switch (msg) { case WM_INITDIALOG: p = (struct PassphraseProcStruct *)lParam; passphrase = p->passphrase; if (p->comment) SetDlgItemText(hwnd, 101, p->comment) char *comment; struct PassphraseProcStruct pps; needs_pass = rsakey_encrypted(filename, &comment); attempts = 0; key = malloc(sizeof(*key)); pps.passphrase = passphrase; pps.comment = comment&pps); if (!dlgret) { if (comment) free(comment);comment) free(commentfreersakey(key Revision-number: 637 Prop-content-length: 174 Content-length: 174 K 7 svn:log V 74 Implement OpenSSH-compatible RSA key fingerprints and use them throughout K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-26T14:26:21.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 800a3917b489df2f24f3b80e02697a08 Text-content-length: 686 Text-content-md5: 09ad1cd22093f21ad0c274c648685573 Content-length: 726 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN伡伡+ 漗僇痙濬寍鄇薙;char listentry[512], *p; /* * Replace two spaces in the fingerprint with tabs, for * nice alignment in the box. */ rsa_fingerprint(listentry, sizeof(listentry), key); p = strchr(listentry, ' '); if (p) *p = '\t'; p = strchr(listentry, ' '); if (p) *p = '\t'; SendDlgItemMessage (keylist, 100, LB_ADDSTRING, 0, (LPARAM)listentry freekeylist = hwnd; { static int tabs[2] = {25, 175}; SendDlgItemMessage (hwnd, 100, LB_SETTABSTOPS, 2, (LPARAM) tabs); } keylist_update();keylist_update( Node-path: putty/pageant.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d67d08382cb09ef0ffa4d8b01bc43eba Text-content-length: 35 Text-content-md5: 210aa3fa534f03fe951eeb59327e0354 Content-length: 74 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN5嘒 7厏LBS_USETABSTOP Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 14d2e4f62cc70910dfd7a062ac94e78d Text-content-length: 299 Text-content-md5: 00bee6ec10b67ad3f6539be19889205c Content-length: 339 K 15 cvs2svn:cvs-rev V 4 1.50 PROPS-END SVN叞叜&侙兇侞wLog the host key fingerprint. */ { char logmsg[80]; logevent("Host key fingerprint is:"); strcpy(logmsg, " "); hostkey.comment = NULL; rsa_fingerprint(logmsg+strlen(logmsg), sizeof(logmsg)-strlen(logmsg), &hostkey Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e8a3d375008838cf793c6e5b1206e114 Text-content-length: 55 Text-content-md5: afa16878cfc50aaf90cec98191496fe3 Content-length: 95 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN* " &rsa_fingerprint(char *str, int len Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0bb36e0ff34277c096bf88a5315f4ec2 Text-content-length: 1165 Text-content-md5: f60297a77f8d194f9cf632cc691dbd4a Content-length: 1205 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN 焂坉乄圚僯弅唦-乶nclude "ssh.h" modpow(b1, key->exponent, key->modulus, /* * Generate a fingerprint string for the key. Compatible with the * OpenSSH fingerprint code. */ void rsa_fingerprint(char *str, int len, struct RSAKey *key) { struct MD5Context md5c; unsigned char digest[16]; char buffer[16*3+40]; int numlen, slen, i; MD5Init(&md5c); numlen = ssh1_bignum_length(key->modulus) - 2; for (i = numlen; i-- ;) { unsigned char c = bignum_byte(key->modulus, i); MD5Update(&md5c, &c, 1); } numlen = ssh1_bignum_length(key->exponent) - 2; for (i = numlen; i-- ;) { unsigned char c = bignum_byte(key->exponent, i); MD5Update(&md5c, &c, 1); } MD5Final(digest, &md5c); sprintf(buffer, "%d ", ssh1_bignum_bitcount(key->modulus)); for (i = 0; i < 16; i++) sprintf(buffer+strlen(buffer), "%s%02x", i?":":"", digest[i]); strncpy(str, buffer, len); str[len-1] = '\0'; slen = strlen(str); if (key->comment && slen < len-1) { str[slen] = ' '; strncpy(str+slen+1, key->comment, len-slen-1); str[len-1] = '\0'; } Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4a41603525d0a25647400c8b6e9e6d82 Text-content-length: 125 Text-content-md5: 69e126472a0759f185c70ce92e70a9b3 Content-length: 165 K 15 cvs2svn:cvs-rev V 4 1.38 PROPS-END SVN鞾鞿a踂踃`軷2135, 102, 44, 14 PUSHBUTTON "C&opy", IDN_COPY, 81, 102, 44, 14 LISTBOX IDN_LIST, 3, 3, 2 Revision-number: 638 Prop-content-length: 266 Content-length: 266 K 7 svn:log V 165 Remove the special hooks in ssh.c for pscp. pscp now uses the standard interface to the outside of the ssh module. This means pscp now works without change in SSH2. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-27T09:36:39.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: bf82352084fdd64aa3c21b2d177eecfe Text-content-length: 20 Text-content-md5: 4ccea6cbcdd85fad723a904e67703d88 Content-length: 60 K 15 cvs2svn:cvs-rev V 4 1.32 PROPS-END SVN稶稯 瓽甅 Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2cc6229111dbcc4ebffbe16e54686f67 Text-content-length: 3466 Text-content-md5: 9c59e08c3bdd5ac69154a410c6523db9 Content-length: 3506 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN伬佖t刣峠剈慓拀倁:>薎乂豣贎 軵凩遚57-鑤 )>驢塱黤禗亞W俽伣,Receive a block of data from the SSH link. Block until all data * is available. * * To do this, we repeatedly call the SSH protocol module, with our * own trap in term_out() to catch the data that comes back. We do * this until we have enough data. */ static unsigned char *outptr; /* where to put the data */ static unsigned outlen; /* how much data required */ static unsigned char *pending = NULL; /* any spare data */ static unsigned pendlen=0, pendsize=0; /* length and phys. size of buffer */ void term_out(void) { /* * Here we must deal with a block of data, in `inbuf', size * `inbuf_head'. */ unsigned char *p = inbuf; unsigned len = inbuf_head; inbuf_head = 0; /* * If this is before the real session begins, just return. */ if (!outptr) return; if (outlen > 0) { unsigned used = outlen; if (used > len) used = len; memcpy(outptr, p, used); outptr += used; outlen -= used; p += used; len -= used; } if (len > 0) { if (pendsize < pendlen + len) { pendsize = pendlen + len + 4096; pending = (pending ? realloc(pending, pendsize) : malloc(pendsize)); if (!pending) fatalbox("Out of memory"); } memcpy(pending+pendlen, p, len); pendlen += len; } } static int ssh_scp_recv(unsigned char *buf, int len) { SOCKET s; outptr = buf; outlen = len; /* * See if the pending-input block contains some of what we * need. */ if (pendlen > 0) { unsigned pendused = pendlen; if (pendused > outlen) pendused = outlen; memcpy(outptr, pending, pendused); memmove(pending, pending+pendused, pendlen-pendused); outptr += pendused; outlen -= pendused; pendlen -= pendused; if (pendlen == 0) { pendsize = 0; free(pending); pending = NULL; } if (outlen == 0) return len; } while (outlen > 0) { fd_set readfds; s = back->socket(); if (s == INVALID_SOCKET) { connection_open = FALSE; return 0; } FD_ZERO(&readfds); FD_SET(s, &readfds); if (select(1, &readfds, NULL, NULL, NULL) < 0) return 0; /* doom */ back->msg(0, FD_READ); term_out(); } return len; } /* * Loop through the ssh connection and authentication process. */ static void ssh_scp_init(void) { SOCKET s; s = back->socket(); if (s == INVALID_SOCKET) return; while (!back->sendok()) { fd_set readfds; FD_ZERO(&readfds); FD_SET(s, &readfds); if (select(1, &readfds, NULL, NULL, NULL) < 0) return; /* doom */ back->msg(0, FD_READ); term_out(); }back->special(TS_EOFstrncpy(cfg.remote_cmd, cmd, sizeof(cfg.remote_cmd)); cfg.remote_cmd[sizeof(cfg.remote_cmd)-1] = '\0'; cfg.nopty = TRUE; back = &ssh_backend; err = back->init(NULL, cfg.host, cfg.port, &realhost); if (err != NULL) bump("ssh_init: %s", err); ssh_scp_init(back->back->back->back->back->back->back->back->back->back->back->back->back->special(TS_EOF Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 00bee6ec10b67ad3f6539be19889205c Text-content-length: 136 Text-content-md5: 8d3b5a33e5b4002e142041199dd78d9e Content-length: 176 K 15 cvs2svn:cvs-rev V 4 1.51 PROPS-END SVN叜&厫f,O乸訸偣E;亷#儛;劄&篍動a乪叕Aatic void c_writedata (char *buf, int len) { while (len--)data.90s@%.90data Node-path: putty/scp.h Node-action: delete Revision-number: 639 Prop-content-length: 241 Content-length: 241 K 7 svn:log V 140 Rationalised host key storage. Also started code reorg: persistent-state routines have been moved out into a replaceable module winstore.c. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-27T15:21:04.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4ccea6cbcdd85fad723a904e67703d88 Text-content-length: 164 Text-content-md5: 34ae837abe041ccbb9c313afff2845d6 Content-length: 204 K 15 cvs2svn:cvs-rev V 4 1.33 PROPS-END SVN稯+巬巚p亅93 winstore storage.h windlg.$(OBJ): windlg.c putty.h ssh.h win_res.h storage.h winstore.$(OBJ): winstore.c putty.h storage storage Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 570ddbaba855561e24b69ebb9fb02bc4 Text-content-length: 211 Text-content-md5: 6ab0ffd9ec9c5559366ad44720692a32 Content-length: 250 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN>弔06係奌圧攍#include "storage.h"read_random_seed(func); } void random_save_seed(void) { int len; void *data; random_get_savedata(&data, &len); write_random_seed(data, len Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fba5cfa33b84eb1c376d77e618a1a69d Text-content-length: 83 Text-content-md5: dade95564b34c9020d0c0e558e5b906b Content-length: 123 K 15 cvs2svn:cvs-rev V 4 1.47 PROPS-END SVN蘆 >4type, char *keystr, char *fingerprint Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8d3b5a33e5b4002e142041199dd78d9e Text-content-length: 410 Text-content-md5: 7574c0090ca838bc12a1160d3e22fd79 Content-length: 450 K 15 cvs2svn:cvs-rev V 4 1.52 PROPS-END SVN厫f厯&俧個'個~伻:倎M篭兪丣亱^剠fingerprint[100]rsa_fingerprint(fingerprint, sizeof(fingerprint), &hostkey); verify_ssh_host_key(savedhost, "rsa", keystr, fingerprint, *fingerprintfingerprint = hostkey->fingerprint(); verify_ssh_host_key(savedhost, hostkey->keytype, keystr, fingerprint); logevent("Host key fingerprint is:"); logevent(fingerprint); free(fingerprint Node-path: putty/ssh.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: afa16878cfc50aaf90cec98191496fe3 Text-content-length: 201 Text-content-md5: 014dfd900686b65a728ca9a4c9ddfc79 Content-length: 241 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN 1橶1嘆(char *(*fingerprint)(void); int (*verifysig)(char *sig, int siglen, char *data, int datalen); char *name; char *keytype; /* for host key cache */ Node-path: putty/sshdss.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d9ade49397ab82cb3a3324ba50bebc3b Text-content-length: 2239 Text-content-md5: bc87ee2385a07f673ddde0ecdd6f32df Content-length: 2278 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN癰"乄 峢<#define PUT_32BIT(cp, value) { \ (cp)[0] = (unsigned char)((value) >> 24); \ (cp)[1] = (unsigned char)((value) >> 16); \ (cp)[2] = (unsigned char)((value) >> 8); \ (cp)[3] = (unsigned char)(value); }, i, pos, nibbles; static const char hex[] = "0123456789abcdef"; if (!dss_p) return NULL; len = 8 + 4 + 1; /* 4 x "0x pos = 0; pos += sprintf(p+pos, "0x"); nibbles = (3 + ssh1_bignum_bitcount(dss_p))/4; if (nibbles<1) nibbles=1; for (i=nibbles; i-- ;) p[pos++] = hex[(bignum_byte(dss_p, i/2) >> (4*(i%2))) & 0xF]; pos += sprintf(p+pos, "0x"); nibbles = (3 + ssh1_bignum_bitcount(dss_q))/4; if (nibbles<1) nibbles=1; for (i=nibbles; i-- ;) p[pos++] = hex[(bignum_byte(dss_q, i/2) >> (4*(i%2))) & 0xF]; pos += sprintf(p+pos, "0x"); nibbles = (3 + ssh1_bignum_bitcount(dss_g))/4; if (nibbles<1) nibbles=1; for (i=nibbles; i-- ;) p[pos++] = hex[(bignum_byte(dss_g, i/2) >> (4*(i%2))) & 0xF]; pos += sprintf(p+pos, "0x"); nibbles = (3 + ssh1_bignum_bitcount(dss_y))/4; if (nibbles<1) nibbles=1; for (i=nibbles; i-- ;) p[pos++] = hex[(bignum_byte(dss_y, i/2) >> (4*(i%2))) & 0xF]; p[pos] = '\0'; return p; } static char *dss_fingerprint(void) { struct MD5Context md5c; unsigned char digest[16], lenbuf[4]; char buffer[16*3+40]; char *ret; int numlen, i; MD5Init(&md5c); MD5Update(&md5c, "\0\0\0\7ssh-dss", 11); #define ADD_BIGNUM(bignum) \ numlen = (ssh1_bignum_bitcount(bignum)+8)/8; \ PUT_32BIT(lenbuf, numlen); MD5Update(&md5c, lenbuf, 4); \ for (i = numlen; i-- ;) { \ unsigned char c = bignum_byte(bignum, i); \ MD5Update(&md5c, &c, 1); \ } ADD_BIGNUM(dss_p); ADD_BIGNUM(dss_q); ADD_BIGNUM(dss_g); ADD_BIGNUM(dss_y); #undef ADD_BIGNUM MD5Final(digest, &md5c); sprintf(buffer, "%d ", ssh1_bignum_bitcount(dss_p)); for (i = 0; i < 16; i++) sprintf(buffer+strlen(buffer), "%s%02x", i?":":"", digest[i]); ret = malloc(strlen(buffer)+1); if (ret) strcpy(ret, buffer); return retfingerprint, dss_verifysig, "ssh-dss", "dss" }; Node-path: putty/sshrsa.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f60297a77f8d194f9cf632cc691dbd4a Text-content-length: 641 Text-content-md5: 0319148739f524bb874962154352c9ae Content-length: 681 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN焂 刬扏刬4%20; } void rsastr_fmt(char *str, struct RSAKey *key) { Bignum md, ex; int len = 0, i, nibbles; static const char hex[] = "0123456789abcdef"; md = key->modulus; ex = key->exponent; len += sprintf(str+len, "0x"); nibbles = (3 + ssh1_bignum_bitcount(ex))/4; if (nibbles<1) nibbles=1; for (i=nibbles; i-- ;) str[len++] = hex[(bignum_byte(ex, i/2) >> (4*(i%2))) & 0xF]; len += sprintf(str+len, ",0x"); nibbles = (3 + ssh1_bignum_bitcount(md))/4; if (nibbles<1) nibbles=1; for (i=nibbles; i-- ;) str[len++] = hex[(bignum_byte(md, i/2) >> (4*(i%2))) & 0xF]; Node-path: putty/storage.h Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 1548 Text-content-md5: bb8e5f84bfedf6a30afa8ca1e37e7152 Content-length: 1664 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN 卼盚岲篍丵r匑ED両%咹8D丗L匘)揈F朌乺侲0凞 D:孌哅8E淒嘒F怐$楪dF匘#凥 E俛嘐傾嘍乺D-EF嘍俔凞乺朌0咷倇僁咲ID-E乹D俍両凮僆俇J$凞俇DE剉凟僒侱 E匲H凮丏刉僁匘IE!H凜匘僐D厈H卝塂亀丏儀D俍僁D厈EMDKUI2侴cF刦L凨D卶咷 咶唍P F刦H刵FD1G;F5U乑-凪嘙丵卍L.侶 凘A丂G刌D侼Q%M塈o匘僁d丏Q塈E6丗D厈廏9匜侲H咥凣奜I嶥0丏 G凱D傾圖\侴E乁"僄奪匘奆F-EF*僁\D$匛匛 丒僌!E奷F2丵塢I奪僇奆H#Y唈乁FO塈_.F奝F塂O塣]噅僝丼%@X咺L圗_凪匘 I廎咲剘両廚塅媌E5D 丏咵 I弖H廜凥+匟4J;EF僅+匘H廜侱AG俍凞孠凟'F-E倈匥/丏僇KEx*@g巁咹 圚廣D慚DoE刦揋 D`D僋匜島L5O搈IEE剓D宯僁[F2丒"E僫G)I#KE塈F搖丏丳"IP慭Y擸奃匯凞IE"KF6L7\4@K嘔#咲亁俉I凩丗%凟 sizeof(wrongmsg) ? sizeof(absentmsg) : sizeof(wrongmsg))]; /* * Verify the key against the registry. */ ret = verify_host_key(host, keytype, keystr); if (ret == 0) /* success - key matched OK */ return; if (ret == 2) { /* key was different */ int mbret; sprintf(message, wrongmsg, fingerprint); mbret = MessageBox(NULL, message, mbtitle, MB_ICONWARNING | MB_YESNOCANCEL); if (mbret == IDYES) store_host_key(host, keytype, keystr); if (mbret == IDCANCEL) exit(0); } if (ret == 1) { /* key was absent */ int mbret; sprintf(message, absentmsg, fingerprint); mbret = MessageBox(NULL, message, mbtitle, MB_ICONWARNING | MB_YESNO); if (mbret == IDNO) exit(0); store_host_key(host, keytype, keystr); } Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f6050df7f0a3909a93e08278fe926a3b Text-content-length: 48 Text-content-md5: 3812873609b71a25a6d504c5cef5c3f8 Content-length: 88 K 15 cvs2svn:cvs-rev V 4 1.62 PROPS-END SVN凕凔l+冋kstoragecleanup_all Node-path: putty/winstore.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 4449 Text-content-md5: 47034205e98fd5e69c3504ab6f1bde07 Content-length: 4565 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN薲擸峾BD婦 桭僈`匨r塊IQ凞+0咵乀怟乕嶦9凢8婦8岴5奃2僂俆奃#E俥侻俴丮俴丏俴侱6H俻両俴丩俬凟俴I俛嘑>丒俌E咵%丱僢D乲嘍JD9丒俈卛僼凞!哋僢岻>侲5丒5D僪D僴僃塏俤[侽丒僐匞卾侷僟D:咷 侴厃汫僼丗"両)丒3丱9O僢圖G 匸凱D刾fE怗岶嘷匟噅僃嘸咹'僅'刉乑D:M>匢D噐LD唓T嘸HN噟F)刯咶坮塂:M塛_圷僝坸丵L 婦GHF)DDK+凥2嘓H僅揤婦,塊#F(咵8廌;DD^淍E>G拁J寋D恱R 哤侴K#UJGH寋僈杁FGD0DD9E恮G&G峓G3QG&匤G媌E:H廝O8IJ抙侷(g杮D僑G峓KG乛匘丏N慚DD刄Z>侳両@MHP=乛F 凱▁H嘳E @@;MK @I巣@丮廝Wk゜hD SK峴IS僃丏濵E,D?丒=侱俀D丅F8D G4丠>丗ZL 凥>EH2U F僅峚DD巎咹>O$刣9D-D恱侼E俍F峉Y憊岴恖D恛両H>僁D咵lE僣I>E丼F丼EG凾T眪J9K眪I皌僁 丏唕F慸奃(擫7PD咵F皚\瞮D丮K丏瞔G(H L丗4I盞嘒恛E圖僅(奃淣E硄僄塈V!J峞GKM凴E旳D凣婯M砢D怾E怭凥媦両猋E塛FE疶奃凥I痓匛眧乆睠侻疩I1D*僃3D"K磆孖恗孍侺匥F岴DLF禲婩"咵皌G侽両僟E9嘔 F/EGE-丒!F積EI!嘐瞔E稸D僑D4Q瀎HD竈丒竤GF刄咲!侲丒&F積Q礯FL祏F凢!丒瞐@hF.俀3嶧恡稵I.D丗5丏L窯F筺E瞔D竐G籤I稵^3F塂*嘕慛D D9匜F0丏擸O疊H0侶粿丗4E坽肨丏怑U1bR縗P:咾&I皚M乁`腟RG揁M舃凢$ID揤侱7F糑L"F5E-僁"圗DE丏F丩"D5K"J攆X?P"l胋乕艱j芖d苰GQ#b莃N縉HR膗凢臞J肨/* * winstore.c: Windows-specific implementation of the interfacedefined in age.h. */ #include stdio"putty.h"" sc char seedpath[2*MAX_PATH+10] = "\0";hex[160123456789ABCDEFvoid mungestr(*in,*out) { candot = 0; while (*in if == ' ' ||\\*? %<> '~.' && !)out++ ;((unsig)>> 4]& 15} else*in; in++; 1;}\0'return; }un%in[1]2]i, j; =- '0'; i -= (i > 9 ? 7 : 0)j2jj(i<<4) + += 3*open_settings_wsessionname);write_s(handlekeyvalui*closreadbufferbuflen); defrhostkey_regtypestrcpy(at"@" +len))erify__keytherstr,lenHKEY rkeyDWORDret, comparelen Now a savedfromregistry and what itsays./ = smalloc(3*()+)+5!|| !) fatalbox("Outmemory,RegCreateKey(_CURRENT_USER, PUTTY_REG_POS "\\SshHostKeys", &) != ERROR_SUCCESS) 1;/*does not exist =reRegQueryVEx(,, NULL, &&MORE_DATA &&!mp, "rsa" * Kidn'. I is RSA, we'll tryan trick,chto look up_old_formaunder justtranslate that =+ldstyl+ 10)/fety margin=== SZThewo-bignums separated b slash. Anmadegroups offou digits: are orderensible(meast ant) within each* butilly (to .newinary C-numbers (0xG...XYZ,A nonzero excepal case 0x0appear anywaRSAs) acomma. Alllowerin bothp =qfor i < 2; i++n, nwordspxtrcspn(q, "/"find / or endstring =/ 4/* nowmto removedsq[ (-1) ^ 3 ]0> 1--ovo0<; j++p[-jq[j^3]pq*q++/* ea,'/* adtermine}_if_ thismatchese inewnotassume someg odd wenwrong,hyper-cautiouslRegSet0,)+1sfree||2is die||!0d OK} Fm f`'get_sizizeof(Open=="RandSeedFile0, & lentGetEnvironVariable("HOMEDRIVE"+-== 0) {probably95;n \WINDOWSGetDirectoryt; .RND}(noise_conr_t ANDLEf = GENERIC_READ FILE_SHARE |WRITEOPEN_EXISTING!= INVALID__VALUE1buf[102abuf), &, break Hdata_ 0CREATE_ALWAYS,ATTRIBUTE_NORMALtWRecursiveelete aeveryi_r_i[subRegEnum,)&RegDcleanup_all -Wipe Doy allinassoci Pumaininntkey. One'onhaschildrenA_CHILD0d no murnat meansg_Gwe'r} Revision-number: 640 Prop-content-length: 172 Content-length: 172 K 7 svn:log V 72 Finish creating the storage.h abstraction and winstore.c implementation K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-27T16:21:52.000000Z PROPS-END Node-path: putty/storage.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bb8e5f84bfedf6a30afa8ca1e37e7152 Text-content-length: 321 Text-content-md5: 14e159b865527e07468feb333d146f57 Content-length: 360 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN檦&卼嶭擡4朜close_settings_r(void *handle); /* * Delete a whole saved session. */ void del_settings(char *sessionname); /* * Enumerate all saved sessions. */ void *enum_settings_start(void); char *enum_settings_next(void *handle, char *buffer, int buflen); void enum_settings_finishinin Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e44eee648357a982103f380440bbaf4a Text-content-length: 4323 Text-content-md5: 781f37d7ad39d0e6560d336e1f397627 Content-length: 4363 K 15 cvs2svn:cvs-rev V 4 1.42 PROPS-END SVN儣儖vk爅俰m*tKW}怺乮亀攇俁+'渂8乊╨猯匜╩3俉仛(W倶8H偆}伬p伃V%"傭cvoid gpps(void *handle, char *name, char *def, char *val, int len) { if (!read_setting_s(handle, name, val, len)void *handle, char *name, int def, int *i) { *i = read_setting_i(handle, name, def)char *p; void *sesskey; sesskey = open_settings_w(section); if (!sesskey) return; write_setting_i (sesskey, "Present", 1); if (do_host) { write_setting_s (sesskey, "HostName", cfg.host); write_setting_rite_setting_s (sesskey, "Protocol", p); } write_setting_i (sesskey, "CloseOnExit", !!cfg.close_on_exit); write_setting_i (sesskey, "WarnOnClose", !!cfg.warn_on_close); write_setting_s (sesskey, "TerminalType", cfg.termtype); write_setting_rite_setting_s (sesskey, "Environment", buf); } write_setting_s (sesskey, "UserName", cfg.username); write_setting_i (sesskey, "NoPTY", cfg.nopty); write_setting_i (sesskey, "AgentFwd", cfg.agentfwd); write_setting_s (sesskey, "RemoteCmd", cfg.remote_cmd); write_setting_rite_setting_i (sesskey, "AuthTIS", cfg.try_tis_auth); write_setting_i (sesskey, "SshProt", cfg.sshprot); write_setting_s (sesskey, "PublicKeyFile", cfg.keyfile); write_setting_i (sesskey, "RFCEnviron", cfg.rfc_environ); write_setting_i (sesskey, "BackspaceIsDelete", cfg.bksp_is_delete); write_setting_i (sesskey, "RXVTHomeEnd", cfg.rxvt_homeend); write_setting_i (sesskey, "LinuxFunctionKeys", cfg.funky_type); write_setting_i (sesskey, "ApplicationCursorKeys", cfg.app_cursor); write_setting_i (sesskey, "ApplicationKeypad", cfg.app_keypad); write_setting_i (sesskey, "NetHackKeypad", cfg.nethack_keypad); write_setting_i (sesskey, "AltF4", cfg.alt_f4); write_setting_i (sesskey, "AltSpace", cfg.alt_space); write_setting_i (sesskey, "LdiscTerm", cfg.ldisc_term); write_setting_i (sesskey, "BlinkCur", cfg.blink_cur); write_setting_i (sesskey, "Beep", cfg.beep); write_setting_i (sesskey, "ScrollbackLines", cfg.savelines); write_setting_i (sesskey, "DECOriginMode", cfg.dec_om); write_setting_i (sesskey, "AutoWrapMode", cfg.wrap_mode); write_setting_i (sesskey, "LFImpliesCR", cfg.lfhascr); write_setting_i (sesskey, "WinNameAlways", cfg.win_name_always); write_setting_i (sesskey, "TermWidth", cfg.width); write_setting_i (sesskey, "TermHeight", cfg.height); write_setting_s (sesskey, "Font", cfg.font); write_setting_i (sesskey, "FontIsBold", cfg.fontisbold); write_setting_i (sesskey, "FontCharSet", cfg.fontcharset); write_setting_i (sesskey, "FontHeight", cfg.fontheight); write_setting_i (sesskey, "FontVTMode", cfg.vtmode); write_setting_i (sesskey, "TryPalette", cfg.try_palette); write_setting_rite_setting_s (sesskey, buf, buf2); } write_setting_rite_setting_s (sesskey, buf, buf2); } write_setting_i (sesskey, "KoiWinXlat", cfg.xlat_enablekoiwin); write_setting_i (sesskey, "88592Xlat", cfg.xlat_88592w1250); write_setting_i (sesskey, "CapsLockCyr", cfg.xlat_capslockcyr); write_setting_i (sesskey, "ScrollBar", cfg.scrollbar); write_setting_i (sesskey, "ScrollOnKey", cfg.scroll_on_key); write_setting_i (sesskey, "LockSize", cfg.locksize); write_setting_i (sesskey, "BCE", cfg.bce); write_setting_i (sesskey, "BlinkText", cfg.blinktext); close_settings_w(sesskey); } static void load_settings (char *section, int do_host) { int i; char prot[10]; void *sesskey; sesskey = open_settings_r(sectionclose_settings_rttings(sessions[n]}Keyboardotherbuf[2048]; static char *buffer; int buflen, bufsize, i; char *p, *ret; void *handle; if (allocate) { if ((handle = enum_settings_start()) == NULL) return; buflen = bufsize = 0; buffer = NULL; do { ret = enum_settings_next(handle, otherbuf, sizeof(otherbuf)); if (ret) { int len = strlen(otherbuf)+1; if (bufsize < buflen+len) { bufsize = buflen + len + 2048; buffer = srealloc(buffer, bufsize); } strcpy(buffer+buflen, otherbuf); buflen += strlen(buffer+buflen)+1; } } while (ret); enum_settings_finish(handle Node-path: putty/winstore.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 47034205e98fd5e69c3504ab6f1bde07 Text-content-length: 3437 Text-content-md5: 201a3e6c2b794921dd08965748384402 Content-length: 3476 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN薲,5:!0>匭|O9慽7妟 璉+慿箉onst char *const puttystr = PUTTY_REG_POS "\\Sessions";, int outlen if (!--outlen) return; in += 3; } else { *out++ = *in++; if (!--outlen) return; } { HKEY subkey1, sesskey; int ret; char *p; p = malloc(3*strlen(sessionname)+1); mungestr(sessionname, p); ret = RegCreateKey(HKEY_CURRENT_USER, puttystr, &subkey1); if (ret != ERROR_SUCCESS) { free(p); return NULL; } ret = RegCreateKey(subkey1, p, &sesskey); free(p); RegCloseKey(subkey1); if (ret != ERROR_SUCCESS) return NULL; return (void *)sesskey; } void write_setting_s(void *handle, char *key, char *value) { if (handle) RegSetValueEx((HKEY)handle, key, 0, REG_SZ, value, 1+strlen(value)); } void write_setting_i(void *handle, char *key, int value) { if (handle) RegSetValueEx((HKEY)handle, key, 0, REG_DWORD, (CONST BYTE *)&value, sizeof(value)); } void close_settings_w(void *handle) { RegCloseKey((HKEY)handle); } void *open_settings_r(char *sessionname) { HKEY subkey1, sesskey; char *p; p = malloc(3*strlen(sessionname)+1); mungestr(sessionname, p); if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &subkey1) != ERROR_SUCCESS) { sesskey = NULL; } else { if (RegOpenKey(subkey1, p, &sesskey) != ERROR_SUCCESS) { sesskey = NULL; } RegCloseKey(subkey1); } free(p); return (void *)sesskey; } char *read_setting_s(void *handle, char *key, char *buffer, int buflen) { DWORD type, size; size = buflen; if (!handle || RegQueryValueEx((HKEY)handle, key, 0, &type, buffer, &size) != ERROR_SUCCESS || type != REG_SZ) return NULL; else return buffer; } int read_setting_i(void *handle, char *key, int defvalue) { DWORD type, val, size; size = sizeof(val); if (!handle || RegQueryValueEx((HKEY)handle, key, 0, &type, (BYTE *)&val, &size) != ERROR_SUCCESS || size != sizeof(val) || type != REG_DWORD) return defvalue; else return val; } void close_settings_r(void *handle) { RegCloseKey((HKEY)handle); } void del_settings (char *sessionname) { HKEY subkey1; char *p; if (RegOpenKey(HKEY_CURRENT_USER, puttystr, &subkey1) != ERROR_SUCCESS) return; p = malloc(3*strlen(sessionname)+1); mungestr(sessionname, p); RegDeleteKey(subkey1, p); free(p); RegCloseKey(subkey1); }struct enumsettings { HKEY key; int i; }; void *enum_settings_start(void) { struct enumsettings *ret; HKEY key; if (RegCreateKey(HKEY_CURRENT_USER, puttystr, &key) != ERROR_SUCCESS) return NULL; ret = malloc(sizeof(*ret)); if (ret) { ret->key = key; ret->i = 0; } return ret; } char *enum_settings_next(void *handle, char *buffer, int buflen) { struct enumsettings *e = (struct enumsettings *)handle; char *otherbuf; otherbuf = malloc(3*buflen); if (otherbuf && RegEnumKey(e->key, e->i++, otherbuf, 3*buflen) == ERROR_SUCCESS) { unmungestr(otherbuf, buffer, buflen); free(otherbuf); return buffer; } else return NULL; } void enum_settings_finish(void *handle) { struct enumsettings *e = (struct enumsettings *)handle; RegCloseKey(e->key); free(ein Revision-number: 641 Prop-content-length: 127 Content-length: 127 K 7 svn:log V 27 Remove unnecessary DSS bit K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-27T16:44:00.000000Z PROPS-END Node-path: putty/sshpubk.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: c3acefe8c48e19014337fcc7aab6805d Text-content-length: 25 Text-content-md5: 99284612ee4f3cd580dc8f1352e5b294 Content-length: 64 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN1+ 卥 Revision-number: 642 Prop-content-length: 141 Content-length: 141 K 7 svn:log V 41 Fix small compilation problem in Pageant K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-28T08:35:20.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 09ad1cd22093f21ad0c274c648685573 Text-content-length: 22 Text-content-md5: 62be34407cd018c0554ed16abc4b7bd8 Content-length: 62 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN伡+伡 o伝 Revision-number: 643 Prop-content-length: 162 Content-length: 162 K 7 svn:log V 62 While we're doing a hostkey reorg, store port numbers as well K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-28T08:37:10.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: dade95564b34c9020d0c0e558e5b906b Text-content-length: 28 Text-content-md5: 9fc6eb990092ea459405713142c89007 Content-length: 68 K 15 cvs2svn:cvs-rev V 4 1.48 PROPS-END SVN  攡int por Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7574c0090ca838bc12a1160d3e22fd79 Text-content-length: 134 Text-content-md5: 35925d7b6a7a00bb6283c2d824c1cf54 Content-length: 174 K 15 cvs2svn:cvs-rev V 4 1.53 PROPS-END SVN厯厯k!X7(仱'倓 倐(亴N剢Cavedpor savedport = port;savedporsavedport, hostkey->keytype, Node-path: putty/storage.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 14e159b865527e07468feb333d146f57 Text-content-length: 43 Text-content-md5: 2c3f5cd46f425ea4c3224fad59d41f89 Content-length: 82 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN檦揊.揇攑int portint port Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 781f37d7ad39d0e6560d336e1f397627 Text-content-length: 85 Text-content-md5: 26171a55d295a4f8805c3b7717913abe Content-length: 125 K 15 cvs2svn:cvs-rev V 4 1.43 PROPS-END SVN儖v儗-傳岰傳|儏<儓U爄nt porporporport, keytype, keystr); } } Node-path: putty/winstore.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 201a3e6c2b794921dd08965748384402 Text-content-length: 461 Text-content-md5: b2f128c1330ded32f788ef8e10172b83 Content-length: 500 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN*7 淚俒俢g脄僽―昫珼|&N脄static void hostkey_regname(char *buffer, char *hostname, int port, char *keytype) { int len; strcpy(buffer, keytype); strcat(buffer, "@"); len = strlen(buffer); len += sprintf(buffer+len, "%d:", port); mungestr(hostname, buffer + strlen(buffer)); } int verify_host_key(char *hostname, int port1portcspn(regname, ":"int port15); if (port Revision-number: 644 Prop-content-length: 131 Content-length: 131 K 7 svn:log V 31 Remove some spurious #includes K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-28T08:37:10.000000Z PROPS-END Node-path: putty/sshbn.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 088abad638fc834ab8dffc982239a0af Text-content-length: 19 Text-content-md5: 523086374f20d6fe983b8213410720f3 Content-length: 58 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN󇡐z<亃 Node-path: putty/sshdes.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: b5ddecb70a34cfb76aae22a712b7ac1d Text-content-length: 39 Text-content-md5: 0666f30b8eb5b19b13e1cfb27d6d0442 Content-length: 79 K 15 cvs2svn:cvs-rev V 4 1.13 PROPS-END SVN侙s侘t侘a#include Revision-number: 645 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Keep parent pointers valid during deletion K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-28T09:48:49.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: efb9084457b62facfc1add2a7aa6773d Text-content-length: 447 Text-content-md5: f92ec543f47cf71f3c390912df726712 Content-length: 486 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN亽b仌 螥58<詄(遖<&if (sub->kids[0]) sub->kids[0]->parent = subif (sub->kids[2]) sub->kids[2]->parent = subif (sub->kids[1]) sub->kids[1]->parent = sub; sub->elems[0] = sib->elems[0]; sub->kids[0] = sib->kids[0]; if (sub->kids[0]) sub->kids[0]->parent = subif (a->kids[2]) a->kids[2]->parent = a; a->elems[2] = b->elems[0]; a->kids[3] = b->kids[1]; if (a->kids[3]) a->kids[3]->parent = a Revision-number: 646 Prop-content-length: 146 Content-length: 146 K 7 svn:log V 46 DSS key format string was missing some commas K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-28T11:05:43.000000Z PROPS-END Node-path: putty/sshdss.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: bc87ee2385a07f673ddde0ecdd6f32df Text-content-length: 36 Text-content-md5: 27f44beea7934022c262a95030632f9d Content-length: 75 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN癰癳5丱5丱楽,,, Revision-number: 647 Prop-content-length: 165 Content-length: 165 K 7 svn:log V 65 Fix a very old bug nobody ever noticed: multiple About boxes :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T08:42:55.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 26171a55d295a4f8805c3b7717913abe Text-content-length: 113 Text-content-md5: 72fcc01c784c419c56a13a2800153ebc Content-length: 153 K 15 cvs2svn:cvs-rev V 4 1.44 PROPS-END SVN儗儖j X閠X偂阾EndDialog(hwnd, 1); return 0; } return 0; case WM_CLOSE: EndDialog(hwnd, 1 Revision-number: 648 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Add the About and Licence boxes to Pageant K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T08:43:06.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 62be34407cd018c0554ed16abc4b7bd8 Text-content-length: 1528 Text-content-md5: a844d519bd55bb7758990ea25040b2d7 Content-length: 1568 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN伡伿>@*N媇嘑%"闓乄乑黇>㥮~伆$伆\#define IDM_ABOUT 0x003extern char ver[]; HINSTANCE instance; HWND hwnd; HWND keylist; HWND aboutboxLicence box. */ static int CALLBACK LicenceProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: return 1; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: EndDialog(hwnd, 1); return 0; } return 0; case WM_CLOSE: EndDialog(hwnd, 1); return 0; } return 0; } /* * Dialog-box function for the About box. */ static int CALLBACK AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_INITDIALOG: SetDlgItemText (hwnd, 100, ver); return 1; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: aboutbox = NULL; DestroyWindow (hwnd); return 0; case 101: EnableWindow(hwnd, 0); DialogBox (instance, MAKEINTRESOURCE(214), NULL, LicenceProc); EnableWindow(hwnd, 1); SetActiveWindow(hwnd); return 0; } return 0; case WM_CLOSE: aboutbox = NULL; DestroyWindow (hwnd); return 0; } return 0; }rivaterivate case IDM_ABOUT: if (!aboutbox) { aboutbox = CreateDialog (instance, MAKEINTRESOURCE(213), NULL, AboutProc); ShowWindow (aboutboxaboutbox); SetWindowPos (aboutbox/* accelerators used: vxa */ABOUT, "&About Node-path: putty/pageant.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 210aa3fa534f03fe951eeb59327e0354 Text-content-length: 2442 Text-content-md5: 0ab61f2ff3f95ed64edd01bb59ab9596 Content-length: 2481 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN嘒>抴嘒抴 /* Accelerators used: cl */ 213 DIALOG DISCARDABLE 140, 40, 136, 70 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "About Pageant" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "&Close", IDOK, 82, 52, 48, 14 PUSHBUTTON "View &Licence", 101, 6, 52, 70, 14 CTEXT "Pageant", 102, 10, 6, 120, 8 CTEXT "", 100, 10, 16, 120, 16 CTEXT "\251 1997-2000 Simon Tatham. All rights reserved.", 103, 10, 34, 120, 16 END /* No accelerators used */ 214 DIALOG DISCARDABLE 50, 50, 226, 223 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Pageant Licence" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK", IDOK, 98, 203, 44, 14 LTEXT "Copyright \251 1997-2000 Simon Tatham", 1000, 10, 10, 206, 8 LTEXT "Permission is hereby granted, free of charge, to any person", 1002, 10, 26, 206, 8 LTEXT "obtaining a copy of this software and associated documentation", 1003, 10, 34, 206, 8 LTEXT "files (the ""Software""), to deal in the Software without restriction,", 1004, 10, 42, 206, 8 LTEXT "including without limitation the rights to use, copy, modify, merge,", 1005, 10, 50, 206, 8 LTEXT "publish, distribute, sublicense, and/or sell copies of the Software,", 1006, 10, 58, 206, 8 LTEXT "and to permit persons to whom the Software is furnished to do so,", 1007, 10, 66, 206, 8 LTEXT "subject to the following conditions:", 1008, 10, 74, 206, 8 LTEXT "The above copyright notice and this permission notice shall be", 1010, 10, 90, 206, 8 LTEXT "included in all copies or substantial portions of the Software.", 1011, 10, 98, 206, 8 LTEXT "THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT", 1013, 10, 114, 206, 8 LTEXT "WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,", 1014, 10, 122, 206, 8 LTEXT "INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF", 1015, 10, 130, 206, 8 LTEXT "MERCHANTABILITY, FITNESS FOR A PARTICULAR", 1016, 10, 138, 206, 8 LTEXT "PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL", 1017, 10, 146, 206, 8 LTEXT "SIMON TATHAM BE LIABLE FOR ANY CLAIM, DAMAGES OR", 1018, 10, 154, 206, 8 LTEXT "OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,", 1019, 10, 162, 206, 8 LTEXT "TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN", 1020, 10, 170, 206, 8 LTEXT "CONNECTION WITH THE SOFTWARE OR THE USE OR", 1021, 10, 178, 206, 8 LTEXT "OTHER DEALINGS IN THE SOFTWARE.", 1022, 10, 186, 206, 8 END Revision-number: 649 Prop-content-length: 166 Content-length: 166 K 7 svn:log V 66 Minor restructuring to ssh.c in preparation for portability drive K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T08:43:47.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 35925d7b6a7a00bb6283c2d824c1cf54 Text-content-length: 4005 Text-content-md5: df2182256f7afa541dd41d2ed7c71e2e Content-length: 4045 K 15 cvs2svn:cvs-rev V 4 1.54 PROPS-END SVN厯k厴}3漜6+俉乗!m縸並僠芖;僙8"I7亃蝔&豅(僴蕏哱衊倅踨卐J魗剈傔.8乢兪]兲: 兺Lgu兿3哘冃2 <冏J.P冡~J円8冔 0冾e 仯凁\const struct ssh_cipher ssh_3des; extern const struct ssh_cipher ssh_3des_ssh2; extern const struct ssh_cipher ssh_des; extern const struct ssh_cipher ssh_blowfish_ssh1; extern const/ const static struct ssh_cipher *ciphers[] = { &ssh_blowfish_ssh2, &ssh_3des_ssh2 }; extern const struct ssh_kex ssh_diffiehellman; const static struct ssh_kex *kex_algs[] = { &ssh_diffiehellman }; extern const struct ssh_hostkey ssh_dss; const static struct ssh_hostkey *hostkey_algs[] = { &ssh_dss }; extern const struct ssh_mac ssh_sha1const static const static struct ssh_mac *macs[] = { &ssh_sha1, &ssh_mac_none }; const static struct ssh_compress ssh_comp_none = { "none" }; const static struct ssh_compress *compressions[] = { &ssh_comp_none }SHA_State exhash; static SOCKET s = INVALID_SOCKET; static unsigned char session_key[32]; static const struct ssh_cipher *cipher = NULL; static const struct ssh_cipher *cscipher = NULL; static const struct ssh_cipher *sccipher = NULL; static const struct ssh_mac *csmac = NULL; static const struct ssh_mac *scmac = NULL; static const struct ssh_compress *cscomp = NULL; static const struct ssh_compress *sccomp = NULL; static const struct ssh_kex *kex = NULL; static conststatic struct rdpkt1_state_tag { long len, pad, biglen, to_read; unsigned long realcrc, gotcrc; unsigned char *p; int i; int chunk; } rdpkt1_state; ruct rdpkt1_state_tag *st = &rdpkt1_state; crBegin; next_packet: pktin.type = 0; pktin.length = 0; for (st->i = st->len = 0; st->i < 4; st->i++) { while ((*datalen) == 0) crReturn(4-st->i); st->len = (st->len << 8) + **data; (*data)++, (*datalen)--; } #ifdef FWHACK if (st->len == 0x52656d6f) { /* "Remo"te server has closed ... */ st->len = 0x300; /* big enough to carry to end */ } #endif st->pad = 8 - (st->len % 8); st->biglen = st->len + st->pad; pktin.length = st->len - 5; if (pktin.maxlen < st->biglen) { pktin.maxlen = st->biglen; pktin.data = (pktin.data == NULL ? malloc(st->biglen+APIEXTRA) : realloc(pktin.data, st->biglenst->to_read = st->biglen; st->p = pktin.data; while (st->to_read > 0) { st->chunk = st->to_read; while ((*datalen) == 0) crReturn(st->to_read); if (st->chunk > (*datalen)) st->chunk = (*datalen); memcpy(st->p, *data, st->chunk); *data += st->chunk; *datalen -= st->chunk; st->p += st->chunk; st->to_read -= st->chunk; } if (cipher) cipher->decrypt(pktin.data, st->biglen); pktin.type = pktin.data[st->pad]; pktin.body = pktin.data + st->pad + 1; st->realcrc = crc32(pktin.data, st->biglen-4); st->gotcrc = GET_32BIT(pktin.data+st->biglen-4); if (st->gotcrc != st->const struct ssh_cipher *cscipher_tobe = NULL; static const struct ssh_cipher *sccipher_tobe = NULL; static const struct ssh_mac *csmac_tobe = NULL; static const struct ssh_mac *scmac_tobe = NULL; static const struct ssh_compress *cscomp_tobe = NULL; static const static const struct ssh_cipher *preferred_cipherpreferred_cipherpreferred_cipher = &ssh_3des_ssh2; } else if (cfg.cipher == CIPHER_3DES) { preferred_cipherpreferred_cipher-1; i < lenof(ciphers); i++) { const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i]; ssh2_pkt_addstring_str(c-1; i < lenof(ciphers); i++) { const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i]; ssh2_pkt_addstring_str(c->name); if (i < lenof(cipherMAC-1; i < lenof(ciphers); i++) { const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i]; if (in_commasep_string(c-1; i < lenof(ciphers); i++) { const struct ssh_cipher *c = i<0 ? preferred_cipher : ciphers[i]; if (in_commasep_string(c Revision-number: 650 Prop-content-length: 160 Content-length: 160 K 7 svn:log V 60 Add -pw and -P options, and usage/version message, to plink K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T08:56:30.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4eb0ae3619d01040da076906b26cce49 Text-content-length: 938 Text-content-md5: c75943fabf8362adaa90d02b5fbb5592 Content-length: 977 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN諹1唌8哸6 孴0巇僛乤(榥檟W烿static char *password = NULL;/* * Short description of parameters. */ static void usage(void) { printf("PuTTY Link: command-line connection utility\n"); printf("%s\n", ver); printf("Usage: plink [options] [user@]host [command]\n"); printf("Options:\n"); printf(" -v show verbose messages\n"); printf(" -ssh force use of ssh protocol\n"); printf(" -P port connect to specified port\n"); printf(" -pw passw login with specified password\n"); exit(1) int portnumber = -1 } else if (!strcmp(p, "-pw") && argc > 1) { --argc, password = *++argv; printf("pw is %s\n", password); } else if (!strcmp(p, "-P") && argc > 1) { --argc, portnumber = atoi(*++argv); host) { usage(); } if (portnumber != -1) cfg.port = portnumber; Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: df2182256f7afa541dd41d2ed7c71e2e Text-content-length: 74 Text-content-md5: 98eb6a0e1097978ee84ec9b5e6eadf2d Content-length: 114 K 15 cvs2svn:cvs-rev V 4 1.55 PROPS-END SVN厴}厴g#傔3傽劎>伱-傘$劍Yssh_get_password) {ssh_get_password Revision-number: 651 Prop-content-length: 131 Content-length: 131 K 7 svn:log V 31 Try to improve the caret usage K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T10:32:07.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3812873609b71a25a6d504c5cef5c3f8 Text-content-length: 645 Text-content-md5: 5b66d22b6abbb327b008f66916310eb7 Content-length: 685 K 15 cvs2svn:cvs-rev V 4 1.63 PROPS-END SVN凔lp6凙6 $0t逤"秓佒r俇倣_;倫1佺c倲 HBITMAP caretbmSet up a caret bitmap, with no content. */ { char *bits; int size = (font_width+15)/16 * 2 * font_height; bits = calloc(size, 1); memset(bits, 0x55, size); caretbm = CreateBitmap(font_width, font_height, 1, 1, bits); free(bits); } HideCaret(hwnd); if (inbuf_head) term_out(); term_update(); ShowCaret(hwnd HideCaret(hwnd); term_update(); ShowCaret(hwnd HideCaret(hwnd) ShowCaret(hwndcaretbm, 0, 0); ShowCaret(hwnd Revision-number: 652 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Oops - remove ugly debugging test pattern in cursor K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T12:04:27.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 5b66d22b6abbb327b008f66916310eb7 Text-content-length: 23 Text-content-md5: 35c154c8b95a89e9d4eecedaa76d399d Content-length: 63 K 15 cvs2svn:cvs-rev V 4 1.64 PROPS-END SVNpN 儶I' Revision-number: 653 Prop-content-length: 171 Content-length: 171 K 7 svn:log V 71 Make sure a locally entered login name still comes up in the pw prompt K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T12:04:42.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 98eb6a0e1097978ee84ec9b5e6eadf2d Text-content-length: 73 Text-content-md5: e1943f7cce9c3f3a126c1a2997652e05 Content-length: 113 K 15 cvs2svn:cvs-rev V 4 1.56 PROPS-END SVN厴g厴b侙%歎侙#莣倱佁傐馮劎 static char username[100] Revision-number: 654 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:14.676093Z PROPS-END Revision-number: 655 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:14.683541Z PROPS-END Revision-number: 656 Prop-content-length: 150 Content-length: 150 K 7 svn:log V 50 Fix ssh2 after the rev 1.54 [r649] reorg broke it K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T15:53:59.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e1943f7cce9c3f3a126c1a2997652e05 Text-content-length: 681 Text-content-md5: 90f47e4e71451de633088436e631486c Content-length: 721 K 15 cvs2svn:cvs-rev V 4 1.57 PROPS-END SVN厴b厴\8刢冓4冔34(冚xjD凊?_凔vU凊?O凔v仭v凍l0; i < lenof(ciphers)+1; i++) { const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1]; ssh2_pkt_addstring_str(c->name); if (i < lenof(ciphers)0; i < lenof(ciphers)+1; i++) { const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1]; ssh2_pkt_addstring_str(c->name); if (i < lenof(ciphers)0; i < lenof(ciphers)+1; i++) { const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1cscipher_tobe = cipher */ for (i = 0; i < lenof(ciphers)+1; i++) { const struct ssh_cipher *c = i==0 ? preferred_cipher : ciphers[i-1 Revision-number: 657 Prop-content-length: 122 Content-length: 122 K 7 svn:log V 22 Further restructuring K 10 svn:author V 5 simon K 8 svn:date V 27 2000-09-29T15:56:33.000000Z PROPS-END Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 90f47e4e71451de633088436e631486c Text-content-length: 1858 Text-content-md5: c93f74b1d731e90798d510fefba54580 Content-length: 1898 K 15 cvs2svn:cvs-rev V 4 1.58 PROPS-END SVN厴\厸8N峟襮.襛僂T亐>~鱣乥鵌~C"亗K亃t亝x酨亞x儼佽Bstruct rdpkt2_state_tag { long len, pad, payload, packetlen, maclen; int i; int cipherblk; unsigned long incoming_sequence; } rdpkt2ruct rdpkt2_state_tag *st = &rdpkt2_state; crBegin; next_packet: pktin.type = 0; pktin.length = 0; if (sccipher) st->cipherblk = sccipher->blksize; else st->cipherblk = 8; if (st->cipherblk < 8) st->cipherblk = 8; if (pktin.maxlen < st->cipherblk) { pktin.maxlen = st->cipherblk; pktin.data = (pktin.data == NULL ? malloc(st->cipherblk+APIEXTRA) : realloc(pktin.data, st->cipherblkst->i = st->len = 0; st->i < st->cipherblk; st->i++) { while ((*datalen) == 0) crReturn(st->cipherblk-st->i); pktin.data[st->st->cipherblk); /* * Now get the length and padding figures. */ st->len = GET_32BIT(pktin.data); st->pad = pktin.data[4]; /* * This enables us to deduce the payload length. */ st->payload = st->len - st->pad - 1; pktin.length = st->payload + 5; /* * So now we can work out the total packet length. */ st->packetlen = st->len + 4; st->st->packetlen+st->maclen) { pktin.maxlen = st->packetlen+st->st->i = st->cipherblk; st->i < st->packetlen + st->maclen; st->i++) { while ((*datalen) == 0) crReturn(st->packetlen + st->maclen - st->i); pktin.data[st->st->cipherblk, st->packetlen - st->cipherblk); #if 0 debug(("Got packet len=%d pad=%d\r\n", st->len, st->pad)); for (st->i = 0; st->i < st->packetlen; st->i++) debug((" %02x", (unsigned char)pktin.data[st->st->len+4, st->incoming_sequence)) { bombout(("Incorrect MAC received on packet")); crReturn(0); } st->rdpkt2_state.incoming_sequence = 0; Revision-number: 658 Prop-content-length: 142 Content-length: 142 K 7 svn:log V 42 Shiny new test harness for the 2-3-4 tree K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T11:46:10.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f92ec543f47cf71f3c390912df726712 Text-content-length: 8940 Text-content-md5: 2800715f01a664f214d91cd83cc62689 Content-length: 8979 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN仌 佀r 臦 臘 ki=%d\n", ki/* * Test code for the 2-3-4 tree. This code maintains an alternative * representation of the data in the tree, in an array (using the * obvious and slow insert and delete functions). After each tree * operation, the tree_valid() function is called, which ensures * all the tree properties are preserved (node->child->parent * always equals node; number of kids == number of elements + 1; * all tree nodes are distinct; ordering property between elements * of a node and elements of its children is preserved) and also * ensures the list represented by the tree is the same list it * should be. (This last check also verifies the ordering * properties, because the `same list it should be' is by * definition correctly ordered.) */ #include /* * Error reporting function. */ void error(char *fmt, ...) { va_list ap; printf("ERROR: "); va_start(ap, fmt); vfprintf(stdout, fmt, ap); va_end(ap); printf("\n"); } /* The array representation of the data. */ void **array; int arraylen, arraysize; cmpfn234 cmp; /* The tree representation of the same data. */ tree234 *tree; typedef struct { int treedepth; int elemcount; } chkctx; void chknode(chkctx *ctx, int level, node234 *node, void *lowbound, void *highbound) { int nkids, nelems; int i; /* Count the non-NULL kids. */ for (nkids = 0; nkids < 4 && node->kids[nkids]; nkids++); /* Ensure no kids beyond the first NULL are non-NULL. */ for (i = nkids; i < 4; i++) if (node->kids[i]) { error("node %p: nkids=%d but kids[%d] non-NULL", node, nkids, i); } /* Count the non-NULL elements. */ for (nelems = 0; nelems < 3 && node->elems[nelems]; nelems++); /* Ensure no elements beyond the first NULL are non-NULL. */ for (i = nelems; i < 3; i++) if (node->elems[i]) { error("node %p: nelems=%d but elems[%d] non-NULL", node, nelems, i); } if (nkids == 0) { /* * If nkids==0, this is a leaf node; verify that the tree * depth is the same everywhere. */ if (ctx->treedepth < 0) ctx->treedepth = level; /* we didn't know the depth yet */ else if (ctx->treedepth != level) error("node %p: leaf at depth %d, previously seen depth %d", node, level, ctx->treedepth); } else { /* * If nkids != 0, then it should be nelems+1, unless nelems * is 0 in which case nkids should also be 0 (and so we * shouldn't be in this condition at all). */ int shouldkids = (nelems ? nelems+1 : 0); if (nkids != shouldkids) { error("node %p: %d elems should mean %d kids but has %d", node, nelems, shouldkids, nkids); } } /* * nelems should be at least 1. */ if (nelems == 0) { error("node %p: no elems", node, nkids); } /* * Add nelems to the running element count of the whole tree * (to ensure the enum234 routines see them all). */ ctx->elemcount += nelems; /* * Check ordering property: all elements should be strictly > * lowbound, strictly < highbound, and strictly < each other in * sequence. (lowbound and highbound are NULL at edges of tree * - both NULL at root node - and NULL is considered to be < * everything and > everything. IYSWIM.) */ for (i = -1; i < nelems; i++) { void *lower = (i == -1 ? lowbound : node->elems[i]); void *higher = (i+1 == nelems ? highbound : node->elems[i+1]); if (lower && higher && cmp(lower, higher) >= 0) { error("node %p: kid comparison [%d=%s,%d=%s] failed", node, i, lower, i+1, higher); } } /* * Check parent pointers: all non-NULL kids should have a * parent pointer coming back to this node. */ for (i = 0; i < nkids; i++) if (node->kids[i]->parent != node) { error("node %p kid %d: parent ptr is %p not %p", node, i, node->kids[i]->parent, node); } /* * Now (finally!) recurse into subtrees. */ for (i = 0; i < nkids; i++) { void *lower = (i == 0 ? lowbound : node->elems[i-1]); void *higher = (i >= nelems ? highbound : node->elems[i]); chknode(ctx, level+1, node->kids[i], lower, higher); } } void verify(void) { chkctx ctx; enum234 e; int i; void *p; ctx.treedepth = -1; /* depth unknown yet */ ctx.elemcount = 0; /* no elements seen yet */ /* * Verify validity of tree properties. */ if (tree->root) chknode(&ctx, 0, tree->root, NULL, NULL); printf("tree depth: %d\n", ctx.treedepth); /* * Enumerate the tree and ensure it matches up to the array. */ for (i = 0, p = first234(tree, &e); p; i++, p = next234(&e)) { if (i >= arraylen) error("tree contains more than %d elements", arraylen); if (array[i] != p) error("enum at position %d: array says %s, tree says %s", i, array[i], p); } if (i != ctx.elemcount) { error("tree really contains %d elements, enum gave %d", i, ctx.elemcount); } if (i < arraylen) { error("enum gave only %d elements, array has %d", i, arraylen); } } void addtest(void *elem) { int i, j; void *retval, *realret; if (arraysize < arraylen+1) { arraysize = arraylen+1+256; array = (array == NULL ? malloc(arraysize*sizeof(*array)) : realloc(array, arraysize*sizeof(*array))); } i = 0; while (i < arraylen && cmp(elem, array[i]) > 0) i++; /* now i points to the first element >= elem */ if (i < arraylen && !cmp(elem, array[i])) retval = array[i]; /* expect that returned not elem */ else { retval = elem; /* expect elem returned (success) */ for (j = arraylen; j > i; j--) array[j] = array[j-1]; array[i] = elem; /* add elem to array */ arraylen++; } realret = add234(tree, elem); if (realret != retval) { error("add: retval was %p expected %p", realret, retval); } verify(); } void deltest(void *elem) { int i; i = 0; while (i < arraylen && cmp(elem, array[i]) > 0) i++; /* now i points to the first element >= elem */ if (i >= arraylen || cmp(elem, array[i]) != 0) return; /* don't do it! */ else { while (i < arraylen-1) { array[i] = array[i+1]; i++; } arraylen--; /* delete elem from array */ } del234(tree, elem); verify(); } /* A sample data set and test utility. Designed for pseudo-randomness, * and yet repeatability. */ /* * This random number generator uses the `portable implementation' * given in ANSI C99 draft N869. It assumes `unsigned' is 32 bits; * change it if not. */ int randomnumber(unsigned *seed) { *seed *= 1103515245; *seed += 12345; return ((*seed) / 65536) % 32768; } int mycmp(void *av, void *bv) { char const *a = (char const *)av; char const *b = (char const *)bv; return strcmp(a, b); } #define lenof(x) ( sizeof((x)) / sizeof(*(x)) ) char *strings[] = { "a", "ab", "absque", "coram", "de", "palam", "clam", "cum", "ex", "e", "sine", "tenus", "pro", "prae", "banana", "carrot", "cabbage", "broccoli", "onion", "zebra", "penguin", "blancmange", "pangolin", "whale", "hedgehog", "giraffe", "peanut", "bungee", "foo", "bar", "baz", "quux", "murfl", "spoo", "breen", "flarn", "octothorpe", "snail", "tiger", "elephant", "octopus", "warthog", "armadillo", "aardvark", "wyvern", "dragon", "elf", "dwarf", "orc", "goblin", "pixie", "basilisk", "warg", "ape", "lizard", "newt", "shopkeeper", "wand", "ring", "amulet" }; #define NSTR lenof(strings) int main(void) { int in[NSTR]; int i, j; unsigned seed = 0; for (i = 0; i < NSTR; i++) in[i] = 0; array = NULL; arraylen = arraysize = 0; tree = newtree234(mycmp); cmp = mycmp; verify(); for (i = 0; i < 10000; i++) { j = randomnumber(&seed); j %= NSTR; printf("trial: %d\n", i); if (in[j]) { printf("deleting %s (%d)\n", strings[j], j); deltest(strings[j]); in[j] = 0; } else { printf("adding %s (%d)\n", strings[j], j); addtest(strings[j]); in[j] = 1; } } while (arraylen > 0) { j = randomnumber(&seed); j %= arraylen; deltest(array[j]); } return 0; } #endif Revision-number: 659 Prop-content-length: 134 Content-length: 134 K 7 svn:log V 34 Add trailing newline in tree234.h K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T11:47:30.000000Z PROPS-END Node-path: putty/tree234.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4a01108a8e9d9717e10c123aa9a38ad6 Text-content-length: 17 Text-content-md5: c6ab5d3c351b0fedc6d83391c58209ee Content-length: 56 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN岹岺岹 Revision-number: 660 Prop-content-length: 367 Content-length: 367 K 7 svn:log V 266 Deletion case 2c can shift the root; case 3b is not the only case that can do that. The bad case happens when you have a root node containing only one actual element, and its two child nodes have only one element each, and you try to delete the element in the root. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T11:47:30.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 2800715f01a664f214d91cd83cc62689 Text-content-length: 406 Text-content-md5: d03e2423473f53d5b9b445ef582cd01c Content-length: 445 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN佀r佄o 倈倈蚢 /* * It's possible, in this case, that we've just removed * the only element in the root of the tree. If so, * shift the root. */ if (n->elems[0] == NULL) { LOG((" shifting root!\n")); t->root = a; a->parent = NULL; sfree(n); } Revision-number: 661 Prop-content-length: 150 Content-length: 150 K 7 svn:log V 50 Add ability to configure the initial window title K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T12:24:58.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9fc6eb990092ea459405713142c89007 Text-content-length: 82 Text-content-md5: 719c9ef826064154f6737db54c788c2b Content-length: 122 K 15 cvs2svn:cvs-rev V 4 1.49 PROPS-END SVN蚎 ="﹔char wintitle[256]; /* initial window title */ Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 6a34c6dbd5854eee64a786eeb92b445d Text-content-length: 284 Text-content-md5: dbc321490bfc98f046339d797323824a Content-length: 324 K 15 cvs2svn:cvs-rev V 4 1.20 PROPS-END SVN焛燗亂乀 丄#巋乷岹"W 11EEP 1021 #define IDC2_BCE 1024 #define IDC2_BLINKTEXT 1025 #define IDCW_WINNAME 1001 #define IDCW_BLINKCUR 1002 #define IDCW_SCROLLBAR 1003 #define IDCW_LOCKSIZE 1004 #define IDCW_WINTITLE 1005 #define IDCW_WINEDIT 1006 Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 676fa655ddf176f714bb33dc0871701f Text-content-length: 607 Text-content-md5: 7188bd1057177426813ce90b97229dd4 Content-length: 646 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN餵骙$/4歰║Y両6歰,瞈dghlmnprsw */ IDD_PANEL2Implicit CR in every &LF", IDC2_LFHASCR, SCOL AUTOCHECKBOX "Bee&p enabled", IDC1_BEEPikty */ IDD_PANELW BEGIN GRID(4,4,24) LTEXT "Initial window &title:", IDCW_WINTITLE, COL(1), SS(3,2) EDITTEXT IDCW_WINEDIT, ADJ(8) COL(1), SS(3,3), ES_AUTOHSCROLL NEXT(2) GRID(1,8,10) AUTOCHECKBOX "Avoid ever using &icon title", IDCW_WINNAME, SCOL AUTOCHECKBOX "&Blinking cursor", IDCW_BLINKCUR, SCOL AUTOCHECKBOX "Displa&y scrollbar", IDCW_SCROLLBAR, SCOL AUTOCHECKBOX "Loc&k Window size", IDCW_LOCKSIZE, SCOL Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 69e126472a0759f185c70ce92e70a9b3 Text-content-length: 949 Text-content-md5: 64ea7b973db3a45867470a941cd05e19 Content-length: 989 K 15 cvs2svn:cvs-rev V 4 1.39 PROPS-END SVN鞿;,唥 >'0侶>&踃a廇dghlmnprsw */ IDD_PANEL2Implicit CR in every &LF", IDC2_LFHASCR, 3, 82, 162, 8 AUTOCHECKBOX "Bee&p enabled", IDC1_BEEP, 3, 92, 162, 8 AUTOCHECKBOX "Use Back&ground colour erase", IDC2_BCE, 3, 102, 162, 8 AUTOCHECKBOX "Enable bli&nking text", IDC2_BLINKTEXT, 3, 112, 162, 8 END /* Accelerators used: [aco] bikty */ IDD_PANELWInitial window &title:", IDCW_WINTITLE, 3, 3, 119, 8 EDITTEXT IDCW_WINEDIT, 3, 11, 119, 12, ES_AUTOHSCROLL AUTOCHECKBOX "Avoid ever using &icon title", IDCW_WINNAME, 3, 29, 162, 8 AUTOCHECKBOX "&Blinking cursor", IDCW_BLINKCUR, 3, 39, 162, 8 AUTOCHECKBOX "Displa&y scrollbar", IDCW_SCROLLBAR, 3, 49, 162, 8 AUTOCHECKBOX "Loc&k Window size", IDCW_LOCKSIZE, 3, 59, 162, 8 */ IDD_LOGBOX DIALOG DISCARDABLE 100, 20, 158, 102, 44, 14 LISTBOX IDN_LIST, 3, 3, 154, 95, LBS_HASSTRINGS | LBS_USETABSTOPS | WS_VSCROL Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 72fcc01c784c419c56a13a2800153ebc Text-content-length: 1526 Text-content-md5: 531fee7b99bc5f7b35257722195864d2 Content-length: 1566 K 15 cvs2svn:cvs-rev V 4 1.45 PROPS-END SVN儖j儜w奷.檁俖3)綬侤伝俬伩2P?4伳!Z佋6僆佒vH倶>BH偄;P?*S佋6乭n倠b"佢?乸偭\亀偯,{偱偲Q9 #define MAIN_NPANELS 9 #define RECONF_NPANELS 6s (sesskey, "WinTitle", cfg.wintitles (sesskey, "WinTitle", "", cfg.wintitle, sizeof(cfg.wintitle) CheckDlgButton (hwnd, IDC1_BEEP, cfg.beepDECOMEEPbeep = IsDlgButtonChecked (hwnd, IDC1_BEEPWindowW_WINEDIT, cfg.wintitle); CheckDlgButton (hwnd, IDCW_WINNAME, cfg.win_name_always); CheckDlgButton (hwnd, IDCW_BLINKCUR, cfg.blink_cur); CheckDlgButton (hwnd, IDCW_SCROLLBAR, cfg.scrollbar); CheckDlgButton (hwnd, IDCW_LOCKSIZE, cfg.locksizeW_WINNAME cfg.win_name_always = IsDlgButtonChecked (hwnd, IDCW_WINNAME); break; case IDCW_BLINKCUR: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.blink_cur = IsDlgButtonChecked (hwnd, IDCW_BLINKCUR); break; case IDCW_SCROLLBAR: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) cfg.scrollbar = IsDlgButtonChecked (hwnd, IDCW_SCROLLBAR); break; case IDCW_LOCKSIZE cfg.locksize = IsDlgButtonChecked (hwnd, IDCW_LOCKSIZE); break; case IDCW_WINEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDCW_WINEDIT, cfg.wintitle, sizeof(cfg.wintitle)-1); WindowWWindow, 8}; static int reconfp[RECONF_NPANELS] = { 1, 2, 3, 6, 7, 8 Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 35c154c8b95a89e9d4eecedaa76d399d Text-content-length: 242 Text-content-md5: d853a73d80ce7b274e8a2bdfefcc8f85 Content-length: 282 K 15 cvs2svn:cvs-rev V 4 1.65 PROPS-END SVNN剙X丵6 6両儰D , *title if (*cfg.wintitle) { title = cfg.wintitle; } else { sprintf(msg, "%s - PuTTY", realhost); title = msg; } set_title (title); set_icon (title Revision-number: 662 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 49 Local remove of first key in list wasn't working K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T12:38:12.000000Z PROPS-END Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a844d519bd55bb7758990ea25040b2d7 Text-content-length: 22 Text-content-md5: e39f2af7741db0cfffd1d52b2f49d69f Content-length: 62 K 15 cvs2svn:cvs-rev V 4 1.15 PROPS-END SVN伿>伿4 鰁覱鰋 Revision-number: 663 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Make the new test suite's comment more accurate :-) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T13:57:41.000000Z PROPS-END Node-path: putty/tree234.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d03e2423473f53d5b9b445ef582cd01c Text-content-length: 698 Text-content-md5: 54acc4926d43491c0bc6ac26f40c04f5 Content-length: 737 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN佄o佇亱縝亸 verify() function is called, which ensures all * the tree properties are preserved (node->child->parent always * equals node; number of kids == 0 or number of elements + 1; * ordering property between elements of a node and elements of its * children is preserved; tree has the same depth everywhere; every * node has at least one element) and also ensures the list * represented by the tree is the same list it should be. (This * last check also verifies the ordering properties, because the * `same list it should be' is by definition correctly ordered. It * also ensures all nodes are distinct, because the enum functions * would get caught in a loop if not Revision-number: 664 Prop-content-length: 152 Content-length: 152 K 7 svn:log V 52 Ability to specify a remote command in PuTTY proper K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-02T15:22:41.000000Z PROPS-END Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: dbc321490bfc98f046339d797323824a Text-content-length: 78 Text-content-md5: 83560511b7b01a6d1f3dc3735427f50b Content-length: 118 K 15 cvs2svn:cvs-rev V 4 1.21 PROPS-END SVN燗爗 9檌哬檋#define IDC3_CMDSTATIC 1031 #define IDC3_CMDEDIT 1032 Node-path: putty/win_res.inp Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 7188bd1057177426813ce90b97229dd4 Text-content-length: 120 Text-content-md5: 3c2f163011518db403c85996581d42a8 Content-length: 159 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN骙鬴\**[↘rNEXT(2) LTEXT "&Remote command:", IDC3_CMDSTATIC, COL(1), SS(3,2) EDITTEXT IDC3_CMD Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 64ea7b973db3a45867470a941cd05e19 Text-content-length: 310 Text-content-md5: 45b37acc3ce19e25eaf44b2cc6f8fad2 Content-length: 350 K 15 cvs2svn:cvs-rev V 4 1.40 PROPS-END SVN;;綾j?縘葂rtu */ IDD_PANEL3LTEXT "&Remote command:", IDC3_CMDSTATIC, 3, 111, 119, 8 EDITTEXT IDC3_CMDEDIT, 3, 119, 119, 12, ES_AUTOHSCROLL PUSHBUTTON "C&hange...", IDC3_PKBUTTON, 129, 119, 35, 12 AUTOCHECKBOX "Allow &agent forwarding", IDC3_AGENTFWD, 3, 135 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 531fee7b99bc5f7b35257722195864d2 Text-content-length: 376 Text-content-md5: 2a172d475536eb0d262e05a099e4111a Content-length: 416 K 15 cvs2svn:cvs-rev V 4 1.46 PROPS-END SVN儜w償e73P伵 稶D䙡佷y佺1Q?個1~亣N倞)s (sesskey, "RemoteCommand", cfg.remote_cmds (sesskey, "RemoteCommand", "", cfg.remote_cmd, sizeof(cfg.remote_cmdSetDlgItemText (hwnd, IDC3_CMDEDIT, cfg.remote_cmd); NOPTCMDEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC3_CMDEDIT, cfg.remote_cmd, sizeof(cfg.remote_cmd Revision-number: 665 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Work around DSA formatting bug in commercial-SSH 2.0.13 K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-03T09:05:56.000000Z PROPS-END Node-path: putty/sshdss.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 27f44beea7934022c262a95030632f9d Text-content-length: 822 Text-content-md5: 5aa5e5915bd7875d9d91057aeb95924d Content-length: 861 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN癳O"/* * Commercial SSH (2.0.13) and OpenSSH disagree over the format * of a DSA signature. OpenSSH is in line with the IETF drafts: * it uses a string "ssh-dss", followed by a 40-byte string * containing two 160-bit integers end-to-end. Commercial SSH * can't be bothered with the header bit, and considers a DSA * signature blob to be _just_ the 40-byte string containing * the two 160-bit integers. We tell them apart by measuring * the length: length 40 means the commercial-SSH bug, anything * else is assumed to be IETF-compliant. */ if (siglen != 40) { /* bug not present; read admin fields */ getstring(&sig, &siglen, &p, &slen); if (!p || memcmp(p, "ssh-dss", 7)) { return 0; } } Revision-number: 666 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:15.233861Z PROPS-END Revision-number: 667 Prop-content-length: 132 Content-length: 132 K 7 svn:log V 32 Fix a typo; thanks to Al Sutton K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-04T10:02:25.000000Z PROPS-END Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 9c59e08c3bdd5ac69154a410c6523db9 Text-content-length: 23 Text-content-md5: 84698901d70a075e81ee3e3aed1498fd Content-length: 63 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN佖佖 昩伮5昦 Revision-number: 668 Prop-content-length: 234 Content-length: 234 K 7 svn:log V 133 Plink now honours the Default Settings protocol and supports -l for username. Also removed a diagnostic which had got in by mistake. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-04T14:13:17.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: c75943fabf8362adaa90d02b5fbb5592 Text-content-length: 362 Text-content-md5: 48f389e6e77adcc8cca0887ea6c3af37 Content-length: 401 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN辝侹9R僄亂o_defaults(NULL); default_protocol = cfg.protocol; default_port = cfg.port} else if (!strcmp(p, "-l") && argc > 1) { char *username; --argc, username = *++argv; strncpy(cfg.username, username, sizeof(cfg.username)); cfg.username[sizeof(cfg.username)-1] = '\0' Revision-number: 669 Prop-content-length: 143 Content-length: 143 K 7 svn:log V 43 Store default port number in each back end K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-04T14:35:15.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 719c9ef826064154f6737db54c788c2b Text-content-length: 41 Text-content-md5: e5458a6f7e0aa1080eaf2039d3c6c498 Content-length: 81 K 15 cvs2svn:cvs-rev V 4 1.50 PROPS-END SVN蚎蚲 ? int default_port Node-path: putty/raw.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 94ef4dca366198129d98b608db87f65e Text-content-length: 26 Text-content-md5: 9837a5ae7856fa6a008bff6ed09dac0e Content-length: 66 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN瑼璈==, 1 Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c93f74b1d731e90798d510fefba54580 Text-content-length: 31 Text-content-md5: 8c9a3bf633ab7ebe129db0b2c6683e53 Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.59 PROPS-END SVN厸8厸@ 厸4, 22 }; Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 61798a53184385608fa668f74c6d4f7e Text-content-length: 31 Text-content-md5: 74a62bb0fd16dcb921fdbba487dad210 Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.18 PROPS-END SVN仸;仸C 仸7, 23 }; Revision-number: 670 Prop-content-length: 156 Content-length: 156 K 7 svn:log V 56 Enable protocol prefix on [user@]host argument in Plink K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-04T14:35:31.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 48f389e6e77adcc8cca0887ea6c3af37 Text-content-length: 1180 Text-content-md5: 3a220a86261faa83d8da318de01703b2 Content-length: 1219 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN辝鏼坵烰乑宭烪,癚 } else if (!strcmp(p, "-telnet")) { default_protocol = cfg.protocol = PROT_TELNET; default_port = cfg.port = 23; } else if (!strcmp(p, "-raw")) { default_protocol = cfg.protocol = PROT_RAWchar *r; /* * Before we process the [user@]host string, we * first check for the presence of a protocol * prefix (a protocol name followed by ","). */ r = strchr(p, ','); if (r) { int i, j; for (i = 0; backends[i].backend != NULL; i++) { j = strlen(backends[i].name); if (j == r-p && !memcmp(backends[i].name, p, j)) { default_protocol = cfg.protocol = backends[i].protocol; portnumber = backends[i].backend->default_port; p = r+1; break; } } } Revision-number: 671 Prop-content-length: 396 Content-length: 396 K 7 svn:log V 295 We now honour the PLINK_PROTOCOL environment variable if it's set. Also we are able to notice when a backend is instantly sendok(), rather than waiting until after the first successful socket read. (This was zogging raw connections. They're still slightly zogged but not as badly as they were.) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-05T12:15:22.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3a220a86261faa83d8da318de01703b2 Text-content-length: 1717 Text-content-md5: cb4d63e1e6b51a76a3dc3d49fc8a83c7 Content-length: 1757 K 15 cvs2svn:cvs-rev V 4 1.10 PROPS-END SVN鏼阾,寎`瞫㏒ 凢M&蘊僠譻乬{ /* * Override the default protocol if PLINK_PROTOCOL is set. */ char *p = getenv("PLINK_PROTOCOL"); int i; if (p) { for (i = 0; backends[i].backend != NULL; i++) { if (!strcmp(backends[i].name, p)) { default_port = cfg.port = backends[i].backend->default_port; break; } } } }Select port. */ if (portnumber != -1) cfg.port = portnumber; if (!sending && back->sendok()) { /* * Create a separate thread to read from stdin. This is * a total pain, but I can't find another way to do it: * * - an overlapped ReadFile or ReadFileEx just doesn't * happen; we get failure from ReadFileEx, and * ReadFile blocks despite being given an OVERLAPPED * structure. Perhaps we can't do overlapped reads * on consoles. WHY THE HELL NOT? * * - WaitForMultipleObjects(netevent, console) doesn't * work, because it signals the console when * _anything_ happens, including mouse motions and * other things that don't cause data to be readable * - so we're back to ReadFile blocking. */ idata.event = stdinevent; if (!CreateThread(NULL, 0, stdin_read_thread, &idata, 0, &threadid)) { fprintf(stderr, "Unable to create second thread\n"); exit(1); } sending = TRUE; } Revision-number: 672 Prop-content-length: 202 Content-length: 202 K 7 svn:log V 101 Remove /DWIN32S_COMPAT by detecting presence of GetSystemPowerStatus at runtime using GetProcAddress K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-05T16:48:37.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 34ae837abe041ccbb9c313afff2845d6 Text-content-length: 20 Text-content-md5: 4bb2f532848a0879947bd36d316ab2ea Content-length: 60 K 15 cvs2svn:cvs-rev V 4 1.34 PROPS-END SVN+稯 僅$ Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 6ab0ffd9ec9c5559366ad44720692a32 Text-content-length: 500 Text-content-md5: a9e58d772c5dc1db5e96c33acca2cc3a Content-length: 539 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN弔抈!僄;e귞5僫9刪 媖GetSystemPowerStatus function. */ typedef BOOL (WINAPI *gsps_t)(LPSYSTEM_POWER_STATUS); gsps_t gsps; HMODULE mod gsps = NULL; mod = GetModuleHandle("KERNEL32"); if (mod) { gsps = (gsps_t)GetProcAddress(mod, "GetSystemPowerStatus"); debug(("got gsps=%p\n", gsps)); } /* * Call GetSystemPowerStatus if present. */ if (gsps) { if (gsps(&pwrstat)) func(&pwrstat, sizeof(pwrstat)); } Revision-number: 673 Prop-content-length: 577 Content-length: 577 K 7 svn:log V 476 Revamp the auto-layout of PuTTY configuration box controls. They are now auto-laid-out at runtime instead of compile time. Byebye win_res.inp and mkres.c; byebye most of win_res.rc; hello a whole new load of control-creation functions in windlg.c. Also, now that we're creating the tab control at runtime, we can check to see if it succeeded and use an alternative if so. This _should_ enable the config box to work on Win32s, although at the time of checkin that's untested. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-05T17:19:04.000000Z PROPS-END Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 83560511b7b01a6d1f3dc3735427f50b Text-content-length: 125 Text-content-md5: d4c601eedb6d1053de2fd5af8a4b17d1 Content-length: 165 K 15 cvs2svn:cvs-rev V 4 1.22 PROPS-END SVN爗 g匼g卨TABSTATIC1 1002 #define IDC_TABSTATIC2 1003 #define IDC_TABLIST 1004 #define IDC_ABOUT 1005 Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 45b37acc3ce19e25eaf44b2cc6f8fad2 Text-content-length: 25 Text-content-md5: 83e89d81899c04853889754b4b0a05fe Content-length: 65 K 15 cvs2svn:cvs-rev V 4 1.41 PROPS-END SVN;漙/,奍6 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2a172d475536eb0d262e05a099e4111a Text-content-length: 30018 Text-content-md5: 13d1724d1584359f86b24d4e5e60aa39 Content-length: 30058 K 15 cvs2svn:cvs-rev V 4 1.47 PROPS-END SVN償e勻$侀髃亼Z骹k鬢乕;#〤鵆>梍仯Zl伝4橲伡媏佒哯 佲+l侙0坢淐侚/2倴刯梩偊k唓怮偪%傁N俷傂l嘦R傆no傇f倇乶傌+9'傓>/* ---------------------------------------------------------------------- * Routines to self-manage the controls in a dialog box. */ #define GAPBETWEEN 3 #define GAPWITHIN 1 #define DLGWIDTH 168 #define STATICHEIGHT 8 #define CHECKBOXHEIGHT 8 #define RADIOHEIGHT 8 #define EDITHEIGHT 12 #define COMBOHEIGHT 12 #define PUSHBTNHEIGHT 14 struct ctlpos { HWND hwnd; LONG units; WPARAM font; int ypos, width; }; /* Used on self-constructed dialogs. */ void ctlposinit(struct ctlpos *cp, HWND hwnd) { RECT r; cp->hwnd = hwnd; cp->units = GetWindowLong(hwnd, GWL_USERDATA); cp->font = GetWindowLong(hwnd, DWL_USER); cp->ypos = GAPBETWEEN; GetClientRect(hwnd, &r); cp->width = (r.right * 4) / (cp->units & 0xFFFF) - 2*GAPBETWEEN; } /* Used on kosher dialogs. */ void ctlposinit2(struct ctlpos *cp, HWND hwnd) { RECT r; cp->hwnd = hwnd; r.left = r.top = 0; r.right = 4; r.bottom = 8; MapDialogRect(hwnd, &r); cp->units = (r.bottom << 16) | r.right; cp->font = SendMessage(hwnd, WM_GETFONT, 0, 0); cp->ypos = GAPBETWEEN; GetClientRect(hwnd, &r); cp->width = (r.right * 4) / (cp->units & 0xFFFF) - 2*GAPBETWEEN; } void doctl(struct ctlpos *cp, RECT r, char *wclass, int wstyle, int exstyle, char *wtext, int wid) { HWND ctl; /* * Note nonstandard use of RECT. This is deliberate: by * transforming the width and height directly we arrange to * have all supposedly same-sized controls really same-sized. */ /* MapDialogRect, or its near equivalent. */ r.left = (r.left * (cp->units & 0xFFFF)) / 4; r.right = (r.right * (cp->units & 0xFFFF)) / 4; r.top = (r.top * ((cp->units>>16) & 0xFFFF)) / 8; r.bottom = (r.bottom * ((cp->units>>16) & 0xFFFF)) / 8; ctl = CreateWindowEx(exstyle, wclass, wtext, wstyle, r.left, r.top, r.right, r.bottom, cp->hwnd, (HMENU)wid, hinst, NULL); SendMessage(ctl, WM_SETFONT, cp->font, MAKELPARAM(TRUE, 0)); } /* * Some edit boxes. Each one has a static above it. The percentages * of the horizontal space are provided. */ void multiedit(struct ctlpos *cp, ...) { RECT r; va_list ap; int percent, xpos; percent = xpos = 0; va_start(ap, cp); while (1) { char *text; int staticid, editid, pcwidth; text = va_arg(ap, char *); if (!text) break; staticid = va_arg(ap, int); editid = va_arg(ap, int); pcwidth = va_arg(ap, int); r.left = xpos + GAPBETWEEN; percent += pcwidth; xpos = (cp->width + GAPBETWEEN) * percent / 100; r.right = xpos - r.left; r.top = cp->ypos; r.bottom = STATICHEIGHT; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, text, staticid); r.top = cp->ypos + 8 + GAPWITHIN; r.bottom = EDITHEIGHT; doctl(cp, r, "EDIT", WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, "", editid); } va_end(ap); cp->ypos += 8+GAPWITHIN+12+GAPBETWEEN; } /* * A set of radio buttons on the same line, with a static above * them. `nacross' dictates how many parts the line is divided into * (you might want this not to equal the number of buttons if you * needed to line up some 2s and some 3s to look good in the same * panel). */ void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...) { RECT r; va_list ap; int group; int i; r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, text, id); va_start(ap, nacross); group = WS_GROUP; i = 0; while (1) { char *btext; int bid; btext = va_arg(ap, char *); if (!btext) break; bid = va_arg(ap, int); r.left = GAPBETWEEN + i * (cp->width+GAPBETWEEN)/nacross; r.right = (i+1) * (cp->width+GAPBETWEEN)/nacross - r.left; r.top = cp->ypos; r.bottom = RADIOHEIGHT; doctl(cp, r, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP | group, 0, btext, bid); group = 0; i++; } va_end(ap); cp->ypos += r.bottom + GAPBETWEEN; } /* * A set of radio buttons on multiple lines, with a static above * them. */ void radiobig(struct ctlpos *cp, char *text, int id, ...) { RECT r; va_list ap; int group; r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, text, id); va_start(ap, id); group = WS_GROUP; while (1) { char *btext; int bid; btext = va_arg(ap, char *); if (!btext) break; bid = va_arg(ap, int); r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP | group, 0, btext, bid); group = 0; } va_end(ap); cp->ypos += GAPBETWEEN - GAPWITHIN; } /* * A single standalone checkbox. */ void checkbox(struct ctlpos *cp, char *text, int id) { RECT r; r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = CHECKBOXHEIGHT; cp->ypos += r.bottom + GAPBETWEEN; doctl(cp, r, "BUTTON", BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 0, text, id); } /* * A button on the right hand side, with a static to its left. */ void staticbtn(struct ctlpos *cp, char *stext, int sid, char *btext, int bid) { const int height = (PUSHBTNHEIGHT > STATICHEIGHT ? PUSHBTNHEIGHT : STATICHEIGHT); RECT r; int lwid, rwid, rpos; rpos = GAPBETWEEN + 3 * (cp->width + GAPBETWEEN) / 4; lwid = rpos - 2*GAPBETWEEN; rwid = cp->width + GAPBETWEEN - rpos; r.left = GAPBETWEEN; r.top = cp->ypos + (height-STATICHEIGHT)/2; r.right = lwid; r.bottom = STATICHEIGHT; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); r.left = rpos; r.top = cp->ypos + (height-PUSHBTNHEIGHT)/2; r.right = rwid; r.bottom = PUSHBTNHEIGHT; doctl(cp, r, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, btext, bid); cp->ypos += height + GAPBETWEEN; } /* * An edit control on the right hand side, with a static to its left. */ void staticedit(struct ctlpos *cp, char *stext, int sid, int eid) { const int height = (EDITHEIGHT > STATICHEIGHT ? EDITHEIGHT : STATICHEIGHT); RECT r; int lwid, rwid, rpos; rpos = GAPBETWEEN + (cp->width + GAPBETWEEN) / 2; lwid = rpos - 2*GAPBETWEEN; rwid = cp->width + GAPBETWEEN - rpos; r.left = GAPBETWEEN; r.top = cp->ypos + (height-STATICHEIGHT)/2; r.right = lwid; r.bottom = STATICHEIGHT; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); r.left = rpos; r.top = cp->ypos + (height-EDITHEIGHT)/2; r.right = rwid; r.bottom = EDITHEIGHT; doctl(cp, r, "EDIT", WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, "", eid); cp->ypos += height + GAPBETWEEN; } /* * A tab-control substitute when a real tab control is unavailable. */ void ersatztab(struct ctlpos *cp, char *stext, int sid, int lid, int s2id) { const int height = (COMBOHEIGHT > STATICHEIGHT ? COMBOHEIGHT : STATICHEIGHT); RECT r; int bigwid, lwid, rwid, rpos; static const int BIGGAP = 15; static const int MEDGAP = 3; bigwid = cp->width + 2*GAPBETWEEN - 2*BIGGAP; cp->ypos += MEDGAP; rpos = BIGGAP + (bigwid + BIGGAP) / 2; lwid = rpos - 2*BIGGAP; rwid = bigwid + BIGGAP - rpos; r.left = BIGGAP; r.top = cp->ypos + (height-STATICHEIGHT)/2; r.right = lwid; r.bottom = STATICHEIGHT; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); r.left = rpos; r.top = cp->ypos + (height-COMBOHEIGHT)/2; r.right = rwid; r.bottom = COMBOHEIGHT*10; doctl(cp, r, "COMBOBOX", WS_CHILD | WS_VISIBLE | WS_TABSTOP | CBS_DROPDOWNLIST | CBS_HASSTRINGS, WS_EX_CLIENTEDGE, "", lid); cp->ypos += height + MEDGAP + GAPBETWEEN; r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = 2; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE | SS_ETCHEDHORZ, 0, "", s2id); } /* * A static line, followed by an edit control on the left hand side * and a button on the right. */ void editbutton(struct ctlpos *cp, char *stext, int sid, int eid, char *btext, int bid) { const int height = (EDITHEIGHT > PUSHBTNHEIGHT ? EDITHEIGHT : PUSHBTNHEIGHT); RECT r; int lwid, rwid, rpos; r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); rpos = GAPBETWEEN + 3 * (cp->width + GAPBETWEEN) / 4; lwid = rpos - 2*GAPBETWEEN; rwid = cp->width + GAPBETWEEN - rpos; r.left = GAPBETWEEN; r.top = cp->ypos + (height-EDITHEIGHT)/2; r.right = lwid; r.bottom = EDITHEIGHT; doctl(cp, r, "EDIT", WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, "", eid); r.left = rpos; r.top = cp->ypos + (height-PUSHBTNHEIGHT)/2; r.right = rwid; r.bottom = PUSHBTNHEIGHT; doctl(cp, r, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, btext, bid); cp->ypos += height + GAPBETWEEN; } /* * Special control which was hard to describe generically: the * session-saver assembly. A static; below that an edit box; below * that a list box. To the right of the list box, a column of * buttons. */ void sesssaver(struct ctlpos *cp, char *text, int staticid, int editid, int listid, ...) { RECT r; va_list ap; int lwid, rwid, rpos; int y; const int LISTDEFHEIGHT = 66; rpos = GAPBETWEEN + 3 * (cp->width + GAPBETWEEN) / 4; lwid = rpos - 2*GAPBETWEEN; rwid = cp->width + GAPBETWEEN - rpos; /* The static control. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = lwid; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, text, staticid); /* The edit control. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = lwid; r.bottom = EDITHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "EDIT", WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, "", staticid); /* * The buttons (we should hold off on the list box until we * know how big the buttons are). */ va_start(ap, listid); y = cp->ypos; while (1) { char *btext = va_arg(ap, char *); int bid; if (!btext) break; bid = va_arg(ap, int); r.left = rpos; r.top = y; r.right = rwid; r.bottom = PUSHBTNHEIGHT; y += r.bottom + GAPWITHIN; doctl(cp, r, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, btext, bid); } /* Compute list box height. LISTDEFHEIGHT, or height of buttons. */ y -= cp->ypos; y -= GAPWITHIN; if (y < LISTDEFHEIGHT) y = LISTDEFHEIGHT; r.left = GAPBETWEEN; r.top = cp->ypos; r.right = lwid; r.bottom = y; cp->ypos += y + GAPBETWEEN; doctl(cp, r, "LISTBOX", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | LBS_HASSTRINGS, WS_EX_CLIENTEDGE, "", listid); } /* * Another special control: the environment-variable setter. A * static line first; then a pair of edit boxes with associated * statics, and two buttons; then a list box. */ void envsetter(struct ctlpos *cp, char *stext, int sid, char *e1stext, int e1sid, int e1id, char *e2stext, int e2sid, int e2id, int listid, char *b1text, int b1id, char *b2text, int b2id) { RECT r; const int height = (STATICHEIGHT > EDITHEIGHT && STATICHEIGHT > PUSHBTNHEIGHT ? STATICHEIGHT : EDITHEIGHT > PUSHBTNHEIGHT ? EDITHEIGHT : PUSHBTNHEIGHT); const static int percents[] = { 20, 35, 10, 25 }; int i, j, xpos, percent; const int LISTHEIGHT = 42; /* The static control. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); /* The statics+edits+buttons. */ for (j = 0; j < 2; j++) { percent = 10; for (i = 0; i < 4; i++) { xpos = (cp->width + GAPBETWEEN) * percent / 100; r.left = xpos + GAPBETWEEN; percent += percents[i]; xpos = (cp->width + GAPBETWEEN) * percent / 100; r.right = xpos - r.left; r.top = cp->ypos; r.bottom = (i==0 ? STATICHEIGHT : i==1 ? EDITHEIGHT : PUSHBTNHEIGHT); r.top += (height-r.bottom)/2; if (i==0) { doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, j==0 ? e1stext : e2stext, j==0 ? e1sid : e2sid); } else if (i==1) { doctl(cp, r, "EDIT", WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, "", j==0 ? e1id : e2id); } else if (i==3) { doctl(cp, r, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, j==0 ? b1text : b2text, j==0 ? b1id : b2id); } } cp->ypos += height + GAPWITHIN; } /* The list box. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = LISTHEIGHT; cp->ypos += r.bottom + GAPBETWEEN; doctl(cp, r, "LISTBOX", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | LBS_HASSTRINGS | LBS_USETABSTOPS, WS_EX_CLIENTEDGE, "", listid); } /* * Yet another special control: the character-class setter. A * static, then a list, then a line containing a * button-and-static-and-edit. */ void charclass(struct ctlpos *cp, char *stext, int sid, int listid, char *btext, int bid, int eid, char *s2text, int s2id) { RECT r; const int height = (STATICHEIGHT > EDITHEIGHT && STATICHEIGHT > PUSHBTNHEIGHT ? STATICHEIGHT : EDITHEIGHT > PUSHBTNHEIGHT ? EDITHEIGHT : PUSHBTNHEIGHT); const static int percents[] = { 30, 40, 30 }; int i, xpos, percent; const int LISTHEIGHT = 66; /* The static control. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); /* The list box. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = LISTHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "LISTBOX", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | LBS_HASSTRINGS | LBS_USETABSTOPS, WS_EX_CLIENTEDGE, "", listid); /* The button+static+edit. */ percent = xpos = 0; for (i = 0; i < 3; i++) { r.left = xpos + GAPBETWEEN; percent += percents[i]; xpos = (cp->width + GAPBETWEEN) * percent / 100; r.right = xpos - r.left; r.top = cp->ypos; r.bottom = (i==0 ? PUSHBTNHEIGHT : i==1 ? STATICHEIGHT : EDITHEIGHT); r.top += (height-r.bottom)/2; if (i==0) { doctl(cp, r, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, btext, bid); } else if (i==1) { doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE | SS_CENTER, 0, s2text, s2id); } else if (i==2) { doctl(cp, r, "EDIT", WS_CHILD | WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL, WS_EX_CLIENTEDGE, "", eid); } } cp->ypos += height + GAPBETWEEN; } /* * A special control (horrors!). The colour editor. A static line; * then on the left, a list box, and on the right, a sequence of * two-part statics followed by a button. */ void colouredit(struct ctlpos *cp, char *stext, int sid, int listid, char *btext, int bid, ...) { RECT r; int y; va_list ap; int lwid, rwid, rpos; const int LISTHEIGHT = 66; /* The static control. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = cp->width; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPWITHIN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, stext, sid); rpos = GAPBETWEEN + 2 * (cp->width + GAPBETWEEN) / 3; lwid = rpos - 2*GAPBETWEEN; rwid = cp->width + GAPBETWEEN - rpos; /* The list box. */ r.left = GAPBETWEEN; r.top = cp->ypos; r.right = lwid; r.bottom = LISTHEIGHT; doctl(cp, r, "LISTBOX", WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_VSCROLL | LBS_HASSTRINGS | LBS_USETABSTOPS, WS_EX_CLIENTEDGE, "", listid); /* The statics. */ y = cp->ypos; va_start(ap, bid); while (1) { char *ltext; int lid, rid; ltext = va_arg(ap, char *); if (!ltext) break; lid = va_arg(ap, int); rid = va_arg(ap, int); r.top = y; r.bottom = STATICHEIGHT; y += r.bottom + GAPWITHIN; r.left = rpos; r.right = rwid/2; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, ltext, lid); r.left = rpos + r.right; r.right = rwid - r.right; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE | SS_RIGHT, 0, "", rid); } va_end(ap); /* The button. */ r.top = y + 2*GAPWITHIN; r.bottom = PUSHBTNHEIGHT; r.left = rpos; r.right = rwid; doctl(cp, r, "BUTTON", WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON, 0, btext, bid); cp->ypos += LISTHEIGHT + GAPBETWEENSETFONT: { HFONT hfont = (HFONT)wParam; HFONT oldfont; HDC hdc; TEXTMETRIC tm; LONG units; hdc = GetDC(hwnd); oldfont = SelectObject(hdc, hfont); GetTextMetrics(hdc, &tm); units = (tm.tmHeight << 16) | tm.tmAveCharWidth; SelectObject(hdc, oldfont); DeleteDC(hdc); SetWindowLong(hwnd, GWL_USERDATA, units); SetWindowLong(hwnd, DWL_USER, wParam); } return 0; struct ctlpos cp; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] dehlnprstwx */ ctlposinit(&cp, hwnd); multiedit(&cp, "Host &Name", IDC0_HOSTSTATIC, IDC0_HOST, 75, "&Port", IDC0_PORTSTATIC, IDC0_PORT, 25, NULL); radioline(&cp, "Protocol:", IDC0_PROTSTATIC, 3, "&Raw", IDC0_PROTRAW, "&Telnet", IDC0_PROTTELNET, #ifdef FWHACK "SS&H/hack", #else "SS&H", #endif IDC0_PROTSSH, NULL); sesssaver(&cp, "Stor&ed Sessions", IDC0_SESSSTATIC, IDC0_SESSEDIT, IDC0_SESSLIST, "&Load", IDC0_SESSLOAD, "&Save", IDC0_SESSSAVE, "&Delete", IDC0_SESSDEL, NULL); checkbox(&cp, "Close Window on E&xit", IDC0_CLOSEEXIT); checkbox(&cp, "&Warn on Close", IDC0_CLOSEWARN); WPARAM wParam, LPARAM lParam) { struct ctlpos cp; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] 4?ehiklmnprsuvxy */ ctlposinit(&cp, hwnd); radioline(&cp, "Action of Backspace:", IDC1_DELSTATIC, 2, "Control-&H", IDC1_DEL008, "Control-&? (127)", IDC1_DEL127, NULL); radioline(&cp, "Action of Home and End:", IDC1_HOMESTATIC, 2, "&Standard", IDC1_HOMETILDE, "&rxvt", IDC1_HOMERXVT, NULL); radioline(&cp, "Function key and keypad layout:", IDC1_FUNCSTATIC, 3, "&VT400", IDC1_FUNCTILDE, "&Linux", IDC1_FUNCLINUX, "&Xterm R6", IDC1_FUNCXTERM, NULL); radioline(&cp, "Initial state of cursor keys:", IDC1_CURSTATIC, 2, "&Normal", IDC1_CURNORMAL, "A&pplication", IDC1_CURAPPLIC, NULL); radioline(&cp, "Initial state of numeric keypad:", IDC1_KPSTATIC, 3, "Nor&mal", IDC1_KPNORMAL, "Appl&ication", IDC1_KPAPPLIC, "N&etHack", IDC1_KPNH, NULL); checkbox(&cp, "ALT-F&4 is special (closes window)", IDC1_ALTF4); checkbox(&cp, "ALT-Space is special (S&ystem menu)", IDC1_ALTSPACE); checkbox(&cp, "&Use local terminal line discipline", IDC1_LDISCTERM); checkbox(&cp, "Reset scrollback on &keypress", IDC1_SCROLLKEY); struct ctlpos cp; /* Accelerators used: [aco] dghlmnprsw */ ctlposinit(&cp, hwnd); multiedit(&cp, "&Rows", IDC2_ROWSSTATIC, IDC2_ROWSEDIT, 33, "Colu&mns", IDC2_COLSSTATIC, IDC2_COLSEDIT, 33, "&Scrollback", IDC2_SAVESTATIC, IDC2_SAVEEDIT, 33, NULL); staticbtn(&cp, "", IDC2_FONTSTATIC, "C&hange...", IDC2_CHOOSEFONT); checkbox(&cp, "Auto &wrap mode initially on", IDC2_WRAPMODE); checkbox(&cp, "&DEC Origin Mode initially on", IDC2_DECOM); checkbox(&cp, "Implicit CR in every &LF", IDC2_LFHASCR); checkbox(&cp, "Bee&p enabled", IDC1_BEEP); checkbox(&cp, "Use Back&ground colour erase", IDC2_BCE); checkbox(&cp, "Enable bli&nking text", IDC2_BLINKTEXT); truct ctlpos cp; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] bikty */ ctlposinit(&cp, hwnd); multiedit(&cp, "Initial window &title:", IDCW_WINTITLE, IDCW_WINEDIT, 100, NULL); checkbox(&cp, "Avoid ever using &icon title", IDCW_WINNAME); checkbox(&cp, "&Blinking cursor", IDCW_BLINKCUR); checkbox(&cp, "Displa&y scrollbar", IDCW_SCROLLBAR); checkbox(&cp, "Loc&k Window size", IDCW_LOCKSIZE); struct ctlpos cp; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] bdflrstuv */ ctlposinit(&cp, hwnd); staticedit(&cp, "Terminal-&type string", IDC3_TTSTATIC, IDC3_TTEDIT); staticedit(&cp, "Terminal-&speed string", IDC3_TSSTATIC, IDC3_TSEDIT); staticedit(&cp, "Auto-login &username", IDC3_LOGSTATIC, IDC3_LOGEDIT); envsetter(&cp, "Environment variables:", IDC3_ENVSTATIC, "&Variable", IDC3_VARSTATIC, IDC3_VAREDIT, "Va&lue", IDC3_VALSTATIC, IDC3_VALEDIT, IDC3_ENVLIST, "A&dd", IDC3_ENVADD, "&Remove", IDC3_ENVREMOVE); radioline(&cp, "Handling of OLD_ENVIRON ambiguity:", IDC3_EMSTATIC, 2, "&BSD (commonplace)", IDC3_EMBSD, "R&FC 1408 (unusual)", IDC3_EMRFC, NULL); struct ctlpos cp; /* Accelerators used: [aco] 123abdkmprtuw */ ctlposinit(&cp, hwnd); staticedit(&cp, "Terminal-&type string", IDC3_TTSTATIC, IDC3_TTEDIT); staticedit(&cp, "Auto-login &username", IDC3_LOGSTATIC, IDC3_LOGEDIT); multiedit(&cp, "&Remote command:", IDC3_CMDSTATIC, IDC3_CMDEDIT, 100, NULL); checkbox(&cp, "Don't allocate a &pseudo-terminal", IDC3_NOPTY); checkbox(&cp, "Atte&mpt TIS or CryptoCard authentication", IDC3_AUTHTIS); checkbox(&cp, "Allow &agent forwarding", IDC3_AGENTFWD); editbutton(&cp, "Private &key file for authentication:", IDC3_PKSTATIC, IDC3_PKEDIT, "Bro&wse...", IDC3_PKBUTTON); radioline(&cp, "Preferred SSH protocol version:", IDC3_SSHPROTSTATIC, 2, "&1", IDC3_SSHPROT1, "&2", IDC3_SSHPROT2, NULL); radioline(&cp, "Preferred encryption algorithm:", IDC3_CIPHERSTATIC, 3, "&3DES", IDC3_CIPHER3DES, "&Blowfish", IDC3_CIPHERBLOWF, "&DES", IDC3_CIPHERDES, NULL); struct ctlpos cp; int i; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] stwx */ ctlposinit(&cp, hwnd); radiobig(&cp, "Action of mouse buttons:", IDC4_MBSTATIC, "&Windows (Right pastes, Middle extends)", IDC4_MBWINDOWS, "&xterm (Right extends, Middle pastes)", IDC4_MBXTERM, NULL); charclass(&cp, "Character classes:", IDC4_CCSTATIC, IDC4_CCLIST, "&Set", IDC4_CCSET, IDC4_CCEDIT, "&to class", IDC4_CCSTATIC2); truct ctlpos cp; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] bmlu */ ctlposinit(&cp, hwnd); checkbox(&cp, "&Bolded text is a different colour", IDC5_BOLDCOLOUR); checkbox(&cp, "Attempt to use &logical palettes", IDC5_PALETTE); colouredit(&cp, "Select a colo&ur and click to modify it:", IDC5_STATIC, IDC5_LIST, "&Modify...", IDC5_CHANGE, "Red:", IDC5_RSTATIC, IDC5_RVALUE, "Green:", IDC5_GSTATIC, IDC5_GVALUE, "Blue:", IDC5_BSTATIC, IDC5_BVALUE, NULL); truct ctlpos cp; switch (msg) { case WM_INITDIALOG: /* Accelerators used: [aco] beiknpsx */ ctlposinit(&cp, hwnd); radiobig(&cp, "Handling of VT100 line drawing characters:", IDC2_VTSTATIC, "Font has &XWindows encoding", IDC2_VTXWINDOWS, "Use font in &both ANSI and OEM modes", IDC2_VTOEMANSI, "Use font in O&EM mode only", IDC2_VTOEMONLY, "&Poor man's line drawing (""+"", ""-"" and ""|"")", IDC2_VTPOORMAN, NULL); radiobig(&cp, "Character set translation:", IDC6_XLATSTATIC, "&None", IDC6_NOXLAT, "&KOI8 / Win-1251", IDC6_KOI8WIN1251, "&ISO-8859-2 / Win-1250", IDC6_88592WIN1250, NULL); checkbox(&cp, "CAP&S LOCK acts as cyrillic switch", IDC6_CAPSLOCKCYR); HWND makesubdialog(HWND hwnd, int x, int y, int w, int h, int n) { RECT r; HWND ret; WPARAM font; r.left = x; r.top = y; r.right = r.left + w; r.bottom = r.top + h; MapDialogRect(hwnd, &r); ret = CreateWindowEx(WS_EX_CONTROLPARENT, WC_DIALOG, "", /* no title */ WS_CHILD | WS_VISIBLE | DS_SETFONT, r.left, r.top, r.right-r.left, r.bottom-r.top, hwnd, (HMENU)(panelids[n]), hinst, NULL); SetWindowLong (ret, DWL_DLGPROC, (LONG)panelproc[n]); font = SendMessage(hwnd, WM_GETFONT, 0, 0); SendMessage (ret, WM_SETFONT, font, MAKELPARAM(0, 0)); SendMessage (ret, WM_INITDIALOG, 0, 0); return ret; }, tabctl { RECT r; r.left = 3; r.right = r.left + 174; r.top = 3; r.bottom = r.top + 193; MapDialogRect(hwnd, &r); tabctl = CreateWindowEx(0, WC_TABCONTROL, "", WS_CHILD | WS_VISIBLE | WS_TABSTOP | TCS_MULTILINE, r.left, r.top, r.right-r.left, r.bottom-r.top, hwnd, (HMENU)IDC_TAB, hinst, NULL); if (!tabctl) { struct ctlpos cp; ctlposinit2(&cp, hwnd); ersatztab(&cp, "Category:", IDC_TABSTATIC1, IDC_TABLIST, IDC_TABSTATIC2); } else { WPARAM font = SendMessage(hwnd, WM_GETFONT, 0, 0); SendMessage(tabctl, WM_SETFONT, font, MAKELPARAM(TRUE, 0)); } } *page = NULL; if (tabctl) { tabctl, i, &tab); } } else { int i; for (i=0; ihwndFrom); /* ensure focus stays */ return 0; } break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_TABLIST: if (HIWORD(wParam) == CBN_SELCHANGE) { HWND tablist = GetDlgItem (hwnd, IDC_TABLIST); int i = SendMessage (tablist, CB_GETCURSEL, 0, 0); if (*page) DestroyWindow (*page); *page = makesubdialog(hwnd, 6, 30, 168, 163, panelnums[i]); SetFocus(tablist); /* ensure focus stays */ return 0; } break; Node-path: putty/win_res.inp Node-action: delete Node-path: putty/mkres.c Node-action: delete Revision-number: 674 Prop-content-length: 129 Content-length: 129 K 7 svn:log V 29 Remove rogue debug statement K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T08:06:23.000000Z PROPS-END Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: a9e58d772c5dc1db5e96c33acca2cc3a Text-content-length: 20 Text-content-md5: f372058eaa238ab93d28d1cdfb2ed4e0 Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN抈8 , 圱 Revision-number: 675 Prop-content-length: 168 Content-length: 168 K 7 svn:log V 68 Add LBS_STANDARD on saved session list box, so you can double-click K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T08:10:53.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 13d1724d1584359f86b24d4e5e60aa39 Text-content-length: 58 Text-content-md5: 62a8ae564b66098855c31fdcf1155afb Content-length: 98 K 15 cvs2svn:cvs-rev V 4 1.48 PROPS-END SVN勻勷趖跢郋-儭(佇o LBS_STANDARD Revision-number: 676 Prop-content-length: 167 Content-length: 167 K 7 svn:log V 67 Localise control IDs in each dialog procedure, for maintainability K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T09:06:33.000000Z PROPS-END Node-path: putty/win_res.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d4c601eedb6d1053de2fd5af8a4b17d1 Text-content-length: 57 Text-content-md5: 36632719c2bf16b0fbc3d917cb9592c2 Content-length: 97 K 15 cvs2svn:cvs-rev V 4 1.23 PROPS-END SVN刣 %x僄倉#define IDC_SUBDLG 1006 #endif Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 62a8ae564b66098855c31fdcf1155afb Text-content-length: 19738 Text-content-md5: 3574575cdfea2a255818f16118800b06 Content-length: 19778 K 15 cvs2svn:cvs-rev V 4 1.49 PROPS-END SVN勷;<亾N倠) T剟;h倠{侽Q倧:\倱3. 倴E倷~乿倹4侫W傢}[W傢}亊4偅~P傢})偋7p偢yY偑:|偓&d偔#乀偖僓俕偝<P傢}乑偡p偢yY偑:偤D僾T剟;e偨"唀M偰};偼v凘V傆\傌>G傋傌4\傌>刦傏俽T剟;b傕7a傟@W傢}RW傢}F傢u傭[傹7D 傷~傹3乆傼5.U剟;m儉[*_儏}W傢}`{儔~Z-儔uT傹6jG儧@ 儘f%U剟;W儹np儣9j儤*H兓<J儧=QG儧@丅P傢}X儫8儬俋儭*{儱U偓5 儳&刕儴1僥T剟;d儹a4f儻`儼f俬O兇6 `兓$G儧@L兙;W傢}|兞?V兟@丏P傢}:W傢}QG儧@MG儧@P兩s咶兪Dl傼>M倞?亁T剟;\J冊9僐乺冐au冓T?冚 y冝丄冞 冟LU剟;e冭2Ke冮d:冺i凁%Q傢|q凃]9凅pOW傢}M|凎 m凕:乚P傢}~凔;刬凕:剛8乄剟;丒f剣[乺U剨8Q傢|俬%剶e 剻Y3劆T瓳劻F enum { controlstartvalue = 1000, IDC_HOSTSTATIC, IDC_HOST, IDC_PORTSTATIC, IDC_PORT, IDC_PROTSTATIC, IDC_PROTRAW, IDC_PROTTELNET, IDC_PROTSSH, IDC_SESSSTATIC, IDC_SESSEDIT, IDC_SESSLIST, IDC_SESSLOAD, IDC_SESSSAVE, IDC_SESSDEL, IDC_CLOSEEXIT, IDC_CLOSEWARN }_HOSTSTATIC, IDC_HOST, 75, "&Port", IDC_PORTSTATIC, IDC_PORT, 25, NULL); radioline(&cp, "Protocol:", IDC_PROTSTATIC, 3, "&Raw", IDC_PROTRAW, "&Telnet", IDC_PROTTELNET, #ifdef FWHACK "SS&H/hack", #else "SS&H", #endif IDC_SESSSTATIC, IDC_SESSEDIT, IDC_SESSLIST, "&Load", IDC_SESSLOAD, "&Save", IDC_SESSSAVE, "&Delete", IDC_SESSDEL, NULL); checkbox(&cp, "Close Window on E&xit", IDC_CLOSEEXIT); checkbox(&cp, "&Warn on Close", IDC_CLOSEWARN); SetDlgItemText (hwnd, IDC_HOST, cfg.host); SetDlgItemText (hwnd, IDC_SESSEDIT, savedsession); SetDlgItemInt (hwnd, IDC_SESSLIST, LB_ADDSTRING, 0, (LPARAM) (sessions[i])); CheckRadioButton (hwnd, IDC_PROTRAW, IDC_PROTSSH, cfg.protocol==PROT_SSH ? IDC_PROTSSH : cfg.protocol==PROT_TELNET ? IDC_PROTTELNET : IDC_PROTRAW ); CheckDlgButton (hwnd, IDC_CLOSEEXIT, cfg.close_on_exit); CheckDlgButton (hwnd, IDC_PROTTELNET: case IDC_PROTSSH: case IDC_PROTSSH); int j = IsDlgButtonChecked (hwnd, IDC_PORT, cfg.port, FALSE); } } break; case IDC_HOST: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_HOST, cfg.host, sizeof(cfg.host)-1); break; case IDC_PORT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_PORT, &cfg.port); break; case IDC_CLOSEEXITclose_on_exit = IsDlgButtonChecked (hwnd, IDC_CLOSEEXIT); break; case IDC_CLOSEWARNwarn_on_close = IsDlgButtonChecked (hwnd, IDC_CLOSEWARN); break; case IDC_SESSEDIT: if (HIWORD(wParam) == EN_CHANGE) { SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); GetDlgItemText (hwnd, IDC_SESSSAVE { /* * Save a session */ char str[2048]; GetDlgItemText (hwnd, IDC_SESSEDIT, str, sizeof(str)-1); if (!*str) { int n = SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); } break; case IDC_SESSLIST: case IDC_SESSLOAD: if (LOWORD(wParam) == IDC_HOST, cfg.host); SetDlgItemInt (hwnd, IDC_PORT, cfg.port, FALSE); CheckRadioButton (hwnd, IDC_PROTRAW, IDC_PROTSSH, (cfg.protocol==PROT_SSH ? IDC_PROTSSH : cfg.protocol==PROT_TELNET ? IDC_PROTTELNET : IDC_PROTRAW)); CheckDlgButton (hwnd, IDC_CLOSEEXIT, cfg.close_on_exit); CheckDlgButton (hwnd, IDC_CLOSEWARN, cfg.warn_on_close); SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); } if (LOWORD(wParam) == IDC_SESSDEL { int n = SendDlgItemMessage (hwnd, IDCenum { controlstartvalue = 1000, IDC_DELSTATIC, IDC_DEL008, IDC_DEL127, IDC_HOMESTATIC, IDC_HOMETILDE, IDC_HOMERXVT, IDC_FUNCSTATIC, IDC_FUNCTILDE, IDC_FUNCLINUX, IDC_FUNCXTERM, IDC_KPSTATIC, IDC_KPNORMAL, IDC_KPAPPLIC, IDC_KPNH, IDC_CURSTATIC, IDC_CURNORMAL, IDC_CURAPPLIC, IDC_ALTF4, IDC_ALTSPACE, IDC_LDISCTERM, IDC_SCROLLKEY }_DELSTATIC, 2, "Control-&H", IDC_DEL008, "Control-&? (127)", IDC_DEL127, NULL); radioline(&cp, "Action of Home and End:", IDC_HOMESTATIC, 2, "&Standard", IDC_HOMETILDE, "&rxvt", IDC_HOMERXVT, NULL); radioline(&cp, "Function key and keypad layout:", IDC_FUNCSTATIC, 3, "&VT400", IDC_FUNCTILDE, "&Linux", IDC_FUNCLINUX, "&Xterm R6", IDC_FUNCXTERM, NULL); radioline(&cp, "Initial state of cursor keys:", IDC_CURSTATIC, 2, "&Normal", IDC_CURNORMAL, "A&pplication", IDC_CURAPPLIC, NULL); radioline(&cp, "Initial state of numeric keypad:", IDC_KPSTATIC, 3, "Nor&mal", IDC_KPNORMAL, "Appl&ication", IDC_KPAPPLIC, "N&etHack", IDC_ALTF4); checkbox(&cp, "ALT-Space is special (S&ystem menu)", IDC_ALTSPACE); checkbox(&cp, "&Use local terminal line discipline", IDC_LDISCTERM); checkbox(&cp, "Reset scrollback on &keypress", IDC_SCROLLKEY); CheckRadioButton (hwnd, IDC_DEL008, IDC_DEL127, cfg.bksp_is_delete ? IDC_DEL127 : IDC_DEL008); CheckRadioButton (hwnd, IDC_HOMETILDE, IDC_HOMERXVT, cfg.rxvt_homeend ? IDC_HOMERXVT : IDC_HOMETILDE); CheckRadioButton (hwnd, IDC_FUNCTILDE, IDC_FUNCXTERM, cfg.funky_type ? (cfg.funky_type==2 ? IDC_FUNCXTERM : IDC_FUNCLINUX ) : IDC_FUNCTILDE); CheckRadioButton (hwnd, IDC_CURNORMAL, IDC_CURAPPLIC, cfg.app_cursor ? IDC_CURAPPLIC : IDC_CURNORMAL); CheckRadioButton (hwnd, IDC_KPNORMAL, IDC_KPNH, cfg.nethack_keypad ? IDC_KPNH : cfg.app_keypad ? IDC_KPAPPLIC : IDC_KPNORMAL); CheckDlgButton (hwnd, IDC_ALTF4, cfg.alt_f4); CheckDlgButton (hwnd, IDC_ALTSPACE, cfg.alt_space); CheckDlgButton (hwnd, IDC_LDISCTERM, cfg.ldisc_term); CheckDlgButton (hwnd, IDC_DEL008: case IDC_DEL127: cfg.bksp_is_delete = IsDlgButtonChecked (hwnd, IDC_DEL127); break; case IDC_HOMETILDE: case IDC_HOMERXVT: cfg.rxvt_homeend = IsDlgButtonChecked (hwnd, IDC_HOMERXVT); break; case IDC_FUNCXTERM: cfg.funky_type = 2; break; case IDC_FUNCTILDE: case IDC_FUNCLINUX: cfg.funky_type = IsDlgButtonChecked (hwnd, IDC_FUNCLINUX); break; case IDC_KPNORMAL: case IDC_KPAPPLIC: cfg.app_keypad = IsDlgButtonChecked (hwnd, IDC_KPAPPLIC); cfg.nethack_keypad = FALSE; break; case IDC_CURNORMAL: case IDC_CURAPPLIC: cfg.app_cursor = IsDlgButtonChecked (hwnd, IDC_CURAPPLIC); break; case IDC_ALTF4alt_f4 = IsDlgButtonChecked (hwnd, IDC_ALTF4); break; case IDC_ALTSPACE); break; case IDC_LDISCTERM); break; case IDC_SCROLLKEYscroll_on_key = IsDlgButtonChecked (hwnd, IDC enum { controlstartvalue = 1000, IDC_WRAPMODE, IDC_DECOM, IDC_DIMSTATIC, IDC_ROWSSTATIC, IDC_ROWSEDIT, IDC_COLSSTATIC, IDC_COLSEDIT, IDC_SAVESTATIC, IDC_SAVEEDIT, IDC_FONTSTATIC, IDC_CHOOSEFONT, IDC_LFHASCR, IDC_BEEP, IDC_BCE, IDC_BLINKTEXT }_ROWSSTATIC, IDC_ROWSEDIT, 33, "Colu&mns", IDC_COLSSTATIC, IDC_COLSEDIT, 33, "&Scrollback", IDC_SAVESTATIC, IDC_SAVEEDIT, 33, NULL); staticbtn(&cp, "", IDC_FONTSTATIC, "C&hange...", IDC_CHOOSEFONT); checkbox(&cp, "Auto &wrap mode initially on", IDC_WRAPMODE); checkbox(&cp, "&DEC Origin Mode initially on", IDC_DECOM); checkbox(&cp, "Implicit CR in every &LF", IDC_LFHASCR); checkbox(&cp, "Bee&p enabled", IDC_BEEP); checkbox(&cp, "Use Back&ground colour erase", IDC_BCE); checkbox(&cp, "Enable bli&nking text", IDC_BLINKTEXT); CheckDlgButton (hwnd, IDC_WRAPMODE, cfg.wrap_mode); CheckDlgButton (hwnd, IDC_DECOM, cfg.dec_om); CheckDlgButton (hwnd, IDC_LFHASCR, cfg.lfhascr); SetDlgItemInt (hwnd, IDC_ROWSEDIT, cfg.height, FALSE); SetDlgItemInt (hwnd, IDC_COLSEDIT, cfg.width, FALSE); SetDlgItemInt (hwnd, IDC_SAVEEDIT, cfg.savelines, FALSE); fmtfont (fontstatic); SetDlgItemText (hwnd, IDC_FONTSTATIC, fontstatic); CheckDlgButton (hwnd, IDC_BEEP, cfg.beep); CheckDlgButton (hwnd, IDC_BCE, cfg.bce); CheckDlgButton (hwnd, IDC_WRAPMODEwrap_mode = IsDlgButtonChecked (hwnd, IDC_WRAPMODE); break; case IDC_DECOMdec_om = IsDlgButtonChecked (hwnd, IDC_DECOM); break; case IDC_LFHASCR); break; case IDC_ROWSEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_ROWSEDIT, &cfg.height); break; case IDC_COLSEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_COLSEDIT, &cfg.width); break; case IDC_SAVEEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_SAVEEDIT, &cfg.savelines); break; case IDC_FONTSTATIC, fontstatic); } break; case IDC_BEEPeep = IsDlgButtonChecked (hwnd, IDC_BEEP); break; case IDC_BLINKTEXT); break; case IDCenum { controlstartvalue = 1000, IDC_WINNAME, IDC_BLINKCUR, IDC_SCROLLBAR, IDC_LOCKSIZE, IDC_WINTITLE, IDC_WINEDIT }_WINTITLE, IDC_WINEDIT, 100, NULL); checkbox(&cp, "Avoid ever using &icon title", IDC_WINNAME); checkbox(&cp, "&Blinking cursor", IDC_BLINKCUR); checkbox(&cp, "Displa&y scrollbar", IDC_SCROLLBAR); checkbox(&cp, "Loc&k Window size", IDC_LOCKSIZE); SetDlgItemText (hwnd, IDC_WINEDIT, cfg.wintitle); CheckDlgButton (hwnd, IDC_WINNAME, cfg.win_name_always); CheckDlgButton (hwnd, IDC_BLINKCUR, cfg.blink_cur); CheckDlgButton (hwnd, IDC_SCROLLBAR, cfg.scrollbar); CheckDlgButton (hwnd, IDC_WINNAMEwin_name_always = IsDlgButtonChecked (hwnd, IDC_WINNAME); break; case IDC_BLINKCUblink_cur = IsDlgButtonChecked (hwnd, IDC_BLINKCUR); break; case IDC_SCROLLBAR); break; case IDC_LOCKSIZ cfg.locksize = IsDlgButtonChecked (hwnd, IDC_LOCKSIZE); break; case IDC_WIN enum { controlstartvalue = 1000, IDC_TTSTATIC, IDC_TTEDIT, IDC_TSSTATIC, IDC_TSEDIT, IDC_LOGSTATIC, IDC_LOGEDIT, IDC_ENVSTATIC, IDC_VARSTATIC, IDC_VAREDIT, IDC_VALSTATIC, IDC_VALEDIT, IDC_ENVLIST, IDC_ENVADD, IDC_ENVREMOVE, IDC_EMSTATIC, IDC_EMBSD, IDC_EMRFC }dflrstuv_TTSTATIC, IDC_TTEDIT); staticedit(&cp, "Terminal-&speed string", IDC_TSSTATIC, IDC_TSEDIT); staticedit(&cp, "Auto-login &username", IDC_LOGSTATIC, IDC_LOGEDIT); envsetter(&cp, "Environment variables:", IDC_ENVSTATIC, "&Variable", IDC_VARSTATIC, IDC_VAREDIT, "Va&lue", IDC_VALSTATIC, IDC_VALEDIT, IDC_ENVLIST, "A&dd", IDC_ENVADD, "&Remove", IDC_ENVREMOVE); radioline(&cp, "Handling of OLD_ENVIRON ambiguity:", IDC_EMSTATIC, 2, "&BSD (commonplace)", IDC_EMBSD, "R&FC 1408 (unusual)", IDC_EMRFC, NULL); SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC_TSEDIT, cfg.termspeed); SetDlgItemText (hwnd, IDC_EMBSD, IDC_EMRFC, cfg.rfc_environ ? IDC_EMRFC : IDC_EMBSD_TTEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype, sizeof(cfg.termtype)-1); break; case IDC_TSEDIT, cfg.termspeed, sizeof(cfg.termspeed)-1); break; case IDC_LOG_LOGEDIT, cfg.username, sizeof(cfg.username)-1); break; case IDC_EMBSD: case IDC_EMRFC: cfg.rfc_environ = IsDlgButtonChecked (hwnd, IDC_EMRFC); break; case IDC_ENVADD_ENVLIST, LB_ADDSTRING, 0, (LPARAM)str); SetDlgItemText (hwnd, IDC_VAREDIT, ""); SetDlgItemText (hwnd, IDC_ENVREMOVE: if ( = SendDlgItemMessage (hwnd, IDC enum { controlstartvalue = 1000, IDC_TTSTATIC, IDC_TTEDIT, IDC_LOGSTATIC, IDC_LOGEDIT, IDC_NOPTY, IDC_CIPHERSTATIC, IDC_CIPHER3DES, IDC_CIPHERBLOWF, IDC_CIPHERDES, IDC_AUTHTIS, IDC_PKSTATIC, IDC_PKEDIT, IDC_PKBUTTON, IDC_SSHPROTSTATIC, IDC_SSHPROT1, IDC_SSHPROT2, IDC_AGENTFWD, IDC_CMDSTATIC, IDC_CMDEDIT }_TTSTATIC, IDC_TTEDIT); staticedit(&cp, "Auto-login &username", IDC_LOGSTATIC, IDC_LOGEDIT); multiedit(&cp, "&Remote command:", IDC_CMDSTATIC, IDC_AUTHTIS); checkbox(&cp, "Allow &agent forwarding", IDC_AGENTFWD); editbutton(&cp, "Private &key file for authentication:", IDC_PKSTATIC, IDC_PKEDIT, "Bro&wse...", IDC_PKBUTTON); radioline(&cp, "Preferred SSH protocol version:", IDC_SSHPROTSTATIC, 2, "&1", IDC_SSHPROT1, "&2", IDC_CIPHERSTATIC, 3, "&3DES", IDC_CIPHER3DES, "&Blowfish", IDC_CIPHERBLOWF, "&DES", IDC_CIPHERDES, NULL); SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC_LOGEDIT, cfg.username); CheckDlgButton (hwnd, IDC_NOPTY, cfg.nopty); CheckDlgButton (hwnd, IDC_AGENTFWD, cfg.agentfwd); CheckRadioButton (hwnd, IDC_CIPHER3DES, IDC_CIPHERDES, cfg.cipher == CIPHER_BLOWFISH ? IDC_CIPHERBLOWF : cfg.cipher == CIPHER_DES ? IDC_CIPHERDES : IDC_CIPHER3DES); CheckRadioButton (hwnd, IDC_SSHPROT1, IDC_SSHPROT2, cfg.sshprot == 1 ? IDC_SSHPROT1 : IDC_SSHPROT2); CheckDlgButton (hwnd, IDC_AUTHTIS, cfg.try_tis_auth); SetDlgItemText (hwnd, IDC_PKEDIT, cfg.keyfile); SetDlgItemText (hwnd, IDC_TTEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype, sizeof(cfg.termtype)-1); break; case IDC_LOG_LOGEDIT, cfg.username, sizeof(cfg.username)-1); break; case IDC_NOPTY); break; case IDC_AGENTFWDagentfwd = IsDlgButtonChecked (hwnd, IDC_AGENTFWD); break; case IDC_CIPHER3DES: case IDC_CIPHERBLOWF: case IDC_CIPHERBLOWF)) cfg.cipher = CIPHER_BLOWFISH; else if (IsDlgButtonChecked (hwnd, IDC_CIPHERDES)) cfg.cipher = CIPHER_DES; } break; case IDC_SSHPROT1: case IDC_SSHPROT2 { if (IsDlgButtonChecked (hwnd, IDC_SSHPROT1)) cfg.sshprot = 1; else if (IsDlgButtonChecked (hwnd, IDC_SSHPROT2)) cfg.sshprot = 2; } break; case IDC_AUTHTIStry_tis_auth = IsDlgButtonChecked (hwnd, IDC_AUTHTIS); break; case IDC_PK_PKEDIT, cfg.keyfile, sizeof(cfg.keyfile)-1); break; case IDC_CMD_PKEDIT, cfg.keyfile); } Selstruct ctlpos cp; int i; enum { controlstartvalue = 1000, IDC_MBSTATIC, IDC_MBWINDOWS, IDC_MBXTERM, IDC_CCSTATIC, IDC_CCLIST, IDC_CCSET, IDC_CCSTATIC2, IDC_CCEDIT }stwx */ ctlposinit(&cp, hwnd); radiobig(&cp, "Action of mouse buttons:", IDC_MBWINDOWS, "&xterm (Right extends, Middle pastes)", IDC_MBXTERM, NULL); charclass(&cp, "Character classes:", IDC_CCSTATIC, IDC_CCLIST, "&Set", IDC_CCSET, IDC_CCEDIT, "&to class", IDC_CCSTATIC2); CheckRadioButton (hwnd, IDC_MBWINDOWS, IDC_MBXTERM, cfg.mouse_is_xterm ? IDC_MBXTERM : IDC_MBWINDOWS); { static int tabs[4] = {25, 61, 96, 128}; SendDlgItemMessage (hwnd, IDC_MBWINDOWS: case IDC_MBXTERM: cfg.mouse_is_xterm = IsDlgButtonChecked (hwnd, IDC_MBXTERM); break; case IDC_CCSET: { BOOL ok; int i; int n = GetDlgItemInt (hwnd, IDC enum { controlstartvalue = 1000, IDC_BOLDCOLOUR, IDC_PALETTE, IDC_STATIC, IDC_LIST, IDC_RSTATIC, IDC_GSTATIC, IDC_BSTATIC, IDC_RVALUE, IDC_GVALUE, IDC_BVALUE, IDC_CHANGE }_BOLDCOLOUR); checkbox(&cp, "Attempt to use &logical palettes", IDC_STATIC, IDC_LIST, "&Modify...", IDC_CHANGE, "Red:", IDC_RSTATIC, IDC_RVALUE, "Green:", IDC_GSTATIC, IDC_GVALUE, "Blue:", IDC_BSTATIC, IDC_BVALUE, NULL); CheckDlgButton (hwnd, IDC_BOLDCOLOUR, cfg.bold_colour); CheckDlgButton (hwnd, IDC_LIST, LB_ADDSTRING, 0, (LPARAM) colours[i]); } SendDlgItemMessage (hwnd, IDC_LIST, LB_SETCURSEL, 0, 0); SetDlgItemInt (hwnd, IDC_RVALUE, cfg.colours[0][0], FALSE); SetDlgItemInt (hwnd, IDC_GVALUE, cfg.colours[0][1], FALSE); SetDlgItemInt (hwnd, IDC_BOLDCOLOU { int n, i; cfg.bold_colour = IsDlgButtonChecked (hwnd, IDC_BOLDCOLOUR); n = SendDlgItemMessage (hwnd, IDC_LIST, LB_DELETESTRING, i, 0); } } break; case IDC_PALETTEtry_palette = IsDlgButtonChecked (hwnd, IDC_PALETTE); break; case IDCSetDlgItemInt (hwnd, IDC_RVALUE, cfg.colours[i][0], FALSE); SetDlgItemInt (hwnd, IDC_GVALUE, cfg.colours[i][1], FALSE); SetDlgItemInt (hwnd, IDC_BVALUE, cfg.colours[i][2], FALSE); } break; case IDC_CHANGE_RVALUE, cfg.colours[i][0], FALSE); SetDlgItemInt (hwnd, IDC_GVALUE, cfg.colours[i][1], FALSE); SetDlgItemInt (hwnd, IDC enum { controlstartvalue = 1000, IDC_XLATSTATIC, IDC_NOXLAT, IDC_KOI8WIN1251, IDC_88592WIN1250, IDC_CAPSLOCKCYR, IDC_VTSTATIC, IDC_VTXWINDOWS, IDC_VTOEMANSI, IDC_VTOEMONLY, IDC_VTPOORMAN }_VTSTATIC, "Font has &XWindows encoding", IDC_VTXWINDOWS, "Use font in &both ANSI and OEM modes", IDC_VTOEMANSI, "Use font in O&EM mode only", IDC_VTPOORMAN, NULL); radiobig(&cp, "Character set translation:", IDC_XLATSTATIC, "&None", IDC_NOXLAT, "&KOI8 / Win-1251", IDC_KOI8WIN1251, "&ISO-8859-2 / Win-1250", IDC_CAPSLOCKCYR); CheckRadioButton (hwnd, IDC_NOXLAT, IDC_88592WIN1250, cfg.xlat_88592w1250 ? IDC_88592WIN1250 : cfg.xlat_enablekoiwin ? IDC_KOI8WIN1251 : IDC_NOXLAT); CheckDlgButton (hwnd, IDC_CAPSLOCKCYR, cfg.xlat_capslockcyr); CheckRadioButton (hwnd, IDC_VTXWINDOWS, IDC_VTPOORMAN, cfg.vtmode == VT_XWINDOWS ? IDC_VTXWINDOWS : cfg.vtmode == VT_OEMANSI ? IDC_VTOEMANSI : cfg.vtmode == VT_OEMONLY ? IDC_VTOEMONLY : IDC_VTPOORMAN); case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_NOXLAT: case IDC_KOI8WIN1251: case IDC_88592WIN1250: cfg.xlat_enablekoiwin = IsDlgButtonChecked (hwnd, IDC_KOI8WIN1251); cfg.xlat_88592w1250 = IsDlgButtonChecked (hwnd, IDC_88592WIN1250); break; case IDC_CAPSLOCKCY { cfg.xlat_capslockcyr = IsDlgButtonChecked (hwnd, IDC_CAPSLOCKCYR); } break; case IDC_VTXWINDOWS: case IDC_VTOEMANSI: case IDC_VTOEMONLY: case IDC_VTPOORMAN: cfg.vtmode = (IsDlgButtonChecked (hwnd, IDC_VTXWINDOWS) ? VT_XWINDOWS : IsDlgButtonChecked (hwnd, IDC_VTOEMANSI) ? VT_OEMANSI : IsDlgButtonChecked (hwnd, IDCIDC_SUBDLG static HWND page = NULL; if (msg == WM_COMMAND && LOWORD(wParam) == IDOK) { Revision-number: 677 Prop-content-length: 233 Content-length: 233 K 7 svn:log V 132 Tighten up use of "static" throughout. Module-internal things should NOT be exported willy-nilly. It encourages people to use them. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T11:42:30.000000Z PROPS-END Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f372058eaa238ab93d28d1cdfb2ed4e0 Text-content-length: 28 Text-content-md5: 60103424cb3387a33ab91b692f89f8d8 Content-length: 67 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN8? $static Node-path: putty/pageant.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e39f2af7741db0cfffd1d52b2f49d69f Text-content-length: 240 Text-content-md5: d197abe2b58251beb7aef66fb55fac5c Content-length: 280 K 15 cvs2svn:cvs-rev V 4 1.16 PROPS-END SVN伿4佀*8嘖乤/"哊2 = 鑇醈static HINSTANCE instance; static HWND hwnd; static HWND keylist; static HWND aboutbox; static HMENU systray_menu; static tree234 *rsakeys; static static static static static static Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 84698901d70a075e81ee3e3aed1498fd Text-content-length: 206 Text-content-md5: 27239fb6eebd61f611b516a30226ef87 Content-length: 246 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN佖佖:#揕揕乼擰朎q焤d伨c4static static static static void tell_user(FILE *stream, vsprintf(str, fmt, ap); va_end(ap); strcat(str, "\n"); tell_str(stream, str); } static Node-path: putty/sizetip.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b9524bef8c0ba24375f68508c71a23ff Text-content-length: 265 Text-content-md5: 4f135bf8a4527a0b46e3ab638ea61d9e Content-length: 304 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN乴x両峑亀廸static ATOM tip_class = 0; static HFONT tip_font; static COLORREF tip_bg; static COLORREF tip_text; static LRESULT CALLBACK SizeTipWndProc(HWND hWnd, UINT nMsg, static HWND tip_wnd = NULL; static Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8c9a3bf633ab7ebe129db0b2c6683e53 Text-content-length: 429 Text-content-md5: 4beb6680fdee1642dc23aa2d9fa5cfba Content-length: 469 K 15 cvs2svn:cvs-rev V 4 1.60 PROPS-END SVN厸@厹E|#伡]乄伡])伨4\k伮+^~伱fh伳d7伵L8伹j伻;,伾%8佁Q媉佄 丂佡h佦(侼佪C佱x佮哸兟 佉V內jstatic static static void ssh2_pkt_addbyte(unsigned char byte) { ssh2_pkt_adddata(&byte, 1); } static static void ssh2_pkt_addbool(unsigned char value) { ssh2_pkt_adddata(&value, 1); } static static static static static static static static static static static static static static Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 3574575cdfea2a255818f16118800b06 Text-content-length: 911 Text-content-md5: 91eee32c85a502e7d2f4f4bf99d35ca9 Content-length: 951 K 15 cvs2svn:cvs-rev V 4 1.50 PROPS-END SVN;厑F{侾 鱠m唕;塱亗-亴7仈8仜TT咺仧唌仴ZT6伂~G塳伓m廢伭乯扤佉F侕|?佸.U侕m儔侖;static static static void doctl(struct ctlpos *cp, RECT r, char *wclass, int wstyle, int exstyle, static static void radioline(struct ctlpos *cp, static static static void staticbtn(struct ctlpos *cp, char *stext, int sid, static static void ersatztab(struct ctlpos *cp, char *stext, int sid, static void editbutton(struct ctlpos *cp, char *stext, int sid, static void sesssaver(struct ctlpos *cp, char *text, static void envsetter(struct ctlpos *cp, char *stext, int sid, char *e1stext, int e1sid, int e1id, char *e2stext, int e2sid, int e2id, int listid, static void charclassstatic Revision-number: 678 Prop-content-length: 169 Content-length: 169 K 7 svn:log V 69 Mistaken identity in sesssaver() was breaking saved-session edit box K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T11:49:40.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 91eee32c85a502e7d2f4f4bf99d35ca9 Text-content-length: 30 Text-content-md5: f9a0924e0d5de6900ebb497dce39168d Content-length: 70 K 15 cvs2svn:cvs-rev V 4 1.51 PROPS-END SVN厑F厑D 伻e兏[伻kedit Revision-number: 679 Prop-content-length: 162 Content-length: 162 K 7 svn:log V 62 Cross-reference cleanup: winstore.c should not use fatalbox() K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T12:10:26.000000Z PROPS-END Node-path: putty/winstore.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: b2f128c1330ded32f788ef8e10172b83 Text-content-length: 30 Text-content-md5: 3bd8efdf09fe94cd40ac7b6bfd53f361 Content-length: 69 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN*鉇.膒歴㎡:膒 Revision-number: 680 Prop-content-length: 176 Content-length: 176 K 7 svn:log V 76 Re-enable copying the Event Log. (rev 1.39 [r661] accidentally disabled it) K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T12:31:54.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 83e89d81899c04853889754b4b0a05fe Text-content-length: 322 Text-content-md5: 0e8ad38f272ef4e742d98b6d1a7d1acd Content-length: 362 K 15 cvs2svn:cvs-rev V 4 1.42 PROPS-END SVN漙&%媤I墊乹廇o */ IDD_LOGBOX DIALOG DISCARDABLE 100, 20, 260, 119Event Log" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "&Close", IDOK, 135, 102, 44, 14 PUSHBUTTON "C&opy", IDN_COPY, 81, 102, 44, 14 LISTBOX IDN_LIST, 3, 3, 254, 95, LBS_HASSTRINGS | LBS_USETABSTOPS | WS_VSCROLL | LBS_EXTENDEDSE Revision-number: 681 Prop-content-length: 177 Content-length: 177 K 7 svn:log V 77 Add a parameter to write_clip() so that windlg.c need not call term_deselect K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T12:32:25.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: cb4d63e1e6b51a76a3dc3d49fc8a83c7 Text-content-length: 53 Text-content-md5: 8270e13899a96ea4c3b1371da1984990 Content-length: 93 K 15 cvs2svn:cvs-rev V 4 1.11 PROPS-END SVN阾+岪+ 搆, int must_deselectstatic Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e5458a6f7e0aa1080eaf2039d3c6c498 Text-content-length: 20 Text-content-md5: 2adb0f1188f0927bd992cb39d1d2be28 Content-length: 60 K 15 cvs2svn:cvs-rev V 4 1.51 PROPS-END SVN蚲蚻 48/ Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 27239fb6eebd61f611b516a30226ef87 Text-content-length: 43 Text-content-md5: f26d6b72792338fa513ead27ea346645 Content-length: 83 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN佖:佖M 伵3, int must_deselect Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: a5024346ee3f59a84868adc0ee410124 Text-content-length: 32 Text-content-md5: 98f9f6917b644d2dacbb4be5db816744 Content-length: 72 K 15 cvs2svn:cvs-rev V 4 1.24 PROPS-END SVN儺"儺) 優z(優z, FALSE Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f9a0924e0d5de6900ebb497dce39168d Text-content-length: 357 Text-content-md5: fd6026ef0a64b77759f230504c1af000 Content-length: 397 K 15 cvs2svn:cvs-rev V 4 1.52 PROPS-END SVN厑D厓q=醷 匭醗e鏮,剻鐰if (count == 0) { /* can't copy zero stuff */ MessageBeep(0); break; }, TRUE for (i = 0; i < nevents; i++) SendDlgItemMessage(hwnd, IDN_LIST, LB_SETSEL, FALSE, i Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d853a73d80ce7b274e8a2bdfefcc8f85 Text-content-length: 161 Text-content-md5: bd7e2164945af6211c73ae566085e59f Content-length: 201 K 15 cvs2svn:cvs-rev V 4 1.66 PROPS-END SVN剙X剚%y凁J.凁JI凅$#凈5, int must_deselectif (!must_deselect) SendMessage (hwnd, WM_IGNORE_CLIP, TRUE, 0); if (!must_deselect) Revision-number: 682 Prop-content-length: 199 Content-length: 199 K 7 svn:log V 99 Move omission of SSH protocol setting in PuTTYtel into windlg.c and remove nosshres.rc accordingly K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T12:43:19.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4bb2f532848a0879947bd36d316ab2ea Text-content-length: 63 Text-content-md5: 30a6ce84cfbd086786ce73bccb398596 Content-length: 103 K 15 cvs2svn:cvs-rev V 4 1.35 PROPS-END SVN稯祙慻剘&*%/烶%* puttytel PRESRC = win_PP Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: fd6026ef0a64b77759f230504c1af000 Text-content-length: 469 Text-content-md5: 7f16c2ba4d7189a0b06320a4d5950c12 Content-length: 509 K 15 cvs2svn:cvs-rev V 4 1.53 PROPS-END SVN厓q厗1*倳kI倳fI倳乊傡m倵if (backends[2].backend == NULL) { /* this is PuTTYtel, so only two protocols available */ "&Raw", IDC_PROTRAW, "&Telnet", IDC_PROTTELNET, NULL); } else { "&Raw", IDC_PROTRAW, "&Telnet", IDC_PROTTELNET, #ifdef FWHACK "SS&H/hack", #else "SS&H", #endif IDC_PROTSSH, NULL); } Node-path: putty/nosshres.rc Node-action: delete Revision-number: 683 Prop-content-length: 356 Content-length: 356 K 7 svn:log V 255 Create settings.c and move the load/save session code out of windlg.c into it. Allows plink and pscp to no longer link with windlg.c, meaning they lose some of the sillier stub functions and also can provide a console-based form of verify_ssh_host_key(). K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-06T13:21:36.000000Z PROPS-END Node-path: putty/Makefile Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 30a6ce84cfbd086786ce73bccb398596 Text-content-length: 215 Text-content-md5: 5c21bb1622254af88364ae429dfa1027 Content-length: 255 K 15 cvs2svn:cvs-rev V 4 1.36 PROPS-END SVN祙9'*-∣ ##-- objects pscp SOBJS = scp.$(OBJ) be_none.$(OBJ) ##-- objects putty puttytel pscp plink MOBJS = misc.$(OBJ) version.$(OBJ) winstore.$(OBJ) settings settings.$(OBJ): settings.c putty Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 8270e13899a96ea4c3b1371da1984990 Text-content-length: 2729 Text-content-md5: 240686bb58b10d7bac4ebf9119501989 Content-length: 2769 K 15 cvs2svn:cvs-rev V 4 1.12 PROPS-END SVN䌷#攝丟僷亅僛擪哶漛#include "storage.h" void fatalboxvoid logevent(char *string) { } void verify_ssh_host_key(char *host, int port, char *keytype, char *keystr, char *fingerprint) { int ret; static const char absentmsg[] = "The server's host key is not cached in the registry. You\n" "have no guarantee that the server is the computer you\n" "think it is.\n" "The server's key fingerprint is:\n" "%s\n" "If you trust this host, enter \"y\" to add the key to\n" "PuTTY's cache and carry on connecting.\n" "If you do not trust this host, enter \"n\" to abandon the\n" "connection.\n" "Continue connecting? (y/n) "; static const char wrongmsg[] = "WARNING - POTENTIAL SECURITY BREACH!\n" "The server's host key does not match the one PuTTY has\n" "cached in the registry. This means that either the\n" "server administrator has changed the host key, or you\n" "have actually connected to another computer pretending\n" "to be the server.\n" "The new key fingerprint is:\n" "%s\n" "If you were expecting this change and trust the new key,\n" "enter \"y\" to update PuTTY's cache and continue connecting.\n" "If you want to carry on connecting but without updating\n" "the cache, enter \"n\".\n" "If you want to abandon the connection completely, press\n" "Return to cancel. Pressing Return is the ONLY guaranteed\n" "safe choice.\n" "Update cached key? (y/n, Return cancels connection) "; static const char abandoned[] = "Connection abandoned.\n"; char line[32]; /* * Verify the key against the registry. */ ret = verify_host_key(host, port, keytype, keystr); if (ret == 0) /* success - key matched OK */ return; if (ret == 2) { /* key was different */ fprintf(stderr, wrongmsg, fingerprint); if (fgets(line, sizeof(line), stdin) && line[0] != '\0' && line[0] != '\n') { if (line[0] == 'y' || line[0] == 'Y') store_host_key(host, port, keytype, keystr); } else { fprintf(stderr, abandoned); exit(0); } } if (ret == 1) { /* key was absent */ fprintf(stderr, absentmsg, fingerprint); if (fgets(line, sizeof(line), stdin) && (line[0] == 'y' || line[0] == 'Y')) store_host_key(host, port, keytype, keystr); else { fprintf(stderr, abandoned); exit(0); } } , &cfg, &cfg Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 2adb0f1188f0927bd992cb39d1d2be28 Text-content-length: 300 Text-content-md5: e35ef3084b8f985d345c1e5f0b0eb617 Content-length: 340 K 15 cvs2svn:cvs-rev V 4 1.52 PROPS-END SVN蚻穠丩穞揊&, Configregistry_cleanup(void); GLOBAL int nsessions; GLOBAL char **sessions; /* * Exports from settings.c. */ void save_settings (char *section, int do_host, Config *cfg); void load_settings (char *section, int do_host, Config *cfg); void get_sesslist(int allocate) Node-path: putty/scp.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f26d6b72792338fa513ead27ea346645 Text-content-length: 2721 Text-content-md5: a75661e876c8bb37c41083b6d5cfc436 Content-length: 2761 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN佖M侂s攝刣刞攃;亷u蒟#include "storagevoid begin_session(void) { } void logevent(char *string) { } void verify_ssh_host_key(char *host, int port, char *keytype, char *keystr, char *fingerprint) { int ret; static const char absentmsg[] = "The server's host key is not cached in the registry. You\n" "have no guarantee that the server is the computer you\n" "think it is.\n" "The server's key fingerprint is:\n" "%s\n" "If you trust this host, enter \"y\" to add the key to\n" "PuTTY's cache and carry on connecting.\n" "If you do not trust this host, enter \"n\" to abandon the\n" "connection.\n" "Continue connecting? (y/n) "; static const char wrongmsg[] = "WARNING - POTENTIAL SECURITY BREACH!\n" "The server's host key does not match the one PuTTY has\n" "cached in the registry. This means that either the\n" "server administrator has changed the host key, or you\n" "have actually connected to another computer pretending\n" "to be the server.\n" "The new key fingerprint is:\n" "%s\n" "If you were expecting this change and trust the new key,\n" "enter Yes to update PuTTY's cache and continue connecting.\n" "If you want to carry on connecting but without updating\n" "the cache, enter No.\n" "If you want to abandon the connection completely, press\n" "Return to cancel. Pressing Return is the ONLY guaranteed\n" "safe choice.\n" "Update cached key? (y/n, Return cancels connection) "; static const char abandoned[] = "Connection abandoned.\n"; char line[32]; /* * Verify the key against the registry. */ ret = verify_host_key(host, port, keytype, keystr); if (ret == 0) /* success - key matched OK */ return; if (ret == 2) { /* key was different */ fprintf(stderr, wrongmsg, fingerprint); if (fgets(line, sizeof(line), stdin) && line[0] != '\0' && line[0] != '\n') { if (line[0] == 'y' || line[0] == 'Y') store_host_key(host, port, keytype, keystr); } else { fprintf(stderr, abandoned); exit(0); } } if (ret == 1) { /* key was absent */ fprintf(stderr, absentmsg, fingerprint); if (fgets(line, sizeof(line), stdin) && (line[0] == 'y' || line[0] == 'Y')) store_host_key(host, port, keytype, keystr); else { fprintf(stderr, abandoned); exit(0); } } , &cfg Node-path: putty/settings.c Node-kind: file Node-action: add Prop-content-length: 116 Text-delta: true Text-content-length: 4432 Text-content-md5: ff7f59aa1369d13b228870e12f1e0cbe Content-length: 4548 K 15 cvs2svn:cvs-rev V 3 1.1 K 12 svn:keywords V 23 Author Date Id Revision K 13 svn:eol-style V 6 native PROPS-END SVN9 7JK5匨G塊]嘍m扙扞#僅$橠丟僅F,E丆D丩D丱塃丆E8D丩旹丷僎乕D丠E8D丠侶丱凟I乣丱乯匘8ED!H乣僃&嘒俥揑丱凢1F&丗1FD'匛丷G 嘔2僄僀丗1E乄G 丒丷D凲咷EJ侴 嶬9G働EN刢丩剅怑丳N剄塇匔僁匩G凮奐匘廌,岼凩H丼L.婫厇G唈H丱L DP.JH3匩*両[ 丟唈凣F嘜[刢奃侲匜丏)嘓[刢咵(J3凞圔E=U圝M.婭匓噆 匧<丏墂GHE&岴匜朎侶侴唖I2D匬圗E圡M妋丏僱塂 凞唓咲凨(咵妝凟*侼侷婣D侲婽G婮侳妜丗妜H婮丏婽E奡E凞F-\丟3F侱"XM.凩?凞,b圝匟匔卋圝嘔墇丏峹侶 [宯圛墇丒2僣凧卾丒巓D.濹+M4V巜僁塂廮c峌咺<媌圝僁噒H匔僁唞b孖匓哻 G1卙9M剄僄孭I:僄2b圝怚匓塃扢c慲圞慙奵慱圗僂凥匔哬塇N峧咲僃哃揦匛m搉匤崀凟攅c!哊攄噄攗匢%卐旳丏扚L昲E扙c)凞0H匔丏朤丏塂c咺厀丏D0c僆侶\0匘.処揫D!丏b梉孖卌杕圠楬坉0奍朶卌(僁?凧揨凞,侲b咼凞欰b梉D0匤欵乨'D0匢怮丒4b侲F揰俈汧M剄D沬匢墇D泆卌攞D沬咺怮D泆D&俫泋N3D泆[汚Q淟侺楬俧圝扨D丗c塊匛濿G宎F"團咶DJ侲孿揇巏E濿丏墇丏匫K'嘐烼I巘E濿D5嘝焈俁焆俁匫L.E/D烳[宎M剄圖塂H沵丏爇D抆並杍M瀡侱咶僗 僁#D僱丵$圝;丏烳J+E"嶨EK烣嘐烲丏烸EG婥丗凟廱侶欶G侲丂M塈怮恈匭E卋梉奍厀E奵(F梷侷厀丟梸i丏攃ND圔D処b*咺DD&c侷d/E僆怮E 僁汧F價E>M'F凣J$侸@B:D唞侱"p並1E DW/丩匔侺&EGD侶Y卋圖僉厈U↖K噒丟-D噟咹 M唘侸,G唈L m(F凘咶﹕P.EQ6KT哴N*O<両〨[丠9T=P玍N坙I玹TP∟O0丒P<丏L&I塂_珽H塿嘐瑿Q墈UF| P∟N孭D╥E/G&D宆D匫I奌乚奧丵妘嘍>僌丷M媐侾婽J婡L=DR媫DD)G.F疊E F G.D&D奧L-T琀K I╥HN╲IW H岰丠9L峆P玍K峸I盇OP∟L1I╥J嶣N╲K嶣I F F巪FQ5I巒F廸丟瞋G﹚EH猒HJ侳3M巜P嘙猌I(E廻\;僄砡[<丒JP玍J怟I玹N怹Q盫II盇SQ㎝OI╥GN╲H^I慔T%K^:P玍MI盇RP玍T扐I玹U抁Q禼M JRP玍T揔I盇Q揹Q盫WJ眖P.[窾I攄M竲M攙Q)OJ盇T4Q盫G昫I玹M昿SHJ眖O)QK朤I盇Q杁QJI盇P QF桳J?J梄Q碦Q梸侷盇PP玍P?I盇M楾SLJ/OQMO膗K肧[聾匸 E 塧$O∟E/I+丟L甗丒甮圱烱丏丏 凞&両R焈D媫丟2R焨D媫乄9丒荙DF癥I癥\燷I盇p爚bE胇zL5凷蒏乊蒧K蒐I膞\蒦b蒨丂GL}@QnQ蒦@I%乆舊DD=k^3僘芉G奌D^F&D奧D蚔\J/O I婮E0Istdio"putty.h"storage static void gpps(*handle, char *namdefval, int len) { if (!__s( strncpy(; val[len-1] = '\0';} }i*i*i =idef);s (sectiono_host, Config *cfgnt ipkey; = open_w())return (, "Present", 1sHostName", cfg->;ortNumberpor p = "raw"for (0; backends[i]. != NULL; i++protocol ==break}P", pCloseOnExi!!c_on_exiWarnOnwarnTerminalTyptermtypSpeedsbuf[2*sizeof(environmt)], *p, *q; ufq hile (*q c = *q++;f (c'=' ||= ',\\') *p++\'\t'=c;},} *EbuUseruserNoPTYnoptyAgentFwafwRemoteCmr_cmCiphcCIPHER_BLOWFISH ? "blowfish" :DESdes" : "3uthTISry_tis_authSshsshPublicKeyFilkeyfilommanRFCfc_BackspaceIsDeletbksp_is_dXVTHomeExvt_homeenLinuxFunKeysfunky_pplicaCursorapp_cKeypapp_ketHacknethackAltF4lt_f4Sdiscl_linkCubeepeecrollLinelDECOriginModdec_oAutoWrapwrap_modFImpliesCRfhascWinAlwawin__aWinTitwintWidthdHeighhFoonIsBolisbolCharSeseVTvtTryPaletpoldAsColoold_c=0; i<220]2[30]; sprintf(buf%i2, "%d,[0], 1]2]MouseIsXmx56=32256jWordness*j=i; j #endif#ifndef NO_SECURITY#endif#ifndef NO_SECURITY#endif#ifndef NO_SECURITY#else MessageBox(NULL, "This program has been compiled for Win9X and will\n" "not run on NT, in case it causes a security breach.", "Pageant Fatal Error", MB_ICONERROR | MB_OK); return 1; #endif Revision-number: 689 Prop-content-length: 56 Content-length: 56 K 8 svn:date V 27 2006-09-06T12:07:17.563563Z PROPS-END Revision-number: 690 Prop-content-length: 141 Content-length: 141 K 7 svn:log V 41 Remove the hierarchical dialog structure K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-09T12:16:27.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: be4037f8d9ff3b26515151ea80eb6736 Text-content-length: 28235 Text-content-md5: f17576624c7772dd6998feeb59cb9779 Content-length: 28275 K 15 cvs2svn:cvs-rev V 4 1.57 PROPS-END SVN劗k剭]佔9俛<r猀乫倁J亝X皕汙俕倶L?凁V僨凃b肒乸佇'\{.圵{剚? "剢`佊7乿佋k侴P佊?dP佊?ZR佦|]4佪)U佊?J佭;\佮_p佲v[P佷?QU傟|~乣佺.俕侅|Y佊?乑侌\p佲v<P佊?yP佊?bP佊?QP佊?wU佊?}U佊?vP佊?]P佊?XP佊?_P佊?aP佊?cP佊?[P佊?O偔<#偙]P佊?VP佊?ZP佊?RP佊?i{偹\-偸wT偧oM傓{8S佊?V備b俋傚z~傞M 傟g 傠q俥傡{M傓{,P佊?WP佊?V佊?V儖*[儗c儘;K儙:KP佊?"I儜=(卥儞|儳3y儴5丄儵.T儶o兘7丟 兝P佊?丼兡=B兤>乁兦m兡=億兩BI兺>丠K冚zs冞5俧僅剣乯剫G4剭Y2剰9WPARAM font; int ypos, width; int xoff, yoff; }; static void ctlposinit(struct ctlpos *cp, HWND hwnd, int sideborder, int topborder) { RECT r, r2; cp->hwnd = hwndr2.left = r2.top = 0; r2.right = 4; r2.bottom = 8; MapDialogRect(hwnd, &r2); cp->width = (r.right * 4) / (r2.right) - 2*GAPBETWEEN; cp->xoff = sideborder; cp->width -= 2*sideborder; cp->yoff = topborderr.left += cp->xoff; r.top += cp->yoff; MapDialogRect(cp->hwnd, &r)char savedsession[2048]; enum { IDCX_ABOUT = IDC_ABOUT, IDCX_TAB, controlstartvalue, connectionpanelstart, IDC0_HOSTSTATIC, IDC0_HOST, IDC0_PORTSTATIC, IDC0_PORT, IDC0_PROTSTATIC, IDC0_PROTRAW, IDC0_PROTTELNET, IDC0_PROTSSH, IDC0_SESSSTATIC, IDC0_SESSEDIT, IDC0_SESSLIST, IDC0_SESSLOAD, IDC0_SESSSAVE, IDC0_SESSDEL, IDC0_CLOSEEXIT, IDC0_CLOSEWARN, connectionpanelend, keyboardpanelstart, IDC1_DELSTATIC, IDC1_DEL008, IDC1_DEL127, IDC1_HOMESTATIC, IDC1_HOMETILDE, IDC1_HOMERXVT, IDC1_FUNCSTATIC, IDC1_FUNCTILDE, IDC1_FUNCLINUX, IDC1_FUNCXTERM, IDC1_KPSTATIC, IDC1_KPNORMAL, IDC1_KPAPPLIC, IDC1_KPNH, IDC1_CURSTATIC, IDC1_CURNORMAL, IDC1_CURAPPLIC, IDC1_ALTF4, IDC1_ALTSPACE, IDC1_LDISCTERM, IDC1_SCROLLKEY, keyboardpanelend, terminalpanelstart, IDC2_WRAPMODE, IDC2_DECOM, IDC2_DIMSTATIC, IDC2_ROWSSTATIC, IDC2_ROWSEDIT, IDC2_COLSSTATIC, IDC2_COLSEDIT, IDC2_SAVESTATIC, IDC2_SAVEEDIT, IDC2_FONTSTATIC, IDC2_CHOOSEFONT, IDC2_LFHASCR, IDC2_BEEP, IDC2_BCE, IDC2_BLINKTEXT, terminalpanelend, windowpanelstart, IDC3_WINNAME, IDC3_BLINKCUR, IDC3_SCROLLBAR, IDC3_LOCKSIZE, IDC3_WINTITLE, IDC3_WINEDIT, windowpanelend, telnetpanelstart, IDC4_TTSTATIC, IDC4_TTEDIT, IDC4_TSSTATIC, IDC4_TSEDIT, IDC4_LOGSTATIC, IDC4_LOGEDIT, IDC4_ENVSTATIC, IDC4_VARSTATIC, IDC4_VAREDIT, IDC4_VALSTATIC, IDC4_VALEDIT, IDC4_ENVLIST, IDC4_ENVADD, IDC4_ENVREMOVE, IDC4_EMSTATIC, IDC4_EMBSD, IDC4_EMRFC, telnetpanelend, sshpanelstart, IDC5_TTSTATIC, IDC5_TTEDIT, IDC5_LOGSTATIC, IDC5_LOGEDIT, IDC5_NOPTY, IDC5_CIPHERSTATIC, IDC5_CIPHER3DES, IDC5_CIPHERBLOWF, IDC5_CIPHERDES, IDC5_AUTHTIS, IDC5_PKSTATIC, IDC5_PKEDIT, IDC5_PKBUTTON, IDC5_SSHPROTSTATIC, IDC5_SSHPROT1, IDC5_SSHPROT2, IDC5_AGENTFWD, IDC5_CMDSTATIC, IDC5_CMDEDIT, sshpanelend, selectionpanelstart, IDC6_MBSTATIC, IDC6_MBWINDOWS, IDC6_MBXTERM, IDC6_CCSTATIC, IDC6_CCLIST, IDC6_CCSET, IDC6_CCSTATIC2, IDC6_CCEDIT, selectionpanelend, colourspanelstart, IDC7_BOLDCOLOUR, IDC7_PALETTE, IDC7_STATIC, IDC7_LIST, IDC7_RSTATIC, IDC7_GSTATIC, IDC7_BSTATIC, IDC7_RVALUE, IDC7_GVALUE, IDC7_BVALUE, IDC7_CHANGE, colourspanelend, translationpanelstart, IDC8_XLATSTATIC, IDC8_NOXLAT, IDC8_KOI8WIN1251, IDC8_88592WIN1250, IDC8_CAPSLOCKCYR, IDC8_VTSTATIC, IDC8_VTXWINDOWS, IDC8_VTOEMANSI, IDC8_VTOEMONLY, IDC8_VTPOORMAN, translationpanelend, controlendvalue }; static const char *const colours[] = { "Default Foreground", "Default Bold Foreground", "Default Background", "Default Bold Background", "Cursor Text", "Cursor Colour", "ANSI Black", "ANSI Black Bold", "ANSI Red", "ANSI Red Bold", "ANSI Green", "ANSI Green Bold", "ANSI Yellow", "ANSI Yellow Bold", "ANSI Blue", "ANSI Blue Bold", "ANSI Magenta", "ANSI Magenta Bold", "ANSI Cyan", "ANSI Cyan Bold", "ANSI White", "ANSI White Bold" }; static const int permcolour[] = { TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE };void init_dlg_ctrls(HWND hwnd) { int i; char fontstatic[256]; SetDlgItemText (hwnd, IDC0_HOST, cfg.host); SetDlgItemText (hwnd, IDC0_SESSEDIT, savedsession); SetDlgItemInt (hwnd, IDC0_PORT, cfg.port, FALSE); for (i = 0; i < nsessions; i++) SendDlgItemMessage (hwnd, IDC0_SESSLIST, LB_ADDSTRING, 0, (LPARAM) (sessions[i])); CheckRadioButton (hwnd, IDC0_PROTRAW, IDC0_PROTSSH, cfg.protocol==PROT_SSH ? IDC0_PROTSSH : cfg.protocol==PROT_TELNET ? IDC0_PROTTELNET : IDC0_PROTRAW ); CheckDlgButton (hwnd, IDC0_CLOSEEXIT, cfg.close_on_exit); CheckDlgButton (hwnd, IDC0_CLOSEWARN, cfg.warn_on_close); CheckRadioButton (hwnd, IDC1_DEL008, IDC1_DEL127, cfg.bksp_is_delete ? IDC1_DEL127 : IDC1_DEL008); CheckRadioButton (hwnd, IDC1_HOMETILDE, IDC1_HOMERXVT, cfg.rxvt_homeend ? IDC1_HOMERXVT : IDC1_HOMETILDE); CheckRadioButton (hwnd, IDC1_FUNCTILDE, IDC1_FUNCXTERM, cfg.funky_type ? (cfg.funky_type==2 ? IDC1_FUNCXTERM : IDC1_FUNCLINUX ) : IDC1_FUNCTILDE); CheckRadioButton (hwnd, IDC1_CURNORMAL, IDC1_CURAPPLIC, cfg.app_cursor ? IDC1_CURAPPLIC : IDC1_CURNORMAL); CheckRadioButton (hwnd, IDC1_KPNORMAL, IDC1_KPNH, cfg.nethack_keypad ? IDC1_KPNH : cfg.app_keypad ? IDC1_KPAPPLIC : IDC1_KPNORMAL); CheckDlgButton (hwnd, IDC1_ALTF4, cfg.alt_f4); CheckDlgButton (hwnd, IDC1_ALTSPACE, cfg.alt_space); CheckDlgButton (hwnd, IDC1_LDISCTERM, cfg.ldisc_term); CheckDlgButton (hwnd, IDC1_SCROLLKEY, cfg.scroll_on_key); CheckDlgButton (hwnd, IDC2_WRAPMODE, cfg.wrap_mode); CheckDlgButton (hwnd, IDC2_DECOM, cfg.dec_om); CheckDlgButton (hwnd, IDC2_LFHASCR, cfg.lfhascr); SetDlgItemInt (hwnd, IDC2_ROWSEDIT, cfg.height, FALSE); SetDlgItemInt (hwnd, IDC2_COLSEDIT, cfg.width, FALSE); SetDlgItemInt (hwnd, IDC2_SAVEEDIT, cfg.savelines, FALSE); fmtfont (fontstatic); SetDlgItemText (hwnd, IDC2_FONTSTATIC, fontstatic); CheckDlgButton (hwnd, IDC2_BEEP, cfg.beep); CheckDlgButton (hwnd, IDC2_BCE, cfg.bce); CheckDlgButton (hwnd, IDC2_BLINKTEXT, cfg.blinktext); SetDlgItemText (hwnd, IDC3_WINEDIT, cfg.wintitle); CheckDlgButton (hwnd, IDC3_WINNAME, cfg.win_name_always); CheckDlgButton (hwnd, IDC3_BLINKCUR, cfg.blink_cur); CheckDlgButton (hwnd, IDC3_SCROLLBAR, cfg.scrollbar); CheckDlgButton (hwnd, IDC3_LOCKSIZE, cfg.locksize); SetDlgItemText (hwnd, IDC4_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC4_TSEDIT, cfg.termspeed); SetDlgItemText (hwnd, IDC4_LOGEDIT, cfg.username); { char *p = cfg.environmt; while (*p) { SendDlgItemMessage (hwnd, IDC4_ENVLIST, LB_ADDSTRING, 0, (LPARAM) p); p += strlen(p)+1; } } CheckRadioButton (hwnd, IDC4_EMBSD, IDC4_EMRFC, cfg.rfc_environ ? IDC4_EMRFC : IDC4_EMBSD); SetDlgItemText (hwnd, IDC5_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC5_LOGEDIT, cfg.username); CheckDlgButton (hwnd, IDC5_NOPTY, cfg.nopty); CheckDlgButton (hwnd, IDC5_AGENTFWD, cfg.agentfwd); CheckRadioButton (hwnd, IDC5_CIPHER3DES, IDC5_CIPHERDES, cfg.cipher == CIPHER_BLOWFISH ? IDC5_CIPHERBLOWF : cfg.cipher == CIPHER_DES ? IDC5_CIPHERDES : IDC5_CIPHER3DES); CheckRadioButton (hwnd, IDC5_SSHPROT1, IDC5_SSHPROT2, cfg.sshprot == 1 ? IDC5_SSHPROT1 : IDC5_SSHPROT2); CheckDlgButton (hwnd, IDC5_AUTHTIS, cfg.try_tis_auth); SetDlgItemText (hwnd, IDC5_PKEDIT, cfg.keyfile); SetDlgItemText (hwnd, IDC5_CMDEDIT, cfg.remote_cmd); CheckRadioButton (hwnd, IDC6_MBWINDOWS, IDC6_MBXTERM, cfg.mouse_is_xterm ? IDC6_MBXTERM : IDC6_MBWINDOWS); { static int tabs[4] = {25, 61, 96, 128}; SendDlgItemMessage (hwnd, IDC6_CCLIST, LB_SETTABSTOPS, 4, (LPARAM) tabs); } for (i=0; i<256; i++) { char str[100]; sprintf(str, "%d\t(0x%02X)\t%c\t%d", i, i, (i>=0x21 && i != 0x7F) ? i : ' ', cfg.wordness[i]); SendDlgItemMessage (hwnd, IDC6_CCLIST, LB_ADDSTRING, 0, (LPARAM) str); } CheckDlgButton (hwnd, IDC7_BOLDCOLOUR, cfg.bold_colour); CheckDlgButton (hwnd, IDC7_PALETTE, cfg.try_palette); { int i; for (i=0; i<22; i++) if (cfg.bold_colour || permcolour[i]) SendDlgItemMessage (hwnd, IDC7_LIST, LB_ADDSTRING, 0, (LPARAM) colours[i]); } SendDlgItemMessage (hwnd, IDC7_LIST, LB_SETCURSEL, 0, 0); SetDlgItemInt (hwnd, IDC7_RVALUE, cfg.colours[0][0], FALSE); SetDlgItemInt (hwnd, IDC7_GVALUE, cfg.colours[0][1], FALSE); SetDlgItemInt (hwnd, IDC7_BVALUE, cfg.colours[0][2], FALSE); CheckRadioButton (hwnd, IDC8_NOXLAT, IDC8_88592WIN1250, cfg.xlat_88592w1250 ? IDC8_88592WIN1250 : cfg.xlat_enablekoiwin ? IDC8_KOI8WIN1251 : IDC8_NOXLAT); CheckDlgButton (hwnd, IDC8_CAPSLOCKCYR, cfg.xlat_capslockcyr); CheckRadioButton (hwnd, IDC8_VTXWINDOWS, IDC8_VTPOORMAN, cfg.vtmode == VT_XWINDOWS ? IDC8_VTXWINDOWS : cfg.vtmode == VT_OEMANSI ? IDC8_VTOEMANSI : cfg.vtmode == VT_OEMONLY ? IDC8_VTOEMONLY : IDC8_VTPOORMAN); } static void hide(HWND hwnd, int hide, int minid, int maxid) { int i; for (i = minid; i < maxid; i++) { HWND ctl = GetDlgItem(hwnd, i); if (ctl) { ShowWindow(ctl, hide ? SW_HIDE : SW_SHOW); } } } /* * This _huge_ function is the configuration box. */ static int GenericMainDlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, int dlgtype) { HWND hw, tabctl; TC_ITEMHEADER tab; OPENFILENAME of; char filename[sizeof(cfg.keyfile)]; CHOOSEFONT cf; LOGFONT lf; char fontstatic[256]; int i; switch (msg) { case WM_INITDIALOG: SetWindowLong(hwnd, GWL_USERDATA, 0); /* * Centre the window. */ /* * Create the tab control. */ { RECT r; WPARAM font; X_TAB, hinst, NULL); font = SendMessage(hwnd, WM_GETFONT, 0, 0); SendMessage(tabctl, WM_SETFONT, font, MAKELPARAM(TRUE, 0)); } /* * Create the various panelfuls of controls. */ i = 0; /* The Connection panel. Accelerators used: [aco] dehlnprstwx */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); if (dlgtype == 0) { multiedit(&cp, "Host &Name", IDC0_HOSTSTATIC, IDC0_HOST, 75, "&Port", IDC0_PORTSTATIC, IDC0_PORT, 25, NULL); if (backends[2].backend == NULL) { /* this is PuTTYtel, so only two protocols available */ radioline(&cp, "Protocol:", IDC0_PROTSTATIC, 3, "&Raw", IDC0_PROTRAW, "&Telnet", IDC0_PROTTELNET, NULL); } else { radioline(&cp, "Protocol:", IDC0_PROTSTATIC, 3, "&Raw", IDC0_PROTRAW, "&Telnet", IDC0_PROTTELNET, #ifdef FWHACK "SS&H/hack", #else "SS&H", #endif IDC0_PROTSSH, NULL); } sesssaver(&cp, "Stor&ed Sessions", IDC0_SESSSTATIC, IDC0_SESSEDIT, IDC0_SESSLIST, "&Load", IDC0_SESSLOAD, "&Save", IDC0_SESSSAVE, "&Delete", IDC0_SESSDEL, NULL); } checkbox(&cp, "Close Window on E&xit", IDC0_CLOSEEXIT); checkbox(&cp, "&Warn on Close", IDC0_CLOSEWARN); tab.mask = TCIF_TEXT; tab.pszText = "Connection"; TabCtrl_InsertItem (tabctl, i++, &tab); } /* The Keyboard panel. Accelerators used: [aco] 4?ehiklmnprsuvxy */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); radioline(&cp, "Action of Backspace:", IDC1_DELSTATIC, 2, "Control-&H", IDC1_DEL008, "Control-&? (127)", IDC1_DEL127, NULL); radioline(&cp, "Action of Home and End:", IDC1_HOMESTATIC, 2, "&Standard", IDC1_HOMETILDE, "&rxvt", IDC1_HOMERXVT, NULL); radioline(&cp, "Function key and keypad layout:", IDC1_FUNCSTATIC, 3, "&VT400", IDC1_FUNCTILDE, "&Linux", IDC1_FUNCLINUX, "&Xterm R6", IDC1_FUNCXTERM, NULL); radioline(&cp, "Initial state of cursor keys:", IDC1_CURSTATIC, 2, "&Normal", IDC1_CURNORMAL, "A&pplication", IDC1_CURAPPLIC, NULL); radioline(&cp, "Initial state of numeric keypad:", IDC1_KPSTATIC, 3, "Nor&mal", IDC1_KPNORMAL, "Appl&ication", IDC1_KPAPPLIC, "N&etHack", IDC1_KPNH, NULL); checkbox(&cp, "ALT-F&4 is special (closes window)", IDC1_ALTF4); checkbox(&cp, "ALT-Space is special (S&ystem menu)", IDC1_ALTSPACE); checkbox(&cp, "&Use local terminal line discipline", IDC1_LDISCTERM); checkbox(&cp, "Reset scrollback on &keypress", IDC1_SCROLLKEY); tab.mask = TCIF_TEXT; tab.pszText = "Keyboard"; TabCtrl_InsertItem (tabctl, i++, &tab); } /* The Terminal panel. Accelerators used: [aco] dghlmnprsw */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); multiedit(&cp, "&Rows", IDC2_ROWSSTATIC, IDC2_ROWSEDIT, 33, "Colu&mns", IDC2_COLSSTATIC, IDC2_COLSEDIT, 33, "&Scrollback", IDC2_SAVESTATIC, IDC2_SAVEEDIT, 33, NULL); staticbtn(&cp, "", IDC2_FONTSTATIC, "C&hange...", IDC2_CHOOSEFONT); checkbox(&cp, "Auto &wrap mode initially on", IDC2_WRAPMODE); checkbox(&cp, "&DEC Origin Mode initially on", IDC2_DECOM); checkbox(&cp, "Implicit CR in every &LF", IDC2_LFHASCR); checkbox(&cp, "Bee&p enabled", IDC2_BEEP); checkbox(&cp, "Use Back&ground colour erase", IDC2_BCE); checkbox(&cp, "Enable bli&nking text", IDC2_BLINKTEXT); tab.mask = TCIF_TEXT; tab.pszText = "Terminal"; TabCtrl_InsertItem (tabctl, i++, &tab); } /* The Window panel. Accelerators used: [aco] bikty */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); if (dlgtype == 0) multiedit(&cp, "Initial window &title:", IDC3_WINTITLE, IDC3_WINEDIT, 100, NULL); checkbox(&cp, "Avoid ever using &icon title", IDC3_WINNAME); checkbox(&cp, "&Blinking cursor", IDC3_BLINKCUR); checkbox(&cp, "Displa&y scrollbar", IDC3_SCROLLBAR); checkbox(&cp, "Loc&k Window size", IDC3_LOCKSIZE); tab.mask = TCIF_TEXT; tab.pszText = "Window"; TabCtrl_InsertItem (tabctl, i++, &tab); } /* The Telnet panel. Accelerators used: [aco] bdflrstuv */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); if (dlgtype == 0) { staticedit(&cp, "Terminal-&type string", IDC4_TTSTATIC, IDC4_TTEDIT); staticedit(&cp, "Terminal-&speed string", IDC4_TSSTATIC, IDC4_TSEDIT); staticedit(&cp, "Auto-login &username", IDC4_LOGSTATIC, IDC4_LOGEDIT); envsetter(&cp, "Environment variables:", IDC4_ENVSTATIC, "&Variable", IDC4_VARSTATIC, IDC4_VAREDIT, "Va&lue", IDC4_VALSTATIC, IDC4_VALEDIT, IDC4_ENVLIST, "A&dd", IDC4_ENVADD, "&Remove", IDC4_ENVREMOVE); radioline(&cp, "Handling of OLD_ENVIRON ambiguity:", IDC4_EMSTATIC, 2, "&BSD (commonplace)", IDC4_EMBSD, "R&FC 1408 (unusual)", IDC4_EMRFC, NULL); tab.mask = TCIF_TEXT; tab.pszText = "Telnet"; TabCtrl_InsertItem (tabctl, i++, &tab); } } /* The SSH panel. Accelerators used: [aco] 123abdkmprtuw */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); if (dlgtype == 0) { staticedit(&cp, "Terminal-&type string", IDC5_TTSTATIC, IDC5_TTEDIT); staticedit(&cp, "Auto-login &username", IDC5_LOGSTATIC, IDC5_LOGEDIT); multiedit(&cp, "&Remote command:", IDC5_CMDSTATIC, IDC5_CMDEDIT, 100, NULL); checkbox(&cp, "Don't allocate a &pseudo-terminal", IDC5_NOPTY); checkbox(&cp, "Atte&mpt TIS or CryptoCard authentication", IDC5_AUTHTIS); checkbox(&cp, "Allow &agent forwarding", IDC5_AGENTFWD); editbutton(&cp, "Private &key file for authentication:", IDC5_PKSTATIC, IDC5_PKEDIT, "Bro&wse...", IDC5_PKBUTTON); radioline(&cp, "Preferred SSH protocol version:", IDC5_SSHPROTSTATIC, 2, "&1", IDC5_SSHPROT1, "&2", IDC5_SSHPROT2, NULL); radioline(&cp, "Preferred encryption algorithm:", IDC5_CIPHERSTATIC, 3, "&3DES", IDC5_CIPHER3DES, "&Blowfish", IDC5_CIPHERBLOWF, "&DES", IDC5_CIPHERDES, NULL); tab.mask = TCIF_TEXT; tab.pszText = "SSH"; TabCtrl_InsertItem (tabctl, i++, &tab); } } /* The Selection panel. Accelerators used: [aco] stwx */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); radiobig(&cp, "Action of mouse buttons:", IDC6_MBSTATIC, "&Windows (Right pastes, Middle extends)", IDC6_MBWINDOWS, "&xterm (Right extends, Middle pastes)", IDC6_MBXTERM, NULL); charclass(&cp, "Character classes:", IDC6_CCSTATIC, IDC6_CCLIST, "&Set", IDC6_CCSET, IDC6_CCEDIT, "&to class", IDC6_CCSTATIC2); tab.mask = TCIF_TEXT; tab.pszText = "Selection"; TabCtrl_InsertItem (tabctl, i++, &tab); } /* The Colours panel. Accelerators used: [aco] bmlu */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); checkbox(&cp, "&Bolded text is a different colour", IDC7_BOLDCOLOUR); checkbox(&cp, "Attempt to use &logical palettes", IDC7_PALETTE); colouredit(&cp, "Select a colo&ur and click to modify it:", IDC7_STATIC, IDC7_LIST, "&Modify...", IDC7_CHANGE, "Red:", IDC7_RSTATIC, IDC7_RVALUE, "Green:", IDC7_GSTATIC, IDC7_GVALUE, "Blue:", IDC7_BSTATIC, IDC7_BVALUE, NULL); tab.mask = TCIF_TEXT; tab.pszText = "Colours"; TabCtrl_InsertItem (tabctl, i++, &tab); } /* The Translation panel. Accelerators used: [aco] beiknpsx */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 6, 30); radiobig(&cp, "Handling of VT100 line drawing characters:", IDC8_VTSTATIC, "Font has &XWindows encoding", IDC8_VTXWINDOWS, "Use font in &both ANSI and OEM modes", IDC8_VTOEMANSI, "Use font in O&EM mode only", IDC8_VTOEMONLY, "&Poor man's line drawing (""+"", ""-"" and ""|"")", IDC8_VTPOORMAN, NULL); radiobig(&cp, "Character set translation:", IDC8_XLATSTATIC, "&None", IDC8_NOXLAT, "&KOI8 / Win-1251", IDC8_KOI8WIN1251, "&ISO-8859-2 / Win-1250", IDC8_88592WIN1250, NULL); checkbox(&cp, "CAP&S LOCK acts as cyrillic switch", IDC8_CAPSLOCKCYR); tab.mask = TCIF_TEXT; tab.pszText = "Translation"; TabCtrl_InsertItem (tabctl, i++, &tab); } init_dlg_ctrls(hwnd); hide(hwnd, TRUE, controlstartvalue, controlendvalue); hide(hwnd, FALSE, connectionpanelstart, connectionpanelend); /* * Set focus into the first available control. */ { HWND ctl; ctl = GetDlgItem(hwnd, IDC0_HOST); if (!ctl) ctl = GetDlgItem(hwnd, IDC0_CLOSEEXIT); SetFocus(ctl); } SetWindowLong(hwnd, GWL_USERDATA, 1); return 0hwnd, WM_COMMAND, IDOK, 0); break; case WM_NOTIFY: if (LOWORD(wParam) == IDCXTCITEM item; char buffer[64]; item.pszText = buffer; item.cchTextMax = sizeof(buffer); item.mask = TCIF_TEXT; TabCtrl_GetItem(((LPNMHDR)lParam)->hwndFrom, i, &item); hide(hwnd, TRUE, controlstartvalue, controlendvalue); if (!strcmp(buffer, "Connection")) hide(hwnd, FALSE, connectionpanelstart, connectionpanelend); if (!strcmp(buffer, "Keyboard")) hide(hwnd, FALSE, keyboardpanelstart, keyboardpanelend); if (!strcmp(buffer, "Terminal")) hide(hwnd, FALSE, terminalpanelstart, terminalpanelend); if (!strcmp(buffer, "Window")) hide(hwnd, FALSE, windowpanelstart, windowpanelend); if (!strcmp(buffer, "Telnet")) hide(hwnd, FALSE, telnetpanelstart, telnetpanelend); if (!strcmp(buffer, "SSH")) hide(hwnd, FALSE, sshpanelstart, sshpanelend); if (!strcmp(buffer, "Selection")) hide(hwnd, FALSE, selectionpanelstart, selectionpanelend); if (!strcmp(buffer, "Colours")) hide(hwnd, FALSE, colourspanelstart, colourspanelend); if (!strcmp(buffer, "Translation")) hide(hwnd, FALSE, translationpanelstart, translationpanelend); /* * Only process WM_COMMAND once the dialog is fully formed. */ if (GetWindowLong(hwnd, GWL_USERDATA) == 1) switch (LOWORD(wParam)) { case IDC0_PROTTELNET: case IDC0_PROTSSH: case IDC00_PROTSSH); int j = IsDlgButtonChecked (hwnd, IDC00_PORT, cfg.port, FALSE); } } break; case IDC0_HOST: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC0_HOST, cfg.host, sizeof(cfg.host)-1); break; case IDC0_PORT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC0_PORT, &cfg.port); break; case IDC0_CLOSEEXIT cfg.close_on_exit = IsDlgButtonChecked (hwnd, IDC0_CLOSEEXIT); break; case IDC0_CLOSEWARN cfg.warn_on_close = IsDlgButtonChecked (hwnd, IDC0_CLOSEWARN); break; case IDC00_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); GetDlgItemText (hwnd, IDC00_SESSSAVE0_SESSEDIT, str, sizeof(str)-1); if (!*str) { int n = SendDlgItemMessage (hwnd, IDC000_SESSLIST, LB_ADDSTRING, 0, (LPARAM) (sessions[i])); SendDlgItemMessage (hwnd, IDC00_SESSLIST: case IDC0_SESSLOAD: if (LOWORD(wParam) == IDC0_SESSLOAD && f (LOWORD(wParam) == IDC0_SESSLIST && HIWORD(wParam) != LBN_DBLCLK) break; { int n = SendDlgItemMessage (hwnd, IDC0init_dlg_ctrls(hwnd); } if (LOWORD(wParam) == IDC00_SESSDELn = SendDlgItemMessage (hwnd, IDC000_SESSLIST, LB_ADDSTRING, 0, (LPARAM) (sessions[i])); SendDlgItemMessage (hwnd, IDC0_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); } case IDC1_DEL008: case IDC1_DEL127 cfg.bksp_is_delete = IsDlgButtonChecked (hwnd, IDC1_DEL127); break; case IDC1_HOMETILDE: case IDC1_HOMERXVT cfg.rxvt_homeend = IsDlgButtonChecked (hwnd, IDC1_HOMERXVT); break; case IDC1_FUNCXTERM cfg.funky_type = 2; break; case IDC1_FUNCTILDE: case IDC1_FUNCLINUX cfg.funky_type = IsDlgButtonChecked (hwnd, IDC1_FUNCLINUX); break; case IDC1_KPNORMAL: case IDC1_KPAPPLICcfg.app_keypad = IsDlgButtonChecked (hwnd, IDC1_KPAPPLIC); cfg.nethack_keypad = FALSE; } break; case IDC1_KPNHcfg.app_keypad = FALSE; cfg.nethack_keypad = TRUE; } break; case IDC1_CURNORMAL: case IDC1_CURAPPLIC cfg.app_cursor = IsDlgButtonChecked (hwnd, IDC1_CURAPPLIC); break; case IDC1_ALTF4 cfg.alt_f4 = IsDlgButtonChecked (hwnd, IDC1_ALTF4); break; case IDC1_ALTSPACE cfg.alt_space = IsDlgButtonChecked (hwnd, IDC1_ALTSPACE); break; case IDC1_LDISCTERM cfg.ldisc_term = IsDlgButtonChecked (hwnd, IDC1_LDISCTERM); break; case IDC1_SCROLLKEY cfg.scroll_on_key = IsDlgButtonChecked (hwnd, IDC1_SCROLLKEY); break; case IDC2_WRAPMODE cfg.wrap_mode = IsDlgButtonChecked (hwnd, IDC2_WRAPMODE); break; case IDC2_DECOM cfg.dec_om = IsDlgButtonChecked (hwnd, IDC2_DECOM); break; case IDC22_LFHASCR); break; case IDC2_ROWSEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC2_ROWSEDIT, &cfg.height); break; case IDC2_COLSEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC2_COLSEDIT, &cfg.width); break; case IDC2_SAVEEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC2_SAVEEDIT, &cfg.savelines); break; case IDC22_FONTSTATIC, fontstatic); } break; case IDC2_BEEP cfg.beep = IsDlgButtonChecked (hwnd, IDC2_BEEP); break; case IDC2_BLINKTEXT cfg.blinktext = IsDlgButtonChecked (hwnd, IDC2_BLINKTEXT); break; case IDC2_BCE cfg.bce = IsDlgButtonChecked (hwnd, IDC2_BCE); break; case IDC3_WINNAME cfg.win_name_always = IsDlgButtonChecked (hwnd, IDC3_WINNAME); break; case IDC3_BLINKCUblink_cur = IsDlgButtonChecked (hwnd, IDC3_BLINKCUR); break; case IDC33_SCROLLBAR); break; case IDC3_LOCKSIZ cfg.locksize = IsDlgButtonChecked (hwnd, IDC3_LOCKSIZE); break; case IDC3_WINEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC3_WINEDIT, cfg.wintitle, sizeof(cfg.wintitle)-1); break; case IDC44_TTEDIT, cfg.termtype, sizeof(cfg.termtype)-1); break; case IDC4_TSEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC4_TSEDIT, cfg.termspeed, sizeof(cfg.termspeed)-1); break; case IDC4_LOGEDIT: if (HIWORD(wParam) == EN_CHANGE) { GetDlgItemText (hwnd, IDC4_LOGEDIT, cfg.username, sizeof(cfg.username)-1); cfg.username[sizeof(cfg.username)-1] = '\0'; SetWindowLong(hwnd, GWL_USERDATA, 0); SetDlgItemText (hwnd, IDC5_LOGEDIT, cfg.username); SetWindowLong(hwnd, GWL_USERDATA, 1); } break; case IDC4_EMBSD: case IDC4_EMRFC: cfg.rfc_environ = IsDlgButtonChecked (hwnd, IDC4_EMRFC); break; case IDC4_ENVADD char str[sizeof(cfg.environmt)]; char *p; GetDlgItemText (hwnd, IDC444_ENVLIST, LB_ADDSTRING, 0, (LPARAM)str); SetDlgItemText (hwnd, IDC4_VAREDIT, ""); SetDlgItemText (hwnd, IDC4444 case IDC55_TTEDIT, cfg.termtype, sizeof(cfg.termtype)-1); break; case IDC5_LOGEDIT: if (HIWORD(wParam) == EN_CHANGE) { GetDlgItemText (hwnd, IDC5_LOGEDIT, cfg.username, sizeof(cfg.username)-1); cfg.username[sizeof(cfg.username)-1] = '\0'; SetWindowLong(hwnd, GWL_USERDATA, 0); SetDlgItemText (hwnd, IDC4_LOGEDIT, cfg.username); SetWindowLong(hwnd, GWL_USERDATA, 1); } break; case IDC5_NOPTY cfg.nopty = IsDlgButtonChecked (hwnd, IDC5_NOPTY); break; case IDC5_AGENTFWD cfg.agentfwd = IsDlgButtonChecked (hwnd, IDC5_AGENTFWD); break; case IDC5_CIPHER3DES: case IDC5_CIPHERBLOWF: case IDC5_CIPHERDESf (IsDlgButtonChecked (hwnd, IDC555_CIPHERDES)) cfg.cipher = CIPHER_DES; } break; case IDC5_SSHPROT1: case IDC555_SSHPROT2)) cfg.sshprot = 2; } break; case IDC5_AUTHTIS cfg.try_tis_auth = IsDlgButtonChecked (hwnd, IDC5_AUTHTIS); break; case IDC5_PKEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC55_CMDEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC5_CMDEDIT, cfg.remote_cmd, sizeof(cfg.remote_cmd)-1); break; case IDC5_PKBUTTON:5_PKEDIT, cfg.keyfile); } break; case IDC6_MBWINDOWS: case IDC6_MBXTERM: cfg.mouse_is_xterm = IsDlgButtonChecked (hwnd, IDC6_MBXTERM); break; case IDC6_CCSET: { BOOL ok; int i; int n = GetDlgItemInt (hwnd, IDC6666 case IDC77_BOLDCOLOUR); n = SendDlgItemMessage (hwnd, IDC7_LIST, LB_GETCOUNT, 0, 0); if (cfg.bold_colour && n!=22) { for (i=0; i<22; i++) if (!permcolour[i]) SendDlgItemMessage (hwnd, IDC7colour[i]) SendDlgItemMessage (hwnd, IDC7_LIST, LB_DELETESTRING, i, 0); } } break; case IDC7_PALETTE cfg.try_palette = IsDlgButtonChecked (hwnd, IDC7_PALETTE); break; case IDC7_LIST: if (HIWORD(wParam) == LBN_DBLCLK || HIWORD(wParam) == LBN_SELCHANGE) { int i = SendDlgItemMessage (hwnd, IDC77_RVALUE, cfg.colours[i][0], FALSE); SetDlgItemInt (hwnd, IDC7_GVALUE, cfg.colours[i][1], FALSE); SetDlgItemInt (hwnd, IDC77777_GVALUE, cfg.colours[i][1], FALSE); SetDlgItemInt (hwnd, IDC7_BVALUE, cfg.colours[i][2], FALSE); } } break; case IDC8_NOXLAT: case IDC8_KOI8WIN1251: case IDC88_KOI8WIN1251); cfg.xlat_88592w1250 = IsDlgButtonChecked (hwnd, IDC8_88592WIN1250); break; case IDC88_CAPSLOCKCYR); } break; case IDC8_VTXWINDOWS: case IDC8_VTOEMANSI: case IDC8_VTOEMONLY: case IDC8_VTPOORMAN: cfg.vtmode = (IsDlgButtonChecked (hwnd, IDC8_VTXWINDOWS) ? VT_XWINDOWS : IsDlgButtonChecked (hwnd, IDC8_VTOEMANSI) ? VT_OEMANSI : IsDlgButtonChecked (hwnd, IDC8_VTOEMONLY) ? VT_OEMONLY : VT_POORMAN); breakX 0 1 Revision-number: 691 Prop-content-length: 159 Content-length: 159 K 7 svn:log V 59 Miscellaneous fixes to try to make other compilers happier K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-09T12:19:09.000000Z PROPS-END Node-path: putty/be_all.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 966c57698ec7ef2d38f468b5d79d2288 Text-content-length: 120 Text-content-md5: 26dbb7fabd32ad3faf6b85e8bbfc1d47 Content-length: 159 K 15 cvs2svn:cvs-rev V 3 1.2 PROPS-END SVN侭) dqd乀nfndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/be_none.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3436475773e0696a6d0ea7684f754a7a Text-content-length: 122 Text-content-md5: 346f27ff380ce78670807b79d7178af2 Content-length: 161 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN俍傾 d$d9!fndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/be_nossh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 325b9d2fe6a49a5be846c18d623dc30f Text-content-length: 120 Text-content-md5: 8b4b0855dfab78cce4d8dc1350d81d3e Content-length: 159 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN僒; dqd俧nfndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/ldisc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1412bc4e98b9ee4decb269e43aac26d2 Text-content-length: 140 Text-content-md5: 6641252536844eabfb7cc5667b48e30c Content-length: 179 K 15 cvs2svn:cvs-rev V 3 1.8 PROPS-END SVN無{{瀟#include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/misc.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: ab578a31f34832dd9c50050f61d90546 Text-content-length: 140 Text-content-md5: 27a1c7e2ab354f50f6478c917c0f8496 Content-length: 179 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN 宷{{媣#include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/noise.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 60103424cb3387a33ab91b692f89f8d8 Text-content-length: 120 Text-content-md5: 4c2c2340e075881372a74e7abff58684 Content-length: 159 K 15 cvs2svn:cvs-rev V 3 1.9 PROPS-END SVN?& did慪ffndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/settings.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: eaa3ecd76f016f5d59b379f7ac771ccb Text-content-length: 120 Text-content-md5: 1e0413d3d0d98da71e0b0d7e0c23e5d5 Content-length: 159 K 15 cvs2svn:cvs-rev V 3 1.3 PROPS-END SVN醻鈋 dMd4Jfndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/sizetip.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 4f135bf8a4527a0b46e3ab638ea61d9e Text-content-length: 140 Text-content-md5: 8201f475375e314cb3d60ab94a7476e2 Content-length: 179 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN-{{2#include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/sshsha.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 03578f9f6464b060a0ef42a5bf3cff19 Text-content-length: 20 Text-content-md5: 311a2970edbf34b358e950bb59f4bea2 Content-length: 59 K 15 cvs2svn:cvs-rev V 3 1.7 PROPS-END SVN硄 乮 Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 98f9f6917b644d2dacbb4be5db816744 Text-content-length: 143 Text-content-md5: 4333a3556296032d68fa7a31162c449d Content-length: 183 K 15 cvs2svn:cvs-rev V 4 1.25 PROPS-END SVN儺)儻{{儺#include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4684da2e11732ca3d4f6c2a87c5b0812 Text-content-length: 31 Text-content-md5: 4902823c6f2268d7dead91bb5cf5d15e Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.69 PROPS-END SVN剝剝 仠r傛仠wHEAVY Node-path: putty/winstore.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 3bd8efdf09fe94cd40ac7b6bfd53f361 Text-content-length: 120 Text-content-md5: 9c324f2165f2ed7bc3187215e0031f20 Content-length: 159 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN鉇( dxd釲ufndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Node-path: putty/xlat.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f6d96eca8448709bb766183bfdad6825 Text-content-length: 140 Text-content-md5: 166a809e846b38ba9a59587860d0bf14 Content-length: 179 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN{{#include #ifndef AUTO_WINSOCK #ifdef WINSOCK_TWO #include #else #include #endif #endif Revision-number: 692 Prop-content-length: 371 Content-length: 371 K 7 svn:log V 270 Robert de Bath's big patch: - cope with strange WinSock wrappers not supporting SIOCATMARK - define yet more terminal compatibility modes - support UK-ASCII (just like US-ASCII but # is a sterling sign) - support connection keepalives at a configurable interval K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-09T12:53:32.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e35ef3084b8f985d345c1e5f0b0eb617 Text-content-length: 53 Text-content-md5: e5938840058561bc5291815b6f4d8d2c Content-length: 93 K 15 cvs2svn:cvs-rev V 4 1.53 PROPS-END SVN6昛嘽昛盻7, TS_PINGint ping_interval Node-path: putty/settings.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 1e0413d3d0d98da71e0b0d7e0c23e5d5 Text-content-length: 123 Text-content-md5: d4ccc392b8d3c83a78a6e72b8154ccc9 Content-length: 162 K 15 cvs2svn:cvs-rev V 3 1.4 PROPS-END SVN鈋鉪` 塽9,i (sesskey, "PingInterval", cfg->ping_intervali (sesskey, "PingInterval", 0, &cfg->ping_interval Node-path: putty/ssh.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4beb6680fdee1642dc23aa2d9fa5cfba Text-content-length: 286 Text-content-md5: 36bd1d1f1da6ccd462d7f8351d353e0b Content-length: 326 K 15 cvs2svn:cvs-rev V 4 1.61 PROPS-END SVN厹E厼S厷4厷(if (code == TS_PING) { if (ssh_version == 1) { send_packet(SSH1_MSG_IGNORE, PKT_STR, "", PKT_END); } else { ssh2_pkt_init(SSH2_MSG_IGNORE); ssh2_pkt_addstring_start(); ssh2_pkt_send(); } Node-path: putty/telnet.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 74a62bb0fd16dcb921fdbba487dad210 Text-content-length: 278 Text-content-md5: eb0631c35c9d587ac92e7eed6614895f Content-length: 318 K 15 cvs2svn:cvs-rev V 4 1.19 PROPS-END SVN仸C仹f乺亴# 桜亴}g仱2 /* Don't check for error return; some shims don't support * this ioctl. */ ioctlsocket (s, SIOCATMARK, &clear_of_oob case TS_PING: if (o_they_sga.state == ACTIVE) { b[1] = NOP; s_write (b, 2); } Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4333a3556296032d68fa7a31162c449d Text-content-length: 2546 Text-content-md5: 35a08e6af64151f355980fa2c65b5409 Content-length: 2586 K 15 cvs2svn:cvs-rev V 4 1.26 PROPS-END SVN儻兙(m抴哅亹8唌 仐&.仠0乧匑伖Nr伩h伩o(衆伬Qm倯.j倰倱zL亊偖Z偛A腷傎恑優'2(OTHER,2(OTHER, case '\177': /* Destructive backspace This does nothing on a real VT100 */ compatibility(OTHER); if (curs_x && !wrapnext) curs_x--; wrapnext = FALSE; fix_cpos; *cpos = (' ' | curr_attr | ATTR_ASCII)5f if (c==0x5F) *cpos++ = ' ' | curr_attr |case ATTR_GBCHR: /* If UK-ASCII, make the '#' a LineDraw Pound */ if (c == '#') { *cpos++ = '}' | curr_attr | ATTR_LINEDRW; break; } /*FALLTHROUGH*/2(OTHER,2(OTHER,2(OTHER,VT220); curr_attr &= ~ATTR_BLINK; break; case 27: /* disable reverse video */ compatibility2(OTHER,in 40..42 are a PuTTY extension. * The 2nd arg, 8bit vs 7bit is not checkswitch (esc_args[0]) { case 61: compatibility_level &= ~TM_VTXXX; compatibility_level |= TM_VT102; break; case 62: compatibility_level &= ~TM_VTXXX; compatibility_level |= TM_VT220; break; default: if( esc_args[0] > 60 && esc_args[0] < 70 ) compatibility_level |= TM_VTXXX; break; case 40: compatibility_level &= TM_VTXXX; break; case 41: compatibility_level = TM_PUTTY; break; case 42: compatibility_level = TM_SCOANSI; break; case ARG_DEFAULT: compatibility_level = TM_PUTTY; break; case 50: break; } /* Change the response to CSI c */ if (esc_args[0] == 50) { int i; char lbuf[64]; strcpy(id_string, "\033[?"); for (i=1; i': app_keypad{ /* VT Specials -> ISO8859-1 */ static const char poorman2[] = "* # HTFFCRLF\xB0 \xB1 NLVT+ + + + + - - - - - + + + + | <=>=PI!=\xA3 \xB7 "; int ch = (*q & CHAR_MASK); if ((*q & ATTR_LINEDRW) && ch >= 0x60 && ch < 0x7F ) { int x; *p++ = poorman2[2*(ch-0x60)]; if ( (x = poorman2[2*(ch-0x60)+1]) != ' ') *p++ = x; } #if 0 else if ((*q & ATTR_GBCHR) && ch == '#') *p++ = (unsigned char) 0xA3; #endif else *p++ = (unsigned char) ch; q++; } Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: f17576624c7772dd6998feeb59cb9779 Text-content-length: 1799 Text-content-md5: e5e90e4a8dde5f951b155109823dbf30 Content-length: 1839 K 15 cvs2svn:cvs-rev V 4 1.58 PROPS-END SVN剭]剶):>觨,>/轝5譿伒I>伔=梙伡u&佌R奫佖qx﹝併Hv刉値2$倱sF偉?塁倸^k侲偆匑偋pQ橞偔y朎偳B傕o丵W儥=(傳 W儥=傶W儥=S傔:靘儬p int sid, int eid, int percentedit100-percentedit) * (cp->width + GAPBETWEEN) / 100PINGSTATIC, IDC0_PINGEDITFUNCVT400IDC3_CLOSEEXIT, IDC3_CLOSEWARNSetDlgItemInt (hwnd, IDC0_PINGEDIT, cfg.ping_interval, FALSE cfg.funky_type == 0 ? IDC1_FUNCTILDE : cfg.funky_type == 1 ? IDC1_FUNCLINUX : cfg.funky_type == 2 ? IDC1_FUNCXTERM : cfg.funky_type == 3 ? IDC1_FUNCVT400 : IDC1_FUNCTILDE CheckDlgButton (hwnd, IDC3_CLOSEEXIT, cfg.close_on_exit); CheckDlgButton (hwnd, IDC3_CLOSEWARN, cfg.warn_on_clos staticedit(&cp, "Keepalive inter&val (minutes)", IDC0_PINGSTATIC, IDC0_PINGEDIT, 254, "&VT400", IDC1_FUNCTILDE, "&Linux", IDC1_FUNCLINUX, "&Xterm R6", IDC1_FUNCXTERM, "&VT400", IDC1_FUNCVT400vwcheckbox(&cp, "Close Window on E&xit", IDC3_CLOSEEXIT); checkbox(&cp, "&Warn on Close", IDC3_CLOSEWARN, 50); staticedit(&cp, "Terminal-&speed string", IDC4_TSSTATIC, IDC4_TSEDIT, 50); staticedit(&cp, "Auto-login &username", IDC4_LOGSTATIC, IDC4_LOGEDIT, 50, 50); staticedit(&cp, "Auto-login &username", IDC5_LOGSTATIC, IDC5_LOGEDIT, 50PINGED case IDC0_PINGEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC0_PINGEDIT, &cfg.ping_interval); break; case IDC1_DEL008: case IDC1_DEL127VT400funky_type = 33_CLOSEEXITclose_on_exit = IsDlgButtonChecked (hwnd, IDC3_CLOSEEXIT); break; case IDC33_CLOSEWARN Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 4902823c6f2268d7dead91bb5cf5d15e Text-content-length: 4291 Text-content-md5: c72db0455bed3b55f2baecd647185a31 Content-length: 4331 K 15 cvs2svn:cvs-rev V 4 1.70 PROPS-END SVN剝剻> *丩*丟鋃媙p僟鮶5-鼅糲佦);倶 厇傌''傓峴匱儐B奮儗,:儣 哊儰@`匟儸桵儾q丩兩Z[ 兯"8冝]#include 0) { time_t now; time(&now); if (now-last_movement > cfg.ping_interval * 60 - 10) { back->special(TS_PING); last_movement = now; } }time(&last_movement) * Actually '_' maps to space too, but that's done before#if 0 { /* Tell us all about key events */ static BYTE oldstate[256]; static int first = 1; static int scan; int ch; if(first) memcpy(oldstate, keystate, sizeof(oldstate)); first=0; if ((HIWORD(lParam)&(KF_UP|KF_REPEAT))==KF_REPEAT) { debug(("+")); } else if ((HIWORD(lParam)&KF_UP) && scan==(HIWORD(lParam) & 0xFF) ) { debug((". U")); } else { debug((".\n")); if (wParam >= VK_F1 && wParam <= VK_F20 ) debug(("K_F%d", wParam+1-VK_F1)); else switch(wParam) { case VK_SHIFT: debug(("SHIFT")); break; case VK_CONTROL: debug(("CTRL")); break; case VK_MENU: debug(("ALT")); break; default: debug(("VK_%02x", wParam)); } if(message == WM_SYSKEYDOWN || message == WM_SYSKEYUP) debug(("*")); debug((", S%02x", scan=(HIWORD(lParam) & 0xFF) )); ch = MapVirtualKey(wParam, 2); if (ch>=' ' && ch<='~') debug((", '%c'", ch)); else if (ch) debug((", $%02x", ch)); if (keys[0]) debug((", KB0=%02x", keys[0])); if (keys[1]) debug((", KB1=%02x", keys[1])); if (keys[2]) debug((", KB2=%02x", keys[2])); if ( (keystate[VK_SHIFT]&0x80)!=0) debug((", S")); if ( (keystate[VK_CONTROL]&0x80)!=0) debug((", C")); if ( (HIWORD(lParam)&KF_EXTENDED) ) debug((", E")); if ( (HIWORD(lParam)&KF_UP) ) debug((", U")); } if ((HIWORD(lParam)&(KF_UP|KF_REPEAT))==KF_REPEAT) ; else if ( (HIWORD(lParam)&KF_UP) ) oldstate[wParam&0xFF] ^= 0x80; else oldstate[wParam&0xFF] ^= 0x81; for(ch=0; ch<256; ch++) if (oldstate[ch] != keystate[ch]) debug((", M%02x=%02x", ch, keystate[ch])); memcpy(oldstate, keystate, sizeof(oldstate)); } #endif 3 || (cfg.funky_type <|| cfg.funky_type == 3 /* Control-Numlock for app-keypad mode switch */ if (wParam == VK_PAUSE && shift_state == 2) { app_keypad_keys ^= 1; return 03 || ( cfg.funky_type <= 1 && app_keypad_keys)) switch(wParam) { case VK_EXECUTE:cfg.funky_type==2) { if(shift_state) xkey = 'l'; else xkey = 'k'; } else if(shift_state) xkey = 'm'; else xkey = 'l'; break; case VK_DIVIDE: if(cfg.funky_type==2) xkey = 'o'; break; case VK_MULTIPLY:if(cfg.funky_type==2) xkey = 'j'; break; case VK_SUBTRACT:if(cfg.funky_type==2) xkey = 'm'; break; /* Reorder edit keys to physical order */ if (cfg.funky_type == 3 && code <= 6 ) code = "\0\2\1\4\5\3\6"[code]; if (vt52_mode) p += sprintf((char *)p, "\x1B%c", code + 'P' - 11); else return 0; Revision-number: 693 Prop-content-length: 149 Content-length: 149 K 7 svn:log V 49 Abandon the tab control in favour of a tree view K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-09T15:51:14.000000Z PROPS-END Node-path: putty/win_res.rc Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 0e8ad38f272ef4e742d98b6d1a7d1acd Text-content-length: 396 Text-content-md5: f38ec364f892cec1b960247cd35cfe19 Content-length: 436 K 15 cvs2svn:cvs-rev V 4 1.43 PROPS-END SVN&(俰I墊$墊扵婻280, 232Configuration" FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "&Open", IDOK, 184, 215, 44, 14 PUSHBUTTON "&Cancel", IDCANCEL, 231, 215, 44, 14 PUSHBUTTON "&About", IDC_ABOUT, 3, 215, 44, 14, NOT WS_TABSTOP END /* Accelerators used: ac */ IDD_RECONF DIALOG DISCARDABLE 0, 0, 280, 232184, 215, 44, 14 PUSHBUTTON "&Cancel", IDCANCEL, 231, 215 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e5e90e4a8dde5f951b155109823dbf30 Text-content-length: 32986 Text-content-md5: 895f9fe97bde13f2b6f16dfad5f2a4c7 Content-length: 33026 K 15 cvs2svn:cvs-rev V 4 1.59 PROPS-END SVN剶)勜1卝侞`乕8丄  6宐b亜b瓺瀌伾 丂[佊iY佱匩i佺5k佽哫Z侊z乬侌UT侐= 侒O乭侜y匟丂侟]@凮侢9h倖7S倗4凬h倖7S倗4匛倠丯[倣oP偞1噃偸@)偹\俋_傃3侲傄QB傇q傑7乿傒m [傗s4傘OU傑?JZ傛-傜p傰8Y傱)|傠}d傡z傢_俕傦{Y傑?乑傮]p傰8Y傱)P傑?vP傑?V傷~P傑?OP傑?tU傑?H儉}U傑?tP傑?U儎=P傑?]P傑?_P傑?aP傑?YP傑?UP傑?僆儛qP傑?TP傑?XP傑?PP傑?g{儬:Z-儬1儮並P傑?bP傑?=M儵? S傑?U儺/儻俋儼M儾w兂t 兊 兌俹兎%P傑?UP傑? V傑?丵J兠@V傑?4P傑?3P兩@卽兪亄円y冇 丄冊iY傑?h冏s:冑OP傑?T|冘8冚5>乁冞|m冚5億冣?I冩< U傑?俢冺WGAPXBOX 7 #define GAPYBOX 4dlu4inpix; int ypos, width; int xoff; int boxystart, boxid, boxtextid; char *boxtext; }; static void ctlposinit(struct ctlpos *cp, HWND hwnd, int leftborder, int righttopborderdlu4inpix = r2.right; cp->width = (r.right * 4) / (r2.right) - 2*GAPBETWEEN; cp->xoff = leftborder; cp->width -= leftborder + rightA title bar across the top of a sub-dialog. */ static void bartitle(struct ctlpos *cp, char *name, int id) { RECT r; r.left = GAPBETWEEN; r.right = cp->width; r.top = cp->ypos; r.bottom = STATICHEIGHT; cp->ypos += r.bottom + GAPBETWEEN; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE, 0, name, id); } /* * Begin a grouping box, with or without a group title. */ static void beginbox(struct ctlpos *cp, char *name, int idbox, int idtext) { if (name) cp->ypos += STATICHEIGHT/2; cp->boxystart = cp->ypos; if (name) cp->ypos += STATICHEIGHT - (STATICHEIGHT/2); cp->ypos += GAPYBOX; cp->width -= 2*GAPXBOX; cp->xoff += GAPXBOX; cp->boxid = idbox; cp->boxtextid = idtext; cp->boxtext = name; } /* * End a grouping box. */ static void endbox(struct ctlpos *cp) { RECT r; cp->xoff -= GAPXBOX; cp->width += 2*GAPXBOX; cp->ypos += GAPYBOX - GAPBETWEEN; r.left = GAPBETWEEN; r.right = cp->width; r.top = cp->boxystart; r.bottom = cp->ypos - cp->boxystart; doctl(cp, r, "STATIC", WS_CHILD | WS_VISIBLE | SS_ETCHEDFRAME, 0, "", cp->boxid); if (cp->boxtext) { SIZE s; HDC hdc; HFONT oldfont, dlgfont; hdc = GetDC(cp->hwnd); dlgfont = (HFONT)cp->font; oldfont = SelectObject(hdc, dlgfont); GetTextExtentPoint32(hdc, cp->boxtext, strlen(cp->boxtext), &s); SelectObject(hdc, oldfont); DeleteDC(hdc); r.left = GAPXBOX + GAPBETWEEN; r.right = (s.cx * 4 + cp->dlu4inpix-1) / cp->dlu4inpix; r.top = cp->boxystart - STATICHEIGHT/2cp->boxtext, cp->boxtextid); } cp->ypos += GAPYBOXVSTATIC, IDCX_TREEVIEW, controlstartvalue, sessionpanelstart, IDC_TITLE_SESSION, IDC_BOX_SESSION1, IDC_BOXT_SESSION1, IDC_BOX_SESSION2, IDC_BOXT_SESSION2, IDC_BOX_SESSION3, IDC_HOSTSTATIC, IDC_HOST, IDC_PORTSTATIC, IDC_PORT, IDC_PROTSTATIC, IDC_PROTRAW, IDC_PROTTELNET, IDC_PROTSSH, IDC_SESSSTATIC, IDC_SESSEDIT, IDC_SESSLIST, IDC_SESSLOAD, IDC_SESSSAVE, IDC_SESSDEL, IDC_CLOSEEXIT, sessionpanelend, keyboardpanelstart, IDC_TITLE_KEYBOARD, IDC_BOX_KEYBOARD1, IDC_BOXT_KEYBOARD1, IDC_BOX_KEYBOARD2, IDC_BOXT_KEYBOARD2, IDC_DELSTATIC, IDC_DEL008, IDC_DEL127, IDC_HOMESTATIC, IDC_HOMETILDE, IDC_HOMERXVT, IDC_FUNCSTATIC, IDC_FUNCTILDE, IDC_FUNCLINUX, IDC_FUNCXTERM, IDC_FUNCVT400, IDC_KPSTATIC, IDC_KPNORMAL, IDC_KPAPPLIC, IDC_KPNH, IDC_CURSTATIC, IDC_CURNORMAL, IDC_CURAPPLIC, keyboardpanelend, terminalpanelstart, IDC_TITLE_TERMINAL, IDC_BOX_TERMINAL1, IDC_BOXT_TERMINAL1, IDC_BOX_TERMINAL2, IDC_BOXT_TERMINAL2, IDC_BOX_TERMINAL3, IDC_BOXT_TERMINAL3, IDC_WRAPMODE, IDC_DECOM, IDC_DIMSTATIC, IDC_ROWSSTATIC, IDC_ROWSEDIT, IDC_COLSSTATIC, IDC_COLSEDIT, IDC_LOCKSIZE, IDC_FONTSTATIC, IDC_CHOOSEFONT, IDC_LFHASCR, IDC_BEEP, IDC_BCE, IDC_BLINKTEXT, IDC_LDISCTERM, terminalpanelend, windowpanelstart, IDC_TITLE_WINDOW, IDC_BOX_WINDOW1, IDC_BOXT_WINDOW1, IDC_BOX_WINDOW2, IDC_BOXT_WINDOW2, IDC_BOX_WINDOW3, IDC_BOXT_WINDOW3, IDC_BOX_WINDOW4, IDC_WINNAME, IDC_BLINKCUR, IDC_SCROLLBAR, IDC_WINTITLE, IDC_WINEDIT, IDC_CLOSEWARN, IDC_SAVESTATIC, IDC_SAVEEDIT, IDC_ALTF4, IDC_ALTSPACE, IDC_SCROLLKEY, windowpanelend, connectionpanelstart, IDC_TITLE_CONNECTION, IDC_BOX_CONNECTION1, IDC_BOXT_CONNECTION1, IDC_BOX_CONNECTION2, IDC_BOXT_CONNECTION2, IDC_TTSTATIC, IDC_TTEDIT, IDC_LOGSTATIC, IDC_LOGEDIT, IDC_PINGSTATIC, IDC_PINGEDIT, connectionpanelend, telnetpanelstart, IDC_TITLE_TELNET, IDC_BOX_TELNET1, IDC_BOXT_TELNET1, IDC_BOX_TELNET2, IDC_BOXT_TELNET2, IDC_TSSTATIC, IDC_TSEDIT, IDC_ENVSTATIC, IDC_VARSTATIC, IDC_VAREDIT, IDC_VALSTATIC, IDC_VALEDIT, IDC_ENVLIST, IDC_ENVADD, IDC_ENVREMOVE, IDC_EMSTATIC, IDC_EMBSD, IDC_EMRFC, telnetpanelend, sshpanelstart, IDC_TITLE_SSH, IDC_BOX_SSH1, IDC_BOXT_SSH1, IDC_BOX_SSH2, IDC_BOXT_SSH2, IDC_BOX_SSH3, IDC_BOXT_SSH3, IDC_NOPTY, IDC_CIPHERSTATIC, IDC_CIPHER3DES, IDC_CIPHERBLOWF, IDC_CIPHERDES, IDC_AUTHTIS, IDC_PKSTATIC, IDC_PKEDIT, IDC_PKBUTTON, IDC_SSHPROTSTATIC, IDC_SSHPROT1, IDC_SSHPROT2, IDC_AGENTFWD, IDC_CMDSTATIC, IDC_CMDEDIT, sshpanelend, selectionpanelstart, IDC_TITLE_SELECTION, IDC_BOX_SELECTION1, IDC_BOXT_SELECTION1, IDC_BOX_SELECTION2, IDC_BOXT_SELECTION2, IDC_MBSTATIC, IDC_MBWINDOWS, IDC_MBXTERM, IDC_CCSTATIC, IDC_CCLIST, IDC_CCSET, IDC_CCSTATIC2, IDC_CCEDIT, selectionpanelend, colourspanelstart, IDC_TITLE_COLOURS, IDC_BOX_COLOURS1, IDC_BOXT_COLOURS1, IDC_BOX_COLOURS2, IDC_BOXT_COLOURS2, IDC_BOLDCOLOUR, IDC_PALETTE, IDC_STATIC, IDC_LIST, IDC_RSTATIC, IDC_GSTATIC, IDC_BSTATIC, IDC_RVALUE, IDC_GVALUE, IDC_BVALUE, IDC_CHANGE, colourspanelend, translationpanelstart, IDC_TITLE_TRANSLATION, IDC_BOX_TRANSLATION1, IDC_BOXT_TRANSLATION1, IDC_BOX_TRANSLATION2, IDC_BOXT_TRANSLATION2, IDC_BOX_TRANSLATION3, IDC_BOXT_TRANSLATION3, IDC_XLATSTATIC, IDC_NOXLAT, IDC_KOI8WIN1251, IDC_88592WIN1250, IDC_CAPSLOCKCYR, IDC_VTSTATIC, IDC_VTXWINDOWS, IDC_VTOEMANSI, IDC_VTOEMONLY, IDC_HOST, cfg.host); SetDlgItemText (hwnd, IDC_SESSEDIT, savedsession); SetDlgItemInt (hwnd, IDC_PORT, cfg.port, FALSE); for (i = 0; i < nsessions; i++) SendDlgItemMessage (hwnd, IDC_PROTRAW, IDC_PROTSSH, cfg.protocol==PROT_SSH ? IDC_PROTSSH : cfg.protocol==PROT_TELNET ? IDC_PROTTELNET : IDC_PROTRAW ); SetDlgItemInt (hwnd, IDC_PINGEDIT, cfg.ping_interval, FALSE); CheckRadioButton (hwnd, IDC_DEL008, IDC_DEL127, cfg.bksp_is_delete ? IDC_DEL127 : IDC_DEL008); CheckRadioButton (hwnd, IDC_HOMETILDE, IDC_HOMERXVT, cfg.rxvt_homeend ? IDC_HOMERXVT : IDC_HOMETILDE); CheckRadioButton (hwnd, IDC_FUNCTILDE, IDC_FUNCXTERM, cfg.funky_type == 0 ? IDC_FUNCTILDE : cfg.funky_type == 1 ? IDC_FUNCLINUX : cfg.funky_type == 2 ? IDC_FUNCXTERM : cfg.funky_type == 3 ? IDC_FUNCVT400 : IDC_FUNCTILDE ); CheckRadioButton (hwnd, IDC_CURNORMAL, IDC_CURAPPLIC, cfg.app_cursor ? IDC_CURAPPLIC : IDC_CURNORMAL); CheckRadioButton (hwnd, IDC_KPNORMAL, IDC_KPNH, cfg.nethack_keypad ? IDC_KPNH : cfg.app_keypad ? IDC_KPAPPLIC : IDC_KPNORMAL); CheckDlgButton (hwnd, IDC_ALTF4, cfg.alt_f4); CheckDlgButton (hwnd, IDC_ALTSPACE, cfg.alt_space); CheckDlgButton (hwnd, IDC_LDISCTERM, cfg.ldisc_term); CheckDlgButton (hwnd, IDC_SCROLLKEY, cfg.scroll_on_key); CheckDlgButton (hwnd, IDC_WRAPMODE, cfg.wrap_mode); CheckDlgButton (hwnd, IDC_DECOM, cfg.dec_om); CheckDlgButton (hwnd, IDC_LFHASCR, cfg.lfhascr); SetDlgItemInt (hwnd, IDC_ROWSEDIT, cfg.height, FALSE); SetDlgItemInt (hwnd, IDC_COLSEDIT, cfg.width, FALSE); SetDlgItemInt (hwnd, IDC_FONTSTATIC, fontstatic); CheckDlgButton (hwnd, IDC_BEEP, cfg.beep); CheckDlgButton (hwnd, IDC_BCE, cfg.bce); CheckDlgButton (hwnd, IDC_BLINKTEXT, cfg.blinktext); SetDlgItemText (hwnd, IDC_WINEDIT, cfg.wintitle); CheckDlgButton (hwnd, IDC_WINNAME, cfg.win_name_always); CheckDlgButton (hwnd, IDC_BLINKCUR, cfg.blink_cur); CheckDlgButton (hwnd, IDC_SCROLLBAR, cfg.scrollbar); CheckDlgButton (hwnd, IDC_LOCKSIZE, cfg.locksize); CheckDlgButton (hwnd, IDC_CLOSEEXIT, cfg.close_on_exit); CheckDlgButton (hwnd, IDC_CLOSEWARN, cfg.warn_on_close); SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC_TSEDIT, cfg.termspeed); SetDlgItemText (hwnd, IDC_EMBSD, IDC_EMRFC, cfg.rfc_environ ? IDC_EMRFC : IDC_EMBSD); SetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC_LOGEDIT, cfg.username); CheckDlgButton (hwnd, IDC_NOPTY, cfg.nopty); CheckDlgButton (hwnd, IDC_AGENTFWD, cfg.agentfwd); CheckRadioButton (hwnd, IDC_CIPHER3DES, IDC_CIPHERDES, cfg.cipher == CIPHER_BLOWFISH ? IDC_CIPHERBLOWF : cfg.cipher == CIPHER_DES ? IDC_CIPHERDES : IDC_CIPHER3DES); CheckRadioButton (hwnd, IDC_SSHPROT1, IDC_SSHPROT2, cfg.sshprot == 1 ? IDC_SSHPROT1 : IDC_SSHPROT2); CheckDlgButton (hwnd, IDC_AUTHTIS, cfg.try_tis_auth); SetDlgItemText (hwnd, IDC_PKEDIT, cfg.keyfile); SetDlgItemText (hwnd, IDC_CMDEDIT, cfg.remote_cmd); CheckRadioButton (hwnd, IDC_MBWINDOWS, IDC_MBXTERM, cfg.mouse_is_xterm ? IDC_MBXTERM : IDC_BOLDCOLOUR, cfg.bold_colour); CheckDlgButton (hwnd, IDC_LIST, LB_ADDSTRING, 0, (LPARAM) colours[i]); } SendDlgItemMessage (hwnd, IDC_LIST, LB_SETCURSEL, 0, 0); SetDlgItemInt (hwnd, IDC_RVALUE, cfg.colours[0][0], FALSE); SetDlgItemInt (hwnd, IDC_GVALUE, cfg.colours[0][1], FALSE); SetDlgItemInt (hwnd, IDC_BVALUE, cfg.colours[0][2], FALSE); CheckRadioButton (hwnd, IDC_NOXLAT, IDC_88592WIN1250, cfg.xlat_88592w1250 ? IDC_88592WIN1250 : cfg.xlat_enablekoiwin ? IDC_KOI8WIN1251 : IDC_NOXLAT); CheckDlgButton (hwnd, IDC_CAPSLOCKCYR, cfg.xlat_capslockcyr); CheckRadioButton (hwnd, IDC_VTXWINDOWS, IDC_VTPOORMAN, cfg.vtmode == VT_XWINDOWS ? IDC_VTXWINDOWS : cfg.vtmode == VT_OEMANSI ? IDC_VTOEMANSI : cfg.vtmode == VT_OEMONLY ? IDC_VTOEMONLY : IDCstruct treeview_faff { HWND treeview; HTREEITEM lastat[4]; }; static HTREEITEM treeview_insert(struct treeview_faff *faff, int level, char *text) { TVINSERTSTRUCT ins; int i; HTREEITEM newitem; ins.hParent = (level > 0 ? faff->lastat[level-1] : TVI_ROOT); ins.hInsertAfter = faff->lastat[level]; ins.DUMMYUNIONNAME.item.mask = TVIF_TEXT; ins.DUMMYUNIONNAME.item.pszText = text; newitem = TreeView_InsertItem(faff->treeview, &ins); if (level > 0) TreeView_Expand(faff->treeview, faff->lastat[level-1], TVE_EXPAND); faff->lastat[level] = newitem; for (i = level+1; i < 4; i++) faff->lastat[i] = NULL; return newitem;reeview; struct treeview_faff tvfaff; HTREEITEM hsessionree view. */ { RECT r; WPARAM font; HWND tvstatic; r.left = 3; r.right = r.left + 75; r.top = 3; r.bottom = r.top + 10; MapDialogRect(hwnd, &r); tvstatic = CreateWindowEx(0, "STATIC", "Cate&gory:", WS_CHILD | WS_VISIBLE, r.left, r.top, hwnd, (HMENU)IDCX_TVSTATICvstatic, WM_SETFONT, font, MAKELPARAM(TRUE, 0)); r.left = 3; r.right = r.left + 75; r.top = 13; r.bottom = r.top + 196; MapDialogRect(hwnd, &r); treeview = CreateWindowEx(WS_EX_CLIENTEDGE, WC_TREEVIEW, "", WS_CHILD | WS_VISIBLE | WS_TABSTOP | TVS_HASLINES | TVS_DISABLEDRAGDROP | TVS_HASBUTTONS | TVS_LINESATROOT | TVS_SHOWSELALWAYS, r.left, r.top, hwnd, (HMENU)IDCX_TREEVIEWreeview, WM_SETFONT, font, MAKELPARAM(TRUE, 0)); tvfaff.treeview = treeview; memset(tvfaff.lastat, 0, sizeof(tvfaff.lastat)); } /* * Create the various panelfuls of controls. */ /* The Session panel. Accelerators used: [acgo] nprthelsdx */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Basic options for your PuTTY session", IDC_TITLE_SESSION); if (dlgtype == 0) { beginbox(&cp, "Specify your connection by host name", IDC_BOX_SESSION1, IDC_BOXT_SESSION1); multiedit(&cp, "Host &Name", IDC_HOSTSTATIC, IDC_HOST, 75, "&Port", IDC_PORTSTATIC, IDC_PROTSTATIC, 3, "&Raw", IDC_PROTRAW, "&Telnet", IDC_PROTTELNET, NULL); } else { radioline(&cp, "Protocol:", IDC_PROTSTATIC, 3, "&Raw", IDC_PROTRAW, "&Telnet", IDC_PROTSSH, NULL); } endbox(&cp); beginbox(&cp, "Load, save or delete a stored session", IDC_BOX_SESSION2, IDC_BOXT_SESSION2); sesssaver(&cp, "Stor&ed Sessions", IDC_SESSSTATIC, IDC_SESSEDIT, IDC_SESSLIST, "&Load", IDC_SESSLOAD, "&Save", IDC_SESSSAVE, "&Delete", IDC_SESSDEL, NULL); endbox(&cp); } beginbox(&cp, NULL, IDC_BOX_SESSION3, 0); checkbox(&cp, "Close Window on E&xit", IDC_CLOSEEXIT); endbox(&cp); hsession = treeview_insert(&tvfaff, 0, "Session"); } /* The Terminal panel. Accelerators used: [acgo] rmkh&dlbenu */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling the terminal emulation", IDC_TITLE_TERMINAL); beginbox(&cp, "Set the size of the terminal window", IDC_BOX_TERMINAL1, IDC_BOXT_TERMINAL1); multiedit(&cp, "&Rows", IDC_ROWSSTATIC, IDC_ROWSEDIT, 50, "Colu&mns", IDC_COLSSTATIC, IDC_COLSEDIT, 50, NULL); checkbox(&cp, "Loc&k window size against resizing", IDC_LOCKSIZE); endbox(&cp); beginbox(&cp, "Set the font used in the terminal window", IDC_BOX_TERMINAL2, IDC_BOXT_TERMINAL2); staticbtn(&cp, "", IDC_FONTSTATIC, "C&hange...", IDC_CHOOSEFONT); endbox(&cp); beginbox(&cp, "Set various terminal options", IDC_BOX_TERMINAL3, IDC_BOXT_TERMINAL3); checkbox(&cp, "Auto &wrap mode initially on", IDC_WRAPMODE); checkbox(&cp, "&DEC Origin Mode initially on", IDC_DECOM); checkbox(&cp, "Implicit CR in every &LF", IDC_LFHASCR); checkbox(&cp, "&Beep enabled", IDC_BEEP); checkbox(&cp, "Use background colour to &erase screen", IDC_BCE); checkbox(&cp, "Enable bli&nking text", IDC_BLINKTEXT); checkbox(&cp, "&Use local terminal line discipline", IDC_LDISCTERM); endbox(&cp); treeview_insert(&tvfaff, 0, "Terminal"); } /* The Keyboard panel. Accelerators used: [acgo] h?srvlxvnpmie */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling the effects of keys", IDC_TITLE_KEYBOARD); beginbox(&cp, "Change the sequences sent by:", IDC_BOX_KEYBOARD1, IDC_BOXT_KEYBOARD1); radioline(&cp, "The Backspace key", IDC_DELSTATIC, 2, "Control-&H", IDC_DEL008, "Control-&? (127)", IDC_DEL127, NULL); radioline(&cp, "The Home and End keys", IDC_HOMESTATIC, 2, "&Standard", IDC_HOMETILDE, "&rxvt", IDC_HOMERXVT, NULL); radioline(&cp, "The Function keys and keypad", IDC_FUNCSTATIC, 4, "&VT400", IDC_FUNCTILDE, "&Linux", IDC_FUNCLINUX, "&Xterm R6", IDC_FUNCXTERM, "&VT400", IDC_FUNCVT400, NULL); endbox(&cp); beginbox(&cp, "Change the initial state of:", IDC_BOX_KEYBOARD2, IDC_BOXT_KEYBOARD2); radioline(&cp, "Initial state of cursor keys:", IDC_CURSTATIC, 2, "&Normal", IDC_CURNORMAL, "A&pplication", IDC_CURAPPLIC, NULL); radioline(&cp, "Initial state of numeric keypad:", IDC_KPSTATIC, 3, "Nor&mal", IDC_KPNORMAL, "Appl&ication", IDC_KPAPPLIC, "N&etHack", IDC_KPNH, NULL); endbox(&cp); treeview_insert(&tvfaff, 1, "Keyboard"); } /* The Window panel. Accelerators used: [acgo] tibsdkw4y */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling PuTTY's window", IDC_TITLE_WINDOW); beginbox(&cp, "Adjust the use of the window title", IDC_BOX_WINDOW1, IDC_BOXT_WINDOW1); if (dlgtype == 0) multiedit(&cp, "Initial window &title:", IDC_WINTITLE, IDC_WINEDIT, 100, NULL); checkbox(&cp, "Avoid ever using &icon title", IDC_WINNAME); endbox(&cp); beginbox(&cp, "Adjust the use of the cursor", IDC_BOX_WINDOW2, IDC_BOXT_WINDOW2); checkbox(&cp, "Cursor &blinks", IDC_BLINKCUR); endbox(&cp); beginbox(&cp, "Control the scrollback in the window", IDC_BOX_WINDOW3, IDC_BOXT_WINDOW3); staticedit(&cp, "Lines of &scrollback", IDC_SAVESTATIC, IDC_SAVEEDIT, 50); checkbox(&cp, "&Display scrollbar", IDC_SCROLLBAR); checkbox(&cp, "Reset scrollback on &keypress", IDC_SCROLLKEY); endbox(&cp); beginbox(&cp, NULL, IDC_BOX_WINDOW4, 0); checkbox(&cp, "&Warn before closing window", IDC_CLOSEWARN); checkbox(&cp, "Window closes on ALT-F&4", IDC_ALTF4); checkbox(&cp, "S&ystem menu appears on ALT-Space)", IDC_ALTSPACE); endbox(&cp); treeview_insert(&tvfaff, 0, "Window"); } /* The Translation panel. Accelerators used: [acgo] xbepnkis */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling character set translation", IDC_TITLE_TRANSLATION); beginbox(&cp, "Adjust how PuTTY displays line drawing characters", IDC_BOX_TRANSLATION1, IDC_BOXT_TRANSLATION1); radiobig(&cp, "Handling of line drawing characters:", IDC_VTSTATIC, "Font has &XWindows encoding", IDC_VTXWINDOWS, "Use font in &both ANSI and OEM modes", IDC_VTOEMANSI, "Use font in O&EM mode only", IDC_VTOEMONLY, "&Poor man's line drawing (""+"", ""-"" and ""|"")", IDC_VTPOORMAN, NULL); endbox(&cp); beginbox(&cp, "Enable character set translation on received data", IDC_BOX_TRANSLATION2, IDC_BOXT_TRANSLATION2); radiobig(&cp, "Character set translation:", IDC_XLATSTATIC, "&None", IDC_NOXLAT, "&KOI8 / Win-1251", IDC_KOI8WIN1251, "&ISO-8859-2 / Win-1250", IDC_88592WIN1250, NULL); endbox(&cp); beginbox(&cp, "Enable character set translation on input data", IDC_BOX_TRANSLATION3, IDC_BOXT_TRANSLATION3); checkbox(&cp, "CAP&S LOCK acts as cyrillic switch", IDC_CAPSLOCKCYR); endbox(&cp); treeview_insert(&tvfaff, 1, "Translation"); } /* The Selection panel. Accelerators used: [acgo] wxst */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling copy and paste", IDC_TITLE_SELECTION); beginbox(&cp, "Control which mouse button does which thing", IDC_BOX_SELECTION1, IDC_BOXT_SELECTION1); radiobig(&cp, "Action of mouse buttons:", IDC_MBSTATIC, "&Windows (Right pastes, Middle extends)", IDC_MBWINDOWS, "&xterm (Right extends, Middle pastes)", IDC_MBXTERM, NULL); endbox(&cp); beginbox(&cp, "Control the select-one-word-at-a-time mode", IDC_BOX_SELECTION2, IDC_BOXT_SELECTION2); charclass(&cp, "Character classes:", IDC_CCSTATIC, IDC_CCLIST, "&Set", IDC_CCSET, IDC_CCEDIT, "&to class", IDC_CCSTATIC2); endbox(&cp); treeview_insert(&tvfaff, 1, "Selection"); } /* The Colours panel. Accelerators used: [acgo] blum */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling use of colours", IDC_TITLE_COLOURS); beginbox(&cp, "General options for colour usage", IDC_BOX_COLOURS1, IDC_BOXT_COLOURS1); checkbox(&cp, "&Bolded text is a different colour", IDC_BOLDCOLOUR); checkbox(&cp, "Attempt to use &logical palettes", IDC_PALETTE); endbox(&cp); beginbox(&cp, "Adjust the precise colours PuTTY displays", IDC_BOX_COLOURS2, IDC_BOXT_COLOURS2); colouredit(&cp, "Select a colo&ur and then click to modify it:", IDC_STATIC, IDC_LIST, "&Modify...", IDC_CHANGE, "Red:", IDC_RSTATIC, IDC_RVALUE, "Green:", IDC_GSTATIC, IDC_GVALUE, "Blue:", IDC_BSTATIC, IDC_BVALUE, NULL); endbox(&cp); treeview_insert(&tvfaff, 1, "Colours"); } /* The Connection panel. Accelerators used: [acgo] tuk */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); bartitle(&cp, "Options controlling the connection", IDC_TITLE_CONNECTION); if (dlgtype == 0) { beginbox(&cp, "Data to send to the server", IDC_BOX_CONNECTION1, IDC_BOXT_CONNECTION1); staticedit(&cp, "Terminal-&type string", IDC_TTSTATIC, IDC_TTEDIT, 50); staticedit(&cp, "Auto-login &username", IDC_LOGSTATIC, IDC_LOGEDIT, 50); endbox(&cp); } beginbox(&cp, "Sending of null packets to keep session active", IDC_BOX_CONNECTION2, IDC_BOXT_CONNECTION2); staticedit(&cp, "Minutes between &keepalives (0 to turn off)", IDC_PINGSTATIC, IDC_PINGEDIT, 25); endbox(&cp); treeview_insert(&tvfaff, 0, "Connection"); } /* The Telnet panel. Accelerators used: [acgo] svldrbf */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); if (dlgtype == 0) { bartitle(&cp, "Options controlling Telnet connections", IDC_TITLE_TELNET); beginbox(&cp, "Data to send to the server", IDC_BOX_TELNET1, IDC_BOXT_TELNET1); staticedit(&cp, "Terminal-&speed string", IDC_TSSTATIC, IDC_TSEDIT, 50); envsetter(&cp, "Environment variables:", IDC_ENVSTATIC, "&Variable", IDC_VARSTATIC, IDC_VAREDIT, "Va&lue", IDC_VALSTATIC, IDC_VALEDIT, IDC_ENVLIST, "A&dd", IDC_ENVADD, "&Remove", IDC_ENVREMOVE); endbox(&cp); beginbox(&cp, "Telnet protocol adjustments", IDC_BOX_TELNET2, IDC_BOXT_TELNET2); radioline(&cp, "Handling of OLD_ENVIRON ambiguity:", IDC_EMSTATIC, 2, "&BSD (commonplace)", IDC_EMBSD, "R&FC 1408 (unusual)", IDC_EMRFC, NULL); endbox(&cp); treeview_insert(&tvfaff, 1, "Telnet"); } } /* The SSH panel. Accelerators used: [acgo] rmakwp123bd */ { struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); if (dlgtype == 0) { bartitle(&cp, "Options controlling SSH connections", IDC_TITLE_SSH); beginbox(&cp, "Data to send to the server", IDC_BOX_SSH1, IDC_BOXT_SSH1); multiedit(&cp, "&Remote command:", IDC_CMDSTATIC, IDC_CMDEDIT, 100, NULL); endbox(&cp); beginbox(&cp, "Authentication options", IDC_BOX_SSH2, IDC_BOXT_SSH2); checkbox(&cp, "Atte&mpt TIS or CryptoCard authentication", IDC_AUTHTIS); checkbox(&cp, "Allow &agent forwarding", IDC_PKSTATIC, IDC_PKEDIT, "Bro&wse...", IDC_PKBUTTON); endbox(&cp); beginbox(&cp, "Protocol options", IDC_BOX_SSH3, IDC_BOXT_SSH3); checkbox(&cp, "Don't allocate a &pseudo-terminal", IDC_NOPTY); radioline(&cp, "Preferred SSH protocol version:", IDC_SSHPROTSTATIC, 2, "&1", IDC_SSHPROT1, "&2", IDC_SSHPROT2, NULL); radioline(&cp, "Preferred encryption algorithm:", IDC_CIPHERSTATIC, 3, "&3DES", IDC_CIPHER3DES, "&Blowfish", IDC_CIPHERBLOWF, "&DES", IDC_CIPHERDES, NULL); endbox(&cp); treeview_insert(&tvfaff, 1, "SSH"); } } init_dlg_ctrls(hwnd); /* * Hide all the controls to start with. */ hide(hwnd, TRUE, controlstartvalue, controlendvalue); /* * Put the treeview selection on to the Session panel. This * should also cause unhiding of the relevant controls. */ TreeView_SelectItem(treeview, hsession_HOST); if (!ctl) ctl = GetDlgItem(hwnd, IDC_CLOSEEXREEVIEW && ((LPNMHDR)lParam)->code == TVN_SELCHANGED) { HTREEITEM i = TreeView_GetSelection(((LPNMHDR)lParam)->hwndFrom); TVITEM item; char buffer[64]; item.hItem = i; item.pszText = buffer; item.cchTextMax = sizeof(buffer); item.mask = TVIF_TEXT; TreeView_GetItem(((LPNMHDR)lParam)->hwndFromSession")) hide(hwnd, FALSE, sessionpanelstart, sessConnection")) hide(hwnd, FALSE, connectionpanelstart, connection_PROTTELNET: case IDC_PROTSSH: case IDC_PROTSSH); int j = IsDlgButtonChecked (hwnd, IDC_PORT, cfg.port, FALSE); } } break; case IDC_HOST: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_HOST, cfg.host, sizeof(cfg.host)-1); break; case IDC_PORT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_PORT, &cfg.port); break; case IDC_SESSEDIT: if (HIWORD(wParam) == EN_CHANGE) { SendDlgItemMessage (hwnd, IDC_SESSSAVE/* * Save a session */ char str[2048]; GetDlgItemText (hwnd, IDC_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); } break; case IDC_SESSLIST: case IDC_SESSLOAD: if (LOWORD(wParam) == IDC_SESSDELn = SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_SETCURSEL, (WPARAM) -1, 0); } case IDC_PINGEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_PINGEDIT, &cfg.ping_interval); break; case IDC_DEL008: case IDC_DEL127 cfg.bksp_is_delete = IsDlgButtonChecked (hwnd, IDC_DEL127); break; case IDC_HOMETILDE: case IDC_HOMERXVT cfg.rxvt_homeend = IsDlgButtonChecked (hwnd, IDC_HOMERXVT); break; case IDC_FUNCVT400 cfg.funky_type = 3; break; case IDC_FUNCTILDE: case IDC_FUNCLINUX cfg.funky_type = IsDlgButtonChecked (hwnd, IDC_FUNCLINUX); break; case IDC_KPNORMAL: case IDC_KPAPPLICcfg.app_keypad = IsDlgButtonChecked (hwnd, IDC_KPNHcfg.app_keypad = FALSE; cfg.nethack_keypad = TRUE; } break; case IDC_CURNORMAL: case IDC_CURAPPLIC cfg.app_cursor = IsDlgButtonChecked (hwnd, IDC_CURAPPLIC); break; case IDC_ALTF4); break; case IDC_ALTSPACE cfg.alt_space = IsDlgButtonChecked (hwnd, IDC_ALTSPACE); break; case IDC_LDISCTERM cfg.ldisc_term = IsDlgButtonChecked (hwnd, IDC_LDISCTERM); break; case IDC_SCROLLKEY cfg.scroll_on_key = IsDlgButtonChecked (hwnd, IDC_SCROLLKEY); break; case IDC_WRAPMODE cfg.wrap_mode = IsDlgButtonChecked (hwnd, IDC_WRAPMODE); break; case IDC_DECOM cfg.dec_om = IsDlgButtonChecked (hwnd, IDC_DECOM); break; case IDC_LFHASCR cfg.lfhascr = IsDlgButtonChecked (hwnd, IDC_LFHASCR); break; case IDC_ROWSEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_ROWSEDIT, &cfg.height); break; case IDC_COLSEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_COLSEDIT, &cfg.width); break; case IDC_SAVEEDIT: if (HIWORD(wParam) == EN_CHANGE) MyGetDlgItemInt (hwnd, IDC_SAVEEDIT, &cfg.savelines); break; case IDC_FONTSTATIC, fontstatic); } break; case IDC_BEEP cfg.beep = IsDlgButtonChecked (hwnd, IDC_BEEP); break; case IDC_BLINKTEXT cfg.blinktext = IsDlgButtonChecked (hwnd, IDC_BLINKTEXT); break; case IDC_BCE cfg.bce = IsDlgButtonChecked (hwnd, IDC_BCE); break; case IDC_WINNAME cfg.win_name_always = IsDlgButtonChecked (hwnd, IDC_WINNAME); break; case IDC_BLINKCUblink_cur = IsDlgButtonChecked (hwnd, IDC_BLINKCUR); break; case IDC_SCROLLBAR); break; case IDC_LOCKSIZE); break; case IDC_WINEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_WINEDIT, cfg.wintitle, sizeof(cfg.wintitle)-1); break; case IDC_CLOSEEXIT cfg.close_on_exit = IsDlgButtonChecked (hwnd, IDC_CLOSEEXIT); break; case IDC_CLOSEWARN cfg.warn_on_close = IsDlgButtonChecked (hwnd, IDC_CLOSEWARN); break; case IDC_TTEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_TTEDIT, cfg.termtype, sizeof(cfg.termtype)-1); break; case IDC_TSEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_LOGEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_LOGEDIT, cfg.username, sizeof(cfg.username)-1); break; case IDC_EMBSD: case IDC_EMRFC: cfg.rfc_environ = IsDlgButtonChecked (hwnd, IDC_EMRFC); break; case IDC_ENVADD_VAREDIT, ""); SetDlgItemText (hwnd, IDC_NOPTY cfg.nopty = IsDlgButtonChecked (hwnd, IDC_NOPTY); break; case IDC_AGENTFWD cfg.agentfwd = IsDlgButtonChecked (hwnd, IDC_AGENTFWD); break; case IDC_CIPHER3DES: case IDC_CIPHERBLOWF: case IDC_CIPHERDESf (IsDlgButtonChecked (hwnd, IDC_CIPHER3DES)) cfg.cipher = CIPHER_3DES; else if (IsDlgButtonChecked (hwnd, IDC_CIPHERBLOWF)) cfg.cipher = CIPHER_BLOWFISH; else if (IsDlgButtonChecked (hwnd, IDC_SSHPROT1: case IDC_SSHPROT2f (IsDlgButtonChecked (hwnd, IDC_SSHPROT1)) cfg.sshprot = 1; else if (IsDlgButtonChecked (hwnd, IDC_SSHPROT2)) cfg.sshprot = 2; } break; case IDC_AUTHTIS cfg.try_tis_auth = IsDlgButtonChecked (hwnd, IDC_AUTHTIS); break; case IDC_PKEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_PKEDIT, cfg.keyfile, sizeof(cfg.keyfile)-1); break; case IDC_CMDEDIT: if (HIWORD(wParam) == EN_CHANGE) GetDlgItemText (hwnd, IDC_PKEDIT, cfg.keyfile); } break; case IDC_MBWINDOWS: case IDC_MBXTERM: cfg.mouse_is_xterm = IsDlgButtonChecked (hwnd, IDC_MBXTERM); break; case IDC_CCSET: { BOOL ok; int i; int n = GetDlgItemInt (hwnd, IDC_CCLIST, LB_INSERTSTRING, i, (LPARAM)str); } } } break; case IDC_BOLDCOLOURn, i; cfg.bold_colour = IsDlgButtonChecked (hwnd, IDC_BOLDCOLOUR); n = SendDlgItemMessage (hwnd, IDC_LIST, LB_DELETESTRING, i, 0); } } break; case IDC_PALETTE cfg.try_palette = IsDlgButtonChecked (hwnd, IDC_PALETTE); break; case IDC_RVALUE, cfg.colours[i][0], FALSE); SetDlgItemInt (hwnd, IDC_GVALUE, cfg.colours[i][1], FALSE); SetDlgItemInt (hwnd, IDC_BVALUE, cfg.colours[i][2], FALSE); } break; case IDC_GVALUE, cfg.colours[i][1], FALSE); SetDlgItemInt (hwnd, IDC_BVALUE, cfg.colours[i][2], FALSE); } } break; case IDC_NOXLAT: case IDC_KOI8WIN1251: case IDC_88592WIN1250: cfg.xlat_enablekoiwin = IsDlgButtonChecked (hwnd, IDC_KOI8WIN1251); cfg.xlat_88592w1250 = IsDlgButtonChecked (hwnd, IDC_88592WIN1250); break; case IDC_CAPSLOCKCYRcfg.xlat_capslockcyr = IsDlgButtonChecked (hwnd, IDC_CAPSLOCKCYR); } break; case IDC_VTXWINDOWS: case IDC_VTOEMANSI: case IDC_VTOEMONLY: case IDC_VTPOORMAN: cfg.vtmode = (IsDlgButtonChecked (hwnd, IDC_VTXWINDOWS) ? VT_XWINDOWS : IsDlgButtonChecked (hwnd, IDC_VTOEMANSI) ? VT_OEMANSI : IsDlgButtonChecked (hwnd, IDC Revision-number: 694 Prop-content-length: 167 Content-length: 167 K 7 svn:log V 67 Work around horrifyingly nonportable use of unions in K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-09T16:12:51.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 895f9fe97bde13f2b6f16dfad5f2a4c7 Text-content-length: 199 Text-content-md5: 40800a120fb58673658ad4a987bc4ac1 Content-length: 239 K 15 cvs2svn:cvs-rev V 4 1.60 PROPS-END SVN勜1勝*倴Y*偭倵"#if _WIN32_IE >= 0x0400 && defined NONAMELESSUNION #define INSITEM DUMMYUNIONNAME.item #else #define INSITEM item #endif ins.INSITEM.mask = TVIF_TEXT; ins.INSITEM Revision-number: 695 Prop-content-length: 161 Content-length: 161 K 7 svn:log V 61 Add ISO8859-2 / CP852 translation courtesy of Jaromir Filsak K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-09T16:29:12.000000Z PROPS-END Node-path: putty/putty.h Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: e5938840058561bc5291815b6f4d8d2c Text-content-length: 31 Text-content-md5: 1617fbdd6df15d453bbb96e87a5abbdb Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.54 PROPS-END SVN6螼 ▅╩88592cp852 Node-path: putty/settings.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: d4ccc392b8d3c83a78a6e72b8154ccc9 Text-content-length: 99 Text-content-md5: c7184b5fd265f5f7e74ce31d9a37a0a3 Content-length: 138 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN鉪鋏H);88592-CP852", cfg->xlat_88592cp85288592-CP852", 0, &cfg->xlat_88592cp852 Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 40800a120fb58673658ad4a987bc4ac1 Text-content-length: 309 Text-content-md5: ebb6aff0d14913500442fad30e21bfda Content-length: 349 K 15 cvs2svn:cvs-rev V 4 1.61 PROPS-END SVN勝勞o+亅佮%甃佮d(倧伾備E劖N@0劗b88592CP852CP852, cfg.xlat_88592w1250 ? IDC_88592WIN1250 : cfg.xlat_88592cp852 ? IDC_88592CP852 "&ISO-8859-2 / CP852", IDC_88592CP852case IDC_88592CP852cfg.xlat_88592cp852 = IsDlgButtonChecked (hwnd, IDC_88592CP852 Node-path: putty/xlat.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: 166a809e846b38ba9a59587860d0bf14 Text-content-length: 1612 Text-content-md5: f172a786f078ed61fad5bfdf9b40210d Content-length: 1651 K 15 cvs2svn:cvs-rev V 3 1.5 PROPS-END SVN腞.3?凱?刢"43static unsigned char xlatISO88592toCP852242, 32, 34, 32, 34, 46, 43, 35, 32, 47,138, 60,151,141,166,141, 032, 34, 34, 34, 34,254, 45, 45, 32,126,154, 62,152,157,167,171, 255,164,244,157,207,149,151,245,249,230,184,155,141,240,166,189, 248,165,247,136,239,150,152,243,242,231,173,156,171,241,167,190, 232,181,182,198,142,145,143,128,172,144,168,211,183,214,215,210, 209,227,213,224,226,138,153,158,252,222,233,235,154,237,221,225, 234,160,131,199,132,146,134,135,159,130,169,137,216,161,140,212, 208,228,229,162,147,139,148,246,253,133,163,251,129,236,238,250, }; static unsigned char xlatCP852toISO88592 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 99,252,233,226,228,249,230,231,179,235,138,245,238,141,196,198, 201,197,229,244,246,165,181,140,156,214,154,171,187,157,215,232, 225,237,243,250,161,177,142,158,202,234,170,159,200,186,174,175, 176,177,178,179,180,193,194,204,170,185,186,187,188,175,191,191, 192,193,194,195,196,197,195,227,200,201,202,203,204,205,206,164, 240,208,207,203,239,210,205,206,236,217,218,219,220,222,217,223, 211,223,212,209,241,242,169,185,192,218,224,219,253,221,254,180, 173,189,128,183,162,167,247,178,176,168,255,251,216,248,149,160,else if (cfg.xlat_88592cp852) return xlatCP852cp852) return xlatISO88592toCP852 Revision-number: 696 Prop-content-length: 180 Content-length: 180 K 7 svn:log V 80 Rename IDC_FUNCTILDE from "VT400" to "ESC[n~" because another VT400 now exists! K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T08:20:26.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: ebb6aff0d14913500442fad30e21bfda Text-content-length: 33 Text-content-md5: d11a1eca3088c608d6fd66af058dd928 Content-length: 73 K 15 cvs2svn:cvs-rev V 4 1.62 PROPS-END SVN勞o勞p 偹>倧+偹DESC[n&~ Revision-number: 697 Prop-content-length: 241 Content-length: 241 K 7 svn:log V 140 Move initialisation of the saved session box outside init_dlg_ctrls() so that you don't end up with twice as many items after clicking Load K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T08:33:49.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d11a1eca3088c608d6fd66af058dd928 Text-content-length: 199 Text-content-md5: 921ff78b4438c063f17295add15f0bf6 Content-length: 239 K 15 cvs2svn:cvs-rev V 4 1.63 PROPS-END SVN勞p勠#侂5仸B侅3#伹~儝r for (i = 0; i < nsessions; i++) SendDlgItemMessage (hwnd, IDC_SESSLIST, LB_ADDSTRING, 0, (LPARAM) (sessions[i]) Revision-number: 698 Prop-content-length: 497 Content-length: 497 K 7 svn:log V 396 Now when a saved session is loaded, its name appears in the IDC_SESSEDIT box, so that clicking Save will save over it. Useful for people who want to load, modify, and re-save. Special case: this doesn't apply to Default Settings, because I think people will be more likely to load DS, modify it, and save under a _different_ name, so it's good not to allow a single mouse click to screw them up. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T09:03:20.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 921ff78b4438c063f17295add15f0bf6 Text-content-length: 345 Text-content-md5: d97074d8c97c9e30878c8861ec7c6324 Content-length: 385 K 15 cvs2svn:cvs-rev V 4 1.64 PROPS-END SVN勠勡 <兒Z<仦t兗$ int isdef; if (n == LB_ERR) { MessageBeep(0); break; } isdef = !strcmp(sessions[n], "Default Settings"); load_settings (sessions[n], !isdef, &cfg); init_dlg_ctrls(hwnd); if (!isdef) SetDlgItemText(hwnd, IDC_SESSEDIT, sessions[n] Revision-number: 699 Prop-content-length: 148 Content-length: 148 K 7 svn:log V 48 Trivial bug with the function-key radio buttons K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T09:17:13.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: d97074d8c97c9e30878c8861ec7c6324 Text-content-length: 31 Text-content-md5: 7a7eb01499ca9b12f45c8ab533a4ca8e Content-length: 71 K 15 cvs2svn:cvs-rev V 4 1.65 PROPS-END SVN勡 勡 侊.傡W侊3VT400 Revision-number: 700 Prop-content-length: 140 Content-length: 140 K 7 svn:log V 40 Scroll regions of two lines are allowed K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T10:50:14.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 35a08e6af64151f355980fa2c65b5409 Text-content-length: 27 Text-content-md5: 83f3ad0ab06b2176290cc07af1815e98 Content-length: 67 K 15 cvs2svn:cvs-rev V 4 1.27 PROPS-END SVN兙(兙( 倕 伖倕0 Revision-number: 701 Prop-content-length: 393 Content-length: 393 K 7 svn:log V 292 ISO8859-2 to CP852 output translation wants to have Win1250 to ISO8859-2 input translation as its counterpart, not CP852 to ISO8859-2. Because the reason you want this translation is if your _font_ is coded CP852 - in which case your keymap will not follow suit but will still be in Win1250. K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T12:43:24.000000Z PROPS-END Node-path: putty/xlat.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 39 Text-delta: true Text-delta-base-md5: f172a786f078ed61fad5bfdf9b40210d Text-content-length: 72 Text-content-md5: 4178d5b019ecd30072d698c3c34383b3 Content-length: 111 K 15 cvs2svn:cvs-rev V 3 1.6 PROPS-END SVN腞 3"婯 || cfg.xlat_88592cp852) return xlatWIN1250 Revision-number: 702 Prop-content-length: 173 Content-length: 173 K 7 svn:log V 73 Turn off paste-as-poorman for line drawing chars until it's configurable K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-10T16:02:08.000000Z PROPS-END Node-path: putty/terminal.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 83f3ad0ab06b2176290cc07af1815e98 Text-content-length: 197 Text-content-md5: c1793c6265a396addddc36d9d8410500 Content-length: 237 K 15 cvs2svn:cvs-rev V 4 1.28 PROPS-END SVN兙(兙: 儵9儵8it儷7E儸<儹#if 0#endif int ch = (*q & CHAR_MASK); #if 0 if ((*q & ATTR_LINEDRW) && ch >= 0x60 && ch < 0x7F) else #endif #if 0 else #endif Revision-number: 703 Prop-content-length: 136 Content-length: 136 K 7 svn:log V 36 Add UNE 10053 to the cleartext ones K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-11T19:56:22.000000Z PROPS-END Node-path: putty/window.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: c72db0455bed3b55f2baecd647185a31 Text-content-length: 85 Text-content-md5: db91e579f8fe9aff3e2948366339cdb7 Content-length: 125 K 15 cvs2svn:cvs-rev V 4 1.71 PROPS-END SVN剻>剼 ;亯Q儛亯>case WSAECONNABORTED: sprintf(buf, "Connection aborted Revision-number: 704 Prop-content-length: 150 Content-length: 150 K 7 svn:log V 50 Stop plink's key verification locking up on input K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-12T09:10:31.000000Z PROPS-END Node-path: putty/plink.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 16d5f90e6d193a345cfae5da273b5918 Text-content-length: 649 Text-content-md5: d2d662afe4d877454dbcb97ec70085f8 Content-length: 689 K 15 cvs2svn:cvs-rev V 4 1.14 PROPS-END SVN⺶亖m刔%Z梙)昿錞 HANDLE hin; DWORD savemode, i if (ret == 2) /* key was different */ fprintf(stderr, wrongmsg, fingerprint); if (ret == 1) hin = GetStdHandle(STD_INPUT_HANDLE); GetConsoleMode(hin, &savemode); SetConsoleMode(hin, (savemode | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT)); ReadFile(hin, line, sizeof(line)-1, &i, NULL); SetConsoleMode(hin, savemode); if (ret == 2) { /* key was different */ if (line[0] != '\0' && line[0] != '\rif (line[0] == 'y' || line[0] == 'Y' Revision-number: 705 Prop-content-length: 141 Content-length: 141 K 7 svn:log V 41 Stop the SSH panel appearing in PuTTYtel K 10 svn:author V 5 simon K 8 svn:date V 27 2000-10-12T09:10:45.000000Z PROPS-END Node-path: putty/windlg.c Node-kind: file Node-action: change Prop-delta: true Prop-content-length: 40 Text-delta: true Text-delta-base-md5: 7a7eb01499ca9b12f45c8ab533a4ca8e Text-content-length: 73 Text-content-md5: 0a08d8fc133ea7530a993f2b10ad07f4 Content-length: 113 K 15 cvs2svn:cvs-rev V 4 1.66 PROPS-END SVN勡 勡2)儑 傼f佊w儓 if (backends[2].backend != NULL) Revision-number: 706 Prop-content-length: 237 Content-length: 237 K 7 svn:log V 136 Add a config option to emulate the HMAC bug in comm