deprecated/etouch/etouch.cpp
author Zheng Shen <zheng.shen@nokia.com>
Tue, 26 Oct 2010 11:12:31 +0800
changeset 654 7c11c3d8d025
parent 600 6d08f4a05d93
child 675 02e65118a746
permissions -rw-r--r--
romtools 13.2.0.1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
600
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     1
// Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies).
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     2
// All rights reserved.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     3
// This component and the accompanying materials are made available
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     5
// which accompanies this distribution, and is available
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     7
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     8
// Initial Contributors:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    10
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    11
// Contributors:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    12
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    13
// Description:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    14
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    15
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    16
#if defined(__MSVCDOTNET__) || defined (__TOOLS2__)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    17
 #include <iostream>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    18
 using namespace std;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    19
#else //!__MSVCDOTNET__
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    20
 #include <iostream.h>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    21
#endif //__MSVCDOTNET__
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    22
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    23
#if defined(__VC32__) || defined(__TOOLS2__)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    24
 #include <sys\utime.h>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    25
#else
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    26
 #include <utime.h>
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    27
#endif
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    28
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    29
#if defined(__VC32__) && !defined(__MSVCDOTNET__)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    30
#pragma warning( disable : 4710 )	// 'fn': function not inlined
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    31
#endif // old MSVC
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    32
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    33
int main(int argc,char *argv[])
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    34
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    35
// Collect the filename from the command line
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    36
// and change its date/time stamp to the current date/time
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    37
//
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    38
	{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    39
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    40
	if (argc!=2)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    41
		{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    42
		cout << "Syntax: etouch filename" << endl;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    43
		return(1);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    44
		}
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    45
	return(utime(argv[1],NULL)==(-1) ? 1 : 0);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    46
	}