Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!IRO.UMontreal.CA!JSP.UMontreal.CA!gaumondp From: gaumondp@JSP.UMontreal.CA (Gaumond Pierre) Newsgroups: comp.lang.c Subject: getting home directories Message-ID: <1991Apr16.153542.2630@jsp.umontreal.ca> Date: 16 Apr 91 15:35:42 GMT Sender: news@jsp.umontreal.ca (Administration de C news) Organization: Universite de Montreal Lines: 17 Nntp-Posting-Host: spt3.jsp.umontreal.ca Suppose a C program has to reead the name of a file on another file and then open it (with "fopen"). Now, suppose the name read has one of the forms: - ~/dir/file - ~user/dir/file What tools do I have to interpret the ~ and ~user as home directories? What tools can split path name in single components? Pierre Gaumond. -- Pierre Gaumond. | gaumondp@JSP.UMontreal.CA Services Informatiques, Universite de Montreal. | gaumondp@centrcn.UMontreal.CA C.P. 6128, Succursale "A", Montreal, | Quebec, Canada. H3C 3J7 |