Search:

Type: Posts; User: migf1

Page 1 of 16 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    46
    Views
    2,716

    Regarding NULL, have a look at this post...

    Regarding NULL, have a look at this post (or at that thread as a whole).
  2. To expand on Laserlight's post, if struct Vector...

    To expand on Laserlight's post, if struct Vector is meant to be implementation detail, define it in a .c file (perhaps where your main() function is implemented).
  3. You are welcome. You should always check the...

    You are welcome.

    You should always check the documentation of the functions you are using. If you don't have direct access to the docs, then a simple google lookup is usually all it takes. For...
  4. Lines 35 to 37 are in the right direction. Try...

    Lines 35 to 37 are in the right direction. Try removing the asterisk when you define the buffer, and also pass 21 as the 2nd argument to snprintf().
  5. Replies
    1
    Views
    2,704

    The address of a pointer is a double pointer, so...

    The address of a pointer is a double pointer, so try coding a different swap() function which will accept double pointers as arguments (and adjust accordingly the code in the function body).
  6. Replies
    29
    Views
    2,076

    I was referring to C99's format modifiers for...

    I was referring to C99's format modifiers for printf (PRIxx). glib for example provides its own modifiers (which btw are not necessarily better and/or easier to remember than C99's).


    ...
  7. Replies
    29
    Views
    2,076

    This kind of info should be presented/explained...

    This kind of info should be presented/explained in the docs. If not, I guess you can either contact the author directly (or the community forum of the lib, if there is one), or dig into the source...
  8. Replies
    29
    Views
    2,076

    Actually it provides more functions, just checked...

    Actually it provides more functions, just checked. sp_last_error_message() looks quite handy (similar to perror() but not exactly... also you have to sp_free_message() afterwards). Also, using a...
  9. Replies
    29
    Views
    2,076

    Assuming that the prototype of the function is...

    Assuming that the prototype of the function is something like the following:

    whatever enum_ports( sp_port ***ports);
    then the code above sounds about right.

    Perhaps you should check whether...
  10. Replies
    7
    Views
    1,499

    Your code is more complicated than it needs to...

    Your code is more complicated than it needs to be, and thus more error-prone (as you have already discovered ;) ).

    Follow Laserlight's advice. Even if you are not allowed to use <string.h> and you...
  11. Replies
    29
    Views
    2,076

    The latter. For guaranteed widths use the...

    The latter. For guaranteed widths use the exact-width types.
  12. Replies
    29
    Views
    2,076

    Yes, in this case you indeed need the extra...

    Yes, in this case you indeed need the extra asterisk when defining the function enum_ports()... and consequently the address-of operator when passing ports into the function.

    PS. Regarding...
  13. Replies
    29
    Views
    2,076

    If your code does not depend on explicit type...

    If your code does not depend on explicit type sizes, then no, you don't have to worry. If it does, then using C99's <stdint.h> (as you write below) is a bless from God :)



    <stdint.h>'s *N_t...
  14. Replies
    29
    Views
    2,076

    Almost right :) In the scope of the function,...

    Almost right :)

    In the scope of the function, *list_ptr is the array itself. The line *list_ptr = NULL; initializes to nowhere the not yet allocated array. There are no array elements at that...
  15. Replies
    29
    Views
    2,076

    We were cross-posting. The article says...

    We were cross-posting.



    The article says that when it was written, on x86 machines the sizeof an int was 4 bytes. It doesn't imply that this is always true.



    Yeap, they are exactly the...
  16. Replies
    29
    Views
    2,076

    This makes sense only if sp_list_ports() does NOT...

    This makes sense only if sp_list_ports() does NOT consider as error the case where no ports are found. Which in turn means that even when no ports are found, the functions allocates the ports array...
  17. Replies
    29
    Views
    2,076

    Actually, according to the documentation of the...

    Actually, according to the documentation of the function sp_list_ports(), the ports variable should be defined of type: struct sp_port **

    It's my understanding that the function dynamically...
  18. Replies
    29
    Views
    2,076

    If that's the sp_list_ports()...

    If that's the sp_list_ports() you are using, then it does not return a pointer. It returns an enum value (defined here: libserialport: libserialport.h Source File).
  19. Replies
    37
    Views
    7,861

    There's not really right or wrong way to go....

    There's not really right or wrong way to go. Whatever suits you best!

    Actually I assumed you were using mingw on both platforms (Linux and Windows). If you were, I guess you shouldn't need to...
  20. Replies
    37
    Views
    7,861

    As I said, I don't really have adequate...

    As I said, I don't really have adequate experience with GTK+3, but it's been heavily criticized from what I've read. Some people even say that it's a step forward and 2 steps backward. Rumors also...
  21. Oh, I see. Well, you can only get drafts for...

    Oh, I see. Well, you can only get drafts for free. Have a look here for links (in general google for "iso C?? standard pdf" or "download instead of "pdf").

    EDIT: Actually, they're also listed in...
  22. It seems like the guys over there have already...

    It seems like the guys over there have already answered your questions. They have also given you a link to gcc-avr's ABI & extensions docs. What else do you need?
  23. Replies
    37
    Views
    7,861

    Advanced makefiles isn't my strong pointer...

    Advanced makefiles isn't my strong pointer either, so I think it would be easier to just have 2 separate makefiles, one for x86 builds and one for x64 builds. I think this approach would yield in...
  24. Replies
    37
    Views
    7,861

    I just re-read my last post and I realized that...

    I just re-read my last post and I realized that you may conclude that you cannot connect both a key-press and a mouse-button press signal handler to your window (or any widget for that matter). You...
  25. Replies
    37
    Views
    7,861

    Yes, that's what the above code is supposed to...

    Yes, that's what the above code is supposed to do. You first respond to the "key-release-event" via the signal-handler function, and then inside that function you extract all the info related to the...
Results 1 to 25 of 385
Page 1 of 16 1 2 3 4