⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tcl2c++.c

📁 rtpmon-1.0a7.tar.gz for UNIX like
💻 C
字号:
/*	Netvideo version 3.1	Written by Ron Frederick <frederick@parc.xerox.com>	Simple hack to translate a Tcl/Tk init file into a C string constant*//* * Copyright (c) Xerox Corporation 1992. All rights reserved. *   * License is granted to copy, to use, and to make and to use derivative * works for research and evaluation purposes, provided that Xerox is * acknowledged in all documentation pertaining to any such copy or derivative * work. Xerox grants no other licenses expressed or implied. The Xerox trade * name should not be used in any advertising without its written permission. *   * XEROX CORPORATION MAKES NO REPRESENTATIONS CONCERNING EITHER THE * MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE * FOR ANY PARTICULAR PURPOSE.  The software is provided "as is" without * express or implied warranty of any kind. *   * These notices must be retained in any copies of any part of this software. */#include <stdio.h>main(argc, argv)    int argc;    char **argv;{	int n = 0;	int c;	FILE* f;		if (argc != 3) {		fprintf(stderr, "Usage: tcl2c++ pass file\n");		exit(1);	}	f = fopen(argv[2], "r");	if (f == 0) {		perror(argv[2]);		exit(1);	}	printf("static const char code[] = {\n");	while ((c = getc(f)) != EOF)		printf("%u,%c", c, ((++n & 0xf) == 0) ? '\n' : ' ');	printf("0 };\n");	printf("#include \"Tcl.h\"\nstatic EmbeddedTcl etcl(%d, code);\n",	       atoi(argv[1]));	exit(0);	/*NOTREACHED*/}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -