Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timhopg/42-ft_printf
A micro implementation of the printf function for 42 School Lisboa
https://github.com/timhopg/42-ft_printf
42school clang
Last synced: 15 days ago
JSON representation
A micro implementation of the printf function for 42 School Lisboa
- Host: GitHub
- URL: https://github.com/timhopg/42-ft_printf
- Owner: TimHopg
- Created: 2024-04-23T17:17:54.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-09-19T09:25:14.000Z (4 months ago)
- Last Synced: 2024-11-13T21:16:08.555Z (3 months ago)
- Topics: 42school, clang
- Language: C
- Homepage:
- Size: 1.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 42-ft_printf
![ft_printf grade](./ft_printf_grade.png)
## Table of Contents
- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)## Introduction
A [42 School](https://www.42network.org/) project to create a reduced implementation of the clang `stdio` `printf` function.
The following conversions are implemented:
- `%c` - single char
- `%s` - prints a string
- `%p` - prints a pointer in hex format
- `%d` - prints a decimal number
- `%i` - prints and int in base 10
- `%u` - prints an unsigned decimal
- `%x` - prints a lowercase hex number
- `%X` - prints an uppercase hex number
- `%%` - prints a percentage signBuffer management is not implemented.
## Installation
Git clone the repository:
```shell
https://github.com/TimHopg/42-ft_printf.git
```Run `make` from within the directory to archive `libft.a` and then combine it with `libftprintf.a`.
`make clean` will remove object files.
`make fclean` will remove library and object files.
## Usage
To use include the `libftprintf.a` file in your project and include the `libftprintf.h` header in your source code.
Compile as follows:
``` shell
cc main.c -L. -lftprintf -o main
```