Skip to content

charles-l/spin

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

spin

Simple UTF-8 console spinners for C.

spinner gif

usage

Drop spin.h into your project directory.

#include "spin.h"
int func() {
    spinner *s = spin_new(utf8_pat1, "Working...", UTF8_CHAR_WIDTH);
    while(working) {
        // ... do work ...
        spin_drw(s);
        if(progress == .5)
            spin_upd_msg(s, "Half way through...") // update the message
    }
    spin_del(s);
    return 0;
}

expanding

It's possible to add new spinner patterns, but for now, they have to be UTF8 (since there are hard coded 3 byte jumps in the code).

About

simple c terminal spinners

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages