Search:

Type: Posts; User: razza

Search: Search took 0.00 seconds.

  1. Thread: spot the error

    by razza
    Replies
    5
    Views
    2,424

    If anyone is interested in the whole code (not...

    If anyone is interested in the whole code (not that long).
    a colour coded, spaced link is available here
  2. Thread: spot the error

    by razza
    Replies
    5
    Views
    2,424

    Your way seems to produce the same error too so...

    Your way seems to produce the same error too so there must be something wrong possibly elsewhere Ill keep looking in the code
  3. Thread: spot the error

    by razza
    Replies
    5
    Views
    2,424

    spot the error

    I use the following to get two integers from user input, and also to check they are actually numbers...now it works fine if I enter an incorect number (say the first number) and asks me to re-enter,...
  4. Replies
    6
    Views
    3,924

    Thanks I didn't think of putting the value in '...

    Thanks I didn't think of putting the value in ' ', which did help me spot something :)

    Managed to fix it, so it works now.
  5. Replies
    6
    Views
    3,924

    int parse(char *buffer, char **v) { int temp =...

    int parse(char *buffer, char **v) {
    int temp = 0;
    while (*buffer != '\0') // if not the end of buffer yet.
    {
    while (*buffer == ' ' || *buffer == '\t' || *buffer ==...
  6. Replies
    6
    Views
    3,924

    well for ls for example: ls / (lists...

    well for ls for example:

    ls /

    (lists directory contents properly)

    ls / &

    ls: : No such file or directory
    /:
  7. Replies
    6
    Views
    3,924

    simple shell (c), fgets problem

    Hi all,

    Could you please look at my source at http://razza.org/source.html (its formatted, and color coded)

    I have two problems, they seem to be related
    1:)

    when I use fgets to grab from...
  8. Replies
    9
    Views
    2,076

    yeah i gotta work on that :) thanks for the...

    yeah i gotta work on that :)

    thanks for the help though hammer greately appreciated.
  9. Replies
    9
    Views
    2,076

    the output with printf is as it should be eg i...

    the output with printf is as it should be
    eg i type in ls

    it prints out ls
  10. Replies
    9
    Views
    2,076

    The following code works which is very similar,...

    The following code works which is very similar, but its not what I want, it takes stuff from argv, I want to make a continous while loop (while 1), and run programs the user enters eg echo hello or...
  11. Replies
    9
    Views
    2,076

    problem with pointer/array

    can someone tell me how to make this work properly ive been trying for hours! basically it should act like a shell, and run a command.

    #include <sys/types.h>
    #include <sys/wait.h>
    #include...
  12. Replies
    3
    Views
    1,265

    thanks buddie! I really appreciate the help.

    thanks buddie!

    I really appreciate the help.
  13. Replies
    3
    Views
    1,265

    problem with looping

    I'm preparing to make a very simple linux shell in c (one that will just run one program with any required arguments and perhaps later might search for the program in a path variable if its not found...
  14. Replies
    4
    Views
    2,966

    Thanks for that, I've only just started to learn...

    Thanks for that, I've only just started to learn how to code so any tips is always appreciated.
  15. Replies
    4
    Views
    2,966

    nevermind solved it :) #define STRSIZE 256 just...

    nevermind solved it :)
    #define STRSIZE 256 just had to be changed to something higher 512 works fine..
  16. Replies
    4
    Views
    2,966

    I found out it was the line above in the file im...

    I found out it was the line above in the file im reading from that is causing the problems, basically if you use vi to open up the file it goes past the screen and you have to scroll across to see...
  17. Replies
    4
    Views
    2,966

    problem with strtok & core dump

    Im trying to read from /proc/stat the disk_io line, and grab the first number inside the biggest bracket and print it out.

    The following code works ok, if i make another file eg /somedir/robs...
Results 1 to 17 of 17