Commit graph

102 commits

Author SHA1 Message Date
Raphael
2cc27d75e0 build(math): adding the module sub-makefile 2025-12-11 14:44:48 +01:00
Raphael
ba4adf3ab8 build(list): adding the module sub-makefile 2025-12-11 14:44:48 +01:00
Raphael
cdf388fb7e build(gnl): adding the module sub-makefile 2025-12-11 14:44:48 +01:00
Raphael
c9bfd81d83 build(convert): adding the module sub-makefile 2025-12-11 14:44:48 +01:00
Raphael
338acd32c7 build(char): adding the module sub-makefile 2025-12-11 14:44:48 +01:00
Raphael
8b268a536b
feat(char/isspace): adding isspace function 2025-12-11 14:36:59 +01:00
Raphael
8a294513d8
doc(char): adding the isspace documentation 2025-12-11 14:36:17 +01:00
Raphael
50cc782edd
feat(gnl): include gnl to the libft 2025-12-11 14:35:47 +01:00
Raphael
0464e59dda feat(make): adding the ft_atou function 2025-11-03 14:15:32 +01:00
Raphael
cc41df24e6 fix(convert/atou): moving the initialiation to the top 2025-11-03 14:14:32 +01:00
Raphael
e903c922dd
core(make/tmux): adding tmux rules 2025-09-27 00:09:46 +02:00
Raphaël
32c04140b7
style(readme): deleting the readme 2025-09-19 17:07:59 +02:00
Raphael
8313d8a1c5
core(ignore): adding the build directory to ignore 2025-09-17 17:32:49 +02:00
Raphaël
d1d78c8d7d
Math Utilities Module
## 🆕 New Math Functions
- 🔢 Added `ft_max` → returns the maximum of two values.  
- 🔢 Added `ft_min` → returns the minimum of two values.  
- ✖️ Added `ft_power` → computes exponentiation.  
-  Added `ft_abs` → returns absolute value.  
- √ Added `ft_sqrt` → computes integer square root.  
- 📄 Created `math.h` to declare and document all math functions.  

## 🛠️ Build System Integration
- 🧩 Updated the `Makefile` to include the new `math/` sources so they compile and link with the rest of the project.  

##  Impact
- Project now includes a **dedicated math utility module**.  
- Provides essential helper functions for broader use in future features.  
- Cleaner organization with centralized declarations in `math.h`.
2025-09-17 16:49:01 +02:00
Raphael
801634c6dc
refactor(convert): norming the convert header
- ft_atou was not aligned
2025-09-17 16:47:00 +02:00
Raphael
faf72b5895
refactor(test/convert): norming the test of itoa 2025-09-17 16:46:13 +02:00
Raphael
90d32dca61
style(math/sqrt): changing the parameter name to be clearer 2025-09-17 16:45:41 +02:00
Raphael
574c470a1c
feat(math): adding the header for math library 2025-09-17 16:45:20 +02:00
Raphael
b5f2f370bf
build: adding math part on the makefile 2025-09-17 16:43:22 +02:00
Raphael
62dec89863
feat(math/sqrt): adding a function to calculate square root 2025-09-17 16:43:00 +02:00
Raphael
c27526bc24
feat(math/power): adding a function to calculate power 2025-09-17 16:42:42 +02:00
Raphael
d8ac7d2b88
feat(math/ft_min): adding ft_min
- Using the bitwise for fun 👀
2025-09-17 16:42:24 +02:00
Raphael
82c445502b
feat(math/ft_max): adding ft_max
- Using the bitwise for fun 👀
2025-09-17 16:42:17 +02:00
Raphael
6879b46aee
feat(math/abs): adding ft_abs function
- Return the absolute value
2025-09-17 16:41:56 +02:00
Raphaël
2be64a8f1b
🛠️ Update to ft_atou
## 🛠️ Update to `ft_atou`
- 🌀 Added a loop in `convert/ft_atou.c` to **skip leading whitespace** characters before parsing, ensuring correct conversion of inputs with spaces at the start.  

## 🗂️ Metadata
- 📅 Updated the file header timestamp for consistency.  

##  Impact
- More accurate and standard-compliant behavior for `ft_atou`.  
- Cleaner handling of edge cases with whitespace.
2025-09-12 15:52:17 +02:00
Raphael
94d1de557f
feat(convert/atou): adding the skip of the whitespace at the start
- Wasn't using the function isspace :).
2025-09-12 15:25:20 +02:00
Raphaël
1a09167546
🔢 Conversion Utilities Expansion
##  New Functionality
-  Added the `ft_atou` function in `ft_atou.c` to convert a string to `size_t` (unsigned integer), with built-in whitespace handling and null pointer safety.  
- 📝 Declared `ft_atou` in `convert.h` with a detailed Doxygen-style comment explaining usage, return value, and parameters.  

## 🧪 Test Coverage Improvements
- 🆕 Introduced `test_atou.c` to verify `ft_atou` against `strtoull`, covering edge cases such as empty strings, whitespace, and invalid input.  
- 🔍 Expanded tests in `test_atoi.c`, `test_atoll.c`, and `test_itoa.c` to include more diverse scenarios (extra whitespace, varied integer ranges) to improve robustness and reliability.  

## 🛠️ Codebase Maintenance
- 📦 Included `<stddef.h>` in `convert.h` to ensure `size_t` is available in function declarations.  

##  Impact
- New unsigned integer conversion capability.  
- Stronger and more comprehensive test suite for all conversion functions.  
- Cleaner and safer header definitions.
2025-09-08 10:26:12 +02:00
Raphael
1266f5d7e8
feat(convert/atou): adding the atou function
- without management of simbole (because useless)
2025-09-08 10:23:59 +02:00
Raphael
198f56177b
test(convert): adding test for itoa
- adding test with 13 7 for the captain of the 7th divison of the gotei
13 (it's me btw)
2025-09-08 10:23:24 +02:00
Raphael
904fafc3f4
test(convert): adding test for atoll
- adding test with whitespace before
2025-09-08 10:22:49 +02:00
Raphael
74188a547f
test(convert): adding test for atoi
- adding test with whitespace before
2025-09-08 10:22:41 +02:00
Raphael
28be9d6b91
feat(convert/atou): adding the atou function
- Can be usefull when the parsing of some project (like philosophers)
2025-09-08 10:21:48 +02:00
Raphael
4e15449d12
build(nix): c_formatter_42 with the correction given
- The flake wasn't made for macos (arm), so I made a pull requests to
patch that and was merged thanks to @maix0 for it's reactivity
2025-09-05 17:35:51 +02:00
Raphael
a3accb9d0a
style(str): normed the header 2025-09-05 17:34:30 +02:00
Raphael
e1625857f2
build(nix): adding nix flake
- Allow to all people on nix package manager to have the same env
2025-09-05 16:51:28 +02:00
Raphaël
63a1b2abdf
📚 Documentation & Build Update
📝 Documentation Overhaul:
- 	🚚 Function docs have been migrated from implementation files (.c) to their header files (.h) across the following modules:
- 	char
- 	convert
- 	list
- 	memory
- 	All documentation is now in Doxygen-style comments, making headers self-documented and turning the API into an easier-to-navigate codex.

##

🛠️ Build System Tweaks:
- 🔗 Added str/ft_strncpy.c to the SRC list in the Makefile, ensuring it’s properly compiled and linked into the arsenal.


##

 Impact

- Clearer and more maintainable API documentation.
- Stronger build consistency with all sources included.
- A polished codebase with up-to-date metadata.
2025-09-05 16:35:41 +02:00
Raphael
0bb6d77dbb
style(test/convert): normed the itoa tabs 2025-09-05 16:31:19 +02:00
Raphael
7e80beedb8
build(str/strncpy): adding strncpy to the makefile
- The file was here but not on the makefile so now it's patched
2025-09-05 16:30:55 +02:00
Raphael
2cf0714dc7
docs(str): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:30:00 +02:00
Raphael
701ce57f84
docs(print): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:51 +02:00
Raphael
ed64bd73d6
docs(memory): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:40 +02:00
Raphael
3cadabea0a
docs(list): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:29 +02:00
Raphael
52b85d2dc6
docs(convert): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:29:16 +02:00
Raphael
63c1dea7a2
docs(char): moving the actual documentation on the header
- The documentation on the header allow u to see on the files where the
header is inclued
2025-09-05 16:28:33 +02:00
Raphaël
78c37163f2
⚙️ Conversion & Character Utilities Update #3
🛡️ Robustness Buffs (Conversion Functions)
• 🧩 ft_atoi and ft_atoll gained a safety shield: they now return 0 when passed a null pointer, preventing accidental crashes.
• This change improves stability across the board, ensuring safer handling of unexpected input.

🧪 Test Suite Expansions

New & Expanded Conversion Trials
• 📝 Added extensive test coverage for ft_atoi, ft_atoll, and ft_itoa, including edge cases and null pointer handling.
• These tests live in test/convert/ and ensure your conversion toolkit is battle-ready for any scenario.

Character Function Test Output Polish
•  Updated all character test files (test_isalnum.c, test_isalpha.c, test_isascii.c, test_isprint.c, test_tolower.c, test_toupper.c) with better output formatting.
• Each result now ends with a newline → improved readability during long test runs.

🔨 Build & Test Process
• 🧹 The Makefile has been optimized:
• test target now depends on fclean + $(NAME) → always runs on a clean build.
• The test runner loop has been reformatted for cleaner output.

📦 Minor Updates
• 📅 File headers refreshed to reflect the latest modification dates, keeping the codebase neat and consistent.

 Impact
• Stronger crash resistance for conversion functions.
• More comprehensive and reliable test suite.
• Cleaner, more professional build & test pipeline.
• Better dev experience thanks to polished test outputs.
2025-09-05 15:17:06 +02:00
Raphael
18f174b2a2
test(convert): adding test to convert
- adding test for atoi / atoll / itoa
- Maybe a futur update to test atost (array to size_t)
2025-09-05 15:12:40 +02:00
Raphael
aa8544ba02
build(test): now test is building the libft before test 2025-09-05 15:10:54 +02:00
Raphael
f4cb339be7
fix(convert/atoll): atoll was now working with NULL parameters
- Now fixed by the verification before
2025-09-05 15:09:52 +02:00
Raphael
0988a2c8ab
fix(convert/atoi): atoi was now working with NULL parameters
- Now fixed by the verification before
2025-09-05 15:09:35 +02:00
Raphael
6255f5e0a3
style(test/char): adding the last '\n'
- For the last return line
2025-09-05 11:36:07 +02:00