1999-11-20 01:11:12 +00:00
|
|
|
/*
|
|
|
|
*******************************************************************************
|
1999-12-13 22:28:37 +00:00
|
|
|
*
|
2001-03-21 23:22:16 +00:00
|
|
|
* Copyright (C) 1999-2000, International Business Machines
|
1999-12-13 22:28:37 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
|
|
|
*
|
1999-11-20 01:11:12 +00:00
|
|
|
*******************************************************************************
|
|
|
|
* file name: toolutil.h
|
|
|
|
* encoding: US-ASCII
|
|
|
|
* tab size: 8 (not used)
|
|
|
|
* indentation:4
|
|
|
|
*
|
|
|
|
* created on: 1999nov19
|
|
|
|
* created by: Markus W. Scherer
|
|
|
|
*
|
|
|
|
* This file defines utility functions for ICU tools like genccode.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __TOOLUTIL_H__
|
|
|
|
#define __TOOLUTIL_H__
|
|
|
|
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
1999-11-20 01:11:12 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* For Windows, a path/filename may be the short (8.3) version
|
|
|
|
* of the "real", long one. In this case, the short one
|
|
|
|
* is abbreviated and contains a tilde etc.
|
|
|
|
* This function returns a pointer to the original pathname
|
|
|
|
* if it is the "real" one itself, and a pointer to a static
|
|
|
|
* buffer (not thread-safe) containing the long version
|
|
|
|
* if the pathname is indeed abbreviated.
|
|
|
|
*
|
|
|
|
* On platforms other than Windows, this function always returns
|
|
|
|
* the input pathname pointer.
|
|
|
|
*
|
|
|
|
* This function is especially useful in tools that are called
|
|
|
|
* by a batch file for loop, which yields short pathnames on Win9x.
|
|
|
|
*/
|
2000-04-18 23:13:56 +00:00
|
|
|
U_CFUNC const char *
|
|
|
|
getLongPathname(const char *pathname);
|
1999-11-20 01:11:12 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Find the basename at the end of a pathname, i.e., the part
|
|
|
|
* after the last file separator, and return a pointer
|
|
|
|
* to this part of the pathname.
|
|
|
|
* If the pathname only contains a basename and no file separator,
|
|
|
|
* then the pathname pointer itself is returned.
|
|
|
|
*/
|
|
|
|
U_CFUNC const char *
|
|
|
|
findBasename(const char *filename);
|
|
|
|
|
|
|
|
#endif
|