public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* User Setup & File Operations...
@ 1998-01-17 11:00 Adarsh Kochhar
  1998-01-19 15:26 ` Michael Hirmke
  0 siblings, 1 reply; 2+ messages in thread
From: Adarsh Kochhar @ 1998-01-17 11:00 UTC (permalink / raw)
  To: GNU-WIN32

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@metaphorm.com


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: User Setup & File Operations...
  1998-01-17 11:00 User Setup & File Operations Adarsh Kochhar
@ 1998-01-19 15:26 ` Michael Hirmke
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Hirmke @ 1998-01-19 15:26 UTC (permalink / raw)
  To: gnu-win32

Hi Adarsh,

>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..

First of all - you have to get Sergey's coolview from

        http://miracle.geol.msu.ru/sos/

>
>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??

There is a small programm called "mkgroup", which comes with the Cygnus
CDK. Just call it without parameters and it will show you its syntax.

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

It is in the above mentioned coolview.

>
>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?

You can do either this or create a $HOME/environment for each user.

>
>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");

   at least

   fptr = fopen("Adarsh","w");

   but you also should check, whether the fopen succeeded or not.

>  fprintf(fptr,"HI THERE!!");
>  fflush(fptr);
>  fclose(fptr);
>}
[...]
>That's all for the moment.
>Hope u will help me out.
>
>-Adarsh Kochhar

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-01-19 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-01-17 11:00 User Setup & File Operations Adarsh Kochhar
1998-01-19 15:26 ` Michael Hirmke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).