一个很不错的程序切片工具,希望大家来讨论以下,对测试人员很有帮助

源代码在线查看: control.c

软件大小: 163 K
上传用户: ashdfg
关键词: 程序切片 测试
下载地址: 免注册下载 普通下载 VIP

相关代码

				# include 				# include "control.h"								static char *sccs_h_id = CONTROL_SCCS_ID;				static char *sccs_id = "@(#)control.c	1.1  8/10/95";								control (code,ctrl_entry,ctrl_exit,stmt_entry,stmt_exit,else_entry,					else_exit)					int  code,ctrl_entry,ctrl_exit,stmt_entry,stmt_exit,else_entry,						else_exit;				{									if (!ctrl_file) return;					if (code == IF_THEN_ELSE_CTRL) fprintf (ctrl_file,						"%d(%d,%d,%d,%d,%d,%d)\n",						code,ctrl_entry,ctrl_exit,stmt_entry,stmt_exit,						else_entry,else_exit);					else fprintf (ctrl_file,"%d(%d,%d,%d,%d)\n",						code,ctrl_entry,ctrl_exit,stmt_entry,stmt_exit);				}								open_control (base)					char	*base;				{					char	name[2000];									if (!base) return;					if (strlen(base) == 0) return;					strcpy (name,base);					name[strlen(base) - 1] = 'O';					/*  Not yet implemented 					ctrl_file = fopen(name,"w");					*/					ctrl_file = NULL;								}							

相关资源