Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.9 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. ForFiles.h
  5. Abstract:
  6. Contains function prototypes and macros.
  7. Author:
  8. V Vijaya Bhaskar
  9. Revision History:
  10. 14-Jun-2001 : Created by V Vijaya Bhaskar ( Wipro Technologies ).
  11. --*/
  12. #ifndef __FOR_FILES__H
  13. #define __FOR_FILES__H
  14. #define DEFAULT_SEARCH_MASK _T( "*" )
  15. #define DEFAULT_COMMAND _T( "cmd /c echo @file" )
  16. #define SINGLE_SLASH _T( "\\" )
  17. #define DOUBLE_SLASH _T( "\\\\" )
  18. #define TRIPLE_SLASH _T( "\\\\\\" )
  19. #define SINGLE_DOT _T( "." )
  20. #define DOUBLE_DOT _T( ".." )
  21. #define DATE_FORMAT L"%d%s%d%s%d"
  22. #define MAX_COLUMNS 1
  23. #define ERROR_INVALID_SYNTAX GetResString( IDS_ERROR_INVALID_SYNTAX )
  24. #define ERROR_NOFILE_FOUND GetResString( IDS_ERROR_NOFILE_FOUND )
  25. #define ERROR_NOFILE_FOUND1 GetResString( IDS_ERROR_NOFILE_FOUND1 )
  26. #define TAG_ERROR_ACCESS_DENIED GetResString( IDS_TAG_ERROR_ACCESS_DENIED )
  27. #define APPEND_AT_END GetResString( IDS_APPEND_AT_END )
  28. #define ERROR_CRITERIA_MISMATCHED GetResString( IDS_ERROR_FILE_NOT_FOUND )
  29. #define ERROR_DIRECTORY_INVALID GetResString( IDS_DIRECTORY_INVALID )
  30. #define ERROR_UNC_PATH_NAME GetResString( IDS_ERROR_UNC_PATH_NAME )
  31. #define FORMAT_0 GetResString( IDS_DATE_FORMAT_0 )
  32. #define FORMAT_1 GetResString( IDS_DATE_FORMAT_1 )
  33. #define FORMAT_2 GetResString( IDS_DATE_FORMAT_2 )
  34. #define FORMAT_3 GetResString( IDS_DATE_FORMAT_3 )
  35. #define FORMAT_4 GetResString( IDS_DATE_FORMAT_4 )
  36. #define FORMAT_5 GetResString( IDS_DATE_FORMAT_5 )
  37. /***********************************************************
  38. /* Defines Related Command Line Inputs **
  39. /**********************************************************/
  40. #define MAX_OPTIONS 6
  41. #define OPTION_USAGE _T( "?" ) // 1
  42. #define OPTION_PATH _T( "p" ) // 2
  43. #define OPTION_SEARCHMASK _T( "m" ) // 3
  44. #define OPTION_COMMAND _T( "c" ) // 4
  45. #define OPTION_DATE _T( "d" ) // 5
  46. #define OPTION_RECURSE _T( "s" ) // 6
  47. // indexes
  48. #define OI_USAGE 0
  49. #define OI_PATH 1
  50. #define OI_SEARCHMASK 2
  51. #define OI_COMMAND 3
  52. #define OI_DATE 4
  53. #define OI_RECURSE 5
  54. #define CLOSE_FILE_HANDLE( FILE_HANDLE ) \
  55. if( 0 != FILE_HANDLE ) \
  56. { \
  57. FindClose( FILE_HANDLE ) ; \
  58. FILE_HANDLE = 0 ; \
  59. } \
  60. 1
  61. #endif //__FOR_FILES__H