From b34b47056a5d68d4d47e2bab3769ab3656dcdfdc Mon Sep 17 00:00:00 2001 From: Mark Jansen Date: Sun, 3 Oct 2021 17:32:33 +0200 Subject: [PATCH] [ROSAPPS] Remove 'man' utility --- .../applications/sysutils/CMakeLists.txt | 1 - .../applications/sysutils/man/CMakeLists.txt | 5 - .../rosapps/applications/sysutils/man/man.c | 259 ------------------ .../rosapps/applications/sysutils/man/man.cmd | 54 ---- .../sysutils/man/man/2/chkdsk.man | 13 - .../sysutils/man/man/2/chklib.man | 8 - .../sysutils/man/man/2/format.man | 22 -- .../applications/sysutils/man/man/2/man.man | 21 -- .../applications/sysutils/man/man/2/ping.man | 13 - .../sysutils/man/man/3/taskmgr.man | 8 - .../applications/sysutils/man/man/foo.1 | 78 ------ .../applications/sysutils/man/man/man.1 | 100 ------- .../applications/sysutils/man/used_tags.txt | 7 - 13 files changed, 589 deletions(-) delete mode 100644 modules/rosapps/applications/sysutils/man/CMakeLists.txt delete mode 100644 modules/rosapps/applications/sysutils/man/man.c delete mode 100755 modules/rosapps/applications/sysutils/man/man.cmd delete mode 100644 modules/rosapps/applications/sysutils/man/man/2/chkdsk.man delete mode 100644 modules/rosapps/applications/sysutils/man/man/2/chklib.man delete mode 100644 modules/rosapps/applications/sysutils/man/man/2/format.man delete mode 100644 modules/rosapps/applications/sysutils/man/man/2/man.man delete mode 100644 modules/rosapps/applications/sysutils/man/man/2/ping.man delete mode 100644 modules/rosapps/applications/sysutils/man/man/3/taskmgr.man delete mode 100644 modules/rosapps/applications/sysutils/man/man/foo.1 delete mode 100644 modules/rosapps/applications/sysutils/man/man/man.1 delete mode 100644 modules/rosapps/applications/sysutils/man/used_tags.txt diff --git a/modules/rosapps/applications/sysutils/CMakeLists.txt b/modules/rosapps/applications/sysutils/CMakeLists.txt index e19b0fc8fb0..70514805cb5 100644 --- a/modules/rosapps/applications/sysutils/CMakeLists.txt +++ b/modules/rosapps/applications/sysutils/CMakeLists.txt @@ -4,7 +4,6 @@ add_subdirectory(gettype) add_subdirectory(kill) add_subdirectory(logevent) add_subdirectory(lsdd) -add_subdirectory(man) if(ARCH STREQUAL "i386") add_subdirectory(pedump) endif() diff --git a/modules/rosapps/applications/sysutils/man/CMakeLists.txt b/modules/rosapps/applications/sysutils/man/CMakeLists.txt deleted file mode 100644 index 8c2a16a15f1..00000000000 --- a/modules/rosapps/applications/sysutils/man/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ - -add_executable(man man.c) -set_module_type(man win32cui) -add_importlibs(man user32 msvcrt kernel32 ntdll) -add_cd_file(TARGET man DESTINATION reactos/system32 FOR all) diff --git a/modules/rosapps/applications/sysutils/man/man.c b/modules/rosapps/applications/sysutils/man/man.c deleted file mode 100644 index 825b7954396..00000000000 --- a/modules/rosapps/applications/sysutils/man/man.c +++ /dev/null @@ -1,259 +0,0 @@ -/* - * FILE : man.c - * NATIVE NAME: ReactOS manual browser - * AUTHOR : Semyon Novikov (tappak) - * PROJECT : ReactOS Operating System - * DESCRIPTION: manual file browser (Use Linux man file syntax) - * DATE : 2004-03-29 - * LICENSE : GPL - */ - - /* Known issues. - * 1. Scroll screen - * 2. Non ENVIRONMENT manpath varrible - * 3. At the end of man page must be ./" tag! - */ - - -#include -#include -#include -#include -#include - -#define MAXLINE 256 -#define BOLD 7|9 -#define ITALIC 3|9 -#define NORMAL 7|0 - -/*===[functions]===*/ -void SetCl(WORD cl); -int OpenF(char* name); -int CloseF(void); -void Usage(void); -int AnalyzeArgv(char *); -int AnalyzeFile(); -/*=================*/ - -/*====[Globals]====*/ -FILE* manfile; -char OpenFlag=0; -char manpath[MAX_PATH]; -/*=================*/ - -void -SetCl(WORD cl) -{ - SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),cl); -} - -int -OpenF(char* name) -{ - int ret = 0; - char *cp; - - /* C:\man\\... */ - cp = getenv("SystemDrive"); - if (cp && *cp) - { - strcpy(manpath, cp); - strcat(manpath, "\\man\\"); - } - else - { - strcpy(manpath, "C:\\man\\"); - } - strcat(manpath, name); - - manfile = fopen(manpath, "r"); - if (manfile != NULL) - { - OpenFlag = 1; - AnalyzeFile(); - } - else - { - ret = -1; - } - - return ret; -} - -int -CloseF() -{ - int retval=0; - - if(fclose(manfile)) - OpenFlag=0; - else retval=-1; - - return retval; -} - -void -Usage() -{ - puts("usage: man [command]"); - puts("see \"man man\" for details"); -} - -int -AnalyzeArgv(char *argument) -{ - int element; - char HelpFlag=0; - char *keys[]={"--help","/h","/?","-h"}; - char *sections[]={".1",".2",".3",".4",".5",".6",".7",".8",".9"}; - char *filename=(char*)malloc(sizeof(char)*MAXLINE); - - strcpy(filename,argument); //save argument value - - for(element=0;element<_countof(keys);element++) - { - if(!strcmp(keys[element],argument)) - { - Usage(); - HelpFlag=1; - } - } - - element = 0; - - if(!HelpFlag) - { - - if(OpenF(filename)) - { - while(element<_countof(sections)&&OpenF(strcat(filename,sections[element]))) - { - strcpy(filename,argument); - element++; - } - - if(element>=_countof(sections)) printf("No manual for %s\n",argument); - } - - } - - return element; -} - -void sh_outp(char *cur_string) -{ - int symbol; - putchar('\n'); - putchar('\n'); - for(symbol=3;putchar(cur_string[symbol]); symbol++); -} - -void th_outp(char *cur_string, char *THtag) -{ - int symbol; - putchar('\n'); - putchar('\n'); - putchar('\t'); - putchar('\t'); - SetCl(ITALIC); - for(symbol=3;putchar(THtag[symbol]); symbol++); - putchar('\n'); - SetCl(NORMAL); -} - -void text_outp(char *cur_string) -{ - int symbol=0; - - if(cur_string[0]=='.') - while(cur_string[symbol]!=' ') - symbol++; - - for(;cur_string[symbol]!='\n'; symbol++) - putchar(cur_string[symbol]); - - putchar(' '); -} - -int -AnalyzeFile() -{ - char *cur_string=(char*)malloc(sizeof(char)*MAXLINE); - char *THtag=(char*)malloc(sizeof(char)*MAXLINE); - - - - - while(fgets(cur_string,MAXLINE,manfile)) - -/* TAGs processing */ - if((cur_string[0]=='.')&&(cur_string[1]=='S')&& - (cur_string[2]=='H')) // .SH tag - { - SetCl(BOLD); - sh_outp(cur_string); - SetCl(NORMAL); - } - else - if((cur_string[0]=='.')&&(cur_string[1]=='I')&& - (cur_string[2]==' ')) // .I tag - { - SetCl(ITALIC); - text_outp(cur_string); - SetCl(NORMAL); - } - else - if((cur_string[0]=='.')&&(cur_string[1]=='/')&& - (cur_string[2]=='\"')); // ./" tag (comment) - - else - if((cur_string[0]=='.')&&(cur_string[1]=='T')&& - (cur_string[2]=='H')) // .TH tag - { - strcpy(THtag,cur_string); - } - else - if((cur_string[0]=='.')&&(cur_string[1]=='B')&& - (cur_string[2]==' ')) // .B tag - { - SetCl(BOLD); - text_outp(cur_string); - SetCl(NORMAL); - } - else - if((cur_string[0]=='.')&&(cur_string[1]=='N')&& - (cur_string[2]=='L')) - { - putchar('\n'); - putchar(' '); - } - - else - { - text_outp(cur_string); // print plane text - } - th_outp(cur_string, THtag); - /* END of TAGs processing */ - - free(cur_string); - free(THtag); - return 0; -} - - -int -main(int argc, char *argv[]) -{ - - switch(argc) - { - case 1: Usage(); break; - case 2: AnalyzeArgv(argv[1]);break; - default: Usage();break; - } - - if(OpenFlag)CloseF(); - SetCl(NORMAL); - return 0; -} - diff --git a/modules/rosapps/applications/sysutils/man/man.cmd b/modules/rosapps/applications/sysutils/man/man.cmd deleted file mode 100755 index 25bf70cd3a5..00000000000 --- a/modules/rosapps/applications/sysutils/man/man.cmd +++ /dev/null @@ -1,54 +0,0 @@ -@echo off -rem []------[ReactOS MAN Project ]--------[] -rem Project: ReactOS manual browser -rem File: man.cmd -rem Purpose: Clone of UNIX man -rem Programmers: Semyon Novikov -rem Version: 0.1.2 -rem OS: WinNT/ReactOS/os2 eCs(testing) -rem License: GPL -rem []------------------------------------[] - - -rem []==[Config area]==[] -set MANED=edit -set MANMORE=cat -set MAN=%WINDIR%\man -rem []==[End of config area]==[] - -goto chk_param - -:chk_param - - if "%4"=="/create" attrib -r %MAN%\%SECTION%\%1.man - if "%4"=="/create" %ED% %MAN%\%SECTION%\%1.man - if "%4"=="/create" goto end - - if "%2"=="/e" set ED=%MANED% - if "%2"=="/e" goto locate - - if "%3"=="/e" set ED=%MANED% - if "%3"=="/e" goto chk_section - - if "%2"=="" set ED=%MANMORE% - if "%2"=="" goto locate - -:chk_section - set SECTION=%2 - set ED=%MANMORE% - if "%3"=="/e" set ED=%MANED% -goto open_page - -:locate - if exist %MAN%\1\%1.man set SECTION=1 - if exist %MAN%\2\%1.man set SECTION=2 - if exist %MAN%\3\%1.man set SECTION=3 - if exist %MAN%\4\%1.man set SECTION=4 - if exist %MAN%\5\%1.man set SECTION=5 - -:open_page -if not exist %MAN%\%SECTION%\%1.man echo No manual for %1 -if exist %MAN%\%SECTION%\%1.man cls -if exist %MAN%\%SECTION%\%1.man %ED% %MAN%\%SECTION%\%1.man - -:end \ No newline at end of file diff --git a/modules/rosapps/applications/sysutils/man/man/2/chkdsk.man b/modules/rosapps/applications/sysutils/man/man/2/chkdsk.man deleted file mode 100644 index bdf5d686869..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/2/chkdsk.man +++ /dev/null @@ -1,13 +0,0 @@ -[]==============================[chkdsk.exe]===============================[] - Author: Mark Russinovich - Purpose: Disk checking tool - Port on ROS: Emanuele Aliberti - License: GPL - - Usage: %s [drive:] [-F] [-V] [-R] [-C]\n\n\ - [drive:] Specifies the drive to check.\n\ - -F Fixes errors on the disk.\n\ - -V Displays the full path of every file on the disk.\n\ - -R Locates bad sectors and recovers readable information.\n\ - -C Checks the drive only if it is dirty.\n\n" - diff --git a/modules/rosapps/applications/sysutils/man/man/2/chklib.man b/modules/rosapps/applications/sysutils/man/man/2/chklib.man deleted file mode 100644 index 16dc082d03b..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/2/chklib.man +++ /dev/null @@ -1,8 +0,0 @@ -[]===============================[chklib.exe]================================[] - - Purpose: Check a Dynamic Link Library (DLL) for loading - Author: Emanuele Aliberti - License: GPL - - Usage: chklib.exe module [symbol [, ...]] - diff --git a/modules/rosapps/applications/sysutils/man/man/2/format.man b/modules/rosapps/applications/sysutils/man/man/2/format.man deleted file mode 100644 index e69564d0ea8..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/2/format.man +++ /dev/null @@ -1,22 +0,0 @@ -[]=================================[format.com]==============================[] - -Author: Mark Russinovich -Purpose: Disk Format Utility -Port on ROS: Emanuele Aliberti -License: GPL - -Usage: format.com drive: [-FS:file-system] [-V:label] [-Q] [-A:size] [-C] - - [drive:] Specifies the drive to format. - -FS:file-system Specifies the type of file system (e.g. FAT). - -V:label Specifies volume label. - -Q Performs a quick format. - -A:size Overrides the default allocation unit size. - Default settings are strongly recommended for general - use NTFS supports 512, 1024, 2048, 4096, 8192, 16K, - 32K, 64K. FAT supports 8192, 16K, 32K, 64K, 128K, 256K. - NTFS compression is not supported for allocation - unit sizes above 4096. - -C Files created on the new volume will be compressed by - default. - diff --git a/modules/rosapps/applications/sysutils/man/man/2/man.man b/modules/rosapps/applications/sysutils/man/man/2/man.man deleted file mode 100644 index 7d7529dfbe2..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/2/man.man +++ /dev/null @@ -1,21 +0,0 @@ -[]=========================[ReactOS Man project]========================[] - - Author: Semyon Novikov - Purpose: ReactOS manual browser and manual pages - License: GPL - - 1. Built in cmd.exe commands - 2. Console utils - 3. GUI utils - 4. Developer tools - 5. Games & other - - options: /e - open with editor - /create - create new page - - Usage: man [command] [section] [/e] [/create] - Example: o man man - o man man /e - o man man 2 - o man quake3 5 /e /create - diff --git a/modules/rosapps/applications/sysutils/man/man/2/ping.man b/modules/rosapps/applications/sysutils/man/man/2/ping.man deleted file mode 100644 index 8c8d94a2a05..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/2/ping.man +++ /dev/null @@ -1,13 +0,0 @@ -[]==============================[ping.exe]=======================================[] - - Ptoject: ReactOS ping utility - Purpose: Network test utility - Programmers: Casper S. Hornstrup (chorns@users.sourceforge.net) - - Usage: ping [-t] [-n count] [-l size] [-w timeout] destination-host\n\n - -t Ping the specified host until stopped. - To stop - type Control-C. - -n count Number of echo requests to send. - -l size Send buffer size. - -w timeout Timeout in milliseconds to wait for each reply. - diff --git a/modules/rosapps/applications/sysutils/man/man/3/taskmgr.man b/modules/rosapps/applications/sysutils/man/man/3/taskmgr.man deleted file mode 100644 index e5e0d0099fe..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/3/taskmgr.man +++ /dev/null @@ -1,8 +0,0 @@ -[]=====================[ReactOS GUI task Manager]======================[] - Author: Brian Palmer - Purpose: ROS task manager - License: GPL - - - - \ No newline at end of file diff --git a/modules/rosapps/applications/sysutils/man/man/foo.1 b/modules/rosapps/applications/sysutils/man/man/foo.1 deleted file mode 100644 index f18971771a7..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/foo.1 +++ /dev/null @@ -1,78 +0,0 @@ -.\" Process this file with -.\" groff -man -Tascii foo.1 -.\" -.TH FOO 1 "MARCH 1995" Linux "User Manuals" -.SH NAME -foo \- frobnicate the bar library -.SH SYNOPSIS -.B foo [-bar] [-c -.I config-file -.B ] -.I file -.B ... -.SH DESCRIPTION -.B foo -frobnicates the bar library by tweaking internal -symbol tables. By default it parses all baz segments -and rearranges them in reverse order by time for the -.BR xyzzy (1) -linker to find them. The symdef entry is then compressed -using the WBG (Whiz-Bang-Gizmo) algorithm. -All files are processed in the order specified. -.SH OPTIONS -.IP -b -Do not write 'busy' to stdout while processing. -.IP "-c config-file" -Use the alternate system wide -.I config-file -instead of -.IR /etc/foo.conf . -This overrides any -.B FOOCONF -environment variable. -.IP -a -In addition to the baz segments, also parse the -blurfl headers. -.IP -r -Recursive mode. Operates as fast as lightning -at the expense of a megabyte of virtual memory. -.SH FILES -.I /etc/foo.conf -.RS -The system wide configuration file. See -.BR foo (5) -for further details. -.RE -.I ~/.foorc -.RS -Per user configuration file. See -.BR foo (5) -for further details. -.SH ENVIRONMENT -.IP FOOCONF -If non-null the full pathname for an alternate system wide -.IR foo.conf . -Overridden by the -.B -c -option. -.SH DIAGNOSTICS -The following diagnostics may be issued on stderr: - -Bad magic number. -.RS -The input file does not look like an archive file. -.RE -Old style baz segments. -.RS -.B foo -can only handle new style baz segments. COBOL -object libraries are not supported in this version. -.SH BUGS -The command name should have been chosen more carefully -to reflect its purpose. -.SH AUTHOR -Jens Schweikhardt -.SH "SEE ALSO" -.BR bar (1), -.BR foo (5), -.BR xyzzy (1) \ No newline at end of file diff --git a/modules/rosapps/applications/sysutils/man/man/man.1 b/modules/rosapps/applications/sysutils/man/man/man.1 deleted file mode 100644 index 18e14e7c216..00000000000 --- a/modules/rosapps/applications/sysutils/man/man/man.1 +++ /dev/null @@ -1,100 +0,0 @@ -./" My first man page for ReactOS :) -.TH ReactOS manual project 2004 - -.SH NAME -man.exe - manual browser for ReactOS -.SH SYNOPSIS -.B man [ -.I manual page -.B ] -.SH DESCRIPTION -This project is UNIX(tm) man compatible tool for ReactOS. -.NL -Manual browser support next tags: -.NL -.I ./" -as comment tag -.NL -.I .NL -as "new line" tag (ReactOS only) -.NL -.I .B - as "bold" tag -.NL -.I .I - as "italic" tag -.NL -.I .SH - as part tag -.NL -.I .TH - as page descriptor -.NL -.SH OPTIONS -At this moment man support only -.B "/?, /h, -h, --help" -arguments :) -.SH FILES -Now all of manual pages must be in -.B c:\man\ -directory. This is hack or -bug, i don't know... We planed use ENVIRONMENT -varrible to set manual path. -.NL -Manual files should have extension which marks section of his content. -.NL -.SH SECTIONS -.B (1) -basic commands. (dir,del,man,etc...) -.NL -.B (2) -kernel calls -.NL -.B (3) -calls from system librares -.NL -.B (4) -device files or devices -.NL -.B (5) -file syntax description -.NL -.B (6) -games -.NL -.B (7) -different information (such as licences, manifestos, etc...) -.NL -.B (8) -administration tools (Admin or root only) -.NL -.B (9) -additional kernel information -.NL - -.SH ENVIRONMENT -Comming soon -.SH BUGS -Heh... A lot of. For example: -.NL -.I Scroll-bug -man can't correctly scroll screen -.NL -.I .NL hack -tag who absent in original man -.NL -.I ./" hack -at the end of man file must be ./" tag -.NL -.I putchar() method -all text displays with putchar() function. -.NL - And we have non correct word carry. - -.SH AUTHOR -Semyon Novikov -.NL -.I -.NL -Sorry for my English. I'm just a Russian first-year student. -./" \ No newline at end of file diff --git a/modules/rosapps/applications/sysutils/man/used_tags.txt b/modules/rosapps/applications/sysutils/man/used_tags.txt deleted file mode 100644 index 79aa27c66a4..00000000000 --- a/modules/rosapps/applications/sysutils/man/used_tags.txt +++ /dev/null @@ -1,7 +0,0 @@ -.B bold -.I italic -.SH section (BOLD string without /n) -.TH at the end (page comment) -.NL -.\" comment -