cirilisp/cirilisp.c

35 lines
709 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include "util.h"
int main(int argc, char **argv)
{
// Омогућава библиотекама коришћеним у интерпретеру да протумаче
// српску ћирилицу
// struct lconv *loc;
setlocale(LC_ALL, "sr_RS.utf8");
// loc = localeconv();
// Бојлерплејт обавештења о окружењу
puts("Прост РЕПЛ:");
puts("Притисните ctrl+c да бисте изашли\n");
while (1)
{
char *input = readline("k> ");
if (input == NULL)
{
putchar('\n');
exit(0);
}
printf("НАПИСАЛИ СТЕ: %s\n", input);
free(input);
}
return 0;
}