Skip to content
0
  • Home
  • Piero Bosio
  • Blog
  • World
  • Fediverso
  • News
  • Categories
  • Old Web Site
  • Recent
  • Popular
  • Tags
  • Users
  • Home
  • Piero Bosio
  • Blog
  • World
  • Fediverso
  • News
  • Categories
  • Old Web Site
  • Recent
  • Popular
  • Tags
  • Users
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
keithp@fosstodon.orgundefined

keithp

@keithp@fosstodon.org
About
Posts
7
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

View Original

Posts

Recent Best Controversial

  • Ooo. The plot thickens.
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    Ooo. The plot thickens.

    What does printf("%c", '\0') do?

    Answer: output a character of value 0.

    What should printf("%lc", (wint_t)L'\0') do?

    Answer: output nothing.

    That's because %lc is *defined* to be equivalent to %ls with a two-element wchar_t array, the first holding the wint_t parameter (cast to a wchar_t) and the second a null wide character. If I'm right, then glibc has a bug here.

    Uncategorized

  • Here's a nice C puzzle this evening.
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    Here's a nice C puzzle this evening.

    What type is a L'c' wide character constant?

    Answer: wchar_t.

    What type does the fprintf '%lc' format take?

    Answer: wint_t.

    So you need to cast your wide character when printing it with the conversion specifier which accepts wide characters.

    Also, shout-out to gcc for msp430 where wchar_t is 32 bits (long int) and wint_t is 16 bits (unsigned int). I'm sure there's a story there.

    Uncategorized

  • Picolibc 1.8.11 released today.
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    Picolibc 1.8.11 released today. So many changes, so many contributors. Thanks all.

    Main picolibc page: https://keithp.com/picolibc/

    Microsoft GitHub page: https://github.com/picolibc/picolibc/releases/tag/1.8.11

    Uncategorized

  • Support for using picolibc as the primary C library with GCC landed today.
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    Support for using picolibc as the primary C library with GCC landed today. Thanks much to Jeffrey Law and Andrew Pinski for their help improving the changes and getting them merged. https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=commit;h=72274d0a421785ed38ad704af1192a7578660e7f

    Uncategorized

  • I managed to merge five PRs from other picolibc contributors today.
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    I managed to merge five PRs from other picolibc contributors today. I really like getting contributions from other other people; it makes me think that maybe my little project is starting to be useful in the world.

    Uncategorized

  • Christmas came early
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    @vitaut Can also recommend the sequel -- "Elementary Functions". Riveting action sequences.

    Uncategorized

  • I received a bug report about picolibc's iconv implementation.
    keithp@fosstodon.orgundefined keithp@fosstodon.org

    I received a bug report about picolibc's iconv implementation. So I added a test case. Which pushed the CI runtime up over *six hours* at which point github gave up and killed it.

    I spent a bit of time yesterday and today re-implementing the JIS to Unicode conversion function to make it faster. Lines changed: 5125 additions & 7495 deletions. Runtime is back to normal now. And I have a deeper understanding of these encodings. https://github.com/picolibc/picolibc/pull/1141/changes/8be32431abcfb9848c6633ba23c8f65cd9d68b12

    Uncategorized
  • 1 / 1
  • Login

  • Login or register to search.
  • First post
    Last post