Search:

Type: Posts; User: Hodor

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    115

    I'm assuming that this is a student project so if...

    I'm assuming that this is a student project so if it's not, please forgive me. But if it is, for student tasks like these the students are usually expected to not use library functions like strcpy...
  2. Replies
    8
    Views
    127

    Thanks. I missed that. Xaviou is nice to make...

    Thanks. I missed that. Xaviou is nice to make those builds available.

    Edit: for such a widely used open source project you'd think some company would buy a couple of the devs an apple or two (or...
  3. Replies
    1
    Views
    16

    First, line 20: for (i = 0; i < SIZE;...

    First, line 20:



    for (i = 0; i < SIZE; i++){


    is missing a closing brace (left curly brace) so the code you've supplied couldn't possibly even compile.

    Second, you may want to review...
  4. Replies
    8
    Views
    127

    You might be right, but I did look at the nightly...

    You might be right, but I did look at the nightly releases (at Nightly builds) and saw no builds for OSX -- only Windows builds. But you're right, I'm not intimate with the project so there might be...
  5. Try void myprint(const short *src, size_t...

    Try


    void myprint(const short *src, size_t len)
    {
    int i;
    for(i = 0; i < len; ++i) printf("%d\n", src[i]);
    }

    int main(void)
  6. There are no (yep, a total of zero) CVE entries...

    There are no (yep, a total of zero) CVE entries related to sentinel values being bug-prone or a security risk; if you don't believe me, have a look.

    Knuth discusses sentinel values (and also what...
  7. Citation needed :P

    Citation needed :P
  8. Replies
    8
    Views
    127

    There has been no binary (i.e. compiled) release...

    There has been no binary (i.e. compiled) release of C::B since 2013; I'd hardly call that "maintained"
  9. Thread: Slow forum?

    by Hodor
    Replies
    11
    Views
    484

    I've found the last few days fine. For the...

    I've found the last few days fine. For the previous couple of weeks the forum was reporting at least 8000 simultaneous users and up to 10000. Now it's back to a reasonable 300-500
  10. Replies
    3
    Views
    96

    I should also add that if you can't already do...

    I should also add that if you can't already do it, teach yourself to convert hexadecimal to binary in your head (and vice versa); this is easy because each hex digit (0-F) is only 4 binary digits and...
  11. Replies
    3
    Views
    96

    You can start here: Bit Twiddling Hacks...

    You can start here: Bit Twiddling Hacks

    Note that not everything there is portable or even necessarily faster than what a modern C compiler on a modern CPU would produce, but, hey, gotta start...
  12. Why does the first comment of your program say ...

    Why does the first comment of your program say



    //Draw a single line of fiver uppercase Xs using two kinds of count-controlled loops


    and then proceed to use '+', '-', '|' and ' '...
  13. I'm pretty sure I agree with Salem Edit: gcc...

    I'm pretty sure I agree with Salem

    Edit: gcc even warns you about it :/



    #include <stdio.h>

    int main(void)
    {
  14. Replies
    7
    Views
    178

    Oh those globals. Yeah, they seemed reasonably...

    Oh those globals. Yeah, they seemed reasonably reasonable (i.e. justifiable) when I saw them
  15. Replies
    7
    Views
    178

    Well, it fixes (somewhat) the segfault for me....

    Well, it fixes (somewhat) the segfault for me. I'm 99.9% sure the problem is in that function in any case. Other parts of the code probably need to be modified to accommodate. Maybe get ride of the...
  16. Thread: Quick speed test

    by Hodor
    Replies
    8
    Views
    367

    Also, I meant to mention the other day that the...

    Also, I meant to mention the other day that the "speed" reported by your program, for each of the functions, depends on the order they are tested. If you test method0 first and then method1, the...
  17. Replies
    7
    Views
    178

    I suspect that the function size_t utfcpy(...

    I suspect that the function size_t utfcpy( char8_t *D, size_t DLEN, char8_t const *S, size_t SLEN ) is not nul terminating the string. After modifying that function to ensure the copy is nul...
  18. Thread: Quick speed test

    by Hodor
    Replies
    8
    Views
    367

    Which bug?

    Which bug?
  19. Replies
    7
    Views
    190

    It's a formula to calculate a variation of a Rata...

    It's a formula to calculate a variation of a Rata Die number but I wouldn't trust it because I'm not sure it's accounting for leap days (1461 is the number of days in 4 years one of which might (is...
  20. Replies
    12
    Views
    180

    It's so slow it's stupid. The reason it's slow is...

    It's so slow it's stupid. The reason it's slow is because of DDoS (apparently) and the webmaster mustn't have shell access to add firewall rules to drop the offending traffic. Either that or the...
  21. Replies
    12
    Views
    180

    Errr... d[2] has two elements: d[0] and d[1]...

    Errr... d[2] has two elements: d[0] and d[1] (d[2] would be outside of the array)

    Edit: just saw jimblumberg has already answered. The speed of the forum is messing with my mind I could have sworn...
  22. Replies
    7
    Views
    190

    You're probably entering the date as mm dd yyyy,...

    You're probably entering the date as mm dd yyyy, but the scanf format ("%i/%i/%i") wants it as mm/dd/yyyy. You can check the return value of scanf() to see how many numbers it actually scanned.
  23. Thread: Quick speed test

    by Hodor
    Replies
    8
    Views
    367

    Umm, the whole point is kind of moot anyway...

    Umm, the whole point is kind of moot anyway because



    while ( unit_tests[i] ) { // line 260


    Because that loop is never executed (because by this point unit_tests[i] is already NULL), so the...
  24. Thread: Quick speed test

    by Hodor
    Replies
    8
    Views
    367

    Note that 'stop' is not initialised at this...

    Note that 'stop' is not initialised at this point:



    while ( unit_tests[i] ) {
    ret = test_method( unit_tests[i], 0 );
    if ( ret != EXIT_SUCCESS ) {
    FAIL(...
  25. Thread: Quick speed test

    by Hodor
    Replies
    8
    Views
    367

    If you fix the printf warnings the output is more...

    If you fix the printf warnings the output is more like:



    7 = 7
    999 = 999
    0b101 = 5
    0x5f5e0ff = 99999999
    9stop = 9
    Method 0 = 18446744073705503012, Method 1 = 18446713453979999608
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4