Пример #1
0
int main() {
	int loc;
	void print_graphics(void);
	for(loc=0; loc<X_SIZE; ++loc) {
		SET_BIT(loc,loc);
	}
	print_graphics();
	return 0;
}
Пример #2
0
int main() {
	int loc;
	void print_graphics(void);
	
	printf("First time:\n");
	for (loc=0; loc<X_SIZE; ++loc) {
		SET_BIT(loc,loc);
	}
	print_graphics();

	printf("Second time:\n");
	for (loc=0; loc<X_SIZE; ++loc) {
		CLEAR_BIT(loc,loc);
	}
	print_graphics();

	printf("The size of the graphics is %d x %d.\n", X_SIZE, Y_SIZE);
	printf("The storage we allocate to the graphics is %d x %d.\n", sizeof(graphics)/Y_SIZE, Y_SIZE);
	return 0;
}
Пример #3
0
int main() {
	int loc;        /* current location we are setting */

	void print_graphics(void);      /* print the data */

	for (loc = 0; loc < X_SIZE; ++loc) {
		SET_BIT(loc, loc);
	}

	print_graphics();

	return(0);
}