add LICENSE notice to all code

This commit is contained in:
speedie 2023-05-14 00:21:16 +02:00
parent 16daefc4fe
commit 8c9d33d01f
40 changed files with 67 additions and 1 deletions

View file

@ -2,6 +2,7 @@
* It is recommended you set keybinds in ~/.config/spmenu/spmenu.conf instead.
*
* See https://spmenu.speedie.site/index.php/keybinds.h+documentation for more information.
* See LICENSE file for copyright and license details.
*/
static Key keys[] = {

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
void moveleft(Arg *arg) {
struct item *tmpsel;
int i, offscreen = 0;

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
typedef union {
int i; // integer
unsigned int ui; // unsigned int

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
void readargs(int argc, char *argv[]) {
int i = 0;
int j = 0;

View file

@ -1,2 +1,3 @@
/* See LICENSE file for copyright and license details. */
static void readargs(int argc, char *argv[]);
static void usage(void);

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
void prepare_window_size(void) {
// set horizontal and vertical padding
sp = menupaddingh;

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
static void create_window(int x, int y, int w, int h);
static void prepare_window_size(void);
static void set_window(void);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
// alpha array
static unsigned int alphas[][2] = {
// fg bg

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include <libconfig.h>
#include "../theme/theme.c"

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
#include "../theme/theme.h"
typedef struct {

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
// declare various macros
#define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
#define BUTTONMASK (ButtonPressMask|ButtonReleaseMask)

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
void drawhighlights(struct item *item, int x, int y, int w, int p, const char *ittext) {
int i, indent;
char *highlight;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
// declare functions
static void drawmenu(void);
static int drawprompt(int x, int y, int w);

View file

@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
void eventloop(void) {
XEvent ev;
int noimg = 0;

View file

@ -1 +1,2 @@
/* See LICENSE file for copyright and license details. */
static void eventloop(void);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
void loadhistory(void) {
FILE *fp = NULL;
static size_t cap = 0;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
static char *histfile;
static char **history;
static size_t histsz, histpos;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
#if USEIMAGE
void setimagesize(int width, int height) {
int oih = 0;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
#if USEIMAGE
#include <errno.h>
#include <pwd.h>

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
void updatenumlockmask(void) {
unsigned int i, j;
XModifierKeymap *modmap;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
typedef struct {
unsigned int mode;
unsigned int mod;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
void fuzzymatch(void) {
struct item *it;
struct item **fuzzymatches = NULL;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
static void fuzzymatch(void);
static void match(void);
static int compare_distance(const void *a, const void *b);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
void buttonpress(XEvent *e) {
struct item *item;
XButtonPressedEvent *ev = &e->xbutton;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
// clicks
enum {
ClickWindow,

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
#if USERTL
void apply_fribidi(char *str) {
FriBidiStrIndex len = strlen(str);

View file

@ -1,2 +1,4 @@
/* See LICENSE file for copyright and license details. */
static char fribidi_text[BUFSIZ] = "";
static void apply_fribidi(char *str);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
char sixd_to_8bit(int x) {
return x == 0 ? 0 : 0x37 + 0x28 * x;
}

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
static void init_appearance(void);
// Color schemes

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
char ** tokenize(char *source, const char *delim, int *llen) {
int listlength = 0, list_size = 0;
char **list = NULL, *token;

View file

@ -1,2 +1,4 @@
/* See LICENSE file for copyright and license details. */
static char **tokenize(char *source, const char *delim, int *llen);
static int arrayhas(char **list, int length, char *item);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
void readstdin(void) {
char buf[sizeof text], *p;
size_t i, imax = 0, itemsiz = 0;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
static void readstdin(void);
static void readfile(void);
static int parsemarkup(int index);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
void theme_load(void) {
char *xdg_conf;
char *theme = NULL;

View file

@ -1 +1,3 @@
/* See LICENSE file for copyright and license details. */
static void theme_load(void);

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
#if USEXRESOURCES
void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) {
char *sdst = NULL;

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
#if USEXRESOURCES
enum resource_type {
STRING = 0,

View file

@ -1,3 +1,5 @@
/* See LICENSE file for copyright and license details. */
// This .Xresources array is read and compared to the xrdb. Simply add to the array if you need to.
#if USEXRESOURCES
ResourcePref resources[] = {

View file

@ -1,6 +1,8 @@
/* Mouse bindings
* These are all your hardcoded mouse bindings. It is recommended you set these in ~/.config/spmenu/spmenu.conf though.
*
* See https://spmenu.speedie.site/index.php/mouse.h+documentation for more information.
* See LICENSE file for copyright and license details.
*/
static Mouse buttons[] = {

View file

@ -1,7 +1,7 @@
/* spmenu - fancy dynamic menu
*
* Below is a configuration file which is technically C source code.
* See the included LICENSE file for license details.
* See LICENSE file for copyright and license details.
*/
/* spmenu options */