Search:

Type: Posts; User: fguy817817

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    19
    Views
    4,207

    I had thought of this previously. I was just...

    I had thought of this previously. I was just hoping that I could find a way to populate the prompt with a previous response so they could alter it without having to reenter the whole thing. I have...
  2. Replies
    19
    Views
    4,207

    This is much closer to what I am looking for, but...

    This is much closer to what I am looking for, but as you explained you can't backspace. It also overwrites the answer as you type rather than inserting characters.

    Just out of curiosity, when I...
  3. Replies
    19
    Views
    4,207

    It's ok :). Here is a better explaination: My...

    It's ok :). Here is a better explaination:

    My whole goal here is to programmatically enter text into the same prompt the user will be modifying. This will happen as soon as the prompt is...
  4. Replies
    19
    Views
    4,207

    Ok so let me try to step through this. I need...

    Ok so let me try to step through this. I need to:

    1. Call togetattr() to retrieve the current terminal settings
    2. Modify the settings returned by togetattr() to allow raw input
    3. Call...
  5. Replies
    19
    Views
    4,207

    I tried a sample and ran into the same problem :)

    I tried a sample and ran into the same problem :)
  6. Replies
    19
    Views
    4,207

    I have seen some mention of using ioctl() and...

    I have seen some mention of using ioctl() and TIOCSTI to simulate keyboard stokes to TTY. However, as you mentioned, scanf is a blocking call. Would I have to do this on a separate thread?
  7. Replies
    19
    Views
    4,207

    I'm not receiving the raw keystrokes. Currently...

    I'm not receiving the raw keystrokes. Currently I have written my own version of scanf() that uses fgets() to accept keyboard input. I have never used the keyboard buffer before. Considering the...
  8. Replies
    19
    Views
    4,207

    I have never used glib before. I wasn't aware...

    I have never used glib before. I wasn't aware that its functionality was that extensive. This will be a good reference in the future for me. I am going to look at the code for the string...
  9. Replies
    19
    Views
    4,207

    I actually read this page previously. ...

    I actually read this page previously. Unfortunately, they only go over the very basics of using libedit to create a prompt and accept input.
  10. Replies
    19
    Views
    4,207

    Pre-Populating Input Prompt Using Libedit

    I am currently using libedit in a custom shell I am designing. Is there a way to use libedit to pre-populate the user input at the prompt? For example, i am using:

    el_set(el, EL_PROMPT,...
  11. Replies
    12
    Views
    6,467

    2^63 is more than enough for what I am doing so I...

    2^63 is more than enough for what I am doing so I guess my entire post is now moot. I don't know why I was thinking that a long int on a 64-bit system was -2^32 to +2^32. I must be losing my mind. ...
  12. Replies
    12
    Views
    6,467

    OK I understand. Don't know what I was thinking.

    OK I understand. Don't know what I was thinking.
  13. Replies
    12
    Views
    6,467

    well i tracked it all the way back to types.h and...

    well i tracked it all the way back to types.h and it appears to be:

    __SLONGWORD_TYPE long int

    which means that its definitely signed as we basically already knew.

    Also, i thought that a...
  14. Replies
    12
    Views
    6,467

    I guess I can't prove that it is an unsigned...

    I guess I can't prove that it is an unsigned long. My printf is simply converting to that value. I realize now that the above example is actually really bad one :)

    The problem I am having is...
  15. Replies
    12
    Views
    6,467

    fseeko and off_t

    From what I have been able to determine, the system I am currently coding on defines off_t as an unsigned long int which is an 8 byte value with max range of 18446744073709551615. I believe example...
  16. Replies
    17
    Views
    5,551

    Aside from Valgrind I am still leaking memory due...

    Aside from Valgrind I am still leaking memory due to constant reallocation. I guess this is just not a valid approach for a large amount of memory reallocation. I think my strategy will be to just...
  17. Replies
    17
    Views
    5,551

    The program was not failing on the first realloc....

    The program was not failing on the first realloc. It was tying up memory as the program repeated itself and eventually exhausting all memory. This is when it was crashing.
  18. Replies
    17
    Views
    5,551

    Well I think I found the problem. I had been...

    Well I think I found the problem. I had been running these test cases in Valgrind. Apparently valgrind holds onto a tremendous amount of memory until the program terminates... I ran this outside...
  19. Replies
    17
    Views
    5,551

    I understand everything you have told me. I have...

    I understand everything you have told me. I have had this discussion with numerous other people. To answer your question, no I am not trying to "allocate an arbitrarily large amount of memory and...
  20. Replies
    17
    Views
    5,551

    I am questioning this example because I am going...

    I am questioning this example because I am going to try to write some methods that will manage files in memory i.e. mseek, mtell, mwrite.. etc. The prob is that the memory for this type of approach...
  21. Replies
    17
    Views
    5,551

    I guess my real question is this: If the above...

    I guess my real question is this: If the above code is iterated several times without the program terminating, should it ever crash? This is assuming your system has enough memory to run one...
  22. Replies
    17
    Views
    5,551

    The above example is my code. If I loop it to...

    The above example is my code. If I loop it to execute several times the system runs out of memory. I cannot figure out why this is happening if everything is freed with each iteration. I even ran...
  23. Replies
    17
    Views
    5,551

    So what if the process doing this type of...

    So what if the process doing this type of allocation doesn't end? a daemon for example? I know that the memory is not immediately given back to the OS, but I was assuming it would be reused by the...
  24. Replies
    17
    Views
    5,551

    Realloc and Linux

    I am running the below code on Debian Linux kernel 2.6.26. I was watching the resource manager in Linux and noticed that this program does not free memory properly until its execution ends. I...
  25. Replies
    15
    Views
    7,331

    What is a good profiling tool? I tried gprof but...

    What is a good profiling tool? I tried gprof but my program is multi-threaded and it loses its mind. There was a workaround but I have yet to get it to work. Do you know of any profilers that work...
Results 1 to 25 of 97
Page 1 of 4 1 2 3 4