Skip to content

Commit

Permalink
pequeno ajuste no remover encomenda
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaian-k committed Jul 2, 2022
1 parent 6a32820 commit 93b74b9
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 12 deletions.
41 changes: 41 additions & 0 deletions .vscode/targets.log
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ make: *** No rule to make target 'all'. Stop.
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.

<<<<<<< HEAD
# Make data base, printed on Sat Jul 2 12:30:58 2022
=======
# Make data base, printed on Sat Jul 2 19:11:47 2022
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)

# Variables

Expand All @@ -21,7 +25,11 @@ NO_AT_BRIDGE = 1
# environment
GJS_DEBUG_OUTPUT = stderr
# environment
<<<<<<< HEAD
VSCODE_IPC_HOOK_EXTHOST = /run/user/1000/vscode-ipc-21b6637e-e4e6-470f-af21-84da88e37917.sock
=======
VSCODE_IPC_HOOK_EXTHOST = /run/user/1000/vscode-ipc-13b267ee-3384-46aa-879e-dbe7c22cb969.sock
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
VSCODE_CWD = /home/lukaian
# environment
Expand Down Expand Up @@ -63,7 +71,11 @@ VSCODE_CODE_CACHE_PATH = /home/lukaian/.config/Code/CachedData/30d9c6cd9483b2cc5
# environment
LANG = C
# environment
<<<<<<< HEAD
XAUTHORITY = /run/user/1000/.mutter-Xwaylandauth.AIRSO1
=======
XAUTHORITY = /run/user/1000/.mutter-Xwaylandauth.7MXXO1
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# default
.LOADED :=
# default
Expand Down Expand Up @@ -101,7 +113,11 @@ MAKEFILE_LIST :=
# environment
VSCODE_VERBOSE_LOGGING = true
# environment
<<<<<<< HEAD
VSCODE_PID = 2819
=======
VSCODE_PID = 2523
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
XDG_SESSION_TYPE = wayland
# automatic
Expand Down Expand Up @@ -145,7 +161,11 @@ MAKEFILES :=
# automatic
^F = $(notdir $^)
# environment
<<<<<<< HEAD
INVOCATION_ID = 995a6d7d7cc04bb48ca31a298c98e21c
=======
INVOCATION_ID = 6312d7f4c02b45049d1763b64137711e
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
VSCODE_LOG_NATIVE = false
# environment
Expand Down Expand Up @@ -175,7 +195,11 @@ GIO_LAUNCHED_DESKTOP_FILE = /usr/share/applications/code.desktop
# makefile
.DEFAULT_GOAL :=
# environment
<<<<<<< HEAD
SYSTEMD_EXEC_PID = 1725
=======
SYSTEMD_EXEC_PID = 1722
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
HISTCONTROL = ignoredups
# environment
Expand All @@ -187,19 +211,31 @@ USER = lukaian
# default
MAKE_VERSION := 4.3
# environment
<<<<<<< HEAD
MANAGERPID = 1550
=======
MANAGERPID = 1548
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
which_declare = declare -f
# environment
DEBUGINFOD_URLS = https://debuginfod.fedoraproject.org/
# environment
<<<<<<< HEAD
GIO_LAUNCHED_DESKTOP_FILE_PID = 2819
=======
GIO_LAUNCHED_DESKTOP_FILE_PID = 2523
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
_ = /usr/bin/make
# environment
XDG_RUNTIME_DIR = /run/user/1000
# environment
<<<<<<< HEAD
JOURNAL_STREAM = 8:28545
=======
JOURNAL_STREAM = 8:29064
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)
# environment
XDG_SESSION_CLASS = user
# environment
Expand All @@ -224,6 +260,7 @@ SUFFIXES :=
XDG_MENU_PREFIX = gnome-
# environment
GDMSESSION = gnome

# variable set hash-table stats:
# Load=104/1024=10%, Rehash=0, Collisions=4/131=3%

Expand Down Expand Up @@ -292,6 +329,10 @@ GNUmakefile:
# hash-table stats:

# Load=20/8192=0%, Rehash=0, Collisions=0/23=0%
<<<<<<< HEAD
# Finished Make data base on Sat Jul 2 12:30:58 2022
=======
# Finished Make data base on Sat Jul 2 19:11:47 2022
>>>>>>> 7b7cef9 (pequeno ajuste no remover encomenda)


2 changes: 1 addition & 1 deletion fila_pre_cadastrados.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void add_pre_cadastrados(){
fifopre_add("Brenda Vieira", "100", 100, 'S');
fifopre_add("Pietro Correia", "200", 200, 'S');
fifopre_add("Noah da Costa", "300", 300, 'S');
//transportadores
////transportadores
fifopre_add("Davi Lucca Nunes", "111", 111, 'T');
fifopre_add("André Martins", "112", 112, 'T');
fifopre_add("Agatha da Paz", "113", 113, 'T');
Expand Down
20 changes: 9 additions & 11 deletions fuctions_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int add_esq_ou_dir = 0;

//fuctions

int verificar_senha(Fifopre_node *aux, char cargo){
Fifopre_node *verificar_senha(Fifopre_node *aux, char cargo){
int cpf; char senha[100];

printf("\nDigite seu cpf: "); scanf("%d", &cpf);
Expand All @@ -21,9 +21,9 @@ int verificar_senha(Fifopre_node *aux, char cargo){
printf("\nDigite sua senha: "); scanf(" %[^\n]s", &senha);

if (strcasecmp(senha, aux->admin.senha) == 0){
printf("\nSenha correta!\n\n"); return 1;}
printf("\nSenha correta!\n\n"); return aux;}

else {printf("\nSenha incorreta!\n\n"); return 0;}}
else {printf("\nSenha incorreta!\n\n"); return NULL;}}
aux = aux->next;}

printf("\nNão há nenhum usuario cadastrado com esse CPF que possa usar essa função."); return 0;}
Expand Down Expand Up @@ -89,8 +89,9 @@ void encomendar(){
void remover_encomenda(){
//visualizar as encomendas
in_ordem(root);

if (verificar_senha(fifopre_start, 'S') == 1){
Fifopre_node *admin = verificar_senha(fifopre_start, 'S');

if (admin != NULL){
//create variables
int selecionar_id; Abb_node *lixo = buscar(selecionar_id, root);

Expand All @@ -100,9 +101,6 @@ void remover_encomenda(){
root = remover_abb(root, selecionar_id);

//setar novos dados (faltando)
printf("Digite o nome do responsavel:\n");
char *nome_responsavel = malloc(sizeof(char)); scanf(" %[^\n]s", nome_responsavel);

printf("Digite o nome do campus do aluno:\n");
char *nome_campus_aluno = malloc(sizeof(char)); scanf(" %[^\n]s", nome_campus_aluno);

Expand All @@ -111,15 +109,15 @@ void remover_encomenda(){

printf("Informe a prioridade do pedido (0 à 100):\n");
int prioriadade; scanf("%d", &prioriadade);

add_fila(lixo->id, prioriadade, lixo->nome_aluno, lixo->matricula, lixo->descricao, nome_responsavel, nome_campus_aluno, nome_campus_livro);}}
add_fila(lixo->id, prioriadade, lixo->nome_aluno, lixo->matricula, lixo->descricao, admin->admin.nome, nome_campus_aluno, nome_campus_livro);}}

else {
printf("\nSenha incorreta!\n\n");}}


void remover_pedido(){
//verificar o usuario
if (verificar_senha(fifopre_start, 'T') == 1){
if (verificar_senha(fifopre_start, 'T') != NULL){
//remover da fila de prioridade
remover_fila();}}

0 comments on commit 93b74b9

Please sign in to comment.