Coder Social home page Coder Social logo

ansi2gif's People

Contributors

deater avatar tim0s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansi2gif's Issues

error in compiler

ansi2gif.o: En la función gif_the_text': ansi2gif.c:(.text+0x491): referencia agdImageCreate' sin definir
ansi2gif.c:(.text+0x4aa): referencia a gdImageCreate' sin definir ansi2gif.c:(.text+0x4d4): referencia agdImageColorAllocate' sin definir
ansi2gif.c:(.text+0x4fe): referencia a gdImageColorAllocate' sin definir ansi2gif.c:(.text+0x528): referencia agdImageColorAllocate' sin definir
ansi2gif.c:(.text+0x552): referencia a gdImageColorAllocate' sin definir ansi2gif.c:(.text+0x57c): referencia agdImageColorAllocate' sin definir
ansi2gif.o:ansi2gif.c:(.text+0x5a6): más referencias a gdImageColorAllocate' sin definir a continuación ansi2gif.o: En la funcióngif_the_text':
ansi2gif.c:(.text+0xa99): referencia a gdImageRectangle' sin definir ansi2gif.c:(.text+0xaaa): referencia agdImageGif' sin definir
ansi2gif.c:(.text+0xd0d): referencia a gdImageSetPixel' sin definir ansi2gif.c:(.text+0xd71): referencia agdImageGif' sin definir
ansi2gif.c:(.text+0xf8e): referencia a gdImageSetPixel' sin definir ansi2gif.c:(.text+0x102a): referencia agdImageGif' sin definir
ansi2gif.c:(.text+0x1109): referencia a gdImageSetPixel' sin definir ansi2gif.c:(.text+0x11d2): referencia agdImageGif' sin definir
ansi2gif.c:(.text+0x12e4): referencia a gdImageDestroy' sin definir ansi2gif.c:(.text+0x12f1): referencia agdImageDestroy' sin definir
ansi2gif.c:(.text+0x1ae4): referencia a gdImagePng' sin definir ansi2gif.c:(.text+0x1dce): referencia agdImageColorResolve' sin definir
ansi2gif.c:(.text+0x20fb): referencia a gdImageColorResolve' sin definir ansi2gif.c:(.text+0x2402): referencia agdImageGif' sin definir
ansi2gif.c:(.text+0x24da): referencia a gdImageCreateTrueColor' sin definir ansi2gif.c:(.text+0x24ff): referencia agdImageColorAllocate' sin definir
ansi2gif.c:(.text+0x252c): referencia a gdImageRectangle' sin definir ansi2gif.c:(.text+0x253d): referencia agdImageGif' sin definir
ansi2gif.c:(.text+0x2552): referencia a gdImageDestroy' sin definir ansi2gif.o: En la funciónsetup_gd_256colors':
ansi2gif.c:(.text.unlikely+0xb6): referencia a gdImageColorAllocate' sin definir ansi2gif.c:(.text.unlikely+0x136): referencia agdImageColorAllocate' sin definir
collect2: error: ld returned 1 exit status
make: *** [ansi2gif] Error 1

Segfault on empty "set graphics mode" terminal escape sequence

Hi Vince/deater,

Thank you for writing ansi2gif, it's a fantastic little program! I've found a case where it crashes, and I thought you might be interested.

This minimal crashing example, escape-left-bracket-m-segfault.ans.txt, contains the terminal escape code ESC[m, which causes ansi2gif to segfault.

ESC[0m is the terminal escape sequence for 'reset graphics mode' or 'reset all color/font attributes'. Unfortulately, some programs instead send Esc[m, with nothing instead of a digit. I'm not sure whether this is also allowed by the standard (which I couldn't find anywhere), but it a search on searchcode.com suggests it is common. Parsing ESC[m without crashing, and interpreting it as ESC[0m, should fix the issue.

I'm afraid I don't know enough of C myself to submit a patch. Please don't feel obliged to fix this, though; and thank you for all your work polishing ansi2gif.

Kind regards,
Sietse

P.s. Because these terminal escape codes are quite hard to google, and because there is huge fragmentation in how they are spelled out, I'd like to put a few variant spellings here so that future googlers can easily find it.

ESC[0m, ESC[m
ESC [ 0 m, ESC [ m
\[[0m, \[[m,
^[[0m, ^[[m
Escape left bracket zero m, Escape left bracket m
Escape bracket zero m, Escape bracket m.

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.