starting the UI stuff

This commit is contained in:
Tonton Th 2019-10-27 11:08:27 +01:00
parent 759a6450a6
commit 7ac2bc53e9
3 changed files with 53 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,6 +1,9 @@
# mon machin a moi
audio/t
audio/*.wav
ui/t
# ---> C
# Prerequisites

10
ui/Makefile Normal file
View File

@ -0,0 +1,10 @@
# NcLooper : user interface components
CC = gcc
CCOPT = -Wall -g -DDEBUG_LEVEL=1
t: t.c ${OBJS} Makefile
$(CC) ${CCOPT} $< ${OBJS} ${LIBS} -o $@

40
ui/t.c Normal file
View File

@ -0,0 +1,40 @@
/*
* NcLooper test des fonctions ncurses
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
/* --------------------------------------------------------------------- */
int verbosity;
/* --------------------------------------------------------------------- */
void help(int k)
{
puts("plop...");
exit(0);
}
/* --------------------------------------------------------------------- */
int main(int argc, char *argv[])
{
int foo;
int opt;
while ((opt = getopt(argc, argv, "hv")) != -1) {
switch(opt) {
case 'h': help(0); break;
case 'v': verbosity++; break;
}
}
#if DEBUG_LEVEL
fprintf(stderr, "argc = %d, optind = %d\n", argc, optind);
#endif
return 0;
}
/* --------------------------------------------------------------------- */