File: hello.c

package info (click to toggle)
radare2 0.9-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,648 kB
  • sloc: ansic: 161,405; sh: 2,852; makefile: 1,587; awk: 373; asm: 312; python: 278; ruby: 196; perl: 102; xml: 11
file content (32 lines) | stat: -rw-r--r-- 499 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <stdio.h>
#include "r_cons.h"

int main() {
	char buf[1024];

	r_cons_new ();

	r_cons_strcat ("Hello World\n");

	r_cons_strcat_justify (
		"this is pure\n"
		"fun and nasty bubble\n"
		"so i can enjoy tha time\n"
		"dudu du dudu dah\n"
		, 10, 0);

	r_cons_flush();

	while (!r_cons_eof()) {
		r_cons_fgets (buf, sizeof (buf), 0, NULL);
		r_cons_printf ("%s\n", buf);
		r_cons_flush ();
		if (strstr (buf, "exit"))
			break;
	}

	r_cons_strcat ("Eof!\n");
	r_cons_flush ();

	return 0;
}