Code Monkey home page Code Monkey logo

ft_printf_42's Introduction

ft_printf_42

Do you hate using write as the only allowed method of writing to the terminal or files? Well, ft_printf to the rescue!

Description

With this project we extended our standard library clone by writing our own (simplified) printf with the flags %c, %s, %d, %i, %p, %u, %x, %x and %%.

Table of Contents

Getting Started

Prerequisites

You will need GNU Make version 3.81 or higher ( https://www.gnu.org/software/make/ ). To compile you will also need a gcc compiler. At school we use clang version 11.0.0 ( https://gcc.gnu.org/install/download.html )

Installation

Open a terminal window and cd into a directory of your choice. Clone the repo via git clone <link to remote repo> to your machine and execute cd ft_printf && make.

Usage

The library is compiled into libftprintf.a and can be included in your projects by including the path to the 'ft_printf.h' and libft.h files and linking the library to your project during compilation with -L[path to ft_printf directory] and -lftprintf (eg. using a Makefile):

{
### GNU MAKEFILE ###

NAME = your_project
SRC = [your source files]
INC = [your header files]

$(NAME): $(SRC) $(INC)
    gcc -I$(INC) $< -o $@ -Lft_printf -lftprintf
}

In the folder there is a test file with unit tests for 'ft_printf', which can be executed like so after compilation:

  cc -I$(INC) my_printf_tests.c -o test -Lft_printf -lftprintf
  ./test

Sidenote

Over the course of the curriculum, the library has expanded significantly. The most current version can be found in the miniRT project. I will update thhis version once my other early school projects work with the most current version.

ft_printf_42's People

Contributors

dorianjagusch avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.