A89: Re: Linux Clone Dev


[Prev][Next][Index][Thread]

A89: Re: Linux Clone Dev



What exactly is the problem with the code...
 
Oh and sorry for being a jerk, but it isn't really a Linux Clone(no kernel) if your coding a command prompt, it's more like BASH/CSH/XPROMPT Clone.
 
I would love to see stuff like scripts(text files), pipes, and advanced commands. You can leave out anything about multiuser and other stuff.
----- Original Message -----
From: Neema Amini
To: assembly-89@lists.ticalc.org
Sent: Sunday, November 19, 2000 7:56 PM
Subject: A89: Linux Clone Dev

Trying to get a C written Linux Clone program to work. I'm working on the send function (with TI-GCC). Wondering if you knew what was wrong with this code:
 
if (strstr (command,"send ") != NULL ||       // deletes a file
    strstr (command,"send") != NULL)
{
 error = 0;
 if (strcmp (command,"send") == 0)
  printf ("%s\n","invalid repertory, what do you want to send?");
 else
 {
  if (command[3]  == ' ')
  { 
   namestr = strstr (command,"$ ") + 1;
   error = SendCalc (strcpy (TIOSname + 1, namestr) + strlen (namestr));  // sends function
   if (error == FALSE)
    printf ("%s\n","invalid file name, can't send that");
   else
    printf ("%s %s %s\n", "file",namestr,"file sent");
  }
  else
   error = 1;
 }
}

References: