GithubHelp home page GithubHelp logo

rdebath / putty Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 11.0 19.56 MB

My patches against Simon's PuTTY

Home Page: https://git.tartarus.org/?p=simon/putty.git

License: Other

Shell 0.99% Makefile 0.43% C 92.23% Perl 3.37% Awk 0.97% Python 1.70% Inno Setup 0.15% M4 0.16%

putty's People

Contributors

bjh21 avatar chipitsine avatar chrisstaite avatar cjwatson avatar codesquid avatar dtaylor84 avatar gwinkless avatar igaztanaga avatar jandryuk avatar jtn20 avatar l2dy avatar lly-dev avatar nicowilliams avatar odenbach avatar olysonek avatar pavelkryukov avatar rdebath avatar sgtatham avatar somasis avatar whydoubt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

putty's Issues

XP-Style window decoration on Vista

I've been using PuttyTray previously, but wanted to switch to your version for 24-bit color support.

Your version works fine, but why does it not use the normal UI theme (Vista with the default theme, see image below)?

PuttyTray looks like any other window on my desktop, with the proper theme decoration, but your version gets the XP treatment.

Any idea why that happens? I tried to look at the source code, but the CreateWindow() call in window.c seem identical in both repositories. Is there something else that triggers this UI difference?

image

Type conflict using DIRECT_CHAR macro

@matbech commented on fd97538

I believe setting the CSET_ASCII value outside of the wchar_t range (16-bit) breaks (always returns 0) the DIRECT_CHAR macro when a wchar_t value is passed. This is the case for Windows:

if (DIRECT_CHAR(ucsdata->unitab_line[i]))

and here:
if (DIRECT_CHAR(text[0]) &&

You're quite correct. However, I think that this means that the conditions are incorrect.

Both of these in effect check to see if unitab_line contains CSET_ASCII characters. The first on is a direct check of that array. This means that the first one has been upgraded from "Should not happen" to "Cannot happen" and that's fine.

The one in window.c is translated via the array in do_paint in terminal.c

            switch (tchar & CSET_MASK) {
              case CSET_ASCII:
                tchar = term->ucsdata->unitab_line[tchar & 0xFF];
                break;
              case CSET_LINEDRW:
                tchar = term->ucsdata->unitab_xterm[tchar & 0xFF];
                break;
              case CSET_SCOACS:
                tchar = term->ucsdata->unitab_scoacs[tchar&0xFF];
                break;
            }

So the second has gone from a "should not happen" check that I used for debugging in the early days (making sure that they didn't sneak in) to a default translation of ISO8859-1. This is also okay (see "should not happen"), but it might be good to recreate the check directly in the UCS4 to UTF-16 translation in do_paint

#ifdef PLATFORM_IS_UTF16
            if (tchar >= 0x10000 && tchar < 0x110000) {
                ch[ccount++] = (wchar_t) HIGH_SURROGATE_OF(tchar);
                ch[ccount++] = (wchar_t) LOW_SURROGATE_OF(tchar);
            } else
#endif /* PLATFORM_IS_UTF16 */
            ch[ccount++] = (wchar_t) tchar;

eg: set it to U+FFFD if the character is out of range.

#ifdef PLATFORM_IS_UTF16
            if (tchar >= 0x10000 && tchar < 0x110000) {
                ch[ccount++] = (wchar_t) HIGH_SURROGATE_OF(tchar);
                ch[ccount++] = (wchar_t) LOW_SURROGATE_OF(tchar);
            } else if (tchar >= 0x110000)
                ch[ccount++] = 0xFFFD;
            else
#endif /* PLATFORM_IS_UTF16 */
            ch[ccount++] = (wchar_t) tchar;

Binary tag releases

Would it be possible to publish the binaries within the tag releases on GitHub?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.