File: simple.c

package info (click to toggle)
fudgit 2.42-6
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 2,468 kB
  • ctags: 2,375
  • sloc: ansic: 27,729; makefile: 793; yacc: 724; lex: 102; asm: 29; fortran: 15
file content (19 lines) | stat: -rw-r--r-- 334 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "dld.h"

main (argc, argv)
int argc;
char *argv[];
{
	void (*func) ();

	(void) dld_init (argv[0]);

	printf ("Hello world from %s\n", argv[0]);
	func = (void (*) ()) dld_get_func ("printf");
	if (func) {
	  (*func) ("Hello world from %s\n", argv[0]);
	  return 0;
	}
	dld_perror("dld_get_func (\"printf\")\n");
	return 1;
}