* [security]: segfault in win_line() * update helptags * filetype: just files are not recognized * Update base-syntax, match ternary and falsy operators * Vim9: out-of-bound access when echoing an enum * Vim9: imported type cannot be used as func return type * runtime(kconfig): updated ftplugin and syntax script * runtime(doc): rename last t_BG reference to t_RB * Vim9: comments are outdated * tests: test_channel.py fails with IPv6 * runtime(vim): Update base-syntax, fix is/isnot operator matching * Vim9: confusing error when using abstract method via super * make install fails when using shadowdir * Vim9: memory leak with blob2str() * runtime(tex): add texEmphStyle to texMatchGroup in syntax script * runtime(netrw): upstream snapshot of v175 * Vim9: compiling abstract method fails without return * runtime(c): add new constexpr keyword to syntax file (C23) * tests: shaderslang was removed from test_filetype erroneously * link error when FEAT_SPELL not defined * Coverity complains about insecure data handling * runtime(sh): update syntax script * runtime(c): Add missing syntax test files * filetype: setting bash filetype is backwards incompatible * runtime(c): Update syntax and ftplugin files * the installer can be improved * too many strlen() calls in screen.c * no sanitize check when running linematch * filetype: swc configuration files are not recognized OBS-URL: https://build.opensuse.org/package/show/editors/vim?expand=0&rev=873
31 lines
823 B
C
31 lines
823 B
C
/*
|
|
* This is a wrapper around the VIM editor which may be used to invoke
|
|
* the editor in a way that is guaranteed to be suitable for editing
|
|
* temporary files used with programs such as crontab(1) and edquota(8).
|
|
*
|
|
* Written by Solar Designer <solar@owl.openwall.com> and placed in the
|
|
* public domain.
|
|
*
|
|
* $Id: vitmp.c,v 1.2 2002/04/24 23:11:34 solar Exp $
|
|
*/
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
#include <string.h>
|
|
|
|
int main(int argc, const char * const *argv)
|
|
{
|
|
char *newargv[argc + 4]; /* GNU C */
|
|
|
|
newargv[0] = "/bin/vi";
|
|
/* No swap files, use memory only */
|
|
newargv[1] = "-n";
|
|
/* Don't make a backup before overwriting a file */
|
|
newargv[2] = "-c"; newargv[3] = "set nowritebackup";
|
|
memcpy(&newargv[4], &argv[1], argc * sizeof(char *));
|
|
|
|
execv(newargv[0], newargv);
|
|
perror("execv");
|
|
|
|
return 1;
|
|
}
|