repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | src/tracer/ebpf/kern/procmonEBPFkern4.17-5.1.c | null | null | null | null | null | null | C | 2026-05-04T18:26:42.890137 | /*
Procmon-for-Linux
Copyright (c) Microsoft Corporation
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at you... |
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | src/tracer/ebpf/kern/procmonEBPFkern5.2.c | null | null | null | null | null | null | C | 2026-05-04T18:26:42.910685 | /*
Procmon-for-Linux
Copyright (c) Microsoft Corporation
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at you... |
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | src/tracer/ebpf/kern/procmonGenericExit_rawtp.c | null | null | null | null | null | null | C | 2026-05-04T18:26:42.911249 | /*
Procmon-for-Linux
Copyright (c) Microsoft Corporation
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at you... |
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | src/tracer/ebpf/kern/procmonEBPFkern5.6-.c | null | null | null | null | null | null | C | 2026-05-04T18:26:42.962016 | /*
Procmon-for-Linux
Copyright (c) Microsoft Corporation
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at you... |
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | src/tracer/mock_tracer_engine.h | null | null | null | null | null | null | C | 2026-05-04T18:26:43.487379 | /*
Procmon-for-Linux
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including wi... |
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | src/tracer/tracer_engine.h | null | null | null | null | null | null | C | 2026-05-04T18:26:43.519723 | /*
Procmon-for-Linux
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including wi... |
microsoft/ProcMon-for-Linux | https://github.com/microsoft/ProcMon-for-Linux | null | null | null | null | 4,671 | null | null | mit | null | null | null | null | null | null | null | vendor/sqlite3/sqlite3ext.h | null | null | null | null | null | null | C | 2026-05-04T18:26:43.520373 | /*
** 2006 June 7
**
** The author disclaims copyright to this source code. In place of
** a legal notice, here is a blessing:
**
** May you do good and not evil.
** May you find forgiveness for yourself and forgive others.
** May you share freely, never taking more than you give.
**
*************************... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kavl.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.843852 | /* The MIT License
Copyright (c) 2018 by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation t... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kalloc.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.873887 | #ifndef _KALLOC_H_
#define _KALLOC_H_
#include <stddef.h> /* for size_t */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
size_t capacity, available, n_blocks, n_cores, largest;
} km_stat_t;
void *kmalloc(void *km, size_t size);
void *krealloc(void *km, void *ptr, size_t size);
void *krelocate(void *km, v... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kbarena.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.883663 | #ifndef AC_KBARENA_H
#define AC_KBARENA_H
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Initialize a blocked arena
*
* @param blen block length in bytes
*
* @return pointer to a blocked arena
*/
void *kba_init(unsigned blen);
/** Destroy a blocked arena */
void kba_destroy(void *kba);
... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kbtree.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.896050 | /*-
* Copyright 1997-1999, 2001, John-Mark Gurney.
* 2008-2009, Attractive Chaos <attractor@live.co.uk>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must reta... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kalloc.c | null | null | null | null | null | null | C | 2026-05-04T18:26:45.897874 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "kalloc.h"
/* In kalloc, a *core* is a large chunk of contiguous memory. Each core is
* associated with a master header, which keeps the size of the current core
* and the pointer to next core. Kalloc allocates small *blocks* of memory from
* the c... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | bgzf.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.898883 | /* The MIT License
Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
2011 Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kbarena.c | null | null | null | null | null | null | C | 2026-05-04T18:26:45.915219 | #include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include "kbarena.h"
#define kom_malloc(type, cnt) ((type*)malloc((cnt) * sizeof(type)))
#define kom_calloc(type, cnt) ((type*)calloc((cnt), sizeof(type)))
#define kom_realloc(type, ptr, cnt) ((type*)realloc((ptr), (cnt) * sizeof(type)))
#define ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | bgzf.c | null | null | null | null | null | null | C | 2026-05-04T18:26:45.931205 | /* The MIT License
Copyright (c) 2008 Broad Institute / Massachusetts Institute of Technology
2011 Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to dea... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kavl-lite.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.957167 | /* The MIT License
Copyright (c) 2021 by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation t... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kbit.h | null | null | null | null | null | null | C | 2026-05-04T18:26:45.967863 | #ifndef KBIT_H
#define KBIT_H
#include <stdint.h>
static inline uint64_t kbi_popcount64(uint64_t y) // standard popcount; from wikipedia
{
y -= ((y >> 1) & 0x5555555555555555ull);
y = (y & 0x3333333333333333ull) + (y >> 2 & 0x3333333333333333ull);
return ((y + (y >> 4)) & 0xf0f0f0f0f0f0f0full) * 0x101010101010101u... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kdq.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.491920 | #ifndef __AC_KDQ_H
#define __AC_KDQ_H
#include <stdlib.h>
#include <string.h>
#define __KDQ_TYPE(type) \
typedef struct { \
size_t front:58, bits:6, count, mask; \
type *a; \
} kdq_##type##_t;
#define kdq_t(type) kdq_##type##_t
#define kdq_size(q) ((q)->count)
#define kdq_first(q) ((q)->a[(q)->front])
#define ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | ketopt.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.505334 | #ifndef KETOPT_H
#define KETOPT_H
#include <string.h> /* for strchr() and strncmp() */
#define ko_no_argument 0
#define ko_required_argument 1
#define ko_optional_argument 2
typedef struct {
int ind; /* equivalent to optind */
int opt; /* equivalent to optopt */
char *arg; /* equivalent to optarg */
in... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kexpr.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.505986 | #ifndef KEXPR_H
#define KEXPR_H
#include <stdint.h>
struct kexpr_s;
typedef struct kexpr_s kexpr_t;
// Parse errors
#define KEE_UNQU 0x01 // unmatched quotation marks
#define KEE_UNLP 0x02 // unmatched left parentheses
#define KEE_UNRP 0x04 // unmatched right parentheses
#define KEE_UNOP 0x08 // unknown ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | keigen.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.532239 | #ifndef KEIGEN_H
#define KEIGEN_H
#define KE_EXCESS_ITER (-1)
#ifdef __cplusplus
extern "C" {
#endif
/**
* Compute eigenvalues/vectors for a dense symmetric matrix
*
* @param n dimension
* @param a input matrix and eigenvalues on return ([n*n]; in & out)
* @param v eigenvalues ([n]; out)
* @p... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | keigen.c | null | null | null | null | null | null | C | 2026-05-04T18:26:46.549395 | #include <math.h>
#include <stdlib.h>
#include "keigen.h"
void ke_core_strq(int n, double *q, double *b, double *c)
{
int i, j, k, u, v;
double h, f, g, h2;
for (i = n - 1; i >= 1; i--) {
h = 0.0;
if (i > 1)
for (k = 0; k < i; k++) {
u = i * n + k;
h = h + q[u] * q[u];
}
if (h + 1.0 == 1.0) {
... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kgraph.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.579546 | #ifndef AC_KGRAPH_H
#define AC_KGRAPH_H
#include <stdint.h>
#include <stdlib.h>
#include "khash.h"
#include "kbtree.h"
typedef unsigned kgint_t;
#define kgraph_t(name) kh_##name##_t
#define __KG_BASIC(name, SCOPE, vertex_t, arc_t, ehn) \
SCOPE kgraph_t(name) *kg_init_##name(void) { return kh_init(name); } \
SCOPE... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kexpr.c | null | null | null | null | null | null | C | 2026-05-04T18:26:46.580595 | #include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <assert.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include "kexpr.h"
/***************
* Definitions *
***************/
#define KEO_NULL 0
#define KEO_POS 1
#define KEO_NEG 2
#define KEO_BNOT 3
#define KEO_LNOT 4
#define KEO... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | khash.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.609088 | /* The MIT License
Copyright (c) 2008, 2009, 2011 by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | khashl.h | null | null | null | null | null | null | C | 2026-05-04T18:26:46.617861 | /* The MIT License
Copyright (c) 2019- by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | khmm.c | null | null | null | null | null | null | C | 2026-05-04T18:26:46.623255 | #include <math.h>
#include <stdio.h>
#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include "khmm.h"
// new/delete hmm_par_t
hmm_par_t *hmm_new_par(int m, int n)
{
hmm_par_t *hp;
int i;
assert(m > 0 && n > 0);
hp = (hmm_par_t*)calloc(1, sizeof(hmm_par_t));
hp->m = m; hp->n = n;
hp->a0 = (FLOAT*)ca... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | khmm.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.097840 | #ifndef AC_SCHMM_H_
#define AC_SCHMM_H_
/*
* Last Modified: 2008-03-10
* Version: 0.1.0-8
*
* 2008-03-10, 0.1.0-8: make icc report two more "VECTORIZED"
* 2008-03-10, 0.1.0-7: accelerate for some CPU
* 2008-02-07, 0.1.0-6: simulate sequences
* 2008-01-15, 0.1.0-5: goodness of fit
* 2007-11-20, 0.1.0-4: add fun... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | klist.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.143506 | /* The MIT License
Copyright (c) 2008-2009, by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limita... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kmempool.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.150568 | #include <stdint.h>
#include <stdlib.h>
#include "kmempool.h"
#define Malloc(type, cnt) ((type*)malloc((cnt) * sizeof(type)))
#define Calloc(type, cnt) ((type*)calloc((cnt), sizeof(type)))
#define Realloc(type, ptr, cnt) ((type*)realloc((ptr), (cnt) * sizeof(type)))
typedef struct {
uint32_t sz; // size ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kmath.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.151677 | #ifndef AC_KMATH_H
#define AC_KMATH_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**************************
* Non-linear programming *
**************************/
#define KMIN_RADIUS 0.5
#define KMIN_EPS 1e-7
#define KMIN_MAXCALL 50000
typedef double (*kmin_f)(int, double*, void*);
... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kmath.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.177269 | #include <stdlib.h>
#include <string.h>
#include <math.h>
#include "kmath.h"
/******************************
*** Non-linear programming ***
******************************/
/* Hooke-Jeeves algorithm for nonlinear minimization
Based on the pseudocodes by Bell and Pike (CACM 9(9):684-685), and
the revision by ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kmempool.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.225647 | #ifndef AC_KMEMPOOL_H
#define AC_KMEMPOOL_H
#ifdef __cplusplus
extern "C" {
#endif
void *kmp_init(unsigned sz);
void kmp_destroy(void *mp);
void *kmp_alloc(void *mp);
void kmp_free(void *mp, void *p);
#ifdef __cplusplus
}
#endif
#endif
|
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | knhx.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.226844 | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "knhx.h"
typedef struct {
int error, n, max;
knhx1_t *node;
} knaux_t;
static inline char *add_node(const char *s, knaux_t *aux, int x)
{
char *p, *nbeg, *nend = 0;
knhx1_t *r;
if (aux->n == aux->max) {
aux->max = aux->max? ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | knetfile.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.259429 | #ifndef KNETFILE_H
#define KNETFILE_H
#include <stdint.h>
#include <fcntl.h>
#ifndef _WIN32
#define netread(fd, ptr, len) read(fd, ptr, len)
#define netwrite(fd, ptr, len) write(fd, ptr, len)
#define netclose(fd) close(fd)
#else
#include <winsock2.h>
#define netread(fd, ptr, len) recv(fd, ptr, len, 0)
#define netwrit... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | knhx.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.263529 | #ifndef KNHX_H_
#define KNHX_H_
#define KNERR_MISSING_LEFT 0x01
#define KNERR_MISSING_RGHT 0x02
#define KNERR_BRACKET 0x04
#define KNERR_COLON 0x08
typedef struct {
int parent, n;
int *child;
char *name;
double d;
} knhx1_t;
#ifndef KSTRING_T
#define KSTRING_T kstring_t
typedef struct __kstri... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | knetfile.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.308880 | /* The MIT License
Copyright (c) 2008 by Genome Research Ltd (GRL).
2010 by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software wi... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kopen.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.738083 | #include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <ctype.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/types.h>
#ifndef _WIN32
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#endif
#ifdef _WIN32
#define _KO_NO_NET
#endif
#ifndef _KO... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | krng.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.748296 | #ifndef KRNG_H
#define KRNG_H
typedef struct {
uint64_t s[2];
} krng_t;
static inline uint64_t kr_splitmix64(uint64_t x)
{
uint64_t z = (x += 0x9E3779B97F4A7C15ULL);
z = (z ^ (z >> 30)) * 0xBF58476D1CE4E5B9ULL;
z = (z ^ (z >> 27)) * 0x94D049BB133111EBULL;
return z ^ (z >> 31);
}
static inline uint64_t kr_rand_r... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | ksa.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.793649 | /*
* Copyright (c) 2008 Yuta Mori All Rights Reserved.
* 2011 Attractive Chaos <attractor@live.co.uk>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restr... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kseq.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.797725 | /* The MIT License
Copyright (c) 2008, 2009, 2011 Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without lim... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kson.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.811221 | #ifndef KSON_H
#define KSON_H
#include <string.h>
#define KSON_TYPE_NO_QUOTE 1
#define KSON_TYPE_SGL_QUOTE 2
#define KSON_TYPE_DBL_QUOTE 3
#define KSON_TYPE_BRACKET 4
#define KSON_TYPE_BRACE 5
#define KSON_OK 0
#define KSON_ERR_EXTRA_LEFT 1
#define KSON_ERR_EXTRA_RIGHT 2
#define KSON_ERR_NO_KEY ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kson.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.832458 | #include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include "kson.h"
/*************
*** Parse ***
*************/
kson_node_t *kson_parse_core(const char *json, long *_n, int *error, long *parsed_len)
{
long *stack = 0, top = 0, max = 0, n_a = 0, m_... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | krmq.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.848607 | /* The MIT License
Copyright (c) 2019 by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation t... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | ksort.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.901373 | /* The MIT License
Copyright (c) 2008, 2011 Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitatio... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kstring.c | null | null | null | null | null | null | C | 2026-05-04T18:26:47.906687 | #include <stdarg.h>
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <stdint.h>
#include "kstring.h"
int kvsprintf(kstring_t *s, const char *fmt, va_list ap)
{
va_list args;
int l;
va_copy(args, ap);
l = vsnprintf(s->s + s->l, s->m - s->l, fmt, args); // This line does not work with glibc 2.0. Se... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kstring.h | null | null | null | null | null | null | C | 2026-05-04T18:26:47.909774 | /* The MIT License
Copyright (c) by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the r... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | ksw.c | null | null | null | null | null | null | C | 2026-05-04T18:26:48.351777 | /* The MIT License
Copyright (c) 2011 by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation t... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | ksw.h | null | null | null | null | null | null | C | 2026-05-04T18:26:48.363468 | #ifndef __AC_KSW_H
#define __AC_KSW_H
#include <stdint.h>
#define KSW_XBYTE 0x10000
#define KSW_XSTOP 0x20000
#define KSW_XSUBO 0x40000
#define KSW_XSTART 0x80000
struct _kswq_t;
typedef struct _kswq_t kswq_t;
typedef struct {
int score; // best score
int te, qe; // target end and query end
int score2, te2; /... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kthread.h | null | null | null | null | null | null | C | 2026-05-04T18:26:48.433368 | #ifndef KTHREAD_H
#define KTHREAD_H
#ifdef __cplusplus
extern "C" {
#endif
void kt_for(int n_threads, void (*func)(void*,long,int), void *data, long n);
void kt_pipeline(int n_threads, void *(*func)(void*, int, void*), void *shared_data, int n_steps);
void *kt_forpool_init(int n_threads);
void kt_forpool_destroy(voi... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kurl.c | null | null | null | null | null | null | C | 2026-05-04T18:26:48.434121 | #include <stdio.h>
#include <fcntl.h>
#include <ctype.h>
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <curl/curl.h>
#include "kurl.h"
/**********************
*** Core kurl APIs ***
**********************/
#define KU_DEF_BUFLEN 0x8000
#define KU_MAX_S... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kurl.h | null | null | null | null | null | null | C | 2026-05-04T18:26:48.437227 | #ifndef KURL_H
#define KURL_H
#include <sys/types.h>
#define KURL_NULL 1
#define KURL_INV_WHENCE 2
#define KURL_SEEK_OUT 3
#define KURL_NO_AUTH 4
struct kurl_t;
typedef struct kurl_t kurl_t;
typedef struct {
const char *s3keyid;
const char *s3secretkey;
const char *s3key_fn;
} kurl_opt_t;
#ifdef __cp... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kthread.c | null | null | null | null | null | null | C | 2026-05-04T18:26:48.465098 | #include <pthread.h>
#include <stdlib.h>
#include <limits.h>
/************
* kt_for() *
************/
struct kt_for_t;
typedef struct {
struct kt_for_t *t;
long i;
} ktf_worker_t;
typedef struct kt_for_t {
int n_threads;
long n;
ktf_worker_t *w;
void (*func)(void*,long,int);
void *data;
} kt_for_t;
static... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | kvec.h | null | null | null | null | null | null | C | 2026-05-04T18:26:48.473995 | /* The MIT License
Copyright (c) 2008, by Attractive Chaos <attractor@live.co.uk>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation ... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | test/kavl-lite_test.c | null | null | null | null | null | null | C | 2026-05-04T18:26:48.518466 | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "kavl-lite.h"
#define CALLOC(type, num) ((type*)calloc(num, sizeof(type)))
struct my_node {
int key;
KAVLL_HEAD(struct my_node) head;
};
#define my_cmp(p, q) (((p)->key > (q)->key) - ((p)->key < (q)->key))
KAVLL_INIT(my, struct... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | test/kavl_test.c | null | null | null | null | null | null | C | 2026-05-04T18:26:48.519072 | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "kavl.h"
#define CALLOC(type, num) ((type*)calloc(num, sizeof(type)))
struct my_node {
int key;
KAVL_HEAD(struct my_node) head;
};
#define my_cmp(p, q) (((p)->key > (q)->key) - ((p)->key < (q)->key))
KAVL_INIT(my, struct my_nod... |
attractivechaos/klib | https://github.com/attractivechaos/klib | null | null | null | null | 4,655 | null | null | mit | null | null | null | null | null | null | null | test/kbarena_test.c | null | null | null | null | null | null | C | 2026-05-04T18:26:48.575955 | #include <stdio.h>
#include "kbarena.h"
int main(void)
{
int i;
void *ba;
ba = kba_init(1000);
for (i = 0; i < 100; ++i)
kba_alloc(ba, 23, 1);
kba_save(ba);
for (i = 0; i < 100; ++i)
kba_alloc(ba, 29, 1);
kba_restore(ba);
for (i = 0; i < 100; ++i)
kba_alloc(ba, 29, 1);
kba_destroy(ba);
return 0;
}
|
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-0-minimal/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:50.954514 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
int main(void) {
return 0;
}
// Startup code
__attribute__((naked, noreturn)) void _reset(void) {
// memset .bss to zero, and copy .data section to RAM region
extern long _sbss, _ebss, _sdata, _edata, _sidata;
for (long *dst = &_sbss; dst <... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-4-printf/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:50.969352 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include "hal.h"
static volatile uint32_t s_ticks;
void SysTick_Handler(void) {
s_ticks++;
}
int main(void) {
uint16_t led = PIN('B', 7); // Blue LED
systick_init(FREQ / 1000); // Tick every 1 ms
gpio_set_mode(led, G... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-4-printf/hal.h | null | null | null | null | null | null | C | 2026-05-04T18:26:50.998273 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#define FREQ 16000000 // CPU frequency, 16 Mhz
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((bank) - 'A') << 8) | (num))... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-3-uart/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.002653 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#define FREQ 16000000 // CPU frequency, 16 Mhz
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((bank) - 'A') << 8) | (num))
#define PINNO(pin) (pin & 255)
#define PINBANK(pin) (p... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-4-printf/syscalls.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.003898 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <sys/stat.h>
#include "hal.h"
int _fstat(int fd, struct stat *st) {
if (fd < 0) return -1;
st->st_mode = S_IFCHR;
return 0;
}
void *_sbrk(int incr) {
extern char _end;
static unsigned char *heap = NULL;
unsigned char *prev_he... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-5-cmsis/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.018766 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include "hal.h"
static volatile uint32_t s_ticks;
void SysTick_Handler(void) {
s_ticks++;
}
uint32_t SystemCoreClock = FREQ;
void SystemInit(void) {
RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; // Enable SYSCFG
SysTick_Config(SystemCoreClock / ... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-2-systick/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.049017 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <inttypes.h>
#include <stdbool.h>
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((bank) - 'A') << 8) | (num))
#define PINNO(pin) (pin & 255)
#define PINBANK(pin) (pin >> 8)
struct systick {
volatile uint32_t CTRL, LOAD, VAL, CALI... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-1-blinky/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.050118 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <inttypes.h>
#include <stdbool.h>
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((bank) - 'A') << 8) | (num))
#define PINNO(pin) (pin & 255)
#define PINBANK(pin) (pin >> 8)
struct rcc {
volatile uint32_t CR, PLLCFGR, CFGR, CIR, A... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-4-printf/startup.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.066842 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
// Startup code
__attribute__((naked, noreturn)) void _reset(void) {
// Initialise memory
extern long _sbss, _ebss, _sdata, _edata, _sidata;
for (long *dst = &_sbss; dst < &_ebss; dst++) *dst = 0;
for (long *dst = &_sdata, *src = &_sidata; d... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-5-cmsis/hal.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.068079 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "stm32f429xx.h"
#define FREQ 16000000 // CPU frequency, 16 Mhz
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((b... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-5-cmsis/syscalls.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.546710 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <sys/stat.h>
#include "hal.h"
int _fstat(int fd, struct stat *st) {
if (fd < 0) return -1;
st->st_mode = S_IFCHR;
return 0;
}
void *_sbrk(int incr) {
extern char _end;
static unsigned char *heap = NULL;
unsigned char *prev_he... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-6-clock/sysinit.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.613317 | // Copyright (c) 2023 Cesanta Software Limited
// All rights reserved
//
// This file contains essentials required by the CMSIS:
// uint32_t SystemCoreClock - holds the system core clock value
// SystemInit() - initialises the system, e.g. sets up clocks
#include "hal.h"
uint32_t SystemCoreClock = SYS_FREQUENCY;
voi... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/hal.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.616754 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#define TM4C1294NCPDT
#include "TM4C129.h"
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((bank << 8) | (num))
#define PINNO... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-6-clock/hal.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.617687 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
// https://www.st.com/resource/en/reference_manual/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf
#pragma once
#include <stm32f429xx.h>
#include <stdbool.h>
#include <st... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-6-clock/syscalls.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.653963 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <sys/stat.h>
#include "hal.h"
int _fstat(int fd, struct stat *st) {
if (fd < 0) return -1;
st->st_mode = S_IFCHR;
return 0;
}
void *_sbrk(int incr) {
extern char _end;
static unsigned char *heap = NULL;
unsigned char *prev_he... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-6-clock/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:51.654537 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include "hal.h"
static volatile uint32_t s_ticks;
void SysTick_Handler(void) {
s_ticks++;
}
int main(void) {
uint16_t led = PIN('B', 7); // Blue LED
gpio_output(led); // Set blue LED to output mode
uart_init(UART_DEBUG, ... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/include/TM4C129.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.707371 | /**************************************************************************//**
* @file TM4C129.h
* @brief CMSIS Device System Header File for
* Texas Instruments Tiva TM4C129 Device Series
* @version V12591
* @date 12. February 2014
*
* @note
*
*******************************************... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/include/cmsis_compiler.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.720871 | /**************************************************************************//**
* @file cmsis_compiler.h
* @brief CMSIS compiler generic header file
* @version V5.0.4
* @date 10. January 2018
******************************************************************************/
/*
* Copyright (c) 2009-2018 A... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/include/cmsis_version.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.721422 | /**************************************************************************//**
* @file cmsis_version.h
* @brief CMSIS Core(M) Version definitions
* @version V5.0.2
* @date 19. April 2017
******************************************************************************/
/*
* Copyright (c) 2009-2017 ARM L... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/include/cmsis_gcc.h | null | null | null | null | null | null | C | 2026-05-04T18:26:51.729652 | /**************************************************************************//**
* @file cmsis_gcc.h
* @brief CMSIS compiler GCC header file
* @version V5.0.4
* @date 09. April 2018
******************************************************************************/
/*
* Copyright (c) 2009-2018 Arm Limited.... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/include/mpu_armv7.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.215549 | /******************************************************************************
* @file mpu_armv7.h
* @brief CMSIS MPU API for Armv7-M MPU
* @version V5.0.4
* @date 10. January 2018
******************************************************************************/
/*
* Copyright (c) 2017-2018 Arm Limited... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:52.277945 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include "hal.h"
#include "mongoose.h"
static volatile uint32_t s_ticks;
void SysTick_Handler(void) {
s_ticks++;
}
uint64_t mg_millis(void) { // Declare our own uptime function
return s_ticks; // Return number of milliseconds since ... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/include/system_TM4C129.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.279442 | /**************************************************************************//**
* @file system_TM4C129.h
* @brief CMSIS Cortex-M4 Device Peripheral Access Layer Header File for
* TI Tiva TM4C129 Snowflake Class Devices
* @version V3.1
* @date 15. May 2013
*
* @note
* Copyright (C) ... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/mongoose.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.287975 | // Copyright (c) 2004-2013 Sergey Lyubka
// Copyright (c) 2013-2022 Cesanta Software Limited
// All rights reserved
//
// This software is dual-licensed: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation. For the terms... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/mongoose_custom.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.297097 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#define MG_ARCH MG_ARCH_NEWLIB
#define MG_ENABLE_MIP 1
#define MG_ENABLE_DRIVER_TM4C 1
#define MG_ENABLE_PACKED_FS 1
#define MG_IO_SIZE 512
#define MG_ENABLE_CUSTOM_MILLIS 1
|
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/net.c | null | null | null | null | null | null | C | 2026-05-04T18:26:52.298337 | // Copyright (c) 2020-2022 Cesanta Software Limited
// All rights reserved
#include "mongoose.h"
#if !defined(MQTT_SERVER)
#define MQTT_SERVER "mqtt://broker.hivemq.com:1883"
#endif
#define MQTT_PUBLISH_TOPIC "mg/my_device"
#define MQTT_SUBSCRIBE_TOPIC "mg/#"
static time_t s_boot_timestamp = 0; // Upda... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/include/cmsis_compiler.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.368272 | /**************************************************************************//**
* @file cmsis_compiler.h
* @brief CMSIS compiler generic header file
* @version V5.0.4
* @date 10. January 2018
******************************************************************************/
/*
* Copyright (c) 2009-2018 A... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/startup.c | null | null | null | null | null | null | C | 2026-05-04T18:26:52.380843 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
// Startup code
__attribute__((naked, noreturn)) void _reset(void) {
// Initialise memory
extern long _sbss, _ebss, _sdata, _edata, _sidata;
for (long *dst = &_sbss; dst < &_ebss; dst++) *dst = 0;
for (long *dst = &_sdata, *src = &_sidata; d... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/ek-tm4c1294xl/syscalls.c | null | null | null | null | null | null | C | 2026-05-04T18:26:52.381833 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <sys/stat.h>
#include "hal.h"
int _fstat(int fd, struct stat *st) {
if (fd < 0) return -1;
st->st_mode = S_IFCHR;
return 0;
}
void *_sbrk(int incr) {
extern char _end;
static unsigned char *heap = NULL;
unsigned char *prev_he... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/hal.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.409248 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "stm32f429xx.h"
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((bank) - 'A') << 8) | (num))
#define PINNO(pin) (p... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/include/cmsis_gcc.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.874903 | /**************************************************************************//**
* @file cmsis_gcc.h
* @brief CMSIS compiler GCC header file
* @version V5.0.4
* @date 09. April 2018
******************************************************************************/
/*
* Copyright (c) 2009-2018 Arm Limited.... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:52.922288 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include "hal.h"
#include "mongoose.h"
static volatile uint32_t s_ticks;
void SysTick_Handler(void) { s_ticks++; } // IRQ handler
uint64_t mg_millis(void) { return s_ticks; } // For Mongoose
int main(void) {
uint16_t led = PIN('B', 7); ... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/include/mpu_armv7.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.926550 | /******************************************************************************
* @file mpu_armv7.h
* @brief CMSIS MPU API for Armv7-M MPU
* @version V5.0.4
* @date 10. January 2018
******************************************************************************/
/*
* Copyright (c) 2017-2018 Arm Limited... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/mongoose_custom.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.956610 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#define MG_ARCH MG_ARCH_NEWLIB
#define MG_ENABLE_MIP 1
#define MG_ENABLE_PACKED_FS 1
#define MG_IO_SIZE 512
#define MG_ENABLE_CUSTOM_MILLIS 1
|
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/include/cmsis_version.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.986743 | /**************************************************************************//**
* @file cmsis_version.h
* @brief CMSIS Core(M) Version definitions
* @version V5.0.2
* @date 19. April 2017
******************************************************************************/
/*
* Copyright (c) 2009-2017 ARM L... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/mongoose.h | null | null | null | null | null | null | C | 2026-05-04T18:26:52.988142 | // Copyright (c) 2004-2013 Sergey Lyubka
// Copyright (c) 2013-2022 Cesanta Software Limited
// All rights reserved
//
// This software is dual-licensed: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation. For the terms... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/startup.c | null | null | null | null | null | null | C | 2026-05-04T18:26:53.005990 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
// Startup code
__attribute__((naked, noreturn)) void _reset(void) {
// Initialise memory
extern long _sbss, _ebss, _sdata, _edata, _sidata;
for (long *dst = &_sbss; dst < &_ebss; dst++) *dst = 0;
for (long *dst = &_sdata, *src = &_sidata; d... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/include/system_stm32f4xx.h | null | null | null | null | null | null | C | 2026-05-04T18:26:53.012058 | /**
******************************************************************************
* @file system_stm32f4xx.h
* @author MCD Application Team
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
******************************************************************************
*... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/net.c | null | null | null | null | null | null | C | 2026-05-04T18:26:53.036199 | // Copyright (c) 2020-2022 Cesanta Software Limited
// All rights reserved
#include "mongoose.h"
#if !defined(MQTT_SERVER)
#define MQTT_SERVER "mqtt://broker.hivemq.com:1883"
#endif
#define MQTT_PUBLISH_TOPIC "mg/my_device"
#define MQTT_SUBSCRIBE_TOPIC "mg/#"
static time_t s_boot_timestamp = 0; // Upda... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/nucleo-f429zi/syscalls.c | null | null | null | null | null | null | C | 2026-05-04T18:26:53.037416 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <sys/stat.h>
#include "hal.h"
int _fstat(int fd, struct stat *st) {
if (fd < 0) return -1;
st->st_mode = S_IFCHR;
return 0;
}
void *_sbrk(int incr) {
extern char _end;
static unsigned char *heap = NULL;
unsigned char *prev_he... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/pico-w5500/hal.h | null | null | null | null | null | null | C | 2026-05-04T18:26:53.464005 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#pragma once
#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#define BIT(x) (1UL << (x))
#define PIN(bank, num) ((((bank) - 'A') << 8) | (num))
#define PINNO(pin) ((pin) &255)
#define PINBANK(pin) ((pin) >> 8)
st... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/pico-w5500/main.c | null | null | null | null | null | null | C | 2026-05-04T18:26:53.537723 | // Copyright (c) 2023 Cesanta Software Limited
// All rights reserved
#include "hal.h"
#include "mongoose.h"
enum { LED = 25 }; // LED pins
enum { UART_TX = 0, UART_RX = 1 }; // UART pins
enum { SPI_CS = 17, SPI_CLK = 18, SPI_TX = 19, SPI_RX = 16... |
cpq/bare-metal-programming-guide | https://github.com/cpq/bare-metal-programming-guide | null | null | null | null | 4,618 | null | null | mit | null | null | null | null | null | null | null | steps/step-7-webserver/pico-w5500/syscalls.c | null | null | null | null | null | null | C | 2026-05-04T18:26:53.610733 | // Copyright (c) 2022 Cesanta Software Limited
// All rights reserved
#include <sys/stat.h>
#include "hal.h"
int _fstat(int fd, struct stat *st) {
if (fd < 0) return -1;
st->st_mode = S_IFCHR;
return 0;
}
void *_sbrk(int incr) {
extern char _end;
static unsigned char *heap = NULL;
unsigned char *prev_he... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.