Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/drawfunny/p9psrc/compose/main.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include "compose.h"

void
usage(void)
{
	fprint(2, "compose [-t] img ...\n");
	exits("usage");
}

void
main(int argc, char **argv)
{
	int i, chan;
	C *c;

	chan = 0;
	ARGBEGIN{
	case 'c':
		chan = strtochan(EARGF(usage()));
		break;
	case 't':
		flag['t'] = 1;
		break;
	default:
		usage();
	}ARGEND
	if(argc == 0)
		usage();
	c = malloc(argc*sizeof *c);
	if(c == nil)
		sysfatal("malloc: %r");
	for(i = 0; i < argc; i++)
		intimg(c + i, argv[i], -1);
	composer(c, argc, chan);
	exits("");
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.