consolidate all repos to one for archive
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
all: lib build run
|
||||
|
||||
build:
|
||||
gcc -m32 main.c -o demo_staticno libXPO.a
|
||||
|
||||
run:
|
||||
./demo_staticno "Jaz Sem Velik" 5 6
|
||||
|
||||
clean:
|
||||
rm -f demo_staticno libXPO.a libXPO.o
|
||||
|
||||
lib:
|
||||
gcc -m32 -c libXPO.c -o libXPO.o
|
||||
ar rcs libXPO.a libXPO.o
|
||||
|
||||
zip:
|
||||
zip staticno.zip Makefile libXPO.c libXPO.h main.c
|
BIN
semester_4/namenska_programska_oprema/Naloga_5/staticno/libXPO.a
Normal file
BIN
semester_4/namenska_programska_oprema/Naloga_5/staticno/libXPO.a
Normal file
Binary file not shown.
@@ -0,0 +1,17 @@
|
||||
#include "libXPO.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
uint32_t sestej(uint32_t a, uint32_t b)
|
||||
{
|
||||
return a+b;
|
||||
}
|
||||
|
||||
void niz_veliki(char* niz)
|
||||
{
|
||||
size_t size = strlen(niz);
|
||||
for (size_t i = 0; i < size; i++)
|
||||
if(niz[i] >= 'a' && niz[i] <= 'z')
|
||||
niz[i] -= 32;
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
uint32_t sestej(uint32_t a, uint32_t b);
|
||||
void niz_veliki(char* niz);
|
BIN
semester_4/namenska_programska_oprema/Naloga_5/staticno/libXPO.o
Normal file
BIN
semester_4/namenska_programska_oprema/Naloga_5/staticno/libXPO.o
Normal file
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
#include "libXPO.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
char* niz = argv[1];
|
||||
int i = atoi(argv[2]);
|
||||
int j = atoi(argv[3]);
|
||||
niz_veliki(niz);
|
||||
printf("%s\n", niz);
|
||||
printf("rezultat: %d\n", sestej(i,j));
|
||||
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user