Files
Sprinter-SDCC/tests/argv/argv.c
T
snark13 737c974400 Add mdview markdown viewer, reorganize tests/examples and libc layout
- Split tests/ (libc feature tests) and examples/ (real apps); shared
  app.mk in repo root, was examples/example.mk
- libc/io/* split into libc/{conio,env,errno,file,mouse,string,sys,
  time,video}/ — clearer module boundaries
- New examples/mdview/: markdown viewer (Phases 1-5 + light nested
  lists). Headers (H1-H4), HR, ulist/olist/quote with nesting via
  leading spaces, fenced code blocks, inline emphasis (bold/italic/
  underscore/code), wrap/unwrap mode with soft wrap (F2), horizontal
  pan (← →) with '>' truncation indicator
- libc additions: scroll() in conio (ESTEX SCROLL), strlwr/strupr,
  gets() test
- Makefile updates across tests/ for the new shared app.mk path

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 22:23:36 +03:00

23 lines
555 B
C

#include <stdio.h>
/*
* Prints every command-line argument, then exits.
*
* Try in MAME / ESTEX shell:
* ARGV_TES -> argc=1, argv[0] = ""
* ARGV_TES one two three -> argc=4, argv[1..3] = "one","two","three"
* ARGV_TES spaced args -> multiple spaces are squashed
*/
int main(int argc, char **argv)
{
printf("argc = %d\n", argc);
for (int i = 0; i < argc; i++) {
printf("argv[%d] = \"%s\"\n", i, argv[i]);
}
puts("");
puts("Press any key to exit...");
(void)getchar();
return 0;
}