Search:

Type: Posts; User: Dino

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    3,475

    Ah yes, I see this now. No man pages on the...

    Ah yes, I see this now. No man pages on the system I'm using! Not all development systems are *nix.

    Thank you!
  2. Replies
    6
    Views
    3,475

    Do parens make a difference here?

    If I am testing a bit (and please don't tell me better ways to test a bit - I know there are), are the inner parens redundant here?



    if ((work->flagbyte & 0x80) ==0) { ... }
  3. I said it was "ignored" because the end result...

    I said it was "ignored" because the end result was the same. I wasn't aware that I could use &array. I've always just used array or &array[0]. Now I have a third option.

    I was looking at...
  4. I don't understand why the address-of operator is ignored

    #include <stdio.h>
    #include <string.h>

    ...
  5. Replies
    3
    Views
    1,454

    Yep, thanks. That's what I came up with.

    Yep, thanks. That's what I came up with.
  6. Replies
    3
    Views
    1,454

    I see that this works. my_24_ptr =...

    I see that this works.



    my_24_ptr = (void *) ((int) my_32_ptr & (int) 0x00FFFFFF) ;
  7. Replies
    3
    Views
    1,454

    24 bit pointer from a 4-byte field

    On the processor I am programming on, there can be 64-bit, 31-bit and 24-bit pointers.

    I'm trying to extract a 24-bit pointer out of a 4-byte word. The first 8 bits in the 4-byte word can be...
  8. Replies
    6
    Views
    1,780

    Thank you both for replying. I would have...

    Thank you both for replying. I would have responded earlier, but couldn't - see below.

    I went through several test cases to see what is happening and to understand it better. I guess it's...
  9. Replies
    6
    Views
    1,780

    I appreciate your replying, but IMHO, the...

    I appreciate your replying, but IMHO, the pertinent pieces of the question were more than enough to answer. The question was about syntax, style and expression evaluation.

    However, I have...
  10. Replies
    6
    Views
    1,780

    bit testing question

    I don't think there is, but is there any difference between the following expressions?



    ...
    unsigned char flag ;

    #define BIT0 0x80
    #define BIT1 0x40
    ...
  11. So simple!! If a guy wanted to buy you a...

    So simple!!

    If a guy wanted to buy you a bottle of your favorite libation, for appreciation of all the times you've helped me, how would he do that?
  12. Incrementing a struct pointer as if it were a char pointer.

    I'm stuck on how to fix this. The program does not work, and I know why, but I don't know how to fix it.

    It's not working because of this line:


    tempptr += ( tempptr->glen +...
  13. Replies
    1
    Views
    1,166

    declaring filler space in a struct

    Is there a way to declare space in a struct as unused / filler / pad, in such as way as to not have to provide an identifier?

    For example,



    struct foo {
    int . ; // just 4...
  14. Replies
    2
    Views
    1,170

    Clever! My platform is big endian. Will never...

    Clever! My platform is big endian. Will never be ported to another platform. I forgot about shifting. Thank you.
  15. Replies
    2
    Views
    1,170

    how to cast unsigned char[3] to int?

    I have a 3 byte unsigned char array that contains a length value (someone else's control block) and I need to move the value to my int field.

    I tried different flavors of casting, but couldn't...
  16. Actually, my list_entry is not doubly linked. I...

    Actually, my list_entry is not doubly linked. I had it doubly linked, but realized it was overkill in this scenario.
  17. Advancing a pointer past an incomplete structure.

    I'm creating a doubly-linked list that is contained in blocks that are doubly-linked as well.

    When I create a block, (aka, a header), the caller specifies the length of his data that will go...
  18. Works perfect! Great solution. Thank you!

    Works perfect! Great solution. Thank you!
  19. Is there a way to point to one structure array entry from another at compile time?

    Here's the scenario.

    I have some structures...



    struct entry {
    char name[8] ;
    int age ;
    } ;
  20. Replies
    7
    Views
    3,483

    That’s what I was expecting, but wasn’t certain. ...

    That’s what I was expecting, but wasn’t certain. Thx
  21. Replies
    7
    Views
    3,483

    In the #define solution above, will the, for...

    In the #define solution above, will the, for instance, B500 fields, since not directly used, be part of the executable, affecting the final size of the executable?

    In assembler, I code this:
    ...
  22. Replies
    7
    Views
    3,483

    Not super elegant, but it works well enough. ...

    Not super elegant, but it works well enough. Thanks!
  23. Replies
    7
    Views
    3,483

    Creating a long, specific, c string

    I need to create a c string that is 1100 bytes long, with a whole lot of blanks in the middle, for a boundary test.

    Is there a way, in C, to define this string at compile time vs generating what I...
  24. Replies
    40
    Views
    7,469

    Wow. ...

    Wow.

    http://cboard.cprogramming.com/c-programming/106838-fscanf-issue.html
  25. Replies
    40
    Views
    7,469

    If you think about, (well, if I think about it),...

    If you think about, (well, if I think about it), it's pretty easy.

    A string you get is so long. Create a new variable the same length.
    The first character of the input string goes in the...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4