Example #1
0
int main(int argc, char **argv)
{
	char buf[] = "abcad";
	char buf2[] = "abcad";
	remove_1(buf, strlen(buf));
	printf("test 1: buf %s\r\n", buf);
	remove_2(buf2, strlen(buf2));
	printf("test 2: buf %s\r\n", buf2);
}
Example #2
0
void remove_entry(CLIENT *c)
{
	char name_array[NAME_SIZE];
	name name_arg;
	int *result;
	
	read_string("Enter the name: ", name_array, NAME_SIZE);
	name_arg = name_array;
	
	result = remove_1(&name_arg, c);
	if (!result)
		printf("Error: bad RPC call for remove_1.\n");
	else if (*result)
		printf("Error: `%s' not removed, error code = %d.\n",
		       name_arg, *result);
	else
		printf("`%s' has been removed.\n", name_arg);
}