├── .gitignore ├── CONTRIBUTING.md ├── Doxyfile ├── LICENSE ├── Makefile ├── README.md ├── TODO ├── airplan ├── Makefile └── airplan.c ├── assoc ├── Makefile └── assoc.c ├── attrib ├── Makefile └── attrib.c ├── base64 ├── Makefile └── base64.c ├── battery ├── Makefile └── battery.c ├── builtins ├── Makefile ├── alias.c ├── alias.def ├── builtin.def ├── chdir.c ├── chdir.def ├── color.c ├── color.def ├── direnv.c ├── direnv.def ├── exit.c ├── exit.def ├── false.c ├── false.def ├── fg.c ├── fg.def ├── history.c ├── history.def ├── if.c ├── if.def ├── job.c ├── job.def ├── pushd.c ├── pushd.def ├── rem.c ├── rem.def ├── set.c ├── set.def ├── setlocal.c ├── setlocal.def ├── true.c ├── true.def ├── ver.c ├── ver.def ├── wait.c ├── wait.def ├── ys.c ├── ys.def ├── z.c └── z.def ├── cab ├── Makefile └── cab.c ├── cal ├── Makefile └── cal.c ├── charmap ├── Makefile └── charmap.c ├── clip ├── Makefile └── clip.c ├── clmp ├── Makefile └── clmp.c ├── cls ├── Makefile └── cls.c ├── co ├── Makefile └── co.c ├── compact ├── Makefile └── compact.c ├── completion ├── chdir.ys1 ├── git.ys1 ├── nice.ys1 ├── pushd.ys1 ├── scut.ys1 ├── which.ys1 ├── ymkdir.ys1 ├── ypm.ys1 ├── yrmdir.ys1 └── z.ys1 ├── config ├── common.mk └── ver.mk ├── contool ├── Makefile └── contool.c ├── copy ├── Makefile └── copy.c ├── cpuinfo ├── Makefile └── cpuinfo.c ├── crt ├── Makefile ├── bigdiv.asm ├── bigdvrm.asm ├── bigmul.asm ├── bigrem.asm ├── bigshl.asm ├── bigshr.asm ├── cmpxchg.asm ├── ep_cons.c ├── ep_consw.c ├── ep_dll.c ├── i386 │ ├── README.TXT │ ├── bigdiv.obj │ ├── bigdvrm.obj │ ├── bigmul.obj │ ├── bigrem.obj │ ├── bigshl.obj │ ├── bigshr.obj │ └── cmpxchg.obj ├── mem.c ├── rand.c ├── string.c ├── stringw.c └── yoricrt.h ├── cshot ├── Makefile └── cshot.c ├── cut ├── Makefile └── cut.c ├── cvtvt ├── Makefile ├── cvtvt.h ├── html.c ├── main.c └── rtf.c ├── date ├── Makefile └── date.c ├── df ├── Makefile └── df.c ├── dir ├── Makefile └── dir.c ├── dircase ├── Makefile └── dircase.c ├── du ├── Makefile └── du.c ├── echo ├── Makefile └── echo.c ├── edit ├── Makefile ├── edit.c ├── edit.h └── options.c ├── env ├── Makefile └── env.c ├── envdiff ├── Makefile └── envdiff.c ├── envrc.ys1 ├── erase ├── Makefile └── erase.c ├── err ├── Makefile └── err.c ├── expr ├── Makefile └── expr.c ├── extents ├── Makefile └── extents.c ├── finfo ├── Makefile └── finfo.c ├── for ├── Makefile ├── for.c └── for.def ├── fscmp ├── Makefile └── fscmp.c ├── get ├── Makefile └── get.c ├── grpcmp ├── Makefile └── grpcmp.c ├── guide.html ├── hash ├── Makefile └── hash.c ├── help ├── Makefile └── help.c ├── hexdump ├── Makefile └── hexdump.c ├── hexedit ├── Makefile └── hexedit.c ├── hilite ├── Makefile └── hilite.c ├── iconv ├── Makefile └── iconv.c ├── initool ├── Makefile └── initool.c ├── intcmp ├── Makefile └── intcmp.c ├── kernelbase ├── KernelBase.def └── Makefile ├── kill ├── Makefile └── kill.c ├── lib ├── Makefile ├── airplane.c ├── bargraph.c ├── builtin.c ├── bytebuf.c ├── cabinet.c ├── call.c ├── cancel.c ├── clip.c ├── cmdline.c ├── color.c ├── condrv.c ├── cpuinfo.c ├── cshot.c ├── curdir.c ├── cvtcons.c ├── cvthtml.c ├── cvtrtf.c ├── dblclk.c ├── debug.c ├── dyld.c ├── dyld_adv.c ├── dyld_cab.c ├── dyld_net.c ├── dyld_usr.c ├── env.c ├── ep_yori.c ├── filecomp.c ├── fileenum.c ├── filefilt.c ├── fileinfo.c ├── fullpath.c ├── group.c ├── hash.c ├── hexdump.c ├── http.c ├── iconv.c ├── jobobj.c ├── license.c ├── lineread.c ├── list.c ├── malloc.c ├── movefile.c ├── numkey.c ├── obenum.c ├── osver.c ├── path.c ├── printf.c ├── printf.inc ├── printfa.c ├── priv.c ├── process.c ├── progman.c ├── recycle.c ├── rsrc.c ├── scheme.c ├── scut.c ├── select.c ├── strarray.c ├── strmenum.c ├── temp.c ├── update.c ├── util.c ├── vt.c ├── ylhomedr.c ├── ylstralc.c ├── ylstrcat.c ├── ylstrcmp.c ├── ylstrcnt.c ├── ylstrcnv.c ├── ylstrfnd.c ├── ylstrhex.c ├── ylstrnum.c ├── ylstrsrt.c ├── ylstrtrm.c ├── ylvolpth.c ├── ylvtdbg.c ├── yori.ico ├── yori.man ├── yori32.ico ├── yoricall.h ├── yoricmpt.h ├── yorilib.h ├── yoripch.h └── yoriver.inc ├── libdlg ├── Makefile ├── about.c ├── device.c ├── dir.c ├── file.c ├── find.c ├── findhex.c ├── input.c ├── msgbox.c ├── replace.c ├── replhex.c └── yoridlg.h ├── libsh ├── Makefile ├── builtin.c ├── cmdbuf.c ├── exec.c ├── parse.c └── yorish.h ├── libwin ├── Makefile ├── border.c ├── button.c ├── checkbox.c ├── color.c ├── combo.c ├── ctrl.c ├── edit.c ├── hexedit.c ├── itemaray.c ├── label.c ├── list.c ├── menubar.c ├── mledit.c ├── radio.c ├── scrolbar.c ├── text.c ├── window.c ├── winmgr.c ├── winpriv.h └── yoriwin.h ├── lines ├── Makefile └── lines.c ├── lsof ├── Makefile └── lsof.c ├── make ├── Makefile ├── alloc.c ├── exec.c ├── make.c ├── make.h ├── minish.c ├── preproc.c ├── scope.c ├── target.c └── var.c ├── mem ├── Makefile └── mem.c ├── mkdir ├── Makefile └── mkdir.c ├── mklink ├── Makefile └── mklink.c ├── more ├── Makefile ├── ingest.c ├── lines.c ├── more.c ├── more.h ├── moreinit.c └── viewport.c ├── mount ├── Makefile └── mount.c ├── move ├── Makefile └── move.c ├── nice ├── Makefile └── nice.c ├── objdir ├── Makefile └── objdir.c ├── osver ├── Makefile └── osver.c ├── path ├── Makefile └── path.c ├── pause ├── Makefile └── pause.c ├── petool ├── Makefile └── petool.c ├── pkg ├── Makefile ├── bld-pkglist.ys1 ├── bld.ys1 ├── yori-completion.lst ├── yori-core-pdb.lst ├── yori-core.lst ├── yori-extra-pdb.lst ├── yori-extra.lst ├── yori-modular-pdb.lst ├── yori-modular.lst ├── yori-one-pdb.lst ├── yori-one.lst ├── yori-typical-pdb.lst ├── yori-typical.lst ├── yori-ypm-pdb.lst └── yori-ypm.lst ├── pkglib ├── Makefile ├── api.c ├── backup.c ├── config.c ├── create.c ├── install.c ├── reg.c ├── remote.c ├── util.c ├── yoripkg.h └── yoripkgp.h ├── procinfo ├── Makefile └── procinfo.c ├── ps ├── Makefile └── ps.c ├── readline ├── Makefile └── readline.c ├── regedit ├── Makefile ├── binedit.c ├── numedit.c ├── regedit.c ├── regedit.h └── stredit.c ├── repl ├── Makefile └── repl.c ├── rmdir ├── Makefile └── rmdir.c ├── schemes ├── cga.ini └── nt.ini ├── scut ├── Makefile └── scut.c ├── sdir ├── Makefile ├── callback.c ├── color.c ├── display.c ├── init.c ├── sdir.c ├── sdir.h ├── sdir.nuspec ├── usage.c └── utils.c ├── setver ├── Makefile └── setver.c ├── sh ├── Makefile ├── YoriInit.d │ ├── Extra.ys1 │ └── Typical.ys1 ├── alias.c ├── api.c ├── builtin.c ├── complete.c ├── env.c ├── exec.c ├── history.c ├── input.c ├── job.c ├── main.c ├── oneyori.def ├── parse.c ├── prompt.c ├── restart.c ├── wait.c ├── window.c ├── yori.def ├── yori.h ├── yori.man ├── yori.rc ├── yorifull.c ├── yorifull.lst ├── yorimin.def ├── yorinone.c ├── yoriproc.h ├── yorires.h ├── yoristd.c └── yoristru.h ├── shutdn ├── Makefile └── shutdn.c ├── sleep ├── Makefile └── sleep.c ├── slmenu ├── Makefile └── slmenu.c ├── speak ├── Makefile └── speak.c ├── split ├── Makefile └── split.c ├── sponge ├── Makefile └── sponge.c ├── start ├── Makefile └── start.c ├── strcmp ├── Makefile └── strcmp.c ├── stride ├── Makefile └── stride.c ├── sync ├── Makefile └── sync.c ├── tail ├── Makefile └── tail.c ├── tee ├── Makefile └── tee.c ├── test ├── Makefile ├── argcargv.c ├── fileenum.c ├── parse.c ├── test.c └── test.h ├── timethis ├── Makefile └── timethis.c ├── title ├── Makefile └── title.c ├── touch ├── Makefile └── touch.c ├── type ├── Makefile └── type.c ├── vhdtool ├── Makefile └── vhdtool.c ├── vol ├── Makefile └── vol.c ├── which ├── Makefile └── which.c ├── wifi ├── Makefile └── wifi.c ├── wininfo ├── Makefile ├── resource.rc ├── wininfo.c └── wininfo.man ├── winpos ├── Makefile └── winpos.c ├── wintest ├── Makefile └── wintest.c ├── ydbg ├── Makefile └── dbg.c ├── ypm ├── Makefile ├── download.c ├── list.c ├── mirror.c ├── rsource.c ├── uninst.c ├── upgrade.c ├── ypm.c ├── ypm.h ├── ypmconf.c ├── ypmcreat.c └── ypminst.c ├── ysetup ├── Makefile ├── gui.c ├── helper.c ├── resource.h ├── resource.rc ├── tui.c ├── ysetup.c ├── ysetup.h └── ysetup.man └── yui ├── Makefile ├── cal.c ├── checked.ico ├── clock.c ├── debug.ico ├── dragdrop.c ├── draw.c ├── exit.ico ├── icons.c ├── logoff.ico ├── menu.c ├── multimon.c ├── progiso.ico ├── programs.ico ├── resource.h ├── resource.rc ├── run.ico ├── shutdown.ico ├── start.ico ├── system.ico ├── taskbar.c ├── wifi.c ├── wifi1.ico ├── wifi2.ico ├── wifi3.ico ├── wifi4.ico ├── wifi5.ico ├── wificonn.ico ├── yui.c ├── yui.h └── yui.man /.gitignore: -------------------------------------------------------------------------------- 1 | cache.mk 2 | **/*.cab 3 | **/*.com 4 | **/*.dll 5 | **/*.exe 6 | **/*.exp 7 | **/*.lib 8 | **/*.obj 9 | **/*.pdb 10 | **/*.pru 11 | doc/** 12 | beta/** 13 | bin/** 14 | sym/** 15 | pkg/out/** 16 | pkg/amd64/** 17 | pkg/arm/** 18 | pkg/arm64/** 19 | pkg/axp/** 20 | pkg/ia64/** 21 | pkg/mips/** 22 | pkg/ppc/** 23 | pkg/win32/** 24 | pkg/amd64-dbg/** 25 | pkg/arm-dbg/** 26 | pkg/arm64-dbg/** 27 | pkg/axp-dbg/** 28 | pkg/ia64-dbg/** 29 | pkg/mips-dbg/** 30 | pkg/ppc-dbg/** 31 | pkg/win32-dbg/** 32 | !crt/i386/*.obj 33 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing guidelines 2 | 3 | ## Pull Request Checklist 4 | 5 | Before sending pull requests, attempt the following: 6 | - Compile with a recent compiler including static analysis (ymake ANALYZE=1) 7 | - Run doxygen and ensure it finds no issues. As of this writing, use 1.8.x (1.9.x doesn't appear to expand predefined macros correctly.) 8 | - Compile with an older compiler to ensure no use of newer headers. Ideally this is Visual C++ 2, but not everyone will have access to that 9 | 10 | ## Coding style 11 | 12 | In order to ensure tools can run without installation on the largest variety of systems, this code does not use the C runtime library from the compiler. Individual functions that are useful are implemented within the "crt" directory. 13 | 14 | Windows API functions that are newer than NT 3.1 are dynamically loaded to ensure binaries can still launch on NT 3.1. This logic is implemented in lib\yoricmpt.h and lib\dyld.c. 15 | 16 | ## New components 17 | 18 | This project welcomes any new tools that seem generically useful for Windows command line users. 19 | -------------------------------------------------------------------------------- /Doxyfile: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.13 2 | 3 | DOXYFILE_ENCODING = UTF-8 4 | PROJECT_NAME = "Yori" 5 | QUIET = YES 6 | OPTIMIZE_OUTPUT_FOR_C = YES 7 | TYPEDEF_HIDES_STRUCT = YES 8 | RECURSIVE = YES 9 | EXCLUDE = 10 | EXCLUDE_PATTERNS = 11 | GENERATE_HTML = YES 12 | OUTPUT_DIRECTORY = doc 13 | HTML_OUTPUT = html 14 | HTML_FILE_EXTENSION = .html 15 | GENERATE_HTMLHELP = NO 16 | CHM_FILE = Yoricode.chm 17 | HHC_LOCATION = "C:\Program Files (x86)\Html Help Workshop\hhc.exe" 18 | SEARCHENGINE = NO 19 | GENERATE_LATEX = NO 20 | 21 | ENABLE_PREPROCESSING = YES 22 | MACRO_EXPANSION = YES 23 | EXPAND_ONLY_PREDEF = YES 24 | PREDEFINED = \ 25 | __success(x)= \ 26 | _Acquires_lock_(x)= \ 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Malcolm Smith 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Yori: CMD reimagined 2 | 3 | ## Code status update 4 | 5 | This project has been a fun respite from corporate life, and Github is now requiring 2FA for contributions, which seems like a good time to go elsewhere. I'm supposed to lose this account in the next day or two, so if code updates stop soon, that's why. 6 | 7 | ## Intro 8 | 9 | Yori is a CMD replacement shell that supports backquotes, job control, and improves tab completion, file matching, aliases, command history, and more. It includes a handful of native Win32 tools that implement commonly needed tasks which can be used with any shell. 10 | 11 | ## Build 12 | 13 | Compiling currently requires Visual C++, version 2 or newer. To compile, run NMAKE. Once compiled, YMAKE.EXE allows for more efficient subsequent compilation, using all cores in the machine. For build options, run "NMAKE buildhelp". 14 | 15 | ## License 16 | 17 | Yori is available under the MIT license. 18 | 19 | ## System requirements 20 | 21 | For the core shell and components, NT 3.1 or newer for 32 bit; XP 64 or newer for 64 bit. Individual features may require newer versions. Note the ysetup.exe installer works best with NT 4 and IE 4 or newer. 22 | 23 | To install on older versions: 24 | 25 | | Release | Considerations | 26 | |---------|----------------| 27 | | Nano Server | Use the native [AMD64 installer](). | 28 | | 95, 98 or Me | These releases are not supported and extensive changes would be required to execute on them. | 29 | | NT 4 for MIPS | Use the [MIPS installer]() . | 30 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 2 | At this point, the TODO is more a list of tasks that might be useful and/or 3 | fun to write. 4 | 5 | - Finish yextents move code 6 | - Replace a lot of LONGLONG/DWORDLONG with max int types 7 | - Scroll around input line on tiny windows, where the entire line doesn't 8 | fit in the window 9 | - Make more use something like line selection 10 | - Ctrl+R (reverse history search) 11 | - Allow pipes to be inserted into tee output 12 | - Start without elevation prompt 13 | - Have env read variable value pair from stdin 14 | - Use CopyFileEx when compressing to eliminate CreateFile? 15 | - Colorize help and error text 16 | - More select should use logical line coordinates rather than conhost 17 | buffer coordinates to allow selection beyond screen size 18 | - Tab completion on %i 19 | - Attempt to use dbghelp stack formatting again. Seems useful for ydbg 20 | to be able to output the stack of exceptions etc. 21 | 22 | - Support move and resize of libwin windows 23 | - Maximize/close in libwin 24 | - Minimize in libwin, implying defining an icon form of a window 25 | - TreeView 26 | - Multi-column list 27 | - File dialog vertical arrows when file name edit in focus 28 | 29 | - Edit horizontal scroll bar 30 | - Edit parse vim tags 31 | 32 | - Environment variable editor UI 33 | - TUI start menu - Point & Shoot? 34 | - System diagnostics 35 | 36 | - Ymake execute preprocessor CreateProcess calls in parallel somehow 37 | - Ymake dependency aware install, so $(BINDIR) is updated if the link changes 38 | 39 | - Regedit "rename" values 40 | - Regedit "rename" keys 41 | - Regedit search 42 | - Regedit multi-sz editor 43 | 44 | - Hexedit display device offset 45 | - Hexedit reopen at different offset? 46 | 47 | - Yui should look deeper for background color 48 | - Win+X menu 49 | - Start button context menu 50 | - See how explorer did show desktop due to elevated 51 | - Windows 10 taskbar unhides itself very aggressively 52 | - Yui advertize minimize location for animation rendering 53 | - Audio mixer/volume tray 54 | - Safely remove 55 | - Decrypt bitlocker 56 | - Disable wifi, apparently not the same as airplane mode 57 | - Run recent list and autocomplete 58 | - Desktop context menu 59 | - Taskbar button progress 60 | - Progman DDE server 61 | - Extensible notification icons 62 | - Yui fullscreen and flash 63 | 64 | Longer term, larger things: 65 | - Port pcre 66 | - Use regex in hilite 67 | - Case statement in ys 68 | - Ctrl+Z 69 | - Markdown formatter/parser 70 | - Man or something like it 71 | - Edit line wrap 72 | - PWB 73 | - ASCII art/line drawing/visio 74 | - Round braces in command parser, including if 75 | -------------------------------------------------------------------------------- /airplan/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yairplan.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yairplan.pdb 7 | 8 | BIN_OBJS=\ 9 | airplan.obj \ 10 | 11 | MOD_OBJS=\ 12 | mairplan.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yairplan.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mairplan.obj: airplan.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ airplan.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /assoc/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yassoc.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yassoc.pdb 7 | 8 | BIN_OBJS=\ 9 | assoc.obj \ 10 | 11 | MOD_OBJS=\ 12 | massoc.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yassoc.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | massoc.obj: assoc.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ assoc.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /attrib/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yattrib.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yattrib.pdb 7 | 8 | BIN_OBJS=\ 9 | attrib.obj \ 10 | 11 | MOD_OBJS=\ 12 | mattrib.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yattrib.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mattrib.obj: attrib.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ attrib.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /base64/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ybase64.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ybase64.pdb 7 | 8 | BIN_OBJS=\ 9 | base64.obj \ 10 | 11 | MOD_OBJS=\ 12 | mbase64.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ybase64.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mbase64.obj: base64.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ base64.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /battery/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ybattery.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ybattery.pdb 7 | 8 | BIN_OBJS=\ 9 | battery.obj \ 10 | 11 | MOD_OBJS=\ 12 | mbattery.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ybattery.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mbattery.obj: battery.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ battery.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /builtins/Makefile: -------------------------------------------------------------------------------- 1 | 2 | 3 | .SUFFIXES: .com .obj .lib 4 | 5 | MODULES = alias.com \ 6 | chdir.com \ 7 | color.com \ 8 | direnv.com \ 9 | exit.com \ 10 | false.com \ 11 | fg.com \ 12 | history.com \ 13 | if.com \ 14 | job.com \ 15 | pushd.com \ 16 | rem.com \ 17 | set.com \ 18 | setlocal.com \ 19 | true.com \ 20 | ver.com \ 21 | wait.com \ 22 | ys.com \ 23 | z.com \ 24 | 25 | BUILTINS = alias.obj \ 26 | chdir.obj \ 27 | color.obj \ 28 | direnv.obj \ 29 | exit.obj \ 30 | false.obj \ 31 | fg.obj \ 32 | history.obj \ 33 | if.obj \ 34 | job.obj \ 35 | pushd.obj \ 36 | rem.obj \ 37 | set.obj \ 38 | setlocal.obj \ 39 | true.obj \ 40 | ver.obj \ 41 | wait.obj \ 42 | ys.obj \ 43 | z.obj \ 44 | 45 | all: compile link 46 | 47 | !INCLUDE "..\config\common.mk" 48 | 49 | compile: builtins.lib 50 | 51 | builtins.lib: $(BUILTINS) 52 | @echo $@ 53 | @$(LIB32) $(LIBFLAGS) $(BUILTINS) -out:$@ 54 | 55 | COM_LIBS = $(YORILIBS) $(YORIWIN) $(YORIVER) 56 | 57 | !IFDEF _YMAKE_VER 58 | .obj.com: $(COM_LIBS) 59 | !ELSE 60 | .obj.com: 61 | !ENDIF 62 | @echo $@ 63 | @$(LINK) $(LDFLAGS) $< -dll -version:$(YORI_BASE_VER_MAJOR).$(YORI_BASE_VER_MINOR) $(COM_LIBS) $(EXTERNLIBS) -def:$( 28 | #include 29 | 30 | /** 31 | False command (does nothing, unsuccessfully) 32 | 33 | @param ArgC The number of arguments. 34 | 35 | @param ArgV The argument array. 36 | 37 | @return ExitCode, zero for success, nonzero for failure. 38 | */ 39 | DWORD 40 | YORI_BUILTIN_FN 41 | YoriCmd_FALSE( 42 | __in YORI_ALLOC_SIZE_T ArgC, 43 | __in YORI_STRING ArgV[] 44 | ) 45 | { 46 | UNREFERENCED_PARAMETER(ArgC); 47 | UNREFERENCED_PARAMETER(ArgV); 48 | return EXIT_FAILURE; 49 | } 50 | 51 | // vim:sw=4:ts=4:et: 52 | -------------------------------------------------------------------------------- /builtins/false.def: -------------------------------------------------------------------------------- 1 | NAME FALSE.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_FALSE 5 | -------------------------------------------------------------------------------- /builtins/fg.def: -------------------------------------------------------------------------------- 1 | NAME FG.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_FG 5 | -------------------------------------------------------------------------------- /builtins/history.def: -------------------------------------------------------------------------------- 1 | NAME HISTORY.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_HISTORY 5 | -------------------------------------------------------------------------------- /builtins/if.def: -------------------------------------------------------------------------------- 1 | NAME IF.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_IF 5 | -------------------------------------------------------------------------------- /builtins/job.def: -------------------------------------------------------------------------------- 1 | NAME JOB.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_JOB 5 | -------------------------------------------------------------------------------- /builtins/pushd.def: -------------------------------------------------------------------------------- 1 | NAME PUSHD.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_PUSHD 5 | -------------------------------------------------------------------------------- /builtins/rem.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file builtins/rem.c 3 | * 4 | * Yori shell remark/comment 5 | * 6 | * Copyright (c) 2017 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include 28 | #include 29 | 30 | /** 31 | Remark command (does nothing) 32 | 33 | @param ArgC The number of arguments. 34 | 35 | @param ArgV The argument array. 36 | 37 | @return ExitCode, zero for success, nonzero for failure. 38 | */ 39 | DWORD 40 | YORI_BUILTIN_FN 41 | YoriCmd_REM( 42 | __in YORI_ALLOC_SIZE_T ArgC, 43 | __in YORI_STRING ArgV[] 44 | ) 45 | { 46 | UNREFERENCED_PARAMETER(ArgC); 47 | UNREFERENCED_PARAMETER(ArgV); 48 | return EXIT_SUCCESS; 49 | } 50 | 51 | // vim:sw=4:ts=4:et: 52 | -------------------------------------------------------------------------------- /builtins/rem.def: -------------------------------------------------------------------------------- 1 | NAME REM.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_REM 5 | -------------------------------------------------------------------------------- /builtins/set.def: -------------------------------------------------------------------------------- 1 | NAME SET.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_SET 5 | -------------------------------------------------------------------------------- /builtins/setlocal.def: -------------------------------------------------------------------------------- 1 | NAME SETLOCAL.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_SETLOCAL 5 | -------------------------------------------------------------------------------- /builtins/true.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file builtins/true.c 3 | * 4 | * Yori shell evaluate to true 5 | * 6 | * Copyright (c) 2018 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include 28 | #include 29 | 30 | /** 31 | True command (does nothing, successfully) 32 | 33 | @param ArgC The number of arguments. 34 | 35 | @param ArgV The argument array. 36 | 37 | @return ExitCode, zero for success, nonzero for failure. 38 | */ 39 | DWORD 40 | YORI_BUILTIN_FN 41 | YoriCmd_TRUE( 42 | __in YORI_ALLOC_SIZE_T ArgC, 43 | __in YORI_STRING ArgV[] 44 | ) 45 | { 46 | UNREFERENCED_PARAMETER(ArgC); 47 | UNREFERENCED_PARAMETER(ArgV); 48 | return EXIT_SUCCESS; 49 | } 50 | 51 | // vim:sw=4:ts=4:et: 52 | -------------------------------------------------------------------------------- /builtins/true.def: -------------------------------------------------------------------------------- 1 | NAME TRUE.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_TRUE 5 | -------------------------------------------------------------------------------- /builtins/ver.def: -------------------------------------------------------------------------------- 1 | NAME VER.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_VER 5 | -------------------------------------------------------------------------------- /builtins/wait.def: -------------------------------------------------------------------------------- 1 | NAME WAIT.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_WAIT 5 | -------------------------------------------------------------------------------- /builtins/ys.def: -------------------------------------------------------------------------------- 1 | NAME YS.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_YS 5 | -------------------------------------------------------------------------------- /builtins/z.def: -------------------------------------------------------------------------------- 1 | NAME Z.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_Z 5 | -------------------------------------------------------------------------------- /cab/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=cab.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:cab.pdb 7 | 8 | BIN_OBJS=\ 9 | cab.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcab.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | cab.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) $(FDILIB) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcab.obj: cab.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ cab.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /cal/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycal.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycal.pdb 7 | 8 | BIN_OBJS=\ 9 | cal.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcal.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycal.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcal.obj: cal.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ cal.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /charmap/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycharmap.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycharmap.pdb 7 | 8 | BIN_OBJS=\ 9 | charmap.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcharmap.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycharmap.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcharmap.obj: charmap.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ charmap.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /clip/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yclip.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yclip.pdb 7 | 8 | BIN_OBJS=\ 9 | clip.obj \ 10 | 11 | MOD_OBJS=\ 12 | mclip.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yclip.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mclip.obj: clip.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ clip.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /clmp/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=clmp.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:clmp.pdb 7 | 8 | OBJS=\ 9 | clmp.obj \ 10 | 11 | compile: $(OBJS) 12 | 13 | clmp.exe: $(OBJS) $(YORILIBS) $(YORIVER) 14 | @echo $@ 15 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 16 | 17 | -------------------------------------------------------------------------------- /cls/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycls.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycls.pdb 7 | 8 | BIN_OBJS=\ 9 | cls.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcls.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycls.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcls.obj: cls.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ cls.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /co/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yco.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yco.pdb 7 | 8 | BIN_OBJS=\ 9 | co.obj \ 10 | 11 | MOD_OBJS=\ 12 | mco.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yco.exe: $(BIN_OBJS) $(YORILIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mco.obj: co.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ co.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /compact/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycompact.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycompact.pdb 7 | 8 | BIN_OBJS=\ 9 | compact.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcompact.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycompact.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcompact.obj: compact.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ compact.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /completion/chdir.ys1: -------------------------------------------------------------------------------- 1 | set FIRSTCHAR=%2% 2 | if strcmp -- %FIRSTCHAR:~0,1%==/; goto arg 3 | if strcmp -- %FIRSTCHAR:~0,1%==-; goto arg 4 | if strcmp -- %FIRSTCHAR:~0,1%==~; goto special 5 | set FIRSTCHAR= 6 | echo -- /directories 7 | goto :eof 8 | 9 | :special 10 | set FIRSTCHAR= 11 | echo -- /insensitivelist ~ ~appdata ~appdir ~commonappdata ~commondesktop ~commondocuments ~commonprograms ~commonstart ~desktop ~documents ~downloads ~localappdata ~programfiles ~programfiles32 ~programfiles64 ~programs ~start ~startup ~system ~windows 12 | goto :eof 13 | 14 | :arg 15 | set FIRSTCHAR= 16 | echo -- /insensitivelist -e /e 17 | -------------------------------------------------------------------------------- /completion/git.ys1: -------------------------------------------------------------------------------- 1 | 2 | SETLOCAL 3 | 4 | REM Check if it's an option switch. Currently this script doesn't know 5 | REM what to do with those. 6 | set ARGTOCOMPLETE=%2% 7 | if strcmp -- %ARGTOCOMPLETE:~0,1%==/; goto complete_option 8 | if strcmp -- %ARGTOCOMPLETE:~0,1%==-; goto complete_option 9 | 10 | REM Check if it's the first argument, and if so complete from known commands 11 | if intcmp -- %1%==1; goto complete_gitcmd 12 | 13 | REM Scan through arguments looking for a command 14 | :next_arg 15 | shift 16 | set GITCMD=%2% 17 | if strcmp -- %GITCMD%.==.; goto complete_files 18 | if strcmp -- %GITCMD:~0,1%==/; goto next_arg 19 | if strcmp -- %GITCMD:~0,1%==-; goto next_arg 20 | 21 | REM If the command wants to complete git branches, do that 22 | if strcmp -i -- %GITCMD%==checkout; goto complete_gitcmd_checkout 23 | if strcmp -i -- %GITCMD%==merge; goto complete_branch 24 | if strcmp -i -- %GITCMD%==rebase; goto complete_branch 25 | 26 | REM By default, assume the command wants to complete files 27 | goto complete_files 28 | 29 | REM For checkout, look for a --. If one is found, complete files. 30 | REM If any other non-option argument is found, complete branches. 31 | :complete_gitcmd_checkout 32 | shift 33 | set GITCMD=%2% 34 | if strcmp -- %GITCMD%.==.; goto complete_branch 35 | if strcmp -- %GITCMD%==--; goto complete_files 36 | if strcmp -- %GITCMD:~0,1%==/; goto complete_gitcmd_checkout 37 | if strcmp -- %GITCMD:~0,1%==-; goto complete_gitcmd_checkout 38 | goto complete_branch 39 | 40 | REM List all branches matching the search pattern, and remove the currently 41 | REM active branch indicator 42 | :complete_branch 43 | echo -- /insensitivelist `git branch --color=never --list %ARGTOCOMPLETE%* | repl "* "` 44 | goto done 45 | 46 | :complete_files 47 | echo -- /files 48 | goto done 49 | 50 | REM Indicate the known subcommands. This is from 2.17, although arguably not 51 | REM every supported command should be included 52 | :complete_gitcmd 53 | echo -- /insensitivelist add add--interactive am annotate apply archimport archive askpass bisect bisect--helper blame branch bundle cat-file check-attr check-ignore check-mailmap check-ref-format checkout checkout-index cherry cherry-pick citool clean clone column commit commit-tree config count-objects credential credential-manager credential-store credential-wincred cvsexportcommit cvsimport daemon describe diff diff-files diff-index diff-tree difftool difftool--helper fast-export fast-import fetch fetch-pack filter-branch fmt-merge-msg for-each-ref format-patch fsck fsck-objects gc get-tar-commit-id grep gui gui--askpass gui--askyesno gui.tcl hash-object help http-backend http-fetch http-push imap-send index-pack init init-db instaweb interpret-trailers log ls-files ls-remote ls-tree mailinfo mailsplit merge merge-base merge-file merge-index merge-octopus merge-one-file merge-ours merge-recursive merge-resolve merge-subtree merge-tree mergetool mktag mktree mv name-rev notes p4 pack-objects pack-redundant pack-refs patch-id prune prune-packed pull push quiltimport read-tree rebase rebase--helper receive-pack reflog remote remote-ext remote-fd remote-ftp remote-ftps remote-http remote-https repack replace request-pull rerere reset rev-list rev-parse revert rm send-email send-pack sh-i18n--envsubst shortlog show show-branch show-index show-ref stage stash status stripspace submodule submodule--helper subtree svn symbolic-ref tag unpack-file unpack-objects update update-git-for-windows update-index update-ref update-server-info upload-archive upload-pack var verify-commit verify-pack verify-tag web--browse whatchanged worktree write-tree 54 | goto done 55 | 56 | :complete_option 57 | echo -- /files 58 | goto done 59 | 60 | :done 61 | ENDLOCAL 62 | -------------------------------------------------------------------------------- /completion/nice.ys1: -------------------------------------------------------------------------------- 1 | if intcmp -- %1%^>1; goto arg 2 | echo -- /executables 3 | goto :eof 4 | :arg 5 | echo -- /files 6 | -------------------------------------------------------------------------------- /completion/pushd.ys1: -------------------------------------------------------------------------------- 1 | set FIRSTCHAR=%2% 2 | if strcmp -- %FIRSTCHAR:~0,1%==/; goto arg 3 | if strcmp -- %FIRSTCHAR:~0,1%==-; goto arg 4 | set FIRSTCHAR= 5 | echo -- /directories 6 | goto :eof 7 | 8 | :arg 9 | set FIRSTCHAR= 10 | echo -- /insensitivelist -l /l 11 | -------------------------------------------------------------------------------- /completion/scut.ys1: -------------------------------------------------------------------------------- 1 | set FIRSTCHAR=%2% 2 | if strcmp -- %FIRSTCHAR:~0,1%==/; goto arg 3 | if strcmp -- %FIRSTCHAR:~0,1%==-; goto arg 4 | set FIRSTCHAR= 5 | echo -- /files 6 | goto :eof 7 | 8 | :arg 9 | set FIRSTCHAR= 10 | echo -- /insensitivelist -args /args -autoposition /autoposition -bold /bold -buffersize /buffersize -create /create -desc /desc -deleteconsolesettings /deleteconsolesettings -deleteinstallersettings /deleteinstallersettings -dump /dump -exec /exec -f /f -font /font -fontsize /fontsize -hotkey /hotkey -iconindex /iconindex -iconpath /iconpath -modify /modify -nonbold /nonbold -scheme /scheme -show /show -target /target -windowposition /windowposition -windowsize /windowsize -workingdir /workingdir 11 | -------------------------------------------------------------------------------- /completion/which.ys1: -------------------------------------------------------------------------------- 1 | if intcmp -- %1%^>1; goto arg 2 | echo -- /executables 3 | goto :eof 4 | :arg 5 | echo -- /files 6 | -------------------------------------------------------------------------------- /completion/ymkdir.ys1: -------------------------------------------------------------------------------- 1 | echo -- /directories 2 | -------------------------------------------------------------------------------- /completion/ypm.ys1: -------------------------------------------------------------------------------- 1 | set FIRSTCHAR=%2% 2 | if strcmp -- %FIRSTCHAR:~0,1%==/; goto arg 3 | if strcmp -- %FIRSTCHAR:~0,1%==-; goto arg 4 | set FIRSTCHAR= 5 | echo -- /files 6 | goto :eof 7 | 8 | :arg 9 | set FIRSTCHAR= 10 | echo -- /insensitivelist -c /c -config /config -consoledefaultscheme /consoledefaultscheme -consolescheme /consolescheme -cs /cs -d /d -desktop /desktop -download /download -download-daily /download-daily -download-stable /download-stable -i /i -l /l -loginshell /loginshell -lv /lv -md /md -mi /mi -ml /ml -ri /ri -rl /rl -restoreshell /restoreshell -rsa /rsa -rsd /rsd -rsi /rsi -rsl /rsl -src /src -ssh /ssh -start /start -sym /sym -systempath /systempath -terminal /terminal -u /u -ud /ud -uninstall /uninstall -us /us -userpath /userpath -yui /yui 11 | -------------------------------------------------------------------------------- /completion/yrmdir.ys1: -------------------------------------------------------------------------------- 1 | set FIRSTCHAR=%2% 2 | if strcmp -- %FIRSTCHAR%==/; goto arg 3 | if strcmp -- %FIRSTCHAR%==-; goto arg 4 | 5 | echo -- /directories 6 | set FIRSTCHAR= 7 | goto :eof 8 | 9 | :arg 10 | set FIRSTCHAR= 11 | echo -- /insensitivelist -b -r -s /b /r /s 12 | -------------------------------------------------------------------------------- /completion/z.ys1: -------------------------------------------------------------------------------- 1 | set FIRSTCHAR=%2% 2 | if strcmp -- %FIRSTCHAR:~0,1%==/; goto arg 3 | if strcmp -- %FIRSTCHAR:~0,1%==-; goto arg 4 | set FIRSTCHAR= 5 | echo -- /directories 6 | goto :eof 7 | 8 | :arg 9 | set FIRSTCHAR= 10 | echo -- /insensitivelist -l /l 11 | -------------------------------------------------------------------------------- /config/ver.mk: -------------------------------------------------------------------------------- 1 | 2 | !IFNDEF YORI_BASE_VER_MAJOR 3 | YORI_BASE_VER_MAJOR=2 4 | YORI_BASE_VER_MINOR=40 5 | 6 | YORI_VER_MAJOR=$(YORI_BASE_VER_MAJOR) 7 | YORI_VER_MINOR=$(YORI_BASE_VER_MINOR) 8 | !ENDIF 9 | -------------------------------------------------------------------------------- /contool/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=contool.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:contool.pdb 7 | 8 | BIN_OBJS=\ 9 | contool.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcontool.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | contool.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcontool.obj: contool.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ contool.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /copy/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycopy.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycopy.pdb 7 | 8 | BIN_OBJS=\ 9 | copy.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcopy.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycopy.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcopy.obj: copy.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ copy.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /cpuinfo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycpuinfo.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycpuinfo.pdb 7 | 8 | BIN_OBJS=\ 9 | cpuinfo.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcpu.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycpuinfo.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcpu.obj: cpuinfo.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ cpuinfo.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /crt/Makefile: -------------------------------------------------------------------------------- 1 | 2 | compile: yoricrt.lib 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | OBJS=\ 7 | mem.obj \ 8 | rand.obj \ 9 | string.obj \ 10 | stringw.obj \ 11 | ep_cons.obj \ 12 | ep_consw.obj \ 13 | ep_dll.obj \ 14 | 15 | BIGMATH_OBJS=bigdiv.obj \ 16 | bigdvrm.obj \ 17 | bigmul.obj \ 18 | bigrem.obj \ 19 | bigshl.obj \ 20 | bigshr.obj \ 21 | cmpxchg.obj 22 | 23 | ML=ml.exe 24 | 25 | # 26 | # Check is ml.exe is present. If so, the bigmath objects can be 27 | # rebuilt, otherwise use prebuilt ones. 28 | # 29 | 30 | !IF [$(ML) 2>&1 | find "Microsoft" >NUL]>0 31 | ML= 32 | !ENDIF 33 | 34 | # 35 | # Check if we're compiling for x86 and if so include bigmath. This isn't 36 | # needed on 64 bit systems and for non-x86 32 bit systems we don't have 37 | # an implementation anyway. This check is correct for Visual C++ 2 and 38 | # newer; older systems don't have 64 bit math anyway. 39 | # 40 | 41 | !IF [$(CC) 2>&1 | find "x86" >NUL]==0 42 | OBJS=$(OBJS) $(BIGMATH_OBJS) 43 | !ENDIF 44 | 45 | yoricrt.lib: $(OBJS) 46 | @echo $@ 47 | @$(LIB32) $(LIBFLAGS) $(OBJS) -out:$@ 48 | 49 | !IFDEF _NMAKE_VER 50 | .c.obj:: 51 | !ELSE 52 | .c.obj: 53 | !ENDIF 54 | @$(CC) $(CFLAGS_NOUNICODE) -c $< 55 | 56 | !IF "$(ML)"!="" 57 | .asm.obj: 58 | @$(ML) /nologo /coff /c $< 59 | !ELSE 60 | .asm.obj: 61 | @echo i386\$@ (copy binary) 62 | @copy i386\$@ . 63 | !ENDIF 64 | 65 | -------------------------------------------------------------------------------- /crt/bigdvrm.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; BIGDVRM.ASM 3 | ; 4 | ; Implementation for for signed and unsigned division of a 64 bit integer 5 | ; by a 32 bit integer, returning the result and remainder. 6 | ; 7 | ; Copyright (c) 2017-2020 Malcolm J. Smith 8 | ; 9 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 10 | ; of this software and associated documentation files (the "Software"), to deal 11 | ; in the Software without restriction, including without limitation the rights 12 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | ; copies of the Software, and to permit persons to whom the Software is 14 | ; furnished to do so, subject to the following conditions: 15 | ; 16 | ; The above copyright notice and this permission notice shall be included in 17 | ; all copies or substantial portions of the Software. 18 | ; 19 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | ; THE SOFTWARE. 26 | ; 27 | 28 | .386 29 | .MODEL FLAT, C 30 | .CODE 31 | 32 | externdef _aulldiv:near 33 | externdef _aullrem:near 34 | externdef _alldiv:near 35 | externdef _allrem:near 36 | 37 | ; LARGE_INTEGER Result [High EDX, Low EAX] 38 | ; LARGE_INTEGER Remainder [High EBX, Low ECX] 39 | ; _aulldvrm( 40 | ; LARGE_INTEGER Dividend, [High ESP + 8, Low ESP + 4], 41 | ; LARGE_INTEGER Divisor [High ESP + 16, Low ESP + 12] 42 | ; ); 43 | 44 | public _aulldvrm 45 | _aulldvrm proc 46 | 47 | ; Push the arguments for the next function 48 | 49 | mov edx, [esp + 16] 50 | mov eax, [esp + 12] 51 | push edx 52 | push eax 53 | 54 | mov edx, [esp + 16] 55 | mov eax, [esp + 12] 56 | push edx 57 | push eax 58 | 59 | ; Get the remainder 60 | 61 | call _aullrem 62 | 63 | ; Save the remainder into registers that will be preserved 64 | 65 | push esi 66 | mov ebx, edx 67 | mov esi, eax 68 | 69 | ; Push the arguments for the next function 70 | 71 | mov edx, [esp + 20] 72 | mov eax, [esp + 16] 73 | push edx 74 | push eax 75 | 76 | mov edx, [esp + 20] 77 | mov eax, [esp + 16] 78 | push edx 79 | push eax 80 | 81 | ; Get the result 82 | 83 | call _aulldiv 84 | 85 | mov ecx, esi 86 | pop esi 87 | 88 | ret 16 89 | 90 | _aulldvrm endp 91 | 92 | ; LARGE_INTEGER Result [High EDX, Low EAX] 93 | ; LARGE_INTEGER Remainder [High EBX, Low ECX] 94 | ; _alldvrm( 95 | ; LARGE_INTEGER Dividend, [High ESP + 8, Low ESP + 4], 96 | ; LARGE_INTEGER Divisor [High ESP + 16, Low ESP + 12] 97 | ; ); 98 | 99 | public _alldvrm 100 | _alldvrm proc 101 | 102 | ; Push the arguments for the next function 103 | 104 | mov edx, [esp + 16] 105 | mov eax, [esp + 12] 106 | push edx 107 | push eax 108 | 109 | mov edx, [esp + 16] 110 | mov eax, [esp + 12] 111 | push edx 112 | push eax 113 | 114 | ; Get the remainder 115 | 116 | call _allrem 117 | 118 | ; Save the remainder into registers that will be preserved 119 | 120 | push esi 121 | mov ebx, edx 122 | mov esi, eax 123 | 124 | ; Push the arguments for the next function 125 | 126 | mov edx, [esp + 20] 127 | mov eax, [esp + 16] 128 | push edx 129 | push eax 130 | 131 | mov edx, [esp + 20] 132 | mov eax, [esp + 16] 133 | push edx 134 | push eax 135 | 136 | ; Get the result 137 | 138 | call _alldiv 139 | 140 | mov ecx, esi 141 | pop esi 142 | 143 | ret 16 144 | 145 | _alldvrm endp 146 | 147 | END 148 | -------------------------------------------------------------------------------- /crt/bigmul.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; BIGMUL.ASM 3 | ; 4 | ; Implementation for for signed and unsigned multiplication of a 64 bit integer 5 | ; by a 64 bit integer. 6 | ; 7 | ; Copyright (c) 2017 Malcolm J. Smith 8 | ; 9 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 10 | ; of this software and associated documentation files (the "Software"), to deal 11 | ; in the Software without restriction, including without limitation the rights 12 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | ; copies of the Software, and to permit persons to whom the Software is 14 | ; furnished to do so, subject to the following conditions: 15 | ; 16 | ; The above copyright notice and this permission notice shall be included in 17 | ; all copies or substantial portions of the Software. 18 | ; 19 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | ; THE SOFTWARE. 26 | ; 27 | 28 | .386 29 | .MODEL FLAT, C 30 | .CODE 31 | 32 | ; LARGE_INTEGER [High EDX, Low EAX] 33 | ; _allmul( 34 | ; LARGE_INTEGER Value1, [High ESP + 8, Low ESP + 4], 35 | ; LARGE_INTEGER Value2 [High ESP + 16, Low ESP + 12] 36 | ; ); 37 | 38 | ; Multiply low by high of both components, adding them into a temporary 39 | ; register. Multiply low by low, which might result in a high component, 40 | ; and add back the temporary result into this high component. 41 | 42 | _allmul proc 43 | 44 | push ebx 45 | 46 | mov eax, [esp + 8] 47 | mov edx, [esp + 20] 48 | mul edx 49 | mov ebx, eax 50 | 51 | mov eax, [esp + 16] 52 | mov edx, [esp + 12] 53 | mul edx 54 | add ebx, eax 55 | 56 | mov eax, [esp + 8] 57 | mov edx, [esp + 16] 58 | mul edx 59 | add edx, ebx 60 | 61 | pop ebx 62 | 63 | ret 16 64 | _allmul endp 65 | 66 | END 67 | -------------------------------------------------------------------------------- /crt/bigshl.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; BIGSHL.ASM 3 | ; 4 | ; Implementation for for signed and unsigned left shift of a 64 bit integer. 5 | ; 6 | ; Copyright (c) 2017 Malcolm J. Smith 7 | ; 8 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 9 | ; of this software and associated documentation files (the "Software"), to deal 10 | ; in the Software without restriction, including without limitation the rights 11 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | ; copies of the Software, and to permit persons to whom the Software is 13 | ; furnished to do so, subject to the following conditions: 14 | ; 15 | ; The above copyright notice and this permission notice shall be included in 16 | ; all copies or substantial portions of the Software. 17 | ; 18 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | ; THE SOFTWARE. 25 | ; 26 | 27 | .386 28 | .MODEL FLAT, C 29 | .CODE 30 | 31 | ; LARGE_INTEGER [High EDX, Low EAX] 32 | ; _allshl( 33 | ; LARGE_INTEGER Value, [High EDX, Low EAX] 34 | ; UCHAR Shift [CL] 35 | ; ); 36 | 37 | public _allshl 38 | _allshl proc 39 | 40 | ; If the shift is for more than 64 bits, all the data would be gone, so 41 | ; return zero. If the shift is for more than 32 bits, the low 32 bits 42 | ; of the result must be zero, and the high 32 bits contains the low 32 43 | ; bits of input after shifting. If the shift is less than 32 bits, then 44 | ; both components must be shifted with bits carried between the two. 45 | 46 | cmp cl,64 47 | jae allshl_no_shift 48 | cmp cl,32 49 | jae allshl_long_shift 50 | jmp allshl_short_shift 51 | 52 | allshl_short_shift: 53 | shld edx, eax, cl 54 | shl eax, cl 55 | ret 56 | 57 | allshl_long_shift: 58 | sub cl, 32 59 | shl eax, cl 60 | mov edx, eax 61 | xor eax, eax 62 | ret 63 | 64 | allshl_no_shift: 65 | xor eax, eax 66 | xor edx, edx 67 | ret 68 | 69 | _allshl endp 70 | 71 | END 72 | -------------------------------------------------------------------------------- /crt/bigshr.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; BIGSHR.ASM 3 | ; 4 | ; Implementation for for signed and unsigned right shift of a 64 bit integer. 5 | ; 6 | ; Copyright (c) 2017 Malcolm J. Smith 7 | ; 8 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 9 | ; of this software and associated documentation files (the "Software"), to deal 10 | ; in the Software without restriction, including without limitation the rights 11 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | ; copies of the Software, and to permit persons to whom the Software is 13 | ; furnished to do so, subject to the following conditions: 14 | ; 15 | ; The above copyright notice and this permission notice shall be included in 16 | ; all copies or substantial portions of the Software. 17 | ; 18 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | ; THE SOFTWARE. 25 | ; 26 | 27 | .386 28 | .MODEL FLAT, C 29 | .CODE 30 | 31 | ; ULARGE_INTEGER [High EDX, Low EAX] 32 | ; _aullshr( 33 | ; ULARGE_INTEGER Value, [High EDX, Low EAX] 34 | ; UCHAR Shift [CL] 35 | ; ); 36 | 37 | public _aullshr 38 | _aullshr proc 39 | 40 | ; If the shift is for more than 64 bits, all the data would be gone, so 41 | ; return zero. If the shift is for more than 32 bits, the high 32 bits 42 | ; of the result must be zero, and the low 32 bits contains the high 32 43 | ; bits of input after shifting. If the shift is less than 32 bits, then 44 | ; both components must be shifted with bits carried between the two. 45 | 46 | cmp cl,64 47 | jae aullshr_no_shift 48 | cmp cl,32 49 | jae aullshr_long_shift 50 | jmp aullshr_short_shift 51 | 52 | aullshr_short_shift: 53 | shrd eax, edx, cl 54 | shr edx, cl 55 | ret 56 | 57 | aullshr_long_shift: 58 | sub cl, 32 59 | shr edx, cl 60 | mov eax, edx 61 | xor edx, edx 62 | ret 63 | 64 | aullshr_no_shift: 65 | xor eax, eax 66 | xor edx, edx 67 | ret 68 | 69 | _aullshr endp 70 | 71 | ; LARGE_INTEGER [High EDX, Low EAX] 72 | ; _allshr( 73 | ; LARGE_INTEGER Value, [High EDX, Low EAX] 74 | ; UCHAR Shift [CL] 75 | ; ); 76 | 77 | ; It's not clear to me what the meaning of a signed bitshift is, but for now 78 | ; give it to the unsigned implementation. 79 | 80 | public _allshr 81 | _allshr proc 82 | jmp _aullshr 83 | _allshr endp 84 | 85 | END 86 | -------------------------------------------------------------------------------- /crt/cmpxchg.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; CMPXCHG.ASM 3 | ; 4 | ; Implementation for InterlockedCompareExchange for compilers without it. 5 | ; 6 | ; Copyright (c) 2023 Malcolm J. Smith 7 | ; 8 | ; Permission is hereby granted, free of charge, to any person obtaining a copy 9 | ; of this software and associated documentation files (the "Software"), to deal 10 | ; in the Software without restriction, including without limitation the rights 11 | ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | ; copies of the Software, and to permit persons to whom the Software is 13 | ; furnished to do so, subject to the following conditions: 14 | ; 15 | ; The above copyright notice and this permission notice shall be included in 16 | ; all copies or substantial portions of the Software. 17 | ; 18 | ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | ; THE SOFTWARE. 25 | ; 26 | 27 | .486 28 | .MODEL FLAT, C 29 | .CODE 30 | 31 | ; DWORD [EAX] 32 | ; _lock_cmpxchg( 33 | ; PDWORD Destination, 34 | ; DWORD Exchange, 35 | ; DWORD Comperand 36 | ; ); 37 | 38 | public lock_cmpxchg@12 39 | lock_cmpxchg@12 proc 40 | 41 | mov eax,dword ptr [esp+0Ch] 42 | mov ecx,dword ptr [esp+8h] 43 | mov edx,dword ptr [esp+4] 44 | lock cmpxchg dword ptr [edx],ecx 45 | ret 0Ch 46 | 47 | lock_cmpxchg@12 endp 48 | 49 | END 50 | -------------------------------------------------------------------------------- /crt/ep_consw.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file crt/ep_consw.c 3 | * 4 | * Entrypoint code for Unicode console applications 5 | * 6 | * Copyright (c) 2014 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | /** 28 | Indicate that we're compiling the Unicode form of the module. 29 | */ 30 | #define UNICODE 1 31 | #include "ep_cons.c" 32 | 33 | // vim:sw=4:ts=4:et: 34 | -------------------------------------------------------------------------------- /crt/ep_dll.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file crt/ep_dll.c 3 | * 4 | * Entrypoint code for DLLs. Currently just a stub. 5 | * 6 | * Copyright (c) 2014 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #ifndef WIN32_LEAN_AND_MEAN 28 | /** 29 | Standard define to include somewhat less of the Windows headers. Command 30 | line software doesn't need much. 31 | */ 32 | #define WIN32_LEAN_AND_MEAN 1 33 | #endif 34 | 35 | #pragma warning(disable: 4001) /* Single line comment */ 36 | #pragma warning(disable: 4127) // conditional expression constant 37 | #pragma warning(disable: 4201) // nameless struct/union 38 | #pragma warning(disable: 4214) // bit field type other than int 39 | #pragma warning(disable: 4514) // unreferenced inline function 40 | 41 | #if defined(_MSC_VER) && (_MSC_VER <= 1400) 42 | #pragma warning(disable: 4705) // statement has no effect 43 | #endif 44 | 45 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 46 | #pragma warning(push) 47 | #endif 48 | 49 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) 50 | #pragma warning(disable: 4668) // preprocessor conditional with nonexistent macro, SDK bug 51 | #pragma warning(disable: 4255) // no function prototype given. 8.1 and earlier SDKs exhibit this. 52 | #pragma warning(disable: 4820) // implicit padding added in structure 53 | #endif 54 | 55 | /** 56 | Indicate support for compiling for ARM32 if an SDK is available. 57 | */ 58 | #define _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 1 59 | 60 | #include 61 | 62 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 63 | #pragma warning(pop) 64 | #endif 65 | 66 | /** 67 | Indicate to the standard CRT header that we're compiling the CRT itself. 68 | */ 69 | #define MINICRT_BUILD 70 | #include "yoricrt.h" 71 | 72 | /** 73 | The entrypoint function that the Windows loader will invoke when the DLL is 74 | attached or detached from a process or thread. 75 | */ 76 | BOOL WINAPI _DllMainCRTStartup(HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved) 77 | { 78 | UNREFERENCED_PARAMETER(hInst); 79 | UNREFERENCED_PARAMETER(dwReason); 80 | UNREFERENCED_PARAMETER(lpvReserved); 81 | 82 | return TRUE; 83 | } 84 | 85 | 86 | // vim:sw=4:ts=4:et: 87 | -------------------------------------------------------------------------------- /crt/i386/README.TXT: -------------------------------------------------------------------------------- 1 | These are prebuilt versions of the .ASM files in the above tree to support 2 | building MiniCRT where MASM is not present. Modern versions of Visual C++ 3 | include MASM and these files are not needed for those. Accordingly, these 4 | are created with a very old MASM (6.11d) which should be compatible with a 5 | range of older versions of Visual C++. 6 | 7 | Note that these are not required on 64 bit systems which can do 64 bit 8 | math natively, so only 32 bit versions are included. 9 | -------------------------------------------------------------------------------- /crt/i386/bigdiv.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/bigdiv.obj -------------------------------------------------------------------------------- /crt/i386/bigdvrm.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/bigdvrm.obj -------------------------------------------------------------------------------- /crt/i386/bigmul.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/bigmul.obj -------------------------------------------------------------------------------- /crt/i386/bigrem.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/bigrem.obj -------------------------------------------------------------------------------- /crt/i386/bigshl.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/bigshl.obj -------------------------------------------------------------------------------- /crt/i386/bigshr.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/bigshr.obj -------------------------------------------------------------------------------- /crt/i386/cmpxchg.obj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/crt/i386/cmpxchg.obj -------------------------------------------------------------------------------- /crt/rand.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file crt/rand.c 3 | * 4 | * Implementations for random library functions. 5 | * 6 | * Copyright (c) 2014 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #ifndef WIN32_LEAN_AND_MEAN 28 | /** 29 | Standard define to include somewhat less of the Windows headers. Command 30 | line software doesn't need much. 31 | */ 32 | #define WIN32_LEAN_AND_MEAN 1 33 | #endif 34 | 35 | #pragma warning(disable: 4001) /* Single line comment */ 36 | #pragma warning(disable: 4127) // conditional expression constant 37 | #pragma warning(disable: 4201) // nameless struct/union 38 | #pragma warning(disable: 4214) // bit field type other than int 39 | #pragma warning(disable: 4514) // unreferenced inline function 40 | 41 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 42 | #pragma warning(push) 43 | #endif 44 | 45 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) 46 | #pragma warning(disable: 4668) // preprocessor conditional with nonexistent macro, SDK bug 47 | #pragma warning(disable: 4255) // no function prototype given. 8.1 and earlier SDKs exhibit this. 48 | #pragma warning(disable: 4820) // implicit padding added in structure 49 | #endif 50 | 51 | /** 52 | Indicate support for compiling for ARM32 if an SDK is available. 53 | */ 54 | #define _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 1 55 | 56 | #include 57 | 58 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) 59 | #pragma warning(pop) 60 | #endif 61 | 62 | /** 63 | Indicate to the standard CRT header that we're compiling the CRT itself. 64 | */ 65 | #define MINICRT_BUILD 66 | #include "yoricrt.h" 67 | 68 | /** 69 | Bits carried over from previous calls to rand. 70 | */ 71 | unsigned int bit_recycler = 0; 72 | 73 | /** 74 | A seed value set by srand. In this implementation, the seed is modified 75 | by calls to rand also. 76 | */ 77 | unsigned int rand_seed = 0; 78 | 79 | /** 80 | Return a pseudorandom number being the next number in a predetermined 81 | sequence initiated by an srand seed. 82 | 83 | @return A random number in the range 0-RAND_MAX. 84 | */ 85 | int 86 | MCRT_VARARGFN 87 | mini_rand(void) 88 | { 89 | unsigned int oldbits = bit_recycler>>23; 90 | bit_recycler = (bit_recycler<<7) + (rand_seed>>23); 91 | rand_seed = (rand_seed * 83 + 13) ^ (rand_seed>>17) ^ (oldbits); 92 | return rand_seed % RAND_MAX; 93 | } 94 | 95 | /** 96 | Reset the pseudorandom stream and provide a seed which is the basis for 97 | future values returned from the sequence. 98 | */ 99 | void 100 | MCRT_FN 101 | mini_srand(unsigned int seed) 102 | { 103 | rand_seed = seed; 104 | bit_recycler = 0; 105 | } 106 | 107 | // vim:sw=4:ts=4:et: 108 | -------------------------------------------------------------------------------- /crt/stringw.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file crt/stringw.c 3 | * 4 | * Implementations of the Unicode str* library functions. 5 | * 6 | * Copyright (c) 2014 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | 28 | /** 29 | Indicate that we're compiling the Unicode form of the module. 30 | */ 31 | #define UNICODE 1 32 | 33 | /** 34 | Indicate that we're compiling the Unicode form of the module. 35 | */ 36 | #define _UNICODE 1 37 | #include "string.c" 38 | 39 | // vim:sw=4:ts=4:et: 40 | -------------------------------------------------------------------------------- /cshot/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=cshot.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:cshot.pdb 7 | 8 | BIN_OBJS=\ 9 | cshot.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcshot.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | cshot.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcshot.obj: cshot.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ cshot.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /cut/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ycut.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ycut.pdb 7 | 8 | BIN_OBJS=\ 9 | cut.obj \ 10 | 11 | MOD_OBJS=\ 12 | mcut.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ycut.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mcut.obj: cut.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ cut.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /cvtvt/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=cvtvt.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:cvtvt.pdb 7 | 8 | BIN_OBJS=\ 9 | html.obj \ 10 | main.obj \ 11 | rtf.obj \ 12 | 13 | MOD_OBJS=\ 14 | html.obj \ 15 | mmain.obj \ 16 | rtf.obj \ 17 | 18 | compile: $(BIN_OBJS) builtins.lib 19 | 20 | cvtvt.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 21 | @echo $@ 22 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 23 | 24 | mmain.obj: main.c 25 | @echo $@ 26 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ main.c 27 | 28 | builtins.lib: $(MOD_OBJS) 29 | @echo $@ 30 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 31 | -------------------------------------------------------------------------------- /cvtvt/cvtvt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file cvtvt/cvtvt.h 3 | * 4 | * Convert VT100/ANSI escape sequences into HTML, native Win32 console or 5 | * remove them completely. 6 | * 7 | * Copyright (c) 2015-2017 Malcolm J. Smith 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining a copy 10 | * of this software and associated documentation files (the "Software"), to deal 11 | * in the Software without restriction, including without limitation the rights 12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | * copies of the Software, and to permit persons to whom the Software is 14 | * furnished to do so, subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | * THE SOFTWARE. 26 | */ 27 | 28 | #include 29 | #include 30 | 31 | #ifndef COMMON_LVB_UNDERSCORE 32 | /** 33 | A private definition for underscore in case the compilation environment 34 | doesn't provide it. 35 | */ 36 | #define COMMON_LVB_UNDERSCORE 0x8000 37 | #endif 38 | 39 | BOOL CvtvtHtml4SetFunctions(__out PYORI_LIB_VT_CALLBACK_FUNCTIONS CallbackFunctions); 40 | BOOL CvtvtHtml5SetFunctions(__out PYORI_LIB_VT_CALLBACK_FUNCTIONS CallbackFunctions); 41 | BOOL CvtvtRtfSetFunctions(__out PYORI_LIB_VT_CALLBACK_FUNCTIONS CallbackFunctions); 42 | 43 | // vim:sw=4:ts=4:et: 44 | -------------------------------------------------------------------------------- /date/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ydate.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ydate.pdb 7 | 8 | BIN_OBJS=\ 9 | date.obj \ 10 | 11 | MOD_OBJS=\ 12 | mdate.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ydate.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mdate.obj: date.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ date.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /df/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ydf.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ydf.pdb 7 | 8 | BIN_OBJS=\ 9 | df.obj \ 10 | 11 | MOD_OBJS=\ 12 | mdf.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ydf.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mdf.obj: df.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ df.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /dir/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ydir.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ydir.pdb 7 | 8 | BIN_OBJS=\ 9 | dir.obj \ 10 | 11 | MOD_OBJS=\ 12 | mdir.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ydir.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mdir.obj: dir.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ dir.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /dircase/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ydircase.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ydircase.pdb 7 | 8 | BIN_OBJS=\ 9 | dircase.obj \ 10 | 11 | MOD_OBJS=\ 12 | mdircase.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ydircase.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mdircase.obj: dircase.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ dircase.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /du/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ydu.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ydu.pdb 7 | 8 | BIN_OBJS=\ 9 | du.obj \ 10 | 11 | MOD_OBJS=\ 12 | mdu.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ydu.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mdu.obj: du.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ du.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /echo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yecho.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yecho.pdb 7 | 8 | BIN_OBJS=\ 9 | echo.obj \ 10 | 11 | MOD_OBJS=\ 12 | mecho.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yecho.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mecho.obj: echo.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ echo.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /edit/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yedit.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yedit.pdb 7 | 8 | BIN_OBJS=\ 9 | edit.obj \ 10 | options.obj \ 11 | 12 | MOD_OBJS=\ 13 | medit.obj \ 14 | options.obj \ 15 | 16 | compile: $(BIN_OBJS) builtins.lib 17 | 18 | yedit.exe: $(BIN_OBJS) $(YORILIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) 19 | @echo $@ 20 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 21 | 22 | medit.obj: edit.c 23 | @echo $@ 24 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ edit.c 25 | 26 | builtins.lib: $(MOD_OBJS) 27 | @echo $@ 28 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 29 | -------------------------------------------------------------------------------- /edit/edit.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file edit/edit.h 3 | * 4 | * Yori shell editor shared function header 5 | * 6 | * Copyright (c) 2020 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | __success(return) 28 | BOOLEAN 29 | EditOpts( 30 | __in PYORI_WIN_WINDOW_MANAGER_HANDLE WinMgrHandle, 31 | __in YORI_ALLOC_SIZE_T InitialTabWidth, 32 | __out PYORI_ALLOC_SIZE_T NewTabWidth 33 | ); 34 | 35 | // vim:sw=4:ts=4:et: 36 | -------------------------------------------------------------------------------- /env/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yenv.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yenv.pdb 7 | 8 | BIN_OBJS=\ 9 | env.obj \ 10 | 11 | MOD_OBJS=\ 12 | menv.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yenv.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | menv.obj: env.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ env.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /envdiff/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=envdiff.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:envdiff.pdb 7 | 8 | BIN_OBJS=\ 9 | envdiff.obj \ 10 | 11 | MOD_OBJS=\ 12 | menvdiff.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | envdiff.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | menvdiff.obj: envdiff.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ envdiff.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /envrc.ys1: -------------------------------------------------------------------------------- 1 | if strcmp -- %1%==-undo; goto undo 2 | 3 | alias mk=ymake -m -pru DEBUG=1 $*$ 4 | alias mkd=ymake -m -pru DEBUG=1 -f `ypath -f $PARENT$ %~SCRIPTNAME%`\Makefile .\$*$ 5 | alias cln=ymake clean $*$ 6 | alias F3=ymake -m -pru DEBUG=1 7 | alias F5=ymake distclean 8 | alias F6=ymake clean 9 | alias F8=doxygen 10 | set SAVEDPROMPT=%YORIPROMPT% 11 | set YORIPROMPT=[$E$[32;1m^`git rev-parse --abbrev-ref HEAD 2^>NUL^`$E$[0m] $E$[35;1m$P$$E$[0m$G_OR_ADMIN_G$ 12 | set YORICDPATH=.;`ypath -f $PARENT$ %~SCRIPTNAME%` 13 | 14 | goto :eof 15 | :undo 16 | 17 | set YORIPROMPT=%SAVEDPROMPT% 18 | set SAVEDPROMPT= 19 | alias mk= 20 | alias F3= 21 | alias F5= 22 | alias F8= 23 | set YORICDPATH= 24 | 25 | goto :eof 26 | 27 | -------------------------------------------------------------------------------- /erase/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yerase.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yerase.pdb 7 | 8 | BIN_OBJS=\ 9 | erase.obj \ 10 | 11 | MOD_OBJS=\ 12 | merase.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yerase.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | merase.obj: erase.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ erase.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /err/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yerr.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yerr.pdb 7 | 8 | BIN_OBJS=\ 9 | err.obj \ 10 | 11 | MOD_OBJS=\ 12 | merr.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yerr.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | merr.obj: err.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ err.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /expr/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yexpr.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yexpr.pdb 7 | 8 | BIN_OBJS=\ 9 | expr.obj \ 10 | 11 | MOD_OBJS=\ 12 | mexpr.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yexpr.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mexpr.obj: expr.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ expr.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /extents/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yextents.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yextents.pdb 7 | 8 | BIN_OBJS=\ 9 | extents.obj \ 10 | 11 | MOD_OBJS=\ 12 | mextents.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yextents.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mextents.obj: extents.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ extents.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /finfo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=finfo.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:finfo.pdb 7 | 8 | BIN_OBJS=\ 9 | finfo.obj \ 10 | 11 | MOD_OBJS=\ 12 | mfinfo.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | finfo.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mfinfo.obj: finfo.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ finfo.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /for/Makefile: -------------------------------------------------------------------------------- 1 | 2 | MODULES=\ 3 | for.com 4 | 5 | BINARIES=yfor.exe 6 | 7 | !INCLUDE "..\config\common.mk" 8 | 9 | LINKPDB=/Pdb:yfor.pdb 10 | 11 | BIN_OBJS=\ 12 | for.obj \ 13 | 14 | MOD_OBJS=\ 15 | mfor.obj \ 16 | 17 | compile: $(BIN_OBJS) builtins.lib 18 | 19 | yfor.exe: $(BIN_OBJS) $(YORILIBS) $(YORISH) $(YORIVER) 20 | @echo $@ 21 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORISH) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 22 | 23 | mfor.obj: for.c 24 | @echo $@ 25 | @cl -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ for.c 26 | 27 | builtins.lib: $(MOD_OBJS) 28 | @echo $@ 29 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 30 | 31 | for.com: $(MOD_OBJS) $(YORILIBS) $(YORISH) $(YORIVER) 32 | @echo $@ 33 | @$(LINK) $(LDFLAGS) $(MOD_OBJS) -dll $(YORILIBS) $(EXTERNLIBS) $(YORISH) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) -def:for.def -out:$@ 34 | -------------------------------------------------------------------------------- /for/for.def: -------------------------------------------------------------------------------- 1 | NAME FOR.COM 2 | 3 | EXPORTS 4 | YoriMain=YoriCmd_FOR 5 | -------------------------------------------------------------------------------- /fscmp/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=fscmp.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:fscmp.pdb 7 | 8 | BIN_OBJS=\ 9 | fscmp.obj \ 10 | 11 | MOD_OBJS=\ 12 | mfscmp.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | fscmp.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mfscmp.obj: fscmp.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ fscmp.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /get/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yget.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yget.pdb 7 | 8 | BIN_OBJS=\ 9 | get.obj \ 10 | 11 | MOD_OBJS=\ 12 | mget.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yget.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mget.obj: get.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ get.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /grpcmp/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=grpcmp.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:grpcmp.pdb 7 | 8 | BIN_OBJS=\ 9 | grpcmp.obj \ 10 | 11 | MOD_OBJS=\ 12 | mgrpcmp.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | grpcmp.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mgrpcmp.obj: grpcmp.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ grpcmp.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /hash/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yhash.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yhash.pdb 7 | 8 | BIN_OBJS=\ 9 | hash.obj \ 10 | 11 | MOD_OBJS=\ 12 | mhash.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yhash.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mhash.obj: hash.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ hash.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /help/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yhelp.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yhelp.pdb 7 | 8 | BIN_OBJS=\ 9 | help.obj \ 10 | 11 | MOD_OBJS=\ 12 | mhelp.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yhelp.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mhelp.obj: help.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ help.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /hexdump/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=hexdump.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:hexdump.pdb 7 | 8 | BIN_OBJS=\ 9 | hexdump.obj \ 10 | 11 | MOD_OBJS=\ 12 | mhexdump.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | hexdump.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mhexdump.obj: hexdump.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ hexdump.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /hexedit/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yhexedit.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yhexedit.pdb 7 | 8 | BIN_OBJS=\ 9 | hexedit.obj \ 10 | 11 | MOD_OBJS=\ 12 | mhexedit.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yhexedit.exe: $(BIN_OBJS) $(YORILIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mhexedit.obj: hexedit.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ hexedit.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /hilite/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=hilite.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:hilite.pdb 7 | 8 | BIN_OBJS=\ 9 | hilite.obj \ 10 | 11 | MOD_OBJS=\ 12 | mhilite.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | hilite.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mhilite.obj: hilite.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ hilite.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /iconv/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=iconv.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:iconv.pdb 7 | 8 | BIN_OBJS=\ 9 | iconv.obj \ 10 | 11 | MOD_OBJS=\ 12 | miconv.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | iconv.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | miconv.obj: iconv.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ iconv.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /initool/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=initool.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:initool.pdb 7 | 8 | BIN_OBJS=\ 9 | initool.obj \ 10 | 11 | MOD_OBJS=\ 12 | minitool.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | initool.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | minitool.obj: initool.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ initool.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /intcmp/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yintcmp.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yintcmp.pdb 7 | 8 | BIN_OBJS=\ 9 | intcmp.obj \ 10 | 11 | MOD_OBJS=\ 12 | mintcmp.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yintcmp.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mintcmp.obj: intcmp.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ intcmp.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /kernelbase/KernelBase.def: -------------------------------------------------------------------------------- 1 | LIBRARY KERNELBASE 2 | EXPORTS 3 | AllocConsole 4 | CloseHandle 5 | ContinueDebugEvent 6 | CreateConsoleScreenBuffer 7 | CreateDirectoryW 8 | CreateEventW 9 | CreateFileW 10 | CreateMutexW 11 | CreatePipe 12 | CreateProcessW 13 | CreateThread 14 | DebugBreak 15 | DeleteFileW 16 | DeviceIoControl 17 | DuplicateHandle 18 | EnumResourceNamesW 19 | ExitProcess 20 | ExpandEnvironmentStringsW 21 | FileTimeToLocalFileTime 22 | FileTimeToSystemTime 23 | FillConsoleOutputAttribute 24 | FillConsoleOutputCharacterW 25 | FindClose 26 | FindCloseChangeNotification 27 | FindFirstChangeNotificationW 28 | FindFirstFileW 29 | FindNextFileW 30 | FindNextChangeNotification 31 | FlushFileBuffers 32 | FlushInstructionCache 33 | FormatMessageW 34 | FreeConsole 35 | FreeLibrary 36 | GenerateConsoleCtrlEvent 37 | GetCommandLineW 38 | GetConsoleCursorInfo 39 | GetConsoleMode 40 | GetConsoleScreenBufferInfo 41 | GetConsoleTitleW 42 | GetCurrentDirectoryW 43 | GetCurrentProcess 44 | GetCurrentProcessId 45 | GetCurrentThread 46 | GetDiskFreeSpaceW 47 | GetDriveTypeW 48 | GetEnvironmentVariableW 49 | GetExitCodeProcess 50 | GetFileAttributesW 51 | GetFileInformationByHandle 52 | GetFileSize 53 | GetFileTime 54 | GetFileType 55 | GetLastError 56 | GetLocaleInfoW 57 | GetLocalTime 58 | GetModuleFileNameW 59 | GetModuleHandleW 60 | GetNumberOfConsoleInputEvents 61 | GetPriorityClass 62 | GetProcAddress 63 | GetProcessTimes 64 | GetStdHandle 65 | GetSystemDirectoryW 66 | GetSystemInfo 67 | GetSystemTime 68 | GetTempFileNameW 69 | GetTempPathW 70 | GetThreadContext 71 | GetTickCount 72 | GetTimeZoneInformation 73 | GetVersion 74 | GetVolumeInformationW 75 | GetWindowsDirectoryW 76 | GlobalAlloc 77 | GlobalFree 78 | LoadLibraryExW 79 | LocalFileTimeToFileTime 80 | LocalFree 81 | MoveFileExW 82 | MultiByteToWideChar 83 | OpenProcess 84 | OutputDebugStringW 85 | PeekConsoleInputW 86 | PeekNamedPipe 87 | QueryPerformanceCounter 88 | QueryPerformanceFrequency 89 | ReadConsoleInputW 90 | ReadConsoleOutputCharacterW 91 | ReadConsoleOutputW 92 | ReadConsoleW 93 | ReadFile 94 | ReadProcessMemory 95 | ReleaseMutex 96 | RemoveDirectoryW 97 | ResetEvent 98 | ResumeThread 99 | ScrollConsoleScreenBufferW 100 | SetConsoleActiveScreenBuffer 101 | SetConsoleCtrlHandler 102 | SetConsoleCursorInfo 103 | SetConsoleCursorPosition 104 | SetConsoleMode 105 | SetConsoleTextAttribute 106 | SetConsoleTitleW 107 | SetConsoleWindowInfo 108 | SetCurrentDirectoryW 109 | SetEndOfFile 110 | SetEnvironmentVariableW 111 | SetErrorMode 112 | SetEvent 113 | SetFileAttributesW 114 | SetFilePointer 115 | SetFileTime 116 | SetLastError 117 | SetLocalTime 118 | SetPriorityClass 119 | SetStdHandle 120 | SetSystemTime 121 | SetThreadContext 122 | Sleep 123 | SystemTimeToFileTime 124 | TerminateProcess 125 | TerminateThread 126 | VirtualAlloc 127 | VirtualFree 128 | VirtualProtect 129 | WaitForDebugEvent 130 | WaitForMultipleObjectsEx 131 | WaitForSingleObject 132 | WideCharToMultiByte 133 | WriteConsoleOutputAttribute 134 | WriteConsoleOutputCharacterW 135 | WriteConsoleOutputW 136 | WriteConsoleW 137 | WriteFile 138 | WriteProcessMemory 139 | -------------------------------------------------------------------------------- /kernelbase/Makefile: -------------------------------------------------------------------------------- 1 | 2 | !IF $(KERNELBASE)==1 3 | !IF "$(ARCH)"=="amd64" || "$(ARCH)"=="arm64" 4 | compile: kernelbase.lib 5 | !ELSE 6 | # x86 uses stdcall and depends upon having an import library that contains 7 | # symbols specifying the amount of stack to be popped from a function. 8 | # This currently doesn't support this, and that's partly because there's 9 | # currently no system that would benefit from a kernelbase-only x86 build. 10 | !ERROR Architecture not supported for kernelbase builds 11 | !ENDIF 12 | !ELSE 13 | compile: 14 | !ENDIF 15 | 16 | !INCLUDE "..\config\common.mk" 17 | 18 | kernelbase.lib: $(OBJS) kernelbase.def 19 | @echo $@ 20 | @$(LIB32) $(LIBFLAGS) -MACHINE:$(MACHINE) -DEF:kernelbase.def -out:$@ 21 | -------------------------------------------------------------------------------- /kill/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ykill.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ykill.pdb 7 | 8 | BIN_OBJS=\ 9 | kill.obj \ 10 | 11 | MOD_OBJS=\ 12 | mkill.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ykill.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mkill.obj: kill.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ kill.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /lib/Makefile: -------------------------------------------------------------------------------- 1 | 2 | compile: yorilib.lib yoriver.obj 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | OBJS=\ 7 | airplane.obj \ 8 | bargraph.obj \ 9 | builtin.obj \ 10 | bytebuf.obj \ 11 | cabinet.obj \ 12 | call.obj \ 13 | cancel.obj \ 14 | clip.obj \ 15 | cmdline.obj \ 16 | color.obj \ 17 | condrv.obj \ 18 | cpuinfo.obj \ 19 | cshot.obj \ 20 | curdir.obj \ 21 | cvtcons.obj \ 22 | cvthtml.obj \ 23 | cvtrtf.obj \ 24 | dblclk.obj \ 25 | debug.obj \ 26 | dyld.obj \ 27 | dyld_adv.obj \ 28 | dyld_cab.obj \ 29 | dyld_net.obj \ 30 | dyld_usr.obj \ 31 | env.obj \ 32 | ep_yori.obj \ 33 | filecomp.obj \ 34 | fileenum.obj \ 35 | filefilt.obj \ 36 | fileinfo.obj \ 37 | fullpath.obj \ 38 | group.obj \ 39 | hash.obj \ 40 | hexdump.obj \ 41 | http.obj \ 42 | iconv.obj \ 43 | jobobj.obj \ 44 | license.obj \ 45 | lineread.obj \ 46 | list.obj \ 47 | malloc.obj \ 48 | movefile.obj \ 49 | numkey.obj \ 50 | obenum.obj \ 51 | osver.obj \ 52 | path.obj \ 53 | printf.obj \ 54 | printfa.obj \ 55 | priv.obj \ 56 | process.obj \ 57 | progman.obj \ 58 | recycle.obj \ 59 | rsrc.obj \ 60 | scut.obj \ 61 | scheme.obj \ 62 | select.obj \ 63 | strarray.obj \ 64 | strmenum.obj \ 65 | temp.obj \ 66 | update.obj \ 67 | util.obj \ 68 | vt.obj \ 69 | ylhomedr.obj \ 70 | ylstralc.obj \ 71 | ylstrcat.obj \ 72 | ylstrcmp.obj \ 73 | ylstrcnt.obj \ 74 | ylstrcnv.obj \ 75 | ylstrfnd.obj \ 76 | ylstrhex.obj \ 77 | ylstrnum.obj \ 78 | ylstrsrt.obj \ 79 | ylstrtrm.obj \ 80 | ylvolpth.obj \ 81 | ylvtdbg.obj \ 82 | 83 | all: yorilib.lib yoriver.obj 84 | 85 | yorilib.lib: $(OBJS) 86 | @echo $@ 87 | @$(LIB32) $(LIBFLAGS) $(OBJS) /out:yorilib.lib 88 | 89 | yoriver.obj: yoriver.inc 90 | @echo $(**F) 91 | @if exist $@ erase $@ 92 | @$(RC) /fo$(@B).res $(RCFLAGS) /d YORI_VER_MAJOR=$(YORI_VER_MAJOR) /d YORI_VER_MINOR=$(YORI_VER_MINOR) /d YORI_BIN_VER_MAJOR=$(YORI_VER_MAJOR) /d YORI_BIN_VER_MINOR=$(YORI_VER_MINOR) $** >NUL 93 | @if not exist $@ ren $(@B).res $@ 94 | 95 | -------------------------------------------------------------------------------- /lib/debug.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lib/debug.c 3 | * 4 | * Yori debugging support routines 5 | * 6 | * Copyright (c) 2017 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include "yoripch.h" 28 | #include "yorilib.h" 29 | 30 | /** 31 | Stop execution and break into the debugger. 32 | 33 | @param Condition A string describing the condition that failed. 34 | 35 | @param Function A string containing the function with the failure. 36 | 37 | @param File A string containing the File with the failure. 38 | 39 | @param Line The line number within the file. 40 | */ 41 | VOID 42 | YoriLibDbgRealAssert( 43 | __in LPCSTR Condition, 44 | __in LPCSTR Function, 45 | __in LPCSTR File, 46 | __in DWORD Line 47 | ) 48 | { 49 | DWORD LastError; 50 | TCHAR szLine[1024]; 51 | 52 | LastError = GetLastError(); 53 | 54 | YoriLibSPrintf(szLine, _T("ASSERTION FAILURE: %hs\n%hs %hs:%i\nGLE: %i\n\n"), Condition, Function, File, Line, LastError); 55 | YoriLibOutput(YORI_LIB_OUTPUT_STDERR, _T("%s"), szLine); 56 | OutputDebugString(szLine); 57 | 58 | DebugBreak(); 59 | } 60 | 61 | // vim:sw=4:ts=4:et: 62 | -------------------------------------------------------------------------------- /lib/dyld_cab.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lib/dyld_cab.c 3 | * 4 | * Yori dynamically loaded cabinet function support with static fallback 5 | * 6 | * Copyright (c) 2018-2021 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include "yoripch.h" 28 | #include "yorilib.h" 29 | 30 | #ifdef YORI_FDI_SUPPORT 31 | /** 32 | Forward declaration of FDICreate when static linking. 33 | */ 34 | CAB_FDI_CREATE FDICreate; 35 | 36 | /** 37 | Forward declaration of FDICreate when static linking. 38 | */ 39 | CAB_FDI_COPY FDICopy; 40 | 41 | /** 42 | Forward declaration of FDIDestroy when static linking. 43 | */ 44 | CAB_FDI_DESTROY FDIDestroy; 45 | #endif 46 | 47 | /** 48 | A structure containing pointers to cabinet.dll functions that can be used if 49 | they are found but programs do not have a hard dependency on. 50 | */ 51 | YORI_CABINET_FUNCTIONS DllCabinet; 52 | 53 | /** 54 | Load pointers to all optional cabinet.dll functions. 55 | 56 | @return TRUE to indicate success, FALSE to indicate failure. 57 | */ 58 | BOOL 59 | YoriLibLoadCabinetFunctions(VOID) 60 | { 61 | if (DllCabinet.hDll != NULL) { 62 | return TRUE; 63 | } 64 | 65 | DllCabinet.hDll = YoriLibLoadLibraryFromSystemDirectory(_T("CABINET.DLL")); 66 | if (DllCabinet.hDll == NULL) { 67 | #ifdef YORI_FDI_SUPPORT 68 | DllCabinet.pFdiCreate = FDICreate; 69 | DllCabinet.pFdiCopy = FDICopy; 70 | DllCabinet.pFdiDestroy = FDIDestroy; 71 | #endif 72 | return FALSE; 73 | } 74 | 75 | DllCabinet.pFciAddFile = (PCAB_FCI_ADD_FILE)GetProcAddress(DllCabinet.hDll, "FCIAddFile"); 76 | DllCabinet.pFciCreate = (PCAB_FCI_CREATE)GetProcAddress(DllCabinet.hDll, "FCICreate"); 77 | DllCabinet.pFciDestroy = (PCAB_FCI_DESTROY)GetProcAddress(DllCabinet.hDll, "FCIDestroy"); 78 | DllCabinet.pFciFlushCabinet = (PCAB_FCI_FLUSH_CABINET)GetProcAddress(DllCabinet.hDll, "FCIFlushCabinet"); 79 | DllCabinet.pFciFlushFolder = (PCAB_FCI_FLUSH_FOLDER)GetProcAddress(DllCabinet.hDll, "FCIFlushFolder"); 80 | DllCabinet.pFdiCreate = (PCAB_FDI_CREATE)GetProcAddress(DllCabinet.hDll, "FDICreate"); 81 | DllCabinet.pFdiCopy = (PCAB_FDI_COPY)GetProcAddress(DllCabinet.hDll, "FDICopy"); 82 | DllCabinet.pFdiDestroy = (PCAB_FDI_DESTROY)GetProcAddress(DllCabinet.hDll, "FDIDestroy"); 83 | return TRUE; 84 | } 85 | 86 | // vim:sw=4:ts=4:et: 87 | -------------------------------------------------------------------------------- /lib/ep_yori.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lib/ep_yori.c 3 | * 4 | * Entrypoint code for YoriLib applications 5 | * 6 | * Copyright (c) 2014-2018 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include "yoripch.h" 28 | #include "yorilib.h" 29 | 30 | /** 31 | Specifies the main entrypoint function for the application after arguments 32 | have been parsed. 33 | */ 34 | #define CONSOLE_USER_ENTRYPOINT ymain 35 | 36 | /** 37 | Specifies the entrypoint function that Windows will invoke. 38 | */ 39 | #define CONSOLE_CRT_ENTRYPOINT ymainCRTStartup 40 | 41 | /** 42 | The entrypoint function that YoriLib based applications commence execution 43 | from. 44 | */ 45 | DWORD CONSOLE_USER_ENTRYPOINT(YORI_ALLOC_SIZE_T ArgC, YORI_STRING ArgV[]); 46 | 47 | /** 48 | The entrypoint function that the Windows loader will commence execution from. 49 | */ 50 | VOID __cdecl CONSOLE_CRT_ENTRYPOINT(VOID) 51 | { 52 | PYORI_STRING ArgV; 53 | YORI_ALLOC_SIZE_T ArgC; 54 | YORI_ALLOC_SIZE_T Index; 55 | DWORD ExitCode; 56 | 57 | YoriLibLoadNtDllFunctions(); 58 | YoriLibLoadKernel32Functions(); 59 | 60 | ArgV = YoriLibCmdlineToArgcArgv(GetCommandLine(), YORI_MAX_ALLOC_SIZE, FALSE, &ArgC, NULL); 61 | if (ArgV == NULL) { 62 | ExitProcess(EXIT_FAILURE); 63 | } 64 | ExitCode = CONSOLE_USER_ENTRYPOINT(ArgC, ArgV); 65 | for (Index = 0; Index < ArgC; Index++) { 66 | YoriLibFreeStringContents(&ArgV[Index]); 67 | } 68 | YoriLibDereference(ArgV); 69 | 70 | YoriLibDisplayMemoryUsage(); 71 | 72 | ExitProcess(ExitCode); 73 | } 74 | 75 | 76 | // vim:sw=4:ts=4:et: 77 | -------------------------------------------------------------------------------- /lib/jobobj.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lib/jobobj.c 3 | * 4 | * Yori wrappers around Windows Job Object functionality. Loads dynamically 5 | * to allow for fallback if the host OS doesn't support it. 6 | * 7 | * Copyright (c) 2017 Malcolm J. Smith 8 | * 9 | * Permission is hereby granted, free of charge, to any person obtaining a copy 10 | * of this software and associated documentation files (the "Software"), to deal 11 | * in the Software without restriction, including without limitation the rights 12 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | * copies of the Software, and to permit persons to whom the Software is 14 | * furnished to do so, subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be included in 17 | * all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | * THE SOFTWARE. 26 | */ 27 | 28 | #include "yoripch.h" 29 | #include "yorilib.h" 30 | 31 | /** 32 | Attempt to create an unnamed job object. If the functionality is not 33 | supported by the host OS, returns NULL. 34 | 35 | @return Handle to a job object, or NULL on failure. 36 | */ 37 | HANDLE 38 | YoriLibCreateJobObject(VOID) 39 | { 40 | if (DllKernel32.pCreateJobObjectW == NULL) { 41 | return NULL; 42 | } 43 | return DllKernel32.pCreateJobObjectW(NULL, NULL); 44 | } 45 | 46 | /** 47 | Assign a process to a job object. If the functionality is not 48 | supported by the host OS, returns FALSE. 49 | 50 | @return TRUE on success, FALSE on failure. 51 | */ 52 | BOOL 53 | YoriLibAssignProcessToJobObject( 54 | __in HANDLE hJob, 55 | __in HANDLE hProcess 56 | ) 57 | { 58 | if (DllKernel32.pAssignProcessToJobObject == NULL) { 59 | return FALSE; 60 | } 61 | return DllKernel32.pAssignProcessToJobObject(hJob, hProcess); 62 | } 63 | 64 | /** 65 | Set the process priority to be used by a job object. If this functionality 66 | is not supported by the host OS, returns FALSE. 67 | 68 | @return TRUE on success, FALSE on failure. 69 | */ 70 | BOOL 71 | YoriLibLimitJobObjectPriority( 72 | __in HANDLE hJob, 73 | __in DWORD Priority 74 | ) 75 | { 76 | YORI_JOB_BASIC_LIMIT_INFORMATION LimitInfo; 77 | if (DllKernel32.pSetInformationJobObject == NULL) { 78 | return FALSE; 79 | } 80 | ZeroMemory(&LimitInfo, sizeof(LimitInfo)); 81 | LimitInfo.Flags = 0x20; 82 | LimitInfo.Priority = Priority; 83 | return DllKernel32.pSetInformationJobObject(hJob, 2, &LimitInfo, sizeof(LimitInfo)); 84 | } 85 | 86 | // vim:sw=4:ts=4:et: 87 | -------------------------------------------------------------------------------- /lib/printfa.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file printfa.c 3 | * 4 | * Ansi versions of printf functions. 5 | * 6 | * Copyright (c) 2014 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #undef UNICODE 28 | #undef _UNICODE 29 | 30 | #include "yoripch.h" 31 | #include "yorilib.h" 32 | 33 | /** 34 | Indicate to the printf code that whether we're compiling for unicode or not, 35 | the system supports unicode, so conversions should be included. 36 | */ 37 | #define PRINTF_UNICODE_SUPPORTED 1 38 | 39 | #include "printf.inc" 40 | 41 | /** 42 | Process a printf format string and output the result into a NULL terminated 43 | ANSI buffer of specified size. 44 | 45 | @param szDest The buffer to populate with the result. 46 | 47 | @param len The number of characters in the buffer. 48 | 49 | @param szFmt The format string to process. 50 | 51 | @return The number of characters successfully populated into the buffer, or 52 | -1 on error. 53 | */ 54 | YORI_SIGNED_ALLOC_SIZE_T 55 | YoriLibSPrintfSA( 56 | __out_ecount(len) LPSTR szDest, 57 | __in YORI_ALLOC_SIZE_T len, 58 | __in LPCSTR szFmt, 59 | ... 60 | ) 61 | { 62 | va_list marker; 63 | YORI_SIGNED_ALLOC_SIZE_T out_len; 64 | 65 | va_start( marker, szFmt ); 66 | out_len = YoriLibVSPrintfA(szDest, len, szFmt, marker); 67 | va_end( marker ); 68 | return out_len; 69 | } 70 | 71 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) 72 | #pragma warning(push) 73 | #pragma warning(disable: 6386) // Obviously this is the buffer unsafe version 74 | #endif 75 | 76 | /** 77 | Process a printf format string and output the result into a NULL terminated 78 | ANSI buffer which is assumed to be large enough to contain the result. 79 | 80 | @param szDest The buffer to populate with the result. 81 | 82 | @param szFmt The format string to process. 83 | 84 | @return The number of characters successfully populated into the buffer, or 85 | -1 on error. 86 | */ 87 | YORI_SIGNED_ALLOC_SIZE_T 88 | YoriLibSPrintfA( 89 | __out LPSTR szDest, 90 | __in LPCSTR szFmt, 91 | ... 92 | ) 93 | { 94 | va_list marker; 95 | YORI_SIGNED_ALLOC_SIZE_T out_len; 96 | 97 | va_start( marker, szFmt ); 98 | out_len = YoriLibVSPrintfA(szDest, YORI_MAX_ALLOC_SIZE, szFmt, marker); 99 | va_end( marker ); 100 | return out_len; 101 | } 102 | 103 | #if defined(_MSC_VER) && (_MSC_VER >= 1500) 104 | #pragma warning(pop) 105 | #endif 106 | 107 | // vim:sw=4:ts=4:et: 108 | -------------------------------------------------------------------------------- /lib/recycle.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lib/recycle.c 3 | * 4 | * Yori shell send files to the recycle bin. 5 | * 6 | * Copyright (c) 2018 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS ERASE A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ERASE ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include 28 | #include 29 | 30 | 31 | /** 32 | Attempt to send an object to the recycle bin. 33 | 34 | @param FilePath Pointer to the file path to delete. 35 | 36 | @return TRUE if the object was sent to the recycle bin, FALSE if not. 37 | */ 38 | BOOL 39 | YoriLibRecycleBinFile( 40 | __in PYORI_STRING FilePath 41 | ) 42 | { 43 | YORI_SHFILEOP FileOp; 44 | YORI_STRING FilePathWithDoubleNull; 45 | INT Result; 46 | 47 | YoriLibLoadShell32Functions(); 48 | 49 | // 50 | // If loading shell failed or we couldn't find the function, recycling 51 | // won't happen. 52 | // 53 | 54 | if (DllShell32.pSHFileOperationW == NULL) { 55 | return FALSE; 56 | } 57 | 58 | // 59 | // Create a double NULL terminated file name. 60 | // 61 | 62 | YoriLibInitEmptyString(&FilePathWithDoubleNull); 63 | if (!YoriLibAllocateString(&FilePathWithDoubleNull, FilePath->LengthInChars + 2)) { 64 | return FALSE; 65 | } 66 | 67 | // 68 | // Shell will explode if it sees \\?\, so try to reconvert back to 69 | // Win32 limited paths. 70 | // 71 | 72 | YoriLibUnescapePath(FilePath, &FilePathWithDoubleNull); 73 | 74 | ASSERT(FilePathWithDoubleNull.LengthAllocated >= FilePathWithDoubleNull.LengthInChars + 2); 75 | FilePathWithDoubleNull.StartOfString[FilePathWithDoubleNull.LengthInChars] = '\0'; 76 | FilePathWithDoubleNull.StartOfString[FilePathWithDoubleNull.LengthInChars + 1] = '\0'; 77 | 78 | // 79 | // Ask shell to send the object to the recycle bin. 80 | // 81 | 82 | ZeroMemory(&FileOp, sizeof(FileOp)); 83 | FileOp.Function = YORI_SHFILEOP_DELETE; 84 | FileOp.Source = FilePathWithDoubleNull.StartOfString; 85 | FileOp.Flags = YORI_SHFILEOP_FLAG_SILENT|YORI_SHFILEOP_FLAG_NOCONFIRMATION|YORI_SHFILEOP_FLAG_ALLOWUNDO|YORI_SHFILEOP_FLAG_NOERRORUI; 86 | 87 | Result = DllShell32.pSHFileOperationW(&FileOp); 88 | YoriLibFreeStringContents(&FilePathWithDoubleNull); 89 | 90 | if (Result == 0) { 91 | return TRUE; 92 | } 93 | return FALSE; 94 | } 95 | 96 | // vim:sw=4:ts=4:et: 97 | -------------------------------------------------------------------------------- /lib/ylstrcat.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lib/ylstrcat.c 3 | * 4 | * Yori string concatenation routines 5 | * 6 | * Copyright (c) 2017-2018 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include "yoripch.h" 28 | #include "yorilib.h" 29 | 30 | /** 31 | Concatenate one yori string to an existing yori string. Note the first 32 | string may be reallocated within this routine and the caller is expected to 33 | free it with @ref YoriLibFreeStringContents . 34 | 35 | @param String The first string, which will be updated to have the contents 36 | of the second string appended to it. 37 | 38 | @param AppendString The string to copy to the end of the first string. 39 | 40 | @return TRUE to indicate success, FALSE to indicate failure. 41 | */ 42 | BOOLEAN 43 | YoriLibStringConcat( 44 | __inout PYORI_STRING String, 45 | __in PCYORI_STRING AppendString 46 | ) 47 | { 48 | DWORD LengthRequired; 49 | 50 | LengthRequired = String->LengthInChars + AppendString->LengthInChars + 1; 51 | if (!YoriLibIsSizeAllocatable(LengthRequired)) { 52 | return FALSE; 53 | } 54 | if (LengthRequired > String->LengthAllocated) { 55 | if (YoriLibIsSizeAllocatable(LengthRequired + 0x100)) { 56 | LengthRequired = LengthRequired + 0x100; 57 | } 58 | if (!YoriLibReallocString(String, (YORI_ALLOC_SIZE_T)LengthRequired)) { 59 | return FALSE; 60 | } 61 | } 62 | 63 | memcpy(&String->StartOfString[String->LengthInChars], AppendString->StartOfString, AppendString->LengthInChars * sizeof(TCHAR)); 64 | String->LengthInChars = String->LengthInChars + AppendString->LengthInChars; 65 | String->StartOfString[String->LengthInChars] = '\0'; 66 | return TRUE; 67 | } 68 | 69 | /** 70 | Concatenate a literal string to an existing yori string. Note the first 71 | string may be reallocated within this routine and the caller is expected to 72 | free it with @ref YoriLibFreeStringContents . 73 | 74 | @param String The first string, which will be updated to have the contents 75 | of the second string appended to it. 76 | 77 | @param AppendString The string to copy to the end of the first string. 78 | 79 | @return TRUE to indicate success, FALSE to indicate failure. 80 | */ 81 | BOOLEAN 82 | YoriLibStringConcatWithLiteral( 83 | __inout PYORI_STRING String, 84 | __in LPCTSTR AppendString 85 | ) 86 | { 87 | YORI_STRING AppendYoriString; 88 | 89 | // 90 | // We need to length count the literal to ensure buffer sizes anyway, 91 | // so convert it into a length counted string. 92 | // 93 | 94 | YoriLibConstantString(&AppendYoriString, AppendString); 95 | return YoriLibStringConcat(String, &AppendYoriString); 96 | } 97 | 98 | 99 | // vim:sw=4:ts=4:et: 100 | -------------------------------------------------------------------------------- /lib/yori.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/lib/yori.ico -------------------------------------------------------------------------------- /lib/yori.man: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Yori 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /lib/yori32.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/lib/yori32.ico -------------------------------------------------------------------------------- /lib/yoriver.inc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define VS_VERSION_INFO 1 4 | 5 | VS_VERSION_INFO VERSIONINFO 6 | FILEVERSION YORI_BIN_VER_MAJOR, YORI_BIN_VER_MINOR, 0, 0 7 | PRODUCTVERSION YORI_VER_MAJOR, YORI_VER_MINOR, 0, 0 8 | FILEFLAGSMASK 0x3fL 9 | FILEFLAGS 0x0L 10 | FILEOS 0x40004L 11 | FILETYPE 0x1L 12 | FILESUBTYPE 0x0L 13 | BEGIN 14 | END 15 | 16 | // 17 | // We can build the manifest using old resource compilers, 18 | // but need to ensure the definitions are in place. 19 | // 20 | 21 | #ifndef CREATEPROCESS_MANIFEST_RESOURCE_ID 22 | #define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 23 | #endif 24 | 25 | #ifndef RT_MANIFEST 26 | #define RT_MANIFEST 24 27 | #endif 28 | 29 | #ifndef YORI_CUSTOM_MANIFEST 30 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "..\\lib\\yori.man" 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /libdlg/Makefile: -------------------------------------------------------------------------------- 1 | 2 | compile: yoridlg.lib 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | OBJS=\ 7 | about.obj \ 8 | device.obj \ 9 | dir.obj \ 10 | file.obj \ 11 | find.obj \ 12 | findhex.obj \ 13 | input.obj \ 14 | msgbox.obj \ 15 | replace.obj \ 16 | replhex.obj \ 17 | 18 | yoridlg.lib: $(OBJS) 19 | @echo $@ 20 | @$(LIB32) $(LIBFLAGS) $(OBJS) /out:yoridlg.lib 21 | 22 | -------------------------------------------------------------------------------- /libsh/Makefile: -------------------------------------------------------------------------------- 1 | 2 | compile: yorish.lib 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | OBJS=\ 7 | builtin.obj \ 8 | cmdbuf.obj \ 9 | exec.obj \ 10 | parse.obj \ 11 | 12 | yorish.lib: $(OBJS) 13 | @echo $@ 14 | @$(LIB32) $(LIBFLAGS) $(OBJS) /out:yorish.lib 15 | 16 | -------------------------------------------------------------------------------- /libwin/Makefile: -------------------------------------------------------------------------------- 1 | 2 | compile: yoriwin.lib 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | OBJS=\ 7 | border.obj \ 8 | button.obj \ 9 | checkbox.obj \ 10 | color.obj \ 11 | combo.obj \ 12 | ctrl.obj \ 13 | edit.obj \ 14 | hexedit.obj \ 15 | itemaray.obj \ 16 | label.obj \ 17 | list.obj \ 18 | menubar.obj \ 19 | mledit.obj \ 20 | radio.obj \ 21 | scrolbar.obj \ 22 | text.obj \ 23 | window.obj \ 24 | winmgr.obj \ 25 | 26 | yoriwin.lib: $(OBJS) 27 | @echo $@ 28 | @$(LIB32) $(LIBFLAGS) $(OBJS) /out:yoriwin.lib 29 | 30 | -------------------------------------------------------------------------------- /lines/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=lines.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:lines.pdb 7 | 8 | BIN_OBJS=\ 9 | lines.obj \ 10 | 11 | MOD_OBJS=\ 12 | mlines.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | lines.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mlines.obj: lines.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ lines.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /lsof/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ylsof.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ylsof.pdb 7 | 8 | BIN_OBJS=\ 9 | lsof.obj \ 10 | 11 | MOD_OBJS=\ 12 | mlsof.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ylsof.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mlsof.obj: lsof.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ lsof.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /make/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymake.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymake.pdb 7 | 8 | BIN_OBJS=\ 9 | alloc.obj \ 10 | exec.obj \ 11 | make.obj \ 12 | minish.obj \ 13 | preproc.obj \ 14 | scope.obj \ 15 | target.obj \ 16 | var.obj \ 17 | 18 | MOD_OBJS=\ 19 | alloc.obj \ 20 | exec.obj \ 21 | mmake.obj \ 22 | minish.obj \ 23 | preproc.obj \ 24 | scope.obj \ 25 | target.obj \ 26 | var.obj \ 27 | 28 | compile: $(BIN_OBJS) builtins.lib 29 | 30 | MAKE_LIBS=$(YORILIBS) $(YORISH) $(YORIVER) ..\builtins\builtins.lib ..\echo\builtins.lib ..\mkdir\builtins.lib ..\rmdir\builtins.lib 31 | 32 | ymake.exe: $(BIN_OBJS) $(MAKE_LIBS) 33 | @echo $@ 34 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(MAKE_LIBS) $(EXTERNLIBS) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 35 | 36 | mmake.obj: make.c 37 | @echo $@ 38 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ make.c 39 | 40 | builtins.lib: $(MOD_OBJS) 41 | @echo $@ 42 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 43 | -------------------------------------------------------------------------------- /mem/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymem.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymem.pdb 7 | 8 | BIN_OBJS=\ 9 | mem.obj \ 10 | 11 | MOD_OBJS=\ 12 | mmem.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ymem.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mmem.obj: mem.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ mem.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /mkdir/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymkdir.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymkdir.pdb 7 | 8 | BIN_OBJS=\ 9 | mkdir.obj \ 10 | 11 | MOD_OBJS=\ 12 | mmkdir.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ymkdir.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mmkdir.obj: mkdir.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ mkdir.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /mklink/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymklink.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymklink.pdb 7 | 8 | BIN_OBJS=\ 9 | mklink.obj \ 10 | 11 | MOD_OBJS=\ 12 | mmklink.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ymklink.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mmklink.obj: mklink.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ mklink.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /more/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymore.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymore.pdb 7 | 8 | BIN_OBJS=\ 9 | ingest.obj \ 10 | moreinit.obj \ 11 | more.obj \ 12 | lines.obj \ 13 | viewport.obj \ 14 | 15 | MOD_OBJS=\ 16 | ingest.obj \ 17 | moreinit.obj \ 18 | mmore.obj \ 19 | lines.obj \ 20 | viewport.obj \ 21 | 22 | compile: $(BIN_OBJS) builtins.lib 23 | 24 | ymore.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 25 | @echo $@ 26 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 27 | 28 | mmore.obj: more.c 29 | @echo $@ 30 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ more.c 31 | 32 | builtins.lib: $(MOD_OBJS) 33 | @echo $@ 34 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 35 | -------------------------------------------------------------------------------- /mount/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymount.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymount.pdb 7 | 8 | BIN_OBJS=\ 9 | mount.obj \ 10 | 11 | MOD_OBJS=\ 12 | mmount.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ymount.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mmount.obj: mount.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ mount.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /move/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ymove.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ymove.pdb 7 | 8 | BIN_OBJS=\ 9 | move.obj \ 10 | 11 | MOD_OBJS=\ 12 | mmove.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ymove.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mmove.obj: move.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ move.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /nice/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=nice.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:nice.pdb 7 | 8 | BIN_OBJS=\ 9 | nice.obj \ 10 | 11 | MOD_OBJS=\ 12 | mnice.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | nice.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mnice.obj: nice.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ nice.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /objdir/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yobjdir.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yobjdir.pdb 7 | 8 | BIN_OBJS=\ 9 | objdir.obj \ 10 | 11 | MOD_OBJS=\ 12 | mobjdir.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yobjdir.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mobjdir.obj: objdir.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ objdir.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /osver/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=osver.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:osver.pdb 7 | 8 | BIN_OBJS=\ 9 | osver.obj \ 10 | 11 | MOD_OBJS=\ 12 | mosver.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | osver.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mosver.obj: osver.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ osver.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /path/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ypath.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ypath.pdb 7 | 8 | BIN_OBJS=\ 9 | path.obj \ 10 | 11 | MOD_OBJS=\ 12 | mpath.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ypath.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mpath.obj: path.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ path.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /pause/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ypause.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ypause.pdb 7 | 8 | BIN_OBJS=\ 9 | pause.obj \ 10 | 11 | MOD_OBJS=\ 12 | mpause.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ypause.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mpause.obj: pause.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ pause.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /petool/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=petool.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:petool.pdb 7 | 8 | BIN_OBJS=\ 9 | petool.obj \ 10 | 11 | MOD_OBJS=\ 12 | mpetool.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | petool.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mpetool.obj: petool.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ petool.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /pkg/bld-pkglist.ys1: -------------------------------------------------------------------------------- 1 | setlocal 2 | set PKGNAME=%1% 3 | set PKGARCH=%2% 4 | initool -w %OUTDIR%\pkglist.ini Provides %PKGNAME% %BUILDSTRING% 5 | initool -w %OUTDIR%\pkglist.ini %PKGNAME% Version %BUILDSTRING% 6 | initool -w %OUTDIR%\pkglist.ini %PKGNAME% %PKGARCH% %PKGNAME%-%PKGARCH%.cab 7 | endlocal 8 | -------------------------------------------------------------------------------- /pkg/bld.ys1: -------------------------------------------------------------------------------- 1 | setlocal 2 | 3 | REM 4 | REM Determine architecture by looking at compiler output. 5 | REM 6 | 7 | set ARCH=win32 8 | cl /? 2>&1 | findstr /C:"for x64" >NUL 2>&1 9 | if intcmp %ERRORLEVEL%==0;set ARCH=amd64 10 | cl /? 2>&1 | findstr /C:"for AMD64" >NUL 2>&1 11 | if intcmp %ERRORLEVEL%==0;set ARCH=amd64 12 | cl /? 2>&1 | findstr /C:"for ARM" >NUL 2>&1 13 | if intcmp %ERRORLEVEL%==0;set ARCH=arm 14 | cl /? 2>&1 | findstr /C:"for ARM64" >NUL 2>&1 15 | if intcmp %ERRORLEVEL%==0;set ARCH=arm64 16 | cl /? 2>&1 | findstr /C:"for MIPS" >NUL 2>&1 17 | if intcmp %ERRORLEVEL%==0;set ARCH=mips 18 | cl /? 2>&1 | findstr /C:"for PowerPC" >NUL 2>&1 19 | if intcmp %ERRORLEVEL%==0;set ARCH=ppc 20 | cl /? 2>&1 | findstr /C:"Alpha C" >NUL 2>&1 21 | if intcmp %ERRORLEVEL%==0;set ARCH=axp 22 | cl /? 2>&1 | findstr /R /C:"Alpha C.*13.00" >NUL 2>&1 23 | if intcmp %ERRORLEVEL%==0;set ARCH=axp64 24 | cl /? 2>&1 | findstr /C:"for Itanium" >NUL 2>&1 25 | if intcmp %ERRORLEVEL%==0;set ARCH=ia64 26 | 27 | REM 28 | REM For the original NT 3.x architectures, use static fdi.lib since 29 | REM cabinet.dll won't be present. For the newer 2000 and above architectures, 30 | REM there's no point. 31 | REM 32 | 33 | set FDI=0 34 | if strcmp -i %ARCH%==win32;set FDI=1 35 | if strcmp -i %ARCH%==mips;set FDI=1 36 | if strcmp -i %ARCH%==ppc;set FDI=1 37 | if strcmp -i %ARCH%==axp;set FDI=1 38 | 39 | REM 40 | REM Set build ID. For release builds, this needs to be zero. 41 | REM 42 | 43 | set BLDID= 44 | if strcmp -i %1%!=official;set BLDID=`date`;set BLDID=0 45 | if strcmp %BLDID%==0;echo Building OFFICIAL build;echo Building DAILY %ARCH% build 46 | 47 | REM 48 | REM Extract Yori version from ver.mk and generate string containing the 49 | REM version 50 | REM 51 | 52 | set YORI_VER_MAJOR=`findstr YORI_BASE_VER_MAJOR= ..\config\ver.mk|cut -d = -f 1` 53 | set YORI_VER_MINOR=`findstr YORI_BASE_VER_MINOR= ..\config\ver.mk|cut -d = -f 1` 54 | if strcmp %BLDID%==0; set BUILDSTRING=%YORI_VER_MAJOR%.%YORI_VER_MINOR%; set BUILDSTRING=%YORI_VER_MAJOR%.%YORI_VER_MINOR%.%BLDID% 55 | 56 | set OUTDIR=%CD%\out 57 | 58 | echo *** Cleaning tree 59 | pushd .. 60 | ymake clean >NUL 61 | popd 62 | 63 | mkdir "%OUTDIR%" >NUL 2>&1 64 | 65 | echo *** Building %ARCH% debug 66 | ymake -f ..\Makefile -m DEBUG=1 YORI_BUILD_ID=%BLDID% FDI=%FDI% . 67 | if intcmp %ERRORLEVEL%!=0; goto exit 68 | 69 | echo *** Cleaning tree 70 | pushd .. 71 | ymake clean >NUL 72 | popd 73 | 74 | echo *** Building %ARCH% retail 75 | ymake -f ..\Makefile -m YORI_BUILD_ID=%BLDID% FDI=%FDI% . 76 | if intcmp %ERRORLEVEL%!=0; goto exit 77 | 78 | REM 79 | REM Generate pkglist.ini so that tools can find packages provided by this 80 | REM directory 81 | REM 82 | 83 | set BINPKGS=yori-modular yori-core yori-typical yori-extra yori-ypm yori-one 84 | for %%i in (%BINPKGS%) do bld-pkglist %%i %ARCH% ^& bld-pkglist %%i-pdb %ARCH% ^& bld-pkglist %%i-dbg %ARCH% ^& bld-pkglist %%i-dbg-pdb %ARCH% 85 | bld-pkglist yori-completion noarch 86 | bld-pkglist yori-source noarch 87 | 88 | echo *** Cleaning tree 89 | 90 | pushd .. 91 | ymake clean >NUL 92 | popd 93 | 94 | :exit 95 | 96 | endlocal 97 | -------------------------------------------------------------------------------- /pkg/yori-completion.lst: -------------------------------------------------------------------------------- 1 | ..\completion\chdir.ys1|complete\chdir.ys1 2 | ..\completion\git.ys1|complete\git.ys1 3 | ..\completion\nice.ys1|complete\nice.ys1 4 | ..\completion\pushd.ys1|complete\pushd.ys1 5 | ..\completion\scut.ys1|complete\scut.ys1 6 | ..\completion\which.ys1|complete\which.ys1 7 | ..\completion\ymkdir.ys1|complete\ymkdir.ys1 8 | ..\completion\ypm.ys1|complete\ypm.ys1 9 | ..\completion\yrmdir.ys1|complete\yrmdir.ys1 10 | ..\completion\z.ys1|complete\z.ys1 11 | -------------------------------------------------------------------------------- /pkg/yori-core-pdb.lst: -------------------------------------------------------------------------------- 1 | ..\sh\yori.pdb|yori.pdb 2 | ..\assoc\yassoc.pdb|yassoc.pdb 3 | ..\cls\ycls.pdb|ycls.pdb 4 | ..\copy\ycopy.pdb|ycopy.pdb 5 | ..\cut\ycut.pdb|ycut.pdb 6 | ..\date\ydate.pdb|ydate.pdb 7 | ..\dir\ydir.pdb|ydir.pdb 8 | ..\erase\yerase.pdb|yerase.pdb 9 | ..\expr\yexpr.pdb|yexpr.pdb 10 | ..\fscmp\fscmp.pdb|fscmp.pdb 11 | ..\mkdir\ymkdir.pdb|ymkdir.pdb 12 | ..\mklink\ymklink.pdb|ymklink.pdb 13 | ..\move\ymove.pdb|ymove.pdb 14 | ..\path\ypath.pdb|ypath.pdb 15 | ..\pause\ypause.pdb|ypause.pdb 16 | ..\rmdir\yrmdir.pdb|yrmdir.pdb 17 | ..\sleep\sleep.pdb|sleep.pdb 18 | ..\split\ysplit.pdb|ysplit.pdb 19 | ..\start\ystart.pdb|ystart.pdb 20 | ..\title\ytitle.pdb|ytitle.pdb 21 | ..\type\ytype.pdb|ytype.pdb 22 | ..\vol\yvol.pdb|yvol.pdb 23 | -------------------------------------------------------------------------------- /pkg/yori-core.lst: -------------------------------------------------------------------------------- 1 | ..\sh\yori.exe|yori.exe 2 | ..\lib\yori32.ico|yori.ico 3 | ..\assoc\yassoc.exe|yassoc.exe 4 | ..\cls\ycls.exe|ycls.exe 5 | ..\copy\ycopy.exe|ycopy.exe 6 | ..\cut\ycut.exe|ycut.exe 7 | ..\date\ydate.exe|ydate.exe 8 | ..\dir\ydir.exe|ydir.exe 9 | ..\erase\yerase.exe|yerase.exe 10 | ..\expr\yexpr.exe|yexpr.exe 11 | ..\fscmp\fscmp.exe|fscmp.exe 12 | ..\mkdir\ymkdir.exe|ymkdir.exe 13 | ..\mklink\ymklink.exe|ymklink.exe 14 | ..\move\ymove.exe|ymove.exe 15 | ..\path\ypath.exe|ypath.exe 16 | ..\pause\ypause.exe|ypause.exe 17 | ..\rmdir\yrmdir.exe|yrmdir.exe 18 | ..\sleep\sleep.exe|sleep.exe 19 | ..\split\ysplit.exe|ysplit.exe 20 | ..\start\ystart.exe|ystart.exe 21 | ..\title\ytitle.exe|ytitle.exe 22 | ..\type\ytype.exe|ytype.exe 23 | ..\vol\yvol.exe|yvol.exe 24 | -------------------------------------------------------------------------------- /pkg/yori-extra-pdb.lst: -------------------------------------------------------------------------------- 1 | ..\clmp\clmp.pdb|clmp.pdb 2 | ..\echo\yecho.pdb|yecho.pdb 3 | ..\for\yfor.pdb|yfor.pdb 4 | ..\intcmp\yintcmp.pdb|yintcmp.pdb 5 | ..\make\ymake.pdb|ymake.pdb 6 | ..\regedit\yregedit.pdb|yregedit.pdb 7 | ..\shutdn\yshutdn.pdb|yshutdn.pdb 8 | ..\speak\yspeak.pdb|yspeak.pdb 9 | ..\strcmp\ystrcmp.pdb|ystrcmp.pdb 10 | ..\stride\ystride.pdb|ystride.pdb 11 | ..\yui\yui.pdb|yui.pdb 12 | -------------------------------------------------------------------------------- /pkg/yori-extra.lst: -------------------------------------------------------------------------------- 1 | ..\clmp\clmp.exe|clmp.exe 2 | ..\echo\yecho.exe|yecho.exe 3 | ..\for\yfor.exe|yfor.exe 4 | ..\intcmp\yintcmp.exe|yintcmp.exe 5 | ..\make\ymake.exe|ymake.exe 6 | ..\regedit\yregedit.exe|yregedit.exe 7 | ..\shutdn\yshutdn.exe|yshutdn.exe 8 | ..\speak\yspeak.exe|yspeak.exe 9 | ..\strcmp\ystrcmp.exe|ystrcmp.exe 10 | ..\stride\ystride.exe|ystride.exe 11 | ..\yui\yui.exe|yui.exe 12 | ..\sh\YoriInit.d\Extra.ys1|YoriInit.d\Extra.ys1 13 | -------------------------------------------------------------------------------- /pkg/yori-modular-pdb.lst: -------------------------------------------------------------------------------- 1 | ..\sh\yorimin.pdb|yorimin.pdb 2 | ..\builtins\alias.pdb|alias.pdb 3 | ..\builtins\chdir.pdb|chdir.pdb 4 | ..\builtins\color.pdb|color.pdb 5 | ..\builtins\direnv.pdb|direnv.pdb 6 | ..\builtins\exit.pdb|exit.pdb 7 | ..\builtins\false.pdb|false.pdb 8 | ..\builtins\fg.pdb|fg.pdb 9 | ..\for\for.pdb|for.pdb 10 | ..\builtins\history.pdb|history.pdb 11 | ..\builtins\if.pdb|if.pdb 12 | ..\builtins\job.pdb|job.pdb 13 | ..\builtins\pushd.pdb|pushd.pdb 14 | ..\builtins\rem.pdb|rem.pdb 15 | ..\builtins\set.pdb|set.pdb 16 | ..\builtins\setlocal.pdb|setlocal.pdb 17 | ..\builtins\true.pdb|true.pdb 18 | ..\builtins\ver.pdb|ver.pdb 19 | ..\builtins\wait.pdb|wait.pdb 20 | ..\builtins\ys.pdb|ys.pdb 21 | ..\builtins\z.pdb|z.pdb 22 | -------------------------------------------------------------------------------- /pkg/yori-modular.lst: -------------------------------------------------------------------------------- 1 | ..\sh\yorimin.exe|yorimin.exe 2 | ..\builtins\alias.com|modules\alias.com 3 | ..\builtins\chdir.com|modules\chdir.com 4 | ..\builtins\color.com|modules\color.com 5 | ..\builtins\direnv.com|modules\direnv.com 6 | ..\builtins\exit.com|modules\exit.com 7 | ..\builtins\false.com|modules\false.com 8 | ..\builtins\fg.com|modules\fg.com 9 | ..\for\for.com|modules\for.com 10 | ..\builtins\history.com|modules\history.com 11 | ..\builtins\if.com|modules\if.com 12 | ..\builtins\job.com|modules\job.com 13 | ..\builtins\pushd.com|modules\pushd.com 14 | ..\builtins\rem.com|modules\rem.com 15 | ..\builtins\set.com|modules\set.com 16 | ..\builtins\setlocal.com|modules\setlocal.com 17 | ..\builtins\true.com|modules\true.com 18 | ..\builtins\ver.com|modules\ver.com 19 | ..\builtins\wait.com|modules\wait.com 20 | ..\builtins\ys.com|modules\ys.com 21 | ..\builtins\z.com|modules\z.com 22 | -------------------------------------------------------------------------------- /pkg/yori-one-pdb.lst: -------------------------------------------------------------------------------- 1 | ..\sh\oneyori.pdb|oneyori.pdb 2 | -------------------------------------------------------------------------------- /pkg/yori-one.lst: -------------------------------------------------------------------------------- 1 | ..\sh\oneyori.exe|oneyori.exe 2 | -------------------------------------------------------------------------------- /pkg/yori-typical-pdb.lst: -------------------------------------------------------------------------------- 1 | ..\airplan\yairplan.pdb|yairplan.pdb 2 | ..\attrib\yattrib.pdb|yattrib.pdb 3 | ..\base64\ybase64.pdb|ybase64.pdb 4 | ..\battery\ybattery.pdb|ybattery.pdb 5 | ..\cab\cab.pdb|cab.pdb 6 | ..\cal\ycal.pdb|ycal.pdb 7 | ..\charmap\ycharmap.pdb|ycharmap.pdb 8 | ..\clip\yclip.pdb|yclip.pdb 9 | ..\co\yco.pdb|yco.pdb 10 | ..\compact\ycompact.pdb|ycompact.pdb 11 | ..\contool\contool.pdb|contool.pdb 12 | ..\cpuinfo\ycpuinfo.pdb|ycpuinfo.pdb 13 | ..\cshot\cshot.pdb|cshot.pdb 14 | ..\cvtvt\cvtvt.pdb|cvtvt.pdb 15 | ..\df\ydf.pdb|ydf.pdb 16 | ..\dircase\ydircase.pdb|ydircase.pdb 17 | ..\du\ydu.pdb|ydu.pdb 18 | ..\edit\yedit.pdb|yedit.pdb 19 | ..\env\yenv.pdb|yenv.pdb 20 | ..\envdiff\envdiff.pdb|envdiff.pdb 21 | ..\err\yerr.pdb|yerr.pdb 22 | ..\extents\yextents.pdb|yextents.pdb 23 | ..\finfo\finfo.pdb|finfo.pdb 24 | ..\get\yget.pdb|yget.pdb 25 | ..\grpcmp\grpcmp.pdb|grpcmp.pdb 26 | ..\hash\yhash.pdb|yhash.pdb 27 | ..\help\yhelp.pdb|yhelp.pdb 28 | ..\hexdump\hexdump.pdb|hexdump.pdb 29 | ..\hexedit\yhexedit.pdb|yhexedit.pdb 30 | ..\hilite\hilite.pdb|hilite.pdb 31 | ..\iconv\iconv.pdb|iconv.pdb 32 | ..\initool\initool.pdb|initool.pdb 33 | ..\kill\ykill.pdb|ykill.pdb 34 | ..\lines\lines.pdb|lines.pdb 35 | ..\lsof\ylsof.pdb|ylsof.pdb 36 | ..\mem\ymem.pdb|ymem.pdb 37 | ..\more\ymore.pdb|ymore.pdb 38 | ..\mount\ymount.pdb|ymount.pdb 39 | ..\nice\nice.pdb|nice.pdb 40 | ..\objdir\yobjdir.pdb|yobjdir.pdb 41 | ..\osver\osver.pdb|osver.pdb 42 | ..\petool\petool.pdb|petool.pdb 43 | ..\procinfo\procinfo.pdb|procinfo.pdb 44 | ..\ps\yps.pdb|yps.pdb 45 | ..\readline\readline.pdb|readline.pdb 46 | ..\repl\repl.pdb|repl.pdb 47 | ..\scut\scut.pdb|scut.pdb 48 | ..\sdir\sdir.pdb|sdir.pdb 49 | ..\setver\setver.pdb|setver.pdb 50 | ..\slmenu\slmenu.pdb|slmenu.pdb 51 | ..\sponge\ysponge.pdb|ysponge.pdb 52 | ..\sync\sync.pdb|sync.pdb 53 | ..\tail\tail.pdb|tail.pdb 54 | ..\tee\tee.pdb|tee.pdb 55 | ..\timethis\timethis.pdb|timethis.pdb 56 | ..\touch\touch.pdb|touch.pdb 57 | ..\vhdtool\vhdtool.pdb|vhdtool.pdb 58 | ..\which\which.pdb|which.pdb 59 | ..\wininfo\wininfo.pdb|wininfo.pdb 60 | ..\winpos\winpos.pdb|winpos.pdb 61 | ..\ydbg\ydbg.pdb|ydbg.pdb 62 | -------------------------------------------------------------------------------- /pkg/yori-typical.lst: -------------------------------------------------------------------------------- 1 | ..\airplan\yairplan.exe|yairplan.exe 2 | ..\attrib\yattrib.exe|yattrib.exe 3 | ..\base64\ybase64.exe|ybase64.exe 4 | ..\battery\ybattery.exe|ybattery.exe 5 | ..\cab\cab.exe|cab.exe 6 | ..\cal\ycal.exe|ycal.exe 7 | ..\charmap\ycharmap.exe|ycharmap.exe 8 | ..\clip\yclip.exe|yclip.exe 9 | ..\co\yco.exe|yco.exe 10 | ..\compact\ycompact.exe|ycompact.exe 11 | ..\contool\contool.exe|contool.exe 12 | ..\cpuinfo\ycpuinfo.exe|ycpuinfo.exe 13 | ..\cshot\cshot.exe|cshot.exe 14 | ..\cvtvt\cvtvt.exe|cvtvt.exe 15 | ..\df\ydf.exe|ydf.exe 16 | ..\dircase\ydircase.exe|ydircase.exe 17 | ..\du\ydu.exe|ydu.exe 18 | ..\edit\yedit.exe|yedit.exe 19 | ..\env\yenv.exe|yenv.exe 20 | ..\envdiff\envdiff.exe|envdiff.exe 21 | ..\err\yerr.exe|yerr.exe 22 | ..\extents\yextents.exe|yextents.exe 23 | ..\get\yget.exe|yget.exe 24 | ..\finfo\finfo.exe|finfo.exe 25 | ..\grpcmp\grpcmp.exe|grpcmp.exe 26 | ..\hash\yhash.exe|yhash.exe 27 | ..\help\yhelp.exe|yhelp.exe 28 | ..\hexdump\hexdump.exe|hexdump.exe 29 | ..\hexedit\yhexedit.exe|yhexedit.exe 30 | ..\hilite\hilite.exe|hilite.exe 31 | ..\iconv\iconv.exe|iconv.exe 32 | ..\initool\initool.exe|initool.exe 33 | ..\kill\ykill.exe|ykill.exe 34 | ..\lines\lines.exe|lines.exe 35 | ..\lsof\ylsof.exe|ylsof.exe 36 | ..\mem\ymem.exe|ymem.exe 37 | ..\more\ymore.exe|ymore.exe 38 | ..\mount\ymount.exe|ymount.exe 39 | ..\nice\nice.exe|nice.exe 40 | ..\objdir\yobjdir.exe|yobjdir.exe 41 | ..\osver\osver.exe|osver.exe 42 | ..\petool\petool.exe|petool.exe 43 | ..\procinfo\procinfo.exe|procinfo.exe 44 | ..\ps\yps.exe|yps.exe 45 | ..\readline\readline.exe|readline.exe 46 | ..\repl\repl.exe|repl.exe 47 | ..\scut\scut.exe|scut.exe 48 | ..\sdir\sdir.exe|sdir.exe 49 | ..\setver\setver.exe|setver.exe 50 | ..\slmenu\slmenu.exe|slmenu.exe 51 | ..\sponge\ysponge.exe|ysponge.exe 52 | ..\sync\sync.exe|sync.exe 53 | ..\tail\tail.exe|tail.exe 54 | ..\tee\tee.exe|tee.exe 55 | ..\timethis\timethis.exe|timethis.exe 56 | ..\touch\touch.exe|touch.exe 57 | ..\vhdtool\vhdtool.exe|vhdtool.exe 58 | ..\which\which.exe|which.exe 59 | ..\wininfo\wininfo.exe|wininfo.exe 60 | ..\winpos\winpos.exe|winpos.exe 61 | ..\ydbg\ydbg.exe|ydbg.exe 62 | ..\schemes\cga.ini|schemes\cga.ini 63 | ..\schemes\nt.ini|schemes\nt.ini 64 | ..\sh\YoriInit.d\Typical.ys1|YoriInit.d\Typical.ys1 65 | -------------------------------------------------------------------------------- /pkg/yori-ypm-pdb.lst: -------------------------------------------------------------------------------- 1 | ..\ypm\ypm.pdb|ypm.pdb 2 | -------------------------------------------------------------------------------- /pkg/yori-ypm.lst: -------------------------------------------------------------------------------- 1 | ..\ypm\ypm.exe|ypm.exe 2 | -------------------------------------------------------------------------------- /pkglib/Makefile: -------------------------------------------------------------------------------- 1 | 2 | compile: yoripkg.lib 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | OBJS=\ 7 | api.obj \ 8 | backup.obj \ 9 | config.obj \ 10 | create.obj \ 11 | install.obj \ 12 | reg.obj \ 13 | remote.obj \ 14 | util.obj \ 15 | 16 | yoripkg.lib: $(OBJS) 17 | @echo $@ 18 | @$(LIB32) $(LIBFLAGS) $(OBJS) /out:yoripkg.lib 19 | 20 | -------------------------------------------------------------------------------- /procinfo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=procinfo.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:procinfo.pdb 7 | 8 | BIN_OBJS=\ 9 | procinfo.obj \ 10 | 11 | MOD_OBJS=\ 12 | mproc.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | procinfo.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mproc.obj: procinfo.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ procinfo.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /ps/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yps.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yps.pdb 7 | 8 | BIN_OBJS=\ 9 | ps.obj \ 10 | 11 | MOD_OBJS=\ 12 | mps.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yps.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mps.obj: ps.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ ps.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /readline/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=readline.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:readline.pdb 7 | 8 | BIN_OBJS=\ 9 | readline.obj \ 10 | 11 | MOD_OBJS=\ 12 | mreadln.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | readline.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mreadln.obj: readline.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ readline.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /regedit/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yregedit.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yregedit.pdb 7 | 8 | BIN_OBJS=\ 9 | binedit.obj \ 10 | numedit.obj \ 11 | regedit.obj \ 12 | stredit.obj \ 13 | 14 | 15 | MOD_OBJS=\ 16 | mregedit.obj \ 17 | binedit.obj \ 18 | numedit.obj \ 19 | stredit.obj \ 20 | 21 | compile: $(BIN_OBJS) builtins.lib 22 | 23 | yregedit.exe: $(BIN_OBJS) $(YORILIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) 24 | @echo $@ 25 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 26 | 27 | mregedit.obj: regedit.c 28 | @echo $@ 29 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ regedit.c 30 | 31 | builtins.lib: $(MOD_OBJS) 32 | @echo $@ 33 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 34 | -------------------------------------------------------------------------------- /repl/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=repl.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:repl.pdb 7 | 8 | BIN_OBJS=\ 9 | repl.obj \ 10 | 11 | MOD_OBJS=\ 12 | mrepl.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | repl.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mrepl.obj: repl.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ repl.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /rmdir/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yrmdir.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yrmdir.pdb 7 | 8 | BIN_OBJS=\ 9 | rmdir.obj \ 10 | 11 | MOD_OBJS=\ 12 | mrmdir.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yrmdir.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mrmdir.obj: rmdir.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ rmdir.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /schemes/cga.ini: -------------------------------------------------------------------------------- 1 | [Table] 2 | DARK_BLACK=0, 0, 0 3 | DARK_BLUE=0, 0, 170 4 | DARK_GREEN=0, 170, 0 5 | DARK_CYAN=0, 170, 170 6 | DARK_RED=170, 0, 0 7 | DARK_MAGENTA=170, 0, 170 8 | DARK_YELLOW=170, 85, 0 9 | DARK_WHITE=170, 170, 170 10 | BRIGHT_BLACK=85, 85, 85 11 | BRIGHT_BLUE=85, 85, 255 12 | BRIGHT_GREEN=85, 255, 85 13 | BRIGHT_CYAN=85, 255, 255 14 | BRIGHT_RED=255, 85, 85 15 | BRIGHT_MAGENTA=255, 85, 255 16 | BRIGHT_YELLOW=255, 255, 85 17 | BRIGHT_WHITE=255, 255, 255 18 | [Popup] 19 | Foreground=BRIGHT_YELLOW 20 | Background=DARK_BLUE 21 | [Screen] 22 | Foreground=DARK_WHITE 23 | Background=DARK_BLACK 24 | -------------------------------------------------------------------------------- /schemes/nt.ini: -------------------------------------------------------------------------------- 1 | [Table] 2 | DARK_BLACK=0, 0, 0 3 | DARK_BLUE=0, 0, 128 4 | DARK_GREEN=0, 128, 0 5 | DARK_CYAN=0, 128, 128 6 | DARK_RED=128, 0, 0 7 | DARK_MAGENTA=128, 0, 128 8 | DARK_YELLOW=128, 128, 0 9 | DARK_WHITE=192, 192, 192 10 | BRIGHT_BLACK=128, 128, 128 11 | BRIGHT_BLUE=0, 0, 255 12 | BRIGHT_GREEN=0, 255, 0 13 | BRIGHT_CYAN=0, 255, 255 14 | BRIGHT_RED=255, 0, 0 15 | BRIGHT_MAGENTA=255, 0, 255 16 | BRIGHT_YELLOW=255, 255, 0 17 | BRIGHT_WHITE=255, 255, 255 18 | [Popup] 19 | Foreground=DARK_MAGENTA 20 | Background=BRIGHT_WHITE 21 | [Screen] 22 | Foreground=DARK_WHITE 23 | Background=DARK_BLACK 24 | -------------------------------------------------------------------------------- /scut/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=scut.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:scut.pdb 7 | 8 | BIN_OBJS=\ 9 | scut.obj \ 10 | 11 | MOD_OBJS=\ 12 | mscut.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | scut.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mscut.obj: scut.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ scut.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /sdir/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=sdir.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:sdir.pdb 7 | 8 | BIN_OBJS=\ 9 | callback.obj \ 10 | color.obj \ 11 | display.obj \ 12 | init.obj \ 13 | sdir.obj \ 14 | usage.obj \ 15 | utils.obj 16 | 17 | MOD_OBJS=\ 18 | callback.obj \ 19 | color.obj \ 20 | display.obj \ 21 | init.obj \ 22 | msdir.obj \ 23 | usage.obj \ 24 | utils.obj 25 | 26 | 27 | compile: $(BIN_OBJS) builtins.lib 28 | 29 | sdir.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 30 | @echo $@ 31 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 32 | 33 | msdir.obj: sdir.c 34 | @echo $@ 35 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ sdir.c 36 | 37 | builtins.lib: $(MOD_OBJS) 38 | @echo $@ 39 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 40 | 41 | 42 | -------------------------------------------------------------------------------- /sdir/sdir.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | sdir 7 | Sdir 8 | 1.27 9 | malxau 10 | malxau 11 | Colorful, sorted multi-column directory enumeration 12 | Colorful, sorted multi-column directory enumeration. Can include a range of information, or be compact and concise. 13 | http://www.malsmith.net/sdir/ 14 | sdir 15 | Copyright (c) 2014-2017 Malcolm J. Smith 16 | http://www.malsmith.net/license/mit/ 17 | http://www.malsmith.net/sdir/ 18 | http://www.malsmith.net/sdir/ 19 | false 20 | Support current window background, reduce load time, add NT 3.1 support 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /setver/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=setver.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:setver.pdb 7 | 8 | BIN_OBJS=\ 9 | setver.obj \ 10 | 11 | MOD_OBJS=\ 12 | msetver.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | setver.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | msetver.obj: setver.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ setver.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /sh/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yori.exe yorimin.exe oneyori.exe 3 | INITFILES=YoriInit.d\* 4 | 5 | !INCLUDE "..\config\common.mk" 6 | YORI_BIN_VER_MAJOR=$(YORI_VER_MAJOR) 7 | YORI_BIN_VER_MINOR=$(YORI_VER_MINOR) 8 | 9 | MIN_PDB=/Pdb:yorimin.pdb 10 | STD_PDB=/Pdb:yori.pdb 11 | FULL_PDB=/Pdb:oneyori.pdb 12 | 13 | OBJS=\ 14 | alias.obj \ 15 | api.obj \ 16 | builtin.obj \ 17 | complete.obj \ 18 | env.obj \ 19 | exec.obj \ 20 | history.obj \ 21 | input.obj \ 22 | job.obj \ 23 | main.obj \ 24 | parse.obj \ 25 | prompt.obj \ 26 | restart.obj \ 27 | wait.obj \ 28 | window.obj \ 29 | yori.obj \ 30 | 31 | BUILTINTABLE_OBJS=\ 32 | yoristd.obj \ 33 | yorinone.obj \ 34 | yorifull.obj \ 35 | 36 | STD_BUILTINLIBS=\ 37 | ..\builtins\builtins.lib \ 38 | $(YORIWIN) \ 39 | ..\echo\builtins.lib \ 40 | ..\for\builtins.lib \ 41 | ..\intcmp\builtins.lib \ 42 | ..\nice\builtins.lib \ 43 | ..\strcmp\builtins.lib \ 44 | 45 | FULL_BUILTINLIBS=\ 46 | $(STD_BUILTINLIBS) \ 47 | yorifull.lib \ 48 | 49 | compile: $(OBJS) $(BUILTINTABLE_OBJS) 50 | 51 | yorimin.exe: $(OBJS) yorinone.obj yorimin.def $(YORILIBS) $(YORISH) 52 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(OBJS) yorinone.obj $(YORILIBS) $(EXTERNLIBS) $(YORISH) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) -def:$(@B).def $(MIN_PDB) -out:$@ 53 | 54 | yori.exe: $(OBJS) yoristd.obj yori.def $(YORILIBS) $(YORISH) $(STD_BUILTINLIBS) 55 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(OBJS) yoristd.obj $(YORILIBS) $(EXTERNLIBS) $(YORISH) $(STD_BUILTINLIBS) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) -def:$(@B).def $(STD_PDB) -out:$@ 56 | 57 | !IFDEF _YMAKE_VER 58 | ONEYORI_DEPLIST=@yorifull.lst 59 | !ENDIF 60 | 61 | oneyori.exe: $(OBJS) yorifull.obj oneyori.def yorifull.lst $(YORILIBS) $(YORISH) $(STD_BUILTINLIBS) $(ONEYORI_DEPLIST) 62 | @$(LIB32) $(LIBFLAGS) @yorifull.lst /out:yorifull.lib 63 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(OBJS) yorifull.obj $(YORILIBS) $(EXTERNLIBS) $(YORISH) $(FULL_BUILTINLIBS) $(FDILIB) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) -def:$(@B).def $(FULL_PDB) -out:$@ 64 | 65 | -------------------------------------------------------------------------------- /sh/YoriInit.d/Extra.ys1: -------------------------------------------------------------------------------- 1 | builtin alias -s shutdn=yshutdn $*$ 2 | builtin alias -s stride=ystride $*$ 3 | -------------------------------------------------------------------------------- /sh/YoriInit.d/Typical.ys1: -------------------------------------------------------------------------------- 1 | builtin alias -s airplan=yairplan $*$ 2 | builtin alias -s attrib=yattrib $*$ 3 | builtin alias -s base64=ybase64 $*$ 4 | builtin alias -s battery=ybattery $*$ 5 | builtin alias -s cal=ycal $*$ 6 | builtin alias -s clip=yclip $*$ 7 | builtin alias -s co=yco $*$ 8 | builtin alias -s compact=ycompact $*$ 9 | builtin alias -s cpuinfo=ycpuinfo $*$ 10 | builtin alias -s df=ydf $*$ 11 | builtin alias -s dircase=ydircase $*$ 12 | builtin alias -s du=ydu $*$ 13 | builtin alias -s dos2unix=iconv -u $*$ 14 | builtin alias -s edit=yedit $*$ 15 | builtin alias -s env=yenv $*$ 16 | builtin alias -s err=yerr $*$ 17 | builtin alias -s extents=yextents $*$ 18 | builtin alias -s hash=yhash $*$ 19 | builtin alias -s help=yhelp $*$ 20 | builtin alias -s hexedit=yhexedit $*$ 21 | builtin alias -s htmlclip=yclip -h $*$ 22 | builtin alias -s kill=ykill $*$ 23 | builtin alias -s lsof=ylsof $*$ 24 | builtin alias -s md5sum=yhash -a md5 $*$ 25 | builtin alias -s mem=ymem $*$ 26 | builtin alias -s more=ymore $*$ 27 | builtin alias -s mount=ymount $*$ 28 | builtin alias -s objdir=yobjdir $*$ 29 | builtin alias -s paste=yclip -p $*$ 30 | builtin alias -s path=ypath $*$ 31 | builtin alias -s ps=yps $*$ 32 | builtin alias -s pwd=ypath . $*$ 33 | builtin alias -s sha1sum=yhash -a sha1 $*$ 34 | builtin alias -s sha256sum=yhash -a sha256 $*$ 35 | builtin alias -s sha384sum=yhash -a sha384 $*$ 36 | builtin alias -s sha512sum=yhash -a sha512 $*$ 37 | builtin alias -s sponge=ysponge $*$ 38 | builtin alias -s umount=ymount -u $*$ 39 | builtin alias -s unix2dos=iconv -w $*$ 40 | -------------------------------------------------------------------------------- /sh/oneyori.def: -------------------------------------------------------------------------------- 1 | NAME ONEYORI 2 | 3 | EXPORTS 4 | YoriApiAddAlias 5 | YoriApiAddHistoryString 6 | YoriApiAddSystemAlias 7 | YoriApiBuiltinRegister 8 | YoriApiBuiltinUnregister 9 | YoriApiClearHistoryStrings 10 | YoriApiDeleteAlias 11 | YoriApiDecrementPromptRecursionDepth 12 | YoriApiExecuteBuiltin 13 | YoriApiExecuteExpression 14 | YoriApiExitProcess 15 | YoriApiExpandAlias 16 | YoriApiFreeYoriString 17 | YoriApiGetAliasStrings 18 | YoriApiGetEnvironmentVariable 19 | YoriApiGetErrorLevel 20 | YoriApiGetEscapedArguments 21 | YoriApiGetEscapedArgumentsEx 22 | YoriApiGetHistoryStrings 23 | YoriApiGetJobInformation 24 | YoriApiGetJobOutput 25 | YoriApiGetNextJobId 26 | YoriApiGetSystemAliasStrings 27 | YoriApiGetYoriVersion 28 | YoriApiIncrementPromptRecursionDepth 29 | YoriApiIsProcessExiting 30 | YoriApiPipeJobOutput 31 | YoriApiSetCurrentDirectory 32 | YoriApiSetDefaultColor 33 | YoriApiSetEnvironmentVariable 34 | YoriApiSetJobPriority 35 | YoriApiSetNextCommand 36 | YoriApiSetUnloadRoutine 37 | YoriApiTerminateJob 38 | YoriApiWaitForJob 39 | -------------------------------------------------------------------------------- /sh/yori.def: -------------------------------------------------------------------------------- 1 | NAME YORI 2 | 3 | EXPORTS 4 | YoriApiAddAlias 5 | YoriApiAddHistoryString 6 | YoriApiAddSystemAlias 7 | YoriApiBuiltinRegister 8 | YoriApiBuiltinUnregister 9 | YoriApiClearHistoryStrings 10 | YoriApiDecrementPromptRecursionDepth 11 | YoriApiDeleteAlias 12 | YoriApiExecuteBuiltin 13 | YoriApiExecuteExpression 14 | YoriApiExitProcess 15 | YoriApiExpandAlias 16 | YoriApiFreeYoriString 17 | YoriApiGetAliasStrings 18 | YoriApiGetEnvironmentVariable 19 | YoriApiGetErrorLevel 20 | YoriApiGetEscapedArguments 21 | YoriApiGetEscapedArgumentsEx 22 | YoriApiGetHistoryStrings 23 | YoriApiGetJobInformation 24 | YoriApiGetJobOutput 25 | YoriApiGetNextJobId 26 | YoriApiGetSystemAliasStrings 27 | YoriApiGetYoriVersion 28 | YoriApiIncrementPromptRecursionDepth 29 | YoriApiIsProcessExiting 30 | YoriApiPipeJobOutput 31 | YoriApiSetCurrentDirectory 32 | YoriApiSetDefaultColor 33 | YoriApiSetEnvironmentVariable 34 | YoriApiSetJobPriority 35 | YoriApiSetNextCommand 36 | YoriApiSetUnloadRoutine 37 | YoriApiTerminateJob 38 | YoriApiWaitForJob 39 | -------------------------------------------------------------------------------- /sh/yori.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sh/yori.h 3 | * 4 | * Yori shell master header file 5 | * 6 | * Copyright (c) 2017 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include 28 | #include 29 | #include 30 | #include "yoristru.h" 31 | #include "yoriproc.h" 32 | #include "yorires.h" 33 | 34 | // vim:sw=4:ts=4:et: 35 | -------------------------------------------------------------------------------- /sh/yori.man: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Yori 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | true/pm 15 | PerMonitorV2,PerMonitor 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /sh/yori.rc: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sh/yori.rc 3 | * 4 | * Yori shell resource script 5 | * 6 | * Copyright (c) 2017-2025 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | 28 | #include "yorires.h" 29 | 30 | YORI_ICON_APPLICATION ICON DISCARDABLE "..\\lib\\yori.ico" 31 | 32 | #define YORI_CUSTOM_MANIFEST 1 33 | #include "..\lib\yoriver.inc" 34 | 35 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "yori.man" 36 | 37 | // vim:sw=4:ts=4:et: 38 | -------------------------------------------------------------------------------- /sh/yorifull.lst: -------------------------------------------------------------------------------- 1 | ..\airplan\builtins.lib 2 | ..\assoc\builtins.lib 3 | ..\attrib\builtins.lib 4 | ..\base64\builtins.lib 5 | ..\battery\builtins.lib 6 | ..\cab\builtins.lib 7 | ..\cal\builtins.lib 8 | ..\charmap\builtins.lib 9 | ..\clip\builtins.lib 10 | ..\cls\builtins.lib 11 | ..\co\builtins.lib 12 | ..\compact\builtins.lib 13 | ..\contool\builtins.lib 14 | ..\copy\builtins.lib 15 | ..\cpuinfo\builtins.lib 16 | ..\cshot\builtins.lib 17 | ..\cut\builtins.lib 18 | ..\cvtvt\builtins.lib 19 | ..\date\builtins.lib 20 | ..\df\builtins.lib 21 | ..\dir\builtins.lib 22 | ..\dircase\builtins.lib 23 | ..\du\builtins.lib 24 | ..\echo\builtins.lib 25 | ..\edit\builtins.lib 26 | ..\env\builtins.lib 27 | ..\envdiff\builtins.lib 28 | ..\erase\builtins.lib 29 | ..\err\builtins.lib 30 | ..\expr\builtins.lib 31 | ..\extents\builtins.lib 32 | ..\finfo\builtins.lib 33 | ..\fscmp\builtins.lib 34 | ..\get\builtins.lib 35 | ..\grpcmp\builtins.lib 36 | ..\hash\builtins.lib 37 | ..\help\builtins.lib 38 | ..\hexdump\builtins.lib 39 | ..\hexedit\builtins.lib 40 | ..\hilite\builtins.lib 41 | ..\iconv\builtins.lib 42 | ..\initool\builtins.lib 43 | ..\intcmp\builtins.lib 44 | ..\kill\builtins.lib 45 | ..\libdlg\yoridlg.lib 46 | ..\lines\builtins.lib 47 | ..\lsof\builtins.lib 48 | ..\mem\builtins.lib 49 | ..\mkdir\builtins.lib 50 | ..\mklink\builtins.lib 51 | ..\more\builtins.lib 52 | ..\mount\builtins.lib 53 | ..\move\builtins.lib 54 | ..\nice\builtins.lib 55 | ..\objdir\builtins.lib 56 | ..\osver\builtins.lib 57 | ..\path\builtins.lib 58 | ..\pause\builtins.lib 59 | ..\petool\builtins.lib 60 | ..\pkglib\yoripkg.lib 61 | ..\procinfo\builtins.lib 62 | ..\ps\builtins.lib 63 | ..\readline\builtins.lib 64 | ..\regedit\builtins.lib 65 | ..\repl\builtins.lib 66 | ..\rmdir\builtins.lib 67 | ..\scut\builtins.lib 68 | ..\sdir\builtins.lib 69 | ..\setver\builtins.lib 70 | ..\shutdn\builtins.lib 71 | ..\sleep\builtins.lib 72 | ..\slmenu\builtins.lib 73 | ..\speak\builtins.lib 74 | ..\split\builtins.lib 75 | ..\sponge\builtins.lib 76 | ..\start\builtins.lib 77 | ..\strcmp\builtins.lib 78 | ..\stride\builtins.lib 79 | ..\sync\builtins.lib 80 | ..\tail\builtins.lib 81 | ..\tee\builtins.lib 82 | ..\timethis\builtins.lib 83 | ..\title\builtins.lib 84 | ..\touch\builtins.lib 85 | ..\type\builtins.lib 86 | ..\vhdtool\builtins.lib 87 | ..\vol\builtins.lib 88 | ..\which\builtins.lib 89 | ..\wininfo\builtins.lib 90 | ..\winpos\builtins.lib 91 | ..\ydbg\builtins.lib 92 | ..\ypm\builtins.lib 93 | -------------------------------------------------------------------------------- /sh/yorimin.def: -------------------------------------------------------------------------------- 1 | NAME YORIMIN 2 | 3 | EXPORTS 4 | YoriApiAddAlias 5 | YoriApiAddHistoryString 6 | YoriApiAddSystemAlias 7 | YoriApiBuiltinRegister 8 | YoriApiBuiltinUnregister 9 | YoriApiClearHistoryStrings 10 | YoriApiDecrementPromptRecursionDepth 11 | YoriApiDeleteAlias 12 | YoriApiExecuteBuiltin 13 | YoriApiExecuteExpression 14 | YoriApiExitProcess 15 | YoriApiExpandAlias 16 | YoriApiFreeYoriString 17 | YoriApiGetAliasStrings 18 | YoriApiGetEnvironmentVariable 19 | YoriApiGetErrorLevel 20 | YoriApiGetEscapedArguments 21 | YoriApiGetEscapedArgumentsEx 22 | YoriApiGetHistoryStrings 23 | YoriApiGetJobInformation 24 | YoriApiGetJobOutput 25 | YoriApiGetNextJobId 26 | YoriApiGetSystemAliasStrings 27 | YoriApiGetYoriVersion 28 | YoriApiIncrementPromptRecursionDepth 29 | YoriApiIsProcessExiting 30 | YoriApiPipeJobOutput 31 | YoriApiSetCurrentDirectory 32 | YoriApiSetDefaultColor 33 | YoriApiSetEnvironmentVariable 34 | YoriApiSetJobPriority 35 | YoriApiSetNextCommand 36 | YoriApiSetUnloadRoutine 37 | YoriApiTerminateJob 38 | YoriApiWaitForJob 39 | -------------------------------------------------------------------------------- /sh/yorinone.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sh/yorinone.c 3 | * 4 | * Yori table of supported builtins for the modular build of Yori (ie., none.) 5 | * 6 | * Copyright (c) 2017-2019 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | #include "yori.h" 28 | 29 | /** 30 | The list of builtin commands supported by this build of Yori. 31 | */ 32 | CONST YORI_SH_BUILTIN_NAME_MAPPING 33 | YoriShBuiltins[] = { 34 | {NULL, NULL} 35 | }; 36 | 37 | /** 38 | A table of initial alias to value mappings to populate. 39 | */ 40 | CONST YORI_SH_DEFAULT_ALIAS_ENTRY 41 | YoriShDefaultAliasEntries[] = { 42 | {_T("F7"), _T("history -u")}, 43 | {_T("assoc"), _T("yassoc $*$")}, 44 | {_T("cd"), _T("chdir $*$")}, 45 | {_T("cls"), _T("ycls $*$")}, 46 | {_T("copy"), _T("ycopy $*$")}, 47 | {_T("cut"), _T("ycut $*$")}, 48 | {_T("date"), _T("ydate $*$")}, 49 | {_T("del"), _T("yerase $*$")}, 50 | {_T("dir"), _T("ydir $*$")}, 51 | {_T("echo"), _T("yecho $*$")}, 52 | {_T("erase"), _T("yerase $*$")}, 53 | {_T("expr"), _T("yexpr $*$")}, 54 | {_T("ftype"), _T("yassoc -t $*$")}, 55 | {_T("head"), _T("ytype -h $*$")}, 56 | {_T("md"), _T("ymkdir $*$")}, 57 | {_T("mkdir"), _T("ymkdir $*$")}, 58 | {_T("mklink"), _T("ymklink $*$")}, 59 | {_T("move"), _T("ymove $*$")}, 60 | {_T("pause"), _T("ypause $*$")}, 61 | {_T("rd"), _T("yrmdir $*$")}, 62 | {_T("ren"), _T("ymove $*$")}, 63 | {_T("rename"), _T("ymove $*$")}, 64 | {_T("rmdir"), _T("yrmdir $*$")}, 65 | {_T("start"), _T("ystart $*$")}, 66 | {_T("time"), _T("ydate -t $*$")}, 67 | {_T("title"), _T("ytitle $*$")}, 68 | {_T("type"), _T("ytype $*$")}, 69 | {_T("vol"), _T("yvol $*$")}, 70 | {_T("?"), _T("yexpr $*$")} 71 | }; 72 | 73 | /** 74 | Register default aliases in a standard build. This includes core aliases 75 | only, and is done to ensure a consistent baseline when scripts start 76 | executing to extend these capabilities. 77 | 78 | @return TRUE to indicate success. 79 | */ 80 | BOOL 81 | YoriShRegisterDefaultAliases(VOID) 82 | { 83 | DWORD Count; 84 | for (Count = 0; Count < sizeof(YoriShDefaultAliasEntries)/sizeof(YoriShDefaultAliasEntries[0]); Count++) { 85 | YoriShAddAliasLiteral(YoriShDefaultAliasEntries[Count].Alias, YoriShDefaultAliasEntries[Count].Value, TRUE); 86 | } 87 | return TRUE; 88 | } 89 | 90 | // vim:sw=4:ts=4:et: 91 | 92 | -------------------------------------------------------------------------------- /sh/yorires.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file sh/yorires.h 3 | * 4 | * Yori shell resource definitions shared between the resource script and code 5 | * 6 | * Copyright (c) 2025 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | /** 28 | The resource identifier of the application icon. 29 | */ 30 | #define YORI_ICON_APPLICATION 1 31 | 32 | // vim:sw=4:ts=4:et: 33 | -------------------------------------------------------------------------------- /shutdn/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yshutdn.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yshutdn.pdb 7 | 8 | BIN_OBJS=\ 9 | shutdn.obj \ 10 | 11 | MOD_OBJS=\ 12 | mshut.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yshutdn.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mshut.obj: shutdn.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ shutdn.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /sleep/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=sleep.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:sleep.pdb 7 | 8 | BIN_OBJS=\ 9 | sleep.obj \ 10 | 11 | MOD_OBJS=\ 12 | msleep.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | sleep.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | msleep.obj: sleep.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ sleep.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /slmenu/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=slmenu.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:slmenu.pdb 7 | 8 | BIN_OBJS=\ 9 | slmenu.obj \ 10 | 11 | MOD_OBJS=\ 12 | mslmenu.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | slmenu.exe: $(BIN_OBJS) $(YORILIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIWIN) $(YORIDLG) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mslmenu.obj: slmenu.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ slmenu.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /speak/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yspeak.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yspeak.pdb 7 | 8 | BIN_OBJS=\ 9 | speak.obj \ 10 | 11 | MOD_OBJS=\ 12 | mspeak.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yspeak.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mspeak.obj: speak.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ speak.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /split/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ysplit.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ysplit.pdb 7 | 8 | BIN_OBJS=\ 9 | split.obj \ 10 | 11 | MOD_OBJS=\ 12 | msplit.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ysplit.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | msplit.obj: split.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ split.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /sponge/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ysponge.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ysponge.pdb 7 | 8 | BIN_OBJS=\ 9 | sponge.obj \ 10 | 11 | MOD_OBJS=\ 12 | msponge.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ysponge.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | msponge.obj: sponge.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ sponge.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /start/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ystart.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ystart.pdb 7 | 8 | BIN_OBJS=\ 9 | start.obj \ 10 | 11 | MOD_OBJS=\ 12 | mstart.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ystart.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mstart.obj: start.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ start.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /strcmp/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ystrcmp.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ystrcmp.pdb 7 | 8 | BIN_OBJS=\ 9 | strcmp.obj \ 10 | 11 | MOD_OBJS=\ 12 | mstrcmp.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ystrcmp.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mstrcmp.obj: strcmp.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ strcmp.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /stride/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ystride.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ystride.pdb 7 | 8 | BIN_OBJS=\ 9 | stride.obj \ 10 | 11 | MOD_OBJS=\ 12 | mstride.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ystride.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mstride.obj: stride.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ stride.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /sync/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=sync.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:sync.pdb 7 | 8 | BIN_OBJS=\ 9 | sync.obj \ 10 | 11 | MOD_OBJS=\ 12 | msync.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | sync.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | msync.obj: sync.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ sync.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /tail/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=tail.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:tail.pdb 7 | 8 | BIN_OBJS=\ 9 | tail.obj \ 10 | 11 | MOD_OBJS=\ 12 | mtail.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | tail.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mtail.obj: tail.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ tail.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /tee/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=tee.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:tee.pdb 7 | 8 | BIN_OBJS=\ 9 | tee.obj \ 10 | 11 | MOD_OBJS=\ 12 | mtee.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | tee.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mtee.obj: tee.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ tee.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /test/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yoritest.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yoritest.pdb 7 | 8 | BIN_OBJS=\ 9 | test.obj \ 10 | argcargv.obj \ 11 | fileenum.obj \ 12 | parse.obj \ 13 | 14 | compile: $(BIN_OBJS) 15 | 16 | yoritest.exe: $(BIN_OBJS) $(YORILIBS) $(YORISH) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORISH) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | -------------------------------------------------------------------------------- /timethis/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=timethis.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:timethis.pdb 7 | 8 | BIN_OBJS=\ 9 | timethis.obj \ 10 | 11 | MOD_OBJS=\ 12 | mtime.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | timethis.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mtime.obj: timethis.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ timethis.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /title/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ytitle.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ytitle.pdb 7 | 8 | BIN_OBJS=\ 9 | title.obj \ 10 | 11 | MOD_OBJS=\ 12 | mtitle.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ytitle.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mtitle.obj: title.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ title.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /touch/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=touch.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:touch.pdb 7 | 8 | BIN_OBJS=\ 9 | touch.obj \ 10 | 11 | MOD_OBJS=\ 12 | mtouch.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | touch.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mtouch.obj: touch.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ touch.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /type/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ytype.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ytype.pdb 7 | 8 | BIN_OBJS=\ 9 | type.obj \ 10 | 11 | MOD_OBJS=\ 12 | mtype.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ytype.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mtype.obj: type.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ type.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /vhdtool/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=vhdtool.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:vhdtool.pdb 7 | 8 | BIN_OBJS=\ 9 | vhdtool.obj \ 10 | 11 | MOD_OBJS=\ 12 | mvhdtool.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | vhdtool.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mvhdtool.obj: vhdtool.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ vhdtool.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | -------------------------------------------------------------------------------- /vol/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yvol.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:yvol.pdb 7 | 8 | BIN_OBJS=\ 9 | vol.obj \ 10 | 11 | MOD_OBJS=\ 12 | mvol.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | yvol.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mvol.obj: vol.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ vol.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /which/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=which.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:which.pdb 7 | 8 | BIN_OBJS=\ 9 | which.obj \ 10 | 11 | MOD_OBJS=\ 12 | mwhich.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | which.exe: $(BIN_OBJS) $(YORILIBS) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mwhich.obj: which.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ which.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /wifi/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ywifi.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ywifi.pdb 7 | 8 | BIN_OBJS=\ 9 | wifi.obj \ 10 | 11 | MOD_OBJS=\ 12 | mwifi.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ywifi.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mwifi.obj: wifi.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ wifi.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /wininfo/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=wininfo.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | YORI_BIN_VER_MAJOR=$(YORI_VER_MAJOR) 6 | YORI_BIN_VER_MINOR=$(YORI_VER_MINOR) 7 | 8 | LINKPDB=/Pdb:wininfo.pdb 9 | 10 | BIN_OBJS=\ 11 | wininfo.obj \ 12 | resource.obj \ 13 | 14 | MOD_OBJS=\ 15 | mwininfo.obj \ 16 | 17 | compile: $(BIN_OBJS) builtins.lib 18 | 19 | wininfo.exe: $(BIN_OBJS) $(YORILIBS) 20 | @echo $@ 21 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 22 | 23 | mwininfo.obj: wininfo.c 24 | @echo $@ 25 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ wininfo.c 26 | 27 | builtins.lib: $(MOD_OBJS) 28 | @echo $@ 29 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 30 | -------------------------------------------------------------------------------- /wininfo/resource.rc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #define YORI_CUSTOM_MANIFEST 1 5 | #include "../lib/yoriver.inc" 6 | 7 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "wininfo.man" 8 | 9 | // vim:sw=4:ts=4:et: 10 | -------------------------------------------------------------------------------- /wininfo/wininfo.man: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Wininfo 5 | 6 | 7 | true/pm 8 | PerMonitorV2,PerMonitor 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /winpos/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=winpos.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:winpos.pdb 7 | 8 | BIN_OBJS=\ 9 | winpos.obj \ 10 | 11 | MOD_OBJS=\ 12 | mwinpos.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | winpos.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mwinpos.obj: winpos.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ winpos.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | -------------------------------------------------------------------------------- /wintest/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=wintest.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:wintest.pdb 7 | 8 | BIN_OBJS=\ 9 | wintest.obj \ 10 | 11 | compile: $(BIN_OBJS) 12 | 13 | wintest.exe: $(BIN_OBJS) $(YORILIBS) $(YORIWIN) $(YORIVER) 14 | @echo $@ 15 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIWIN) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 16 | -------------------------------------------------------------------------------- /ydbg/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ydbg.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | LINKPDB=/Pdb:ydbg.pdb 7 | 8 | BIN_OBJS=\ 9 | dbg.obj \ 10 | 11 | MOD_OBJS=\ 12 | mdbg.obj \ 13 | 14 | compile: $(BIN_OBJS) builtins.lib 15 | 16 | ydbg.exe: $(BIN_OBJS) $(YORILIBS) $(YORIVER) 17 | @echo $@ 18 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 19 | 20 | mdbg.obj: dbg.c 21 | @echo $@ 22 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ dbg.c 23 | 24 | builtins.lib: $(MOD_OBJS) 25 | @echo $@ 26 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 27 | 28 | 29 | -------------------------------------------------------------------------------- /ypm/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ypm.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | 6 | CFLAGS=$(CFLAGS) -I..\pkglib 7 | 8 | LINKPDB=/Pdb:ypm.pdb 9 | 10 | BIN_OBJS=\ 11 | download.obj \ 12 | list.obj \ 13 | mirror.obj \ 14 | rsource.obj \ 15 | uninst.obj \ 16 | upgrade.obj \ 17 | ypm.obj \ 18 | ypmconf.obj \ 19 | ypmcreat.obj \ 20 | ypminst.obj \ 21 | 22 | MOD_OBJS=\ 23 | download.obj \ 24 | list.obj \ 25 | mirror.obj \ 26 | rsource.obj \ 27 | uninst.obj \ 28 | upgrade.obj \ 29 | mypm.obj \ 30 | ypmconf.obj \ 31 | ypmcreat.obj \ 32 | ypminst.obj \ 33 | 34 | compile: $(BIN_OBJS) builtins.lib 35 | 36 | ypm.exe: $(BIN_OBJS) $(YORILIBS) $(YORIPKG) $(YORIVER) 37 | @echo $@ 38 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIPKG) $(FDILIB) $(YORIVER) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 39 | 40 | mypm.obj: ypm.c 41 | @echo $@ 42 | @$(CC) -c -DYORI_BUILTIN=1 $(CFLAGS) -Fo$@ ypm.c 43 | 44 | builtins.lib: $(MOD_OBJS) 45 | @echo $@ 46 | @$(LIB32) $(LIBFLAGS) $(MOD_OBJS) -out:$@ 47 | 48 | -------------------------------------------------------------------------------- /ypm/ypm.h: -------------------------------------------------------------------------------- 1 | 2 | YORI_CMD_BUILTIN YpmConfig; 3 | YORI_CMD_BUILTIN YpmCreateBinaryPackage; 4 | YORI_CMD_BUILTIN YpmCreateSourcePackage; 5 | YORI_CMD_BUILTIN YpmDelete; 6 | YORI_CMD_BUILTIN YpmDownload; 7 | YORI_CMD_BUILTIN YpmDownloadDaily; 8 | YORI_CMD_BUILTIN YpmDownloadStable; 9 | YORI_CMD_BUILTIN YpmInstall; 10 | YORI_CMD_BUILTIN YpmInstallRemote; 11 | YORI_CMD_BUILTIN YpmInstallSource; 12 | YORI_CMD_BUILTIN YpmInstallSymbols; 13 | YORI_CMD_BUILTIN YpmList; 14 | YORI_CMD_BUILTIN YpmListVerbose; 15 | YORI_CMD_BUILTIN YpmMirrorInstall; 16 | YORI_CMD_BUILTIN YpmMirrorDelete; 17 | YORI_CMD_BUILTIN YpmMirrorList; 18 | YORI_CMD_BUILTIN YpmRemoteList; 19 | YORI_CMD_BUILTIN YpmRemoteSourceAppend; 20 | YORI_CMD_BUILTIN YpmRemoteSourceInsert; 21 | YORI_CMD_BUILTIN YpmRemoteSourceDelete; 22 | YORI_CMD_BUILTIN YpmRemoteSourceList; 23 | YORI_CMD_BUILTIN YpmUninstallAll; 24 | YORI_CMD_BUILTIN YpmUpgrade; 25 | YORI_CMD_BUILTIN YpmUpgradePreferDaily; 26 | YORI_CMD_BUILTIN YpmUpgradePreferStable; 27 | -------------------------------------------------------------------------------- /ysetup/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=ysetup.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | YORI_BIN_VER_MAJOR=$(YORI_VER_MAJOR) 6 | YORI_BIN_VER_MINOR=$(YORI_VER_MINOR) 7 | YSETUP_TUI=1 8 | 9 | CFLAGS=$(CFLAGS) -I..\pkglib -DYSETUP_TUI=$(YSETUP_TUI) 10 | 11 | LINKPDB=/Pdb:ysetup.pdb 12 | 13 | OBJS=\ 14 | resource.obj \ 15 | gui.obj \ 16 | helper.obj \ 17 | tui.obj \ 18 | ysetup.obj \ 19 | 20 | compile: $(OBJS) 21 | 22 | ysetup.exe: $(OBJS) $(YORILIBS) $(YORIPKG) $(YORIWIN) $(YORIDLG) 23 | @echo $@ 24 | @$(LINK) $(LDFLAGS) -entry:$(YENTRY) $(OBJS) $(YORILIBS) $(EXTERNLIBS) $(YORIPKG) $(FDILIB) $(YORIWIN) $(YORIDLG) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 25 | 26 | -------------------------------------------------------------------------------- /ysetup/ysetup.man: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YSetup 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | true 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /yui/Makefile: -------------------------------------------------------------------------------- 1 | 2 | BINARIES=yui.exe 3 | 4 | !INCLUDE "..\config\common.mk" 5 | YORI_BIN_VER_MAJOR=$(YORI_VER_MAJOR) 6 | YORI_BIN_VER_MINOR=$(YORI_VER_MINOR) 7 | 8 | LINKPDB=/Pdb:yui.pdb 9 | 10 | LDFLAGS_NT4UP=$(LDFLAGS_GUI:3.10=4.0) 11 | EXTERNLIBS=$(EXTERNLIBS) user32.lib gdi32.lib comdlg32.lib 12 | 13 | BIN_OBJS=\ 14 | cal.obj \ 15 | clock.obj \ 16 | dragdrop.obj \ 17 | draw.obj \ 18 | icons.obj \ 19 | menu.obj \ 20 | multimon.obj \ 21 | resource.obj \ 22 | taskbar.obj \ 23 | wifi.obj \ 24 | yui.obj \ 25 | 26 | compile: $(BIN_OBJS) 27 | 28 | yui.exe: $(BIN_OBJS) $(YORILIBS) 29 | @echo $@ 30 | @$(LINK) $(LDFLAGS_NT4UP) -entry:$(YENTRY) $(BIN_OBJS) $(YORILIBS) $(EXTERNLIBS) -version:$(YORI_VER_MAJOR).$(YORI_VER_MINOR) $(LINKPDB) -out:$@ 31 | 32 | -------------------------------------------------------------------------------- /yui/checked.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/checked.ico -------------------------------------------------------------------------------- /yui/debug.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/debug.ico -------------------------------------------------------------------------------- /yui/exit.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/exit.ico -------------------------------------------------------------------------------- /yui/logoff.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/logoff.ico -------------------------------------------------------------------------------- /yui/progiso.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/progiso.ico -------------------------------------------------------------------------------- /yui/programs.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/programs.ico -------------------------------------------------------------------------------- /yui/resource.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file yui/resource.h 3 | * 4 | * Yori shell user interface resource definitions 5 | * 6 | * Copyright (c) 2019 Malcolm J. Smith 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | /** 28 | The identifier for the start button icon. 29 | */ 30 | #define STARTICON 2 31 | 32 | /** 33 | The identifier for the programs menu icon. 34 | */ 35 | #define PROGRAMSICON 3 36 | 37 | /** 38 | The identifier for the system menu icon. 39 | */ 40 | #define SYSTEMICON 4 41 | 42 | /** 43 | The identifier for the debug menu icon. 44 | */ 45 | #define DEBUGICON 5 46 | 47 | /** 48 | The identifier for the run menu icon. 49 | */ 50 | #define RUNICON 6 51 | 52 | /** 53 | The identifier for the logoff menu icon. 54 | */ 55 | #define LOGOFFICON 7 56 | 57 | /** 58 | The identifier for the exit menu icon. 59 | */ 60 | #define EXITICON 8 61 | 62 | /** 63 | The identifier for the shut down menu icon. 64 | */ 65 | #define SHUTDOWNICON 9 66 | 67 | /** 68 | The identifier for the checked icon. 69 | */ 70 | #define CHECKEDICON 10 71 | 72 | /** 73 | The identifier for the wifi strength 1 icon. 74 | */ 75 | #define WIFI1ICON 11 76 | 77 | /** 78 | The identifier for the wifi strength 2 icon. 79 | */ 80 | #define WIFI2ICON 12 81 | 82 | /** 83 | The identifier for the wifi strength 3 icon. 84 | */ 85 | #define WIFI3ICON 13 86 | 87 | /** 88 | The identifier for the wifi strength 4 icon. 89 | */ 90 | #define WIFI4ICON 14 91 | 92 | /** 93 | The identifier for the wifi strength 5 icon. 94 | */ 95 | #define WIFI5ICON 15 96 | 97 | /** 98 | The identifier for the wifi connected icon. 99 | */ 100 | #define WIFICONNICON 16 101 | 102 | /** 103 | The identifier for the dialog box. 104 | */ 105 | #define RUNDIALOG 100 106 | 107 | /** 108 | The edit control in which the user can enter the command to run. 109 | */ 110 | #define IDC_RUNCMD 201 111 | 112 | /** 113 | The OK or Install button. 114 | */ 115 | #define IDC_OK 202 116 | 117 | /** 118 | The cancel button. 119 | */ 120 | #define IDC_CANCEL 203 121 | 122 | /** 123 | The browse button. 124 | */ 125 | #define IDC_BROWSE 204 126 | 127 | -------------------------------------------------------------------------------- /yui/resource.rc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "resource.h" 4 | 5 | 1 ICON DISCARDABLE "..\\lib\\yori.ico" 6 | STARTICON ICON DISCARDABLE "start.ico" 7 | PROGRAMSICON ICON DISCARDABLE "progiso.ico" 8 | SYSTEMICON ICON DISCARDABLE "system.ico" 9 | DEBUGICON ICON DISCARDABLE "debug.ico" 10 | RUNICON ICON DISCARDABLE "run.ico" 11 | LOGOFFICON ICON DISCARDABLE "logoff.ico" 12 | EXITICON ICON DISCARDABLE "exit.ico" 13 | SHUTDOWNICON ICON DISCARDABLE "shutdown.ico" 14 | CHECKEDICON ICON DISCARDABLE "checked.ico" 15 | 16 | WIFI1ICON ICON DISCARDABLE "wifi1.ico" 17 | WIFI2ICON ICON DISCARDABLE "wifi2.ico" 18 | WIFI3ICON ICON DISCARDABLE "wifi3.ico" 19 | WIFI4ICON ICON DISCARDABLE "wifi4.ico" 20 | WIFI5ICON ICON DISCARDABLE "wifi5.ico" 21 | WIFICONNICON ICON DISCARDABLE "wificonn.ico" 22 | 23 | #define YORI_CUSTOM_MANIFEST 1 24 | #include "../lib/yoriver.inc" 25 | 26 | CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "yui.man" 27 | 28 | RUNDIALOG DIALOGEX 0, 0, 400, 60 29 | STYLE WS_POPUP | WS_CAPTION | DS_MODALFRAME 30 | CAPTION "Run" 31 | FONT 8, "MS Sans Serif" 32 | { 33 | LTEXT "Open:", -1, 8, 11, 50, 10 34 | EDITTEXT IDC_RUNCMD, 60, 10, 330, 12 35 | PUSHBUTTON "&Browse...", IDC_BROWSE, 340, 40, 50, 14 36 | 37 | DEFPUSHBUTTON "Run", IDC_OK, 8, 40, 50, 14 38 | PUSHBUTTON "Cancel", IDC_CANCEL, 68, 40, 50, 14 39 | } 40 | 41 | // vim:sw=4:ts=4:et: 42 | -------------------------------------------------------------------------------- /yui/run.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/run.ico -------------------------------------------------------------------------------- /yui/shutdown.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/shutdown.ico -------------------------------------------------------------------------------- /yui/start.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/start.ico -------------------------------------------------------------------------------- /yui/system.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/system.ico -------------------------------------------------------------------------------- /yui/wifi1.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/wifi1.ico -------------------------------------------------------------------------------- /yui/wifi2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/wifi2.ico -------------------------------------------------------------------------------- /yui/wifi3.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/wifi3.ico -------------------------------------------------------------------------------- /yui/wifi4.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/wifi4.ico -------------------------------------------------------------------------------- /yui/wifi5.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/wifi5.ico -------------------------------------------------------------------------------- /yui/wificonn.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/malxau/yori/431dc07dd2b9814acd34d8125f9bdb53a10ceaaf/yui/wificonn.ico -------------------------------------------------------------------------------- /yui/yui.man: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Yui 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | true/pm 15 | PerMonitorV2,PerMonitor 16 | 17 | 18 | 19 | --------------------------------------------------------------------------------