Windows NT 4.0 source code leak
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.

105 lines
3.0 KiB

4 years ago
  1. :loop
  2. set _ntlogname_=
  3. set _ntslmop_=%1
  4. if "%_NTSLMOP_SLM_%" == "" set _NTSLMOP_SLM_=slm.exe
  5. if "%1" == "" goto done
  6. if "%1" == "status" goto dostatus
  7. if "%1" == "ssync" goto dossync
  8. if "%1" == "slmck" goto doslmck
  9. if "%1" == "log" goto dolog
  10. if "%1" == "defect" goto dodefect
  11. echo NTSLMOP: Invalid command option - %1
  12. goto done
  13. :dostatus
  14. set _ntlogname_=%_NTSTATLOG%
  15. set _ntlogfd_=1
  16. set _ntslmcmd_=%_NTSLMOP_SLM_% status -ao%_STATOPTIONS%
  17. if NOT "%_NTSTATCMD%" == "" set _ntslmcmd_=%_ntslmcmd_% -z %_NTSTATCMD%
  18. if NOT "%_NTSTATCMD1%" == "" set _ntslmcmd_=%_ntslmcmd_% -y %_NTSTATCMD1%
  19. set _ntslmtitle_=Status of
  20. goto docommand
  21. :dossync
  22. set _ntlogname_=%_NTSYNCLOG%
  23. set _ntlogfd_=1
  24. set _ntslmcmd_=%_NTSLMOP_SLM_% ssync -a%_SYNCOPTIONS%
  25. if NOT "%_NTSTATCMD%" == "" set _ntslmcmd_=%_ntslmcmd_% -l %_NTSTATCMD%
  26. if NOT "%_NTMULTISYNC%" == "" set _ntslmcmd_=start %_ntslmcmd_%
  27. set _ntslmtitle_=Syncing
  28. goto docommand
  29. :doslmck
  30. set _ntlogname_=%_NTSLMCKLOG%
  31. set _ntlogfd_=2
  32. set _ntslmcmd_=slmck
  33. set _ntslmtitle_=Slmck of
  34. goto docommand
  35. :dolog
  36. if NOT "%_LOGOPTIONS%" == "" goto dolog1
  37. echo Set your _LOGOPTIONS environment variable first, to specify
  38. echo restrictions by time and/or user name. For example:
  39. echo set _LOGOPTIONS=-t9-1-94@1:00
  40. echo would display all log entries after 1am 9/1/94
  41. goto done
  42. :dolog1
  43. set _ntlogname_=%_NTLOGLOG%
  44. set _ntlogfd_=1
  45. set _ntslmcmd_=%_NTSLMOP_SLM_% log -a -zi %_LOGOPTIONS%
  46. set _ntslmtitle_=Log (%_LOGOPTIONS%) of
  47. goto docommand
  48. :dodefect
  49. set _ntslmcmd_=%_NTSLMOP_SLM_% defect %_DEFECTOPTIONS%
  50. set _ntslmtitle_=Defecting from
  51. goto docommand
  52. :docommand
  53. shift
  54. if "%1" == "" goto done
  55. call projects.cmd %1
  56. if "%proj_path%"=="" goto badproject
  57. if NOT "%_ntslmop_%" == "slmck" goto notslmck
  58. if EXIST %proj_path%\nul goto gotdir
  59. echo Creating %proj_path%
  60. mkdir %proj_path%
  61. :gotdir
  62. cd /d %proj_path% 2>nul
  63. if ERRORLEVEL 1 goto badpath
  64. if NOT EXIST %proj_path%\slm.ini goto slminimissing
  65. echo Deleting %proj_path%\slm.ini to force rebuild
  66. chmode -hrs %proj_path%\slm.ini
  67. erase %proj_path%\slm.ini >nul 2>nul
  68. :slminimissing
  69. cd /d %proj_path% 2>nul
  70. if ERRORLEVEL 1 goto badpath
  71. set _ntslmcmd_=slmck -auif %_slmckoptions% -s %slm_root% -p %project%
  72. goto executecommand
  73. :notslmck
  74. cd /d %proj_path% 2>nul
  75. if ERRORLEVEL 1 goto badpath
  76. :executecommand
  77. echo %_ntslmtitle_% %project% project in %proj_path%
  78. if "%_ntlogname_%"=="" goto noredirection
  79. %_ntslmcmd_% %_ntlogfd_%>>%_ntlogname_%
  80. if "%_ntslmevent%"=="" goto docommand
  81. %_ntslmevent% %project%
  82. goto docommand
  83. :noredirection
  84. %_ntslmcmd_%
  85. goto docommand
  86. :badproject
  87. if NOT "%_ntslmop_%" == "log" goto badproj1
  88. call deadproj.cmd %1
  89. if "%proj_path%"=="" goto badproj1
  90. cd /d %proj_path%
  91. set _ntslmcmd_=%_ntslmcmd_% -s %slm_root% -p %project%
  92. set _ntslmtitle_=Log (%_LOGOPTIONS%) of dead project
  93. goto executecommand
  94. :badproj1
  95. echo Invalid project name - %1
  96. goto docommand
  97. :badpath
  98. if NOT "%_ntslmop_%" == "log" goto badpath1
  99. cd /d %_ntroot%
  100. set _ntslmcmd_=%_ntslmcmd_% -s %slm_root% -p %project%
  101. goto executecommand
  102. :badpath1
  103. echo You are not enlisted in %project% project in %slm_path%
  104. goto docommand
  105. :done