ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

wmakpath.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:     ReactOS CRT library
00003  * LICENSE:     See COPYING in the top level directory
00004  * FILE:        lib/sdk/crt/stdlib/wmakpath.c
00005  * PURPOSE:     Creates a unicode path
00006  * PROGRAMMERS: Wine team
00007  *              Copyright 1996,1998 Marcus Meissner
00008  *              Copyright 1996 Jukka Iivonen
00009  *              Copyright 1997,2000 Uwe Bonnes
00010  *              Copyright 2000 Jon Griffiths
00011  *
00012  */
00013 
00014 /* $Id: wmakpath.c 53713 2011-09-15 17:11:53Z tkreuzer $
00015  */
00016 #include <precomp.h>
00017 
00018 /*
00019  * @implemented
00020  */
00021 void _wmakepath(wchar_t* path, const wchar_t* drive, const wchar_t* dir, const wchar_t* fname, const wchar_t* ext)
00022 {
00023     wchar_t *p = path;
00024 
00025     if ( !path )
00026         return;
00027 
00028     if (drive && drive[0])
00029     {
00030         *p++ = drive[0];
00031         *p++ = ':';
00032     }
00033     if (dir && dir[0])
00034     {
00035         size_t len = strlenW(dir);
00036         memmove(p, dir, len * sizeof(wchar_t));
00037         p += len;
00038         if (p[-1] != '/' && p[-1] != '\\')
00039             *p++ = '\\';
00040     }
00041     if (fname && fname[0])
00042     {
00043         size_t len = strlenW(fname);
00044         memmove(p, fname, len * sizeof(wchar_t));
00045         p += len;
00046     }
00047     if (ext && ext[0])
00048     {
00049         if (ext[0] != '.')
00050             *p++ = '.';
00051         strcpyW(p, ext);
00052     }
00053     else
00054         *p = '\0';
00055 }

Generated on Fri May 25 2012 04:34:59 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.