Files
scully/src/libscully.c

27 lines
445 B
C
Raw Permalink Normal View History

2013-06-02 09:47:27 +02:00
/* The scully programming language.
*
* Copyright (c) Peter Dahlberg, Markus Hauschild and Florian Sattler, 2013.
* Licensed under the GNU GPL v2.
*/
2013-06-01 18:10:13 +02:00
#include <time.h>
#include <stdlib.h>
2013-06-01 18:18:48 +02:00
#include <stdbool.h>
2013-06-01 22:36:15 +02:00
#include <stdio.h>
2013-06-02 01:51:19 +02:00
#include <time.h>
int put_char(int c) {
printf("%c", c);
return 0;
}
2013-06-01 18:10:13 +02:00
bool random_if(int p) {
2013-06-01 22:36:15 +02:00
//srand(time(NULL));
2013-06-01 18:10:13 +02:00
int r = rand() % 100;
return (r < p);
}
2013-06-02 01:51:19 +02:00
int time_seed() {
srand(time(NULL));
return 0;
}