Search:

Type: Posts; User: davo666

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds; generated 3 minute(s) ago.

  1. Replies
    3
    Views
    1,642

    wow thanks for your help... as it turns out just...

    wow thanks for your help... as it turns out just tip #1 was cool enough :) i ended up not having that many commands... for now :)

    anyway, i love this forum it is sooooo good as a C resource!!!!
    ...
  2. Replies
    3
    Views
    1,642

    hmm i have found while searching that i could...

    hmm i have found while searching that i could create a function map where the string is the key and a pointer to the function is the value

    could you give me a few tips on how would start to go...
  3. Replies
    3
    Views
    1,642

    Sockets and multi string comparison

    Hello,

    I have a socket server program which takes things like CMD:hci_scan as input into a char *
    and i would like to know how i could differentiate between all the different commands and i do...
  4. Replies
    11
    Views
    1,917

    sorry, the platform is iPhone

    sorry, the platform is iPhone
  5. Replies
    11
    Views
    1,917

    so like a polling loop that asks the library...

    so like a polling loop that asks the library every x interval?

    thats kinda hacky...
  6. Replies
    11
    Views
    1,917

    how extern is extern?

    Hello,

    i have an event driven c library that needs to notify the thing it links with that a status has changed. i cant call a function because obviously it would be present at compile time of the...
  7. Replies
    1
    Views
    1,790

    concatenating 2 bytes of an array

    hello,

    I have an unsigned char array which is basically 17bytes long with a null terminator

    in the form 0 0 : 1 1 : 2 2 : 3 3 : 4 4 : 5 5 \0

    i can take the \0 off easily, but i would like to...
  8. Replies
    18
    Views
    11,514

    that interprets it as a 1 byte string, becuase it...

    that interprets it as a 1 byte string, becuase it prints 'l' (ell) and quits, also if you add a trailing 0x00, (which is evident in my string) then it doesnt print anything...

    this is becming an...
  9. Replies
    18
    Views
    11,514

    ok im going for the sprintf the bytes to a char...

    ok im going for the sprintf the bytes to a char array and going from there i found this piece of code does not compile



    #include <stdio.h>
    #include <wchar.h>

    int main() {
  10. Replies
    18
    Views
    11,514

    i did read the man page... from my re-reading i...

    i did read the man page... from my re-reading i changed %C to %c but otherwise i dont know what to do -- arg1 is a pointer to a wide char array? arg2 is the maximum length of the string (?) arg 3 is...
  11. Replies
    18
    Views
    11,514

    sorry, i got casted to (wchar_t) but that still...

    sorry, i got casted to (wchar_t) but that still didnt help... im using GCC on an ARM platform msdn is the last thing i would read :)

    thanks
  12. Replies
    18
    Views
    11,514

    the double casting worked, you are great! i...

    the double casting worked, you are great!

    i still couldnt apply that to swprintf though :s but this is what i have so far:

    name_len - 3 is the number of bytes, including the null termintor that...
  13. Replies
    18
    Views
    11,514

    i thought about the casting, but wouldnt that...

    i thought about the casting, but wouldnt that read 4 bytes at a time? also the bytes i need are 9 bytes in (i.e. the 8th element of the array)
  14. Replies
    18
    Views
    11,514

    ok, i will extrapolate: i am getting an OBEX...

    ok, i will extrapolate:

    i am getting an OBEX packet delivered over Bluetooth. one of the packet fields is 'file name' - in 2 byte unicode characters.

    the problem is the array received is a void...
  15. Replies
    18
    Views
    11,514

    when i print byte for byte this sequence: 0x00...

    when i print byte for byte this sequence:

    0x00 0x6C 0x00 0x6F 0x00

    the letters 'l' and 'o' are printed but when i sprintf the 0x6c then 0x6f i get 'l' and nothing.

    i then looked up 6f in...
  16. Replies
    18
    Views
    11,514

    reading at unicode.org it says it is O.K. to...

    reading at unicode.org it says it is O.K. to truncate 2 byte unicode (16bit big endian) code sequences to 1 byte because it will preserve characters c <= 127, like ascii.

    this wold only stuff up...
  17. Replies
    18
    Views
    11,514

    thanks for the reply, say if the bytes are locked...

    thanks for the reply, say if the bytes are locked up in a char array, is there a way to copy the bytes into this wchat_t array 1 byte at a time, or do you need to copy it two bytes at a time?
    ...
  18. Replies
    18
    Views
    11,514

    Unicode 2 byte wide characters

    Hello,

    I was wondering about Unicode, specifically 2 byte characters, if i have an array of 2 byte unicode characters (each byte is an element) how would i be able to print these characters.
    ...
  19. Replies
    1
    Views
    1,818

    printing wide characters to strings...

    hello everyone,

    i have a for looop that iterates through an array of bytes, each two byte sequence is a 2 byte wide character, i need to print each two byte sequence to a wchar_t array. I have...
  20. Replies
    8
    Views
    1,267

    yes, its definately with the function, i can...

    yes, its definately with the function, i can print my bytes inside it and the error is occuring elsewhere in that func -- thanks for your help!
  21. Replies
    8
    Views
    1,267

    hmm, I think maybe my problem is in output() ...

    hmm, I think maybe my problem is in output()

    here it is


    int output(unsigned char *data) {

    int num_bytes =2;

    // use the rfcomm_pcb passed into the rfcomm_connected function as the...
  22. Replies
    8
    Views
    1,267

    phew! i though i was going insane :) int...

    phew! i though i was going insane :)



    int output(unsigned char *data); //prototype
  23. Replies
    8
    Views
    1,267

    lol sorry unsigned char data[1024] = { ...

    lol sorry


    unsigned char data[1024] = { 0x0a, 0x00 };

    thats how i initialise it

    -- if i dont cast it gives errors
  24. Replies
    8
    Views
    1,267

    function asking for unsigned char *

    hello,

    i have a function which is asking for an unsigned char * but when i initialise an unsigned char array


    unsigned char data[1024];

    and pass it like so:
  25. Replies
    7
    Views
    1,366

    wow! thankyou! return_string on its own printed...

    wow! thankyou! return_string on its own printed as a string printed it exactly! i guess i cant access only the first character... oh well thanks!
Results 1 to 25 of 61
Page 1 of 3 1 2 3