From 29f932b82f10112d4b3e2e65557b35c03bf84608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xos=C3=A9?= Date: Sun, 18 Oct 2026 19:03:31 +0200 Subject: [PATCH] Add the CLion practice projects Co-Authored-By: Claude Opus 5.5 --- .gitignore | 3 ++ Login/CMakeLists.txt | 6 +++ Login/library.c | 87 ++++++++++++++++++++++++++++++++++++++++ Login/library.h | 14 +++++++ uOMG/CMakeLists.txt | 6 +++ uOMG/main.c | 6 +++ untitled/CMakeLists.txt | 6 +++ untitled/library.c | 7 ++++ untitled/library.h | 6 +++ untitled1/CMakeLists.txt | 6 +++ untitled1/main.c | 6 +++ untitled2/CMakeLists.txt | 6 +++ untitled2/library.c | 7 ++++ untitled2/library.h | 6 +++ untitled3/CMakeLists.txt | 6 +++ untitled3/library.c | 7 ++++ untitled3/library.h | 6 +++ untitled4/CMakeLists.txt | 6 +++ untitled4/library.c | 7 ++++ untitled4/library.h | 6 +++ 20 files changed, 210 insertions(+) create mode 100644 .gitignore create mode 100644 Login/CMakeLists.txt create mode 100644 Login/library.c create mode 100644 Login/library.h create mode 100644 uOMG/CMakeLists.txt create mode 100644 uOMG/main.c create mode 100644 untitled/CMakeLists.txt create mode 100644 untitled/library.c create mode 100644 untitled/library.h create mode 100644 untitled1/CMakeLists.txt create mode 100644 untitled1/main.c create mode 100644 untitled2/CMakeLists.txt create mode 100644 untitled2/library.c create mode 100644 untitled2/library.h create mode 100644 untitled3/CMakeLists.txt create mode 100644 untitled3/library.c create mode 100644 untitled3/library.h create mode 100644 untitled4/CMakeLists.txt create mode 100644 untitled4/library.c create mode 100644 untitled4/library.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6850d92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +.idea/ +cmake-build-*/ diff --git a/Login/CMakeLists.txt b/Login/CMakeLists.txt new file mode 100644 index 0000000..f7987b0 --- /dev/null +++ b/Login/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.14) +project(Login C) + +set(CMAKE_C_STANDARD 99) + +add_library(Login library.c library.h) \ No newline at end of file diff --git a/Login/library.c b/Login/library.c new file mode 100644 index 0000000..f7b730e --- /dev/null +++ b/Login/library.c @@ -0,0 +1,87 @@ +#include "library.h" + +#include +#include + + +typedef void{ + short numusu; + short *id; + char *usuarios; + char *contrasinais; + short adm; +}data; + +typedef data *base; + + +void setUUID(short lonx, base *datos){ + short i; + (*datos)->id=(short*)malloc(lonx+1*sizeof(short)); + for(i=0;i<=lonx;i++){ + *((*datos)->id+i)=i;} + (*datos)->numusu=lonx;} + + +void setusr(char *vector, base *datos){ + short i,j; + printf("%hd\n",(*datos)->numusu); + printf("\n"); + (*datos)->usuarios=(char*)malloc(10*((*datos)->numusu)*sizeof(char)); + for(i=0;i<((*datos)->numusu);i++){ + for(j=0;j<10;j++){ + *((*datos)->usuarios+i*10+j)=*(vector+i*10+j); + printf("%c",*((*datos)->usuarios+i*10+j));}} +} + +void setpas(char *vecto, base *datos){ + short i,j; + printf("%hd\n",(*datos)->numusu); + printf("\n"); + (*datos)->contrasinais=(char*)malloc(8*((*datos)->numusu)*sizeof(char)); + for(i=0;i<((*datos)->numusu);i++){ + for(j=0;j<=8;j++){ + *((*datos)->contrasinais+i*8+j)=*(vecto+i*8+j); + printf("%c",*((*datos)->contrasinais+i*8+j));}} +} +//void liberar(matrizP *m1) { +//if ((*m1)->datos != NULL) +//free((*m1)->datos); +// if ((*m1) != NULL) +// free((*m1)); +//} + +//void crear(matrizP *m1, short tam1) { +//long i; +//*m1 = (matrizP) malloc(sizeof (STMATRIZ)); +//(*m1)->datos = (TELEMENTO*) malloc(tam1 * tam1 * sizeof (TELEMENTO)); +//(*m1)->tam = tam1; +//for (i = 1; i <= tam1 * tam1; i++) +//*((*m1)->datos + i - 1) = 0; +//} + + +//void asignar(matrizP *m1, short fila, short columna, TELEMENTO valor) { +// *((*m1)->datos + (fila - 1)*(*m1)->tam + columna - 1) = valor; +//} + + +//void inicializar(matrizP *m1){ +// TELEMENTO element; +// short i=1, j=1; +// printf("%hd", (*m1)->tam); +// for(i=1; i<=((*m1)->tam); i++){ +// for(j=1; j<=((*m1)->tam); j++){ +// element=10.0*(TELEMENTO)rand()/RAND_MAX; +// element=10.0*(TELEMENTO)rand()/RAND_MAX; +// *((*m1)->datos + (i - 1)*(*m1)->tam + j - 1) = element; +// } +// } +//} + +//TELEMENTO recuperar(matrizP m1, short fila, short columna){ +// TELEMENTO valor; +// valor=*((m1)->datos + (fila - 1)*(m1)->tam + columna - 1); +// return(valor); +//} + diff --git a/Login/library.h b/Login/library.h new file mode 100644 index 0000000..9c73c3f --- /dev/null +++ b/Login/library.h @@ -0,0 +1,14 @@ +#ifndef LOGIN_LIBRARY_H +#define LOGIN_LIBRARY_H + +typedef void *data; + +void crear(data *datos); + +void setUUID(short a, data *datos); + +void setusr(char *a, data *datos); + +void setpas(char *a, data *datos); + +#endif //LOGIN_LIBRARY_H \ No newline at end of file diff --git a/uOMG/CMakeLists.txt b/uOMG/CMakeLists.txt new file mode 100644 index 0000000..a76a3c4 --- /dev/null +++ b/uOMG/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.14) +project(uOMG C) + +set(CMAKE_C_STANDARD 11) + +add_executable(uOMG main.c) \ No newline at end of file diff --git a/uOMG/main.c b/uOMG/main.c new file mode 100644 index 0000000..8321e25 --- /dev/null +++ b/uOMG/main.c @@ -0,0 +1,6 @@ +#include + +int main() { + printf("Hello, World!\n"); + return 0; +} \ No newline at end of file diff --git a/untitled/CMakeLists.txt b/untitled/CMakeLists.txt new file mode 100644 index 0000000..64e1f94 --- /dev/null +++ b/untitled/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.14) +project(untitled C) + +set(CMAKE_C_STANDARD 11) + +add_library(untitled library.c library.h) \ No newline at end of file diff --git a/untitled/library.c b/untitled/library.c new file mode 100644 index 0000000..2814686 --- /dev/null +++ b/untitled/library.c @@ -0,0 +1,7 @@ +#include "library.h" + +#include + +void hello(void) { + printf("Hello, World!\n"); +} \ No newline at end of file diff --git a/untitled/library.h b/untitled/library.h new file mode 100644 index 0000000..556a735 --- /dev/null +++ b/untitled/library.h @@ -0,0 +1,6 @@ +#ifndef UNTITLED_LIBRARY_H +#define UNTITLED_LIBRARY_H + +void hello(void); + +#endif //UNTITLED_LIBRARY_H \ No newline at end of file diff --git a/untitled1/CMakeLists.txt b/untitled1/CMakeLists.txt new file mode 100644 index 0000000..4e948d6 --- /dev/null +++ b/untitled1/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.16) +project(untitled1 C) + +set(CMAKE_C_STANDARD 99) + +add_executable(untitled1 main.c) \ No newline at end of file diff --git a/untitled1/main.c b/untitled1/main.c new file mode 100644 index 0000000..f26b97c --- /dev/null +++ b/untitled1/main.c @@ -0,0 +1,6 @@ +#include + +int main() { + printf("Hello, World!\n"); + return 0; +} diff --git a/untitled2/CMakeLists.txt b/untitled2/CMakeLists.txt new file mode 100644 index 0000000..092b521 --- /dev/null +++ b/untitled2/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.16) +project(untitled2 C) + +set(CMAKE_C_STANDARD 99) + +add_library(untitled2 library.c library.h) \ No newline at end of file diff --git a/untitled2/library.c b/untitled2/library.c new file mode 100644 index 0000000..9bc7b0f --- /dev/null +++ b/untitled2/library.c @@ -0,0 +1,7 @@ +#include "library.h" + +#include + +void hello(void) { + printf("Hello, World!\n"); +} diff --git a/untitled2/library.h b/untitled2/library.h new file mode 100644 index 0000000..bdccef6 --- /dev/null +++ b/untitled2/library.h @@ -0,0 +1,6 @@ +#ifndef UNTITLED2_LIBRARY_H +#define UNTITLED2_LIBRARY_H + +void hello(void); + +#endif //UNTITLED2_LIBRARY_H diff --git a/untitled3/CMakeLists.txt b/untitled3/CMakeLists.txt new file mode 100644 index 0000000..920e27a --- /dev/null +++ b/untitled3/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.16) +project(untitled3 C) + +set(CMAKE_C_STANDARD 99) + +add_library(untitled3 library.c library.h) \ No newline at end of file diff --git a/untitled3/library.c b/untitled3/library.c new file mode 100644 index 0000000..9bc7b0f --- /dev/null +++ b/untitled3/library.c @@ -0,0 +1,7 @@ +#include "library.h" + +#include + +void hello(void) { + printf("Hello, World!\n"); +} diff --git a/untitled3/library.h b/untitled3/library.h new file mode 100644 index 0000000..fea91a8 --- /dev/null +++ b/untitled3/library.h @@ -0,0 +1,6 @@ +#ifndef UNTITLED3_LIBRARY_H +#define UNTITLED3_LIBRARY_H + +void hello(void); + +#endif //UNTITLED3_LIBRARY_H diff --git a/untitled4/CMakeLists.txt b/untitled4/CMakeLists.txt new file mode 100644 index 0000000..7458aa7 --- /dev/null +++ b/untitled4/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.16) +project(untitled4 C) + +set(CMAKE_C_STANDARD 99) + +add_library(untitled4 library.c library.h) \ No newline at end of file diff --git a/untitled4/library.c b/untitled4/library.c new file mode 100644 index 0000000..9bc7b0f --- /dev/null +++ b/untitled4/library.c @@ -0,0 +1,7 @@ +#include "library.h" + +#include + +void hello(void) { + printf("Hello, World!\n"); +} diff --git a/untitled4/library.h b/untitled4/library.h new file mode 100644 index 0000000..16c19f1 --- /dev/null +++ b/untitled4/library.h @@ -0,0 +1,6 @@ +#ifndef UNTITLED4_LIBRARY_H +#define UNTITLED4_LIBRARY_H + +void hello(void); + +#endif //UNTITLED4_LIBRARY_H