/svarcom/trunk/cmd/shift.c |
---|
0,0 → 1,52 |
/* This file is part of the SvarCOM project and is published under the terms |
* of the MIT license. |
* |
* Copyright (C) 2021 Mateusz Viste |
* |
* Permission is hereby granted, free of charge, to any person obtaining a |
* copy of this software and associated documentation files (the "Software"), |
* to deal in the Software without restriction, including without limitation |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
* and/or sell copies of the Software, and to permit persons to whom the |
* Software is furnished to do so, subject to the following conditions: |
* |
* The above copyright notice and this permission notice shall be included in |
* all copies or substantial portions of the Software. |
* |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
* DEALINGS IN THE SOFTWARE. |
*/ |
/* |
* shift |
*/ |
static int cmd_shift(struct cmd_funcparam *p) { |
char far *batargv = p->rmod->batargv; |
char far *nextarg; |
if (cmd_ishlp(p)) { |
nls_outputnl(16, 0); |
nls_outputnl(16, 1); |
outputnl(""); |
outputnl("SHIFT"); |
return(-1); |
} |
/* abort if batargv is empty */ |
if (*batargv == 0) return(-1); |
/* find the next argument in batargv */ |
for (nextarg = batargv + 1; *nextarg != 0; nextarg++); |
nextarg++; /* move ptr past the zero terminator */ |
/* move down batargv so 2nd argument is at the head now */ |
_fmemmove(batargv, nextarg, sizeof(p->rmod->batargv) - (nextarg - batargv)); |
return(-1); |
} |
/svarcom/trunk/cmd.c |
---|
81,6 → 81,7 |
#include "cmd/rename.c" |
#include "cmd/rmdir.c" |
#include "cmd/set.c" |
#include "cmd/shift.c" |
#include "cmd/time.c" |
#include "cmd/type.c" |
#include "cmd/ver.c" |
121,6 → 122,7 |
{"RENAME", cmd_rename}, |
{"RMDIR", cmd_rmdir}, |
{"SET", cmd_set}, |
{"SHIFT", cmd_shift}, |
{"TIME", cmd_time}, |
{"TYPE", cmd_type}, |
{"VER", cmd_ver}, |
/svarcom/trunk/svarcom.txt |
---|
29,7 → 29,7 |
placed in a directory pointed at by %NLSPATH% for SvarCOM to be able to output |
messages in non-english languages. SvarCOM's language is controlled by the |
%LANG% environment variable. NOTE: at this time translations aren't available |
yet, with the proof-of-concept exception of the 'PAUSE' command. |
yet, with the proof-of-concept exceptions of the 'PAUSE' and 'SHIFT' commands. |
Latest version available here: http://svardos.osdn.io/svarcom |
/svarcom/trunk/tlumacz/nls/svarcom.en |
---|
5,5 → 5,10 |
# Translator: Mateusz Viste |
# |
# PAUSE |
15.0:Suspends the execution of a batch script |
15.1:Press any key to continue... |
# SHIFT |
16.0:Changes the position of arguments in a batch file: |
16.1:Argument %1 becomes %0, argument %2 becomes %1, etc. |
/svarcom/trunk/tlumacz/nls/svarcom.fr |
---|
5,5 → 5,10 |
# Translator: Mateusz Viste |
# |
# PAUSE |
15.0:Suspends l'excution d'un programme batch |
15.1:Appuyez sur une touche pour continuer... |
# SHIFT |
16.0:Change la position des arguments dans un fichier batch: |
16.1:L'argument %1 devient %0, l'argument %2 devient %1, etc. |
/svarcom/trunk/tlumacz/nls/svarcom.pl |
---|
5,5 → 5,10 |
# Translator: Mateusz Viste |
# |
# PAUSE |
15.0:Wstrzymuje przetwarzanie pliku wsadowego |
15.1:Nacinij dowolny klawisz aby kontynuowa... |
# SHIFT |
16.0:Zmienia pozycj argument¢w w pliku wsadowym: |
16.1:Argument %1 staje si %0, argument %2 staje si %1, itd. |
/svarcom/trunk/todo.txt |
---|
7,11 → 7,12 |
=== HIGH PRIORITY ============================================================ |
redirections to be handled (applied) by RMOD |
pipes redirections |
DIR /A |
ctrl+break handler |
int 24h handler (abort, retry, fail, ignore) |
advanced batch support: CALL, :labels, FOR, GOTO, IF EXIST/ERRORLEVEL, SHIFT |
advanced batch constructs: CALL, :labels, FOR, GOTO, IF EXIST/ERRORLEVEL |
=== MEDIUM PRIORITY ========================================================== |
28,8 → 29,10 |
=== NICE TO HAVE ============================================================= |
DIR: %DIRCMD% support |
DIR %DIRCMD% lookup |
COPY /V |
COPY /Y |
COPY ASCII mode support |
"notify pending command" support (INT 2F,AX=AE00) |
INT 2F,AX=5500 support |
stdout redirection should not create the output file if command fails |
38,6 → 41,7 |
dynamic resizing of environment space |
CTTY |
LOADHIGH/LH |
tlumacz: detect incomplete translation files and fill missing strings with EN |
==================================================================== [EOF] === |