tmxtouch.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett/***********************************************************************
e071fb22ea9923a2a4ff41184d80ca46b55ee932Till Mossakowski* This software is part of the ast package *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* Copyright (c) 1985-2011 AT&T Intellectual Property *
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu* and is licensed under the *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* Eclipse Public License, Version 1.0 *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* by AT&T Intellectual Property *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* A copy of the License is available at *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* http://www.eclipse.org/org/documents/epl-v10.html *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* Information and Software Systems Research *
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett* AT&T Research *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* Florham Park NJ *
9f93b2a8b552789cd939d599504d39732672dc84Christian Maeder* Glenn Fowler <gsf@research.att.com> *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* David Korn <dgk@research.att.com> *
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett* Phong Vo <kpv@research.att.com> *
9ebbce450fb242e1a346f9f89367d8c46fcb2ec8Andy Gimblett***********************************************************************/
9aeda2b3ae8ce0b018955521e4ca835a8ba8a27bLiam O'Reilly * Glenn Fowler
020cdb5dad6b871aba61136a0e1567c00426de87Andy Gimblett * AT&T Research
12b2ae689353ecbaad720a9af9f9be01c1a3fe2dChristian Maeder * Time_t conversion support
8db2221917c1bc569614f3481bcdb3b988facaedChristian Maeder * touch path <atime,mtime,ctime>
12b2ae689353ecbaad720a9af9f9be01c1a3fe2dChristian Maeder * (flags&PATH_TOUCH_VERBATIM) treats times verbatim, otherwise:
8db2221917c1bc569614f3481bcdb3b988facaedChristian Maeder * Time_t==0 current time
12b2ae689353ecbaad720a9af9f9be01c1a3fe2dChristian Maeder * Time_t==TMX_NOTIME retains path value
9aeda2b3ae8ce0b018955521e4ca835a8ba8a27bLiam O'Reillytmxtouch(const char* path, Time_t at, Time_t mt, Time_t ct, int flags)
9f93b2a8b552789cd939d599504d39732672dc84Christian Maeder if (at == TMX_NOTIME && !(flags & PATH_TOUCH_VERBATIM))
9f93b2a8b552789cd939d599504d39732672dc84Christian Maeder else if (!at && !(flags & PATH_TOUCH_VERBATIM))
1c7c4d95775a8ad5f7373e5cf0bad86f8301c56cAndy Gimblett if (mt == TMX_NOTIME && !(flags & PATH_TOUCH_VERBATIM))
53f89daf88665d3ea96d871110a5c0d9d8326bd2Andy Gimblett else if (!mt && !(flags & PATH_TOUCH_VERBATIM))
b25c72845890740c2f8a21214752574990b943cfChristian Maeder if (ct == TMX_NOTIME && !(flags & PATH_TOUCH_VERBATIM))
c052e3ee4a53ee3a2da829aa142fd596ef6c9e3dAndy Gimblett else if (!ct && !(flags & PATH_TOUCH_VERBATIM))