zapret2-fork/nfq2/winnative/args.h
loop-uh 24ac52ccae winws2 native: windows control events, persistent log handle, unlimited config file, host tests
- unix signals are replaced by named events Global\winws2_sig_<pid>_<hup|usr1|usr2|term>,
  'winws2 --wn-signal=<name>[:<pid>]' sends them. term is a graceful stop
- append mode files stay open, fclose only flushes (upstream reopens the log for every line)
- $file and unexpanded @file are read completely instead of the first 16K
- argument parsing moved to args.c and covered by tests/run.sh (includes cases recorded
  from the cygwin build). sync-upstream.sh runs the tests before pushing
- luajit is built with -Os

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:22:13 +03:00

13 lines
466 B
C

#pragma once
#include <stdbool.h>
struct wn_arg_vec
{
char **v;
int c, cap;
};
bool wn_av_add(struct wn_arg_vec *av, char *word);
// file content followed by a space and tail. NULL if the file cannot be read. result must be freed
char *wn_cl_read_file(const char *name, const char *tail);
// split command line the way cygwin does. cmd is modified. every word is added as a separate allocated string
bool wn_cl_parse(char *cmd, struct wn_arg_vec *av, int level);