Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by lukaszmaly ( 14 years ago )
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
extern char **environ;
void print_env()
{
int i;
int pol;

while(*environ[i++]!=0)
        printf("%s \n",environ[i]);
}
void wykonaj(char *name)
{

}

void wykonaj_std(char *name)
{

}

int main()
{
    char konsola[20];
    int done=0;
    int czekaj=0;

    while(done==0)
    {
        printf("nasluch\n");
        scanf("%[^\n]s",&konsola;);
      if(strcmp("quit",konsola)==0)
      {
          printf("ok");
          done=1;
      }
      else if(strcmp("env",konsola)==0)
      {
          wykonaj(konsola);

          print_env();
      }
      else  wykonaj_std(konsola);

    }
return 0;

}

 

Revise this Paste

Your Name: Code Language: