Search:

Type: Posts; User: lilcoder

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. @matsp: thx for explaining! @PrashantVaidwan:...

    @matsp: thx for explaining!

    @PrashantVaidwan: hmm I thought I would make just one pointer to a buffer of 20bytes with this...thanks for making this clear
  2. why not opening another thread???? buff is a...

    why not opening another thread????

    buff is a pointer in my code and &buff is a memory adress to the content of buff, so both are the same in this case.
  3. Thread: Help Please!

    by lilcoder
    Replies
    3
    Views
    1,144

    you're code arrengement looked horrible to me......

    you're code arrengement looked horrible to me... Take a look at this: http://irc.essex.ac.uk/www.iota-six.co.uk/c/b4_arithmetic_operators.asp



    #include <stdio.h>

    int main (void) {

    int...
  4. Why does this crash first when memmory is freed?

    Okay let's take a look at this wrong scanf-implementation:


    #include <stdio.h>

    int main(void) {

    char *buff[20];

    scanf("%s",buff);
  5. Replies
    33
    Views
    4,163

    @salem: Yes, indeed it's limited by hd-speed and...

    @salem: Yes, indeed it's limited by hd-speed and with me even more because my HD is full-encrypted. But I think I can get better than cat. Maybe my BUFSIZE isn't that good choosen as I thought...
  6. Replies
    33
    Views
    4,163

    fputs doesn't seem much faster than printf. It's...

    fputs doesn't seem much faster than printf. It's best result was 4032ticks over 1000 tries..

    I'll redo the time-test this night with closed X-server and no network-connection to bypass any...
  7. Replies
    33
    Views
    4,163

    Hi okay I did a ~60MB Zip-file for this test now....

    Hi okay I did a ~60MB Zip-file for this test now.



    time cat ind.zip
    [..]
    real 2m31.340s
    user 0m00.000s
    sys 2m30.089s
  8. Replies
    33
    Views
    4,163

    Yes the while loop is a good solution and works...

    Yes the while loop is a good solution and works really well:


    #include </usr/include/linux/unistd.h>

    #define BUFSIZE 4092

    int main(int argc, char *argv[1]) {
  9. Replies
    33
    Views
    4,163

    But a line has not definite size or? So a 10 MB...

    But a line has not definite size or? So a 10 MB file could have just one line and never contain \n ? I think I'm gonna try to accomplish this now with sys_readahead:

    But it seems I can't access...
  10. Replies
    33
    Views
    4,163

    Really? I thought this would be a good way of...

    Really? I thought this would be a good way of reading files with unknown length.

    Okay I got now behind, that I have to use gcc -pedantic to get these kind of warnings you are telling about.

    ...
  11. Replies
    33
    Views
    4,163

    Okay I did now like suggested and a few other...

    Okay I did now like suggested and a few other things, so I think now there shouldn't be any errors:


    #include </usr/include/linux/unistd.h>
    #include </usr/include/asm/stat.h>

    int main(int...
  12. Replies
    33
    Views
    4,163

    Hi, So do I: syscall(__NR_close,fd); As...

    Hi,


    So do I: syscall(__NR_close,fd);


    As said this is strlen without including string.h .


    I can't follow that? I created a 182kb textfile and have resized my buffers and everything...
  13. Replies
    33
    Views
    4,163

    ah okay thank you for your answers :)

    ah okay thank you for your answers :)
  14. Replies
    33
    Views
    4,163

    int *x = NULL; // * used such that x is a...

    int *x = NULL; // * used such that x is a pointer.
    makes sense


    int a = *b; // * used such that *b is an int.
    Aha this makes a containing the hexcode of the first field of b[]:


    ...
  15. Replies
    33
    Views
    4,163

    Ahh so buffer and &buffer are exactly the same?...

    Ahh so buffer and &buffer are exactly the same? Because also &buffer points to the first element of this char array.

    But is * not the symbol for the pointer-type? And next to that I don't get a...
  16. Replies
    33
    Views
    4,163

    Ahh thank you I thought FILE would be a fd type...

    Ahh thank you I thought FILE would be a fd type or something like this. 3 was really the correct fd. This here is working fine for me:


    #include </usr/include/linux/unistd.h>
    #include <string.h>...
  17. Replies
    33
    Views
    4,163

    okay I did so now like I would do the same in...

    okay I did so now like I would do the same in assembler:
    fd = syscall(__NR_open,myfile,00,04000) ;

    in asm I do this an it works:


    mov eax,5
    mov ebx, myfile
    mov ecx,00
    mov...
  18. Replies
    33
    Views
    4,163

    What mean filedescriptor error-codes?

    Hi,
    I have written the following code:


    #include <stdio.h>

    int main(void) {

    char *myfile = "/home/username/Desktop/testfile";
    FILE *fd;
  19. Replies
    17
    Views
    8,038

    But can the c-lib put features into unistd.h?...

    But can the c-lib put features into unistd.h? Isn't that part of the kernel?

    I'm really starting to get ........ed of by Ubuntu...

    greets
  20. Replies
    17
    Views
    8,038

    Could you point me to a good linux coding forum...

    Could you point me to a good linux coding forum for advaced topics?
  21. Replies
    17
    Views
    8,038

    lol I know how to use grep... I just posted the...

    lol I know how to use grep... I just posted the whole file in order not to get answers telling me to look closer, or I overlooked them. They are not here.

    Really noone any idea?
  22. Replies
    17
    Views
    8,038

    No they are not here: cat...

    No they are not here:


    cat /usr/include/asm-i386/unistd.h
    #ifndef _ASM_I386_UNISTD_H_
    #define _ASM_I386_UNISTD_H_

    /*
    * This file contains the system call numbers.
    */
  23. Replies
    17
    Views
    8,038

    Hi, $ cat /usr/include/linux/unistd.h...

    Hi,


    $ cat /usr/include/linux/unistd.h
    #ifndef _LINUX_UNISTD_H_
    #define _LINUX_UNISTD_H_

    /*
    * Include machine specific syscall numbers
    */
  24. Replies
    17
    Views
    8,038

    Well in the IBM-paper is written: but they...

    Well in the IBM-paper is written:


    but they are not defined in unistd.h here. In syscall.h they are also not:


    $ cat /usr/include/sys/syscall.h
    /* Copyright (C) 1995, 1996, 1997 Free...
  25. Replies
    17
    Views
    8,038

    Hi Salem, my kernel: 2.6.20-16-386 my...

    Hi Salem,

    my kernel: 2.6.20-16-386
    my compilersuite: gcc (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu4)


    bye
Results 1 to 25 of 26
Page 1 of 2 1 2