Giter Club home page Giter Club logo

Comments (5)

con-f-use avatar con-f-use commented on September 15, 2024

Yeah, it seems some magic code, I didn't write has injected itself into the last merge. No idea what happened there (see the default conundrum).

But it seems strcat is not used anywhere in the code. @cnlohr can we just remove it? Why was it there in the first place and why not in one of our library files (i.e. ./esp82xx/include/string.h ) instead?

If we cannot remove it, what do you guys think of:

char * strcat( char * dest, char * src )
{
    char *orig = dest;
    while (*dest) dest++;
    while (*dest++ = *src++);
    return orig;
}

P.S.
What is charrx supposed to do?

from esp82xx.

cnlohr avatar cnlohr commented on September 15, 2024

I vaguely recall putting in the strcat code. Though I feel completely idiotic about writing it now. I don't know what I was thinking.

charrx I think is when data comes back down the serial line. That way you can easily hook incoming serial bytes.

from esp82xx.

cnlohr avatar cnlohr commented on September 15, 2024

P.S. Please use your code if you've tested it. I also noticed 'man cat' has an implementation:

           char *
           strncat(char *dest, const char *src, size_t n)
           {
               size_t dest_len = strlen(dest);
               size_t i;

               for (i = 0 ; i < n && src[i] != '\0' ; i++)
                   dest[dest_len + i] = src[i];
               dest[dest_len + i] = '\0';

               return dest;
           }

from esp82xx.

con-f-use avatar con-f-use commented on September 15, 2024

Fixed in 93074f1

from esp82xx.

cnlohr avatar cnlohr commented on September 15, 2024

and it works :-D

from esp82xx.

Related Issues (20)

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.