Skip to content

Commit

Permalink
Fix workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
kentlouisetonino committed Jul 3, 2024
1 parent 2f304b3 commit 438aa9b
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/elementexplorer-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build
run: make Build
run: make build
7 changes: 7 additions & 0 deletions src/elements/data/data.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef DATA_H
#define DATA_H
#include "./elements_1st_period.c"

extern element_details hydrogen;

#endif
41 changes: 41 additions & 0 deletions src/elements/data/elements_1st_period.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#include "../element_type.h"

element_details hydrogen = {
"H",
"Hydrogen",
"1",
"Nonmetal",
"1.0080 u",
"Gas",
"1s1",
"+1, -1",
"2.2",
"120 pm",
"13.598 eV",
"0.754 eV",
"13.81 K",
"20.28 K",
"0.00008988 g/cm³",
"1766",
"https://pubchem.ncbi.nlm.nih.gov/element/1",
};

element_details helium = {
"He",
"Helium",
"2",
"Noble Gas",
"4.00260 u",
"Gas",
"1s2",
"0",
"N/A",
"140 pm",
" 24.587 eV",
"N/A",
"0.95 K",
"4.22 K",
"0.0001785 g/cm³",
"1868",
"https://pubchem.ncbi.nlm.nih.gov/element/2",
};
41 changes: 1 addition & 40 deletions src/elements/element_data.c → src/elements/element_array.c
Original file line number Diff line number Diff line change
@@ -1,46 +1,7 @@
#include "./data/data.h"
#include "./element_type.h"
#include <stdio.h>

element_details hydrogen = {
"H",
"Hydrogen",
"1",
"Nonmetal",
"1.0080 u",
"Gas",
"1s1",
"+1, -1",
"2.2",
"120 pm",
"13.598 eV",
"0.754 eV",
"13.81 K",
"20.28 K",
"0.00008988 g/cm³",
"1766",
"https://pubchem.ncbi.nlm.nih.gov/element/1",
};

element_details helium = {
"He",
"Helium",
"2",
"Noble Gas",
"4.00260 u",
"Gas",
"1s2",
"0",
"N/A",
"140 pm",
" 24.587 eV",
"N/A",
"0.95 K",
"4.22 K",
"0.0001785 g/cm³",
"1868",
"https://pubchem.ncbi.nlm.nih.gov/element/2",
};

element_details lithium = {
"Li",
"Lithium",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef ELEMENT_DATA_H
#define ELEMENT_DATA_H
#include "./element_data.c"
#include "./element_array.c"

extern element elements[];

Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "./displays/app_exit.h"
#include "./displays/clear_terminal.h"
#include "./displays/element_not_found.h"
#include "./elements/element_data.h"
#include "./elements/element_array.h"
#include "./elements/element_input_match.h"
#include "./elements/element_type.h"
#include "./elements/get_element_details.h"
Expand Down

0 comments on commit 438aa9b

Please sign in to comment.