delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/01/18/22:19:49

From: adarsh AT metaphorm DOT com (Adarsh Kochhar)
Subject: User Setup & File Operations...
18 Jan 1998 22:19:49 -0800 :
Message-ID: <01bd2358$fbadaf80$0300a8c0.cygnus.gnu-win32@sahara.metaphorm>
Mime-Version: 1.0
To: "GNU-WIN32" <gnu-win32 AT cygnus DOT com>

HI!
    I am a new entrant into the user group of gnu-win32 apps..So,pls bear
with my very basic quaestions & do answer them..

Q1: I have bash running in NT machine.How do I create a /etc/passwd &
/etc/group files.I already have some users on the machine.Can I keep the
same userids, or I need to create new ones??

Q2: Once the users are created, what will be the login procedure ?I dont see
any login.exe .

Q3: I guess I can set the environment variables using the control panel "
system" for each of the users once I am able to get /etc/passwd in place.
Am i right?

Q4: I have the basic setup running , without ofcourse a .batchrc file..
      Now, I am trying to compile & execute a simple code using file
operations, but I get some un-comprehendable run-time errors.Following is
the listing of my code:
=====================================
#include<stdio.h>
void main()
{
  FILE *fptr=NULL;
        printf("Hi World! - This is Adarsh\n");
  system("date");
  fopen("Adarsh","w");
  fprintf(fptr,"HI THERE!!");
  fflush(fptr);
  fclose(fptr);
}
=====================================
I have noticed that it does create a zero byte file in the name of "Adarsh"
, but gives an exception after that I guess.Also the same piece of code
gives a warning, as if I am trying to declare the function "system()" inside
the function "main()".Why does this happen.Is there a header file to be
included?
    Also is there a header file to be included for the file operations??Are
all file operations supported.Where can I find help on that??

That's all for the moment.
Hope u will help me out.

-Adarsh Kochhar
adarsh AT metaphorm DOT com


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019