code stringlengths 6 250k | repo_name stringlengths 5 70 | path stringlengths 3 177 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 250k |
|---|---|---|---|---|---|
/*
* Read and write JSON.
*
* Copyright (c) 2014 Marko Kreen
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "A... | markokr/libusual | usual/json.c | C | isc | 38,477 |
/* Copyright information is at end of file */
#include "xmlrpc_config.h"
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "stdargx.h"
#include "xmlrpc-c/base.h"
#include "xmlrpc-c/base_int.h"
#include "xmlrpc-c/string_int.h"
static void
getString(xmlrpc_env *const envP,
... | arssivka/naomech | xmlrpc-c/src/xmlrpc_build.c | C | isc | 12,744 |
/* ISC license. */
#include <bearssl.h>
#include <s6-networking/sbearssl.h>
int sbearssl_skey_to (sbearssl_skey const *l, br_skey *k, char *s)
{
switch (l->type)
{
case BR_KEYTYPE_RSA :
sbearssl_rsa_skey_to(&l->data.rsa, &k->data.rsa, s) ;
break ;
case BR_KEYTYPE_EC :
sbearssl_ec_skey_to... | skarnet/s6-networking | src/sbearssl/sbearssl_skey_to.c | C | isc | 438 |
/*!
* DASSL solver library description
*/
#include "libinfo.h"
extern void _start()
{
_library_ident("DAE solver library");
_library_task("interfaces to generic IVP solver");
_library_task("operations on data for included solvers");
_library_task("DASSL solver backend");
_library_task("RADAU solver backend")... | becm/mpt-solver | modules/daesolv/libinfo.c | C | isc | 379 |
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <sys/endian.h>
#include <sysexits.h>
#include <mpg123.h>
#include "audio.h"
#include "mp3.h"
struct mp3 {
mpg123_handle *h;
int fd;
int first;
int rate;
int chann... | kdhp/play | mp3.c | C | isc | 2,590 |
/*
* Copyright 2005-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/lice... | ibc/MediaSoup | worker/deps/openssl/openssl/crypto/whrlpool/wp_block.c | C | isc | 34,797 |
/* Copyright (c) 2016, 2021 Dennis Wölfing
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR D... | dennis95/dennix | libc/src/stdio/printf.c | C | isc | 1,043 |
/*-
* builtin.c
* This file is part of libmetha
*
* Copyright (c) 2008, Emil Romanus <emil.romanus@gmail.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear... | nicholaides/Methanol-Web-Crawler | src/libmetha/builtin.c | C | isc | 6,361 |
/* Copyright (c) 2019, 2022 Dennis Wölfing
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR D... | dennis95/dennix | libc/src/stdio/__file_write.c | C | isc | 1,293 |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... | pscedu/slash2-stable | zfs-fuse/src/lib/libzfs/libzfs_pool.c | C | isc | 94,615 |
/* MIT License (From https://choosealicense.com/ )
Copyright (c) 2017 Jonathan Burget support@solarfusionsoftware.com
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, includin... | TigerFusion/TigerEngine | TIGString.c | C | mit | 36,020 |
// rd_route.c
// Copyright (c) 2014-2015 Dmitry Rodionov
//
// This software may be modified and distributed under the terms
// of the MIT license. See the LICENSE file for details.
#include <stdlib.h> // realloc()
#include <libgen.h> // basename()
#include <assert.h> // assert()
#include <std... | XVimProject/XVim2 | XVim2/Helper/rd_route.c | C | mit | 3,016 |
// Multiprocessor support
// mist32 is not supported multiprocessor
#include "types.h"
#include "defs.h"
#include "param.h"
#include "memlayout.h"
#include "mmu.h"
#include "proc.h"
struct cpu cpus[NCPU];
int ismp;
int ncpu;
void
mpinit(void)
{
ismp = 0;
ncpu = 1;
lapic = 0;
cpus[ncpu].id = ncpu;
ncpu++;
... | techno/xv6-mist32 | mp.c | C | mit | 333 |
/*
* COPYRIGHT: Stealthy Labs LLC
* DATE: 29th May 2015
* AUTHOR: Stealthy Labs
* SOFTWARE: Tea Time
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include <teatime.h>
static int teatime_check_gl_version(uint32_t *major, uint32_t *minor);
s... | stealthylabs/teatime | teatime.c | C | mit | 19,398 |
// make a linked list that has one member
// then make 5 nodes - with each node having 1,2,3,4,5 as data
// then print them out
// then work out how to reverse the list by only changing the pointers
// then print again
#include <stdio.h>
#include <stdlib.h> // Including this header to use malloc
struct node {
int n... | vinithanatarajan/Vini-training | c-exercises/structs/linked-list.c | C | mit | 1,014 |
typedef struct { f_t x, y; } vec_t, *vec;
//inline
f_t cross(vec a, vec b)
{
return a->x * b->y - a->y * b->x;
}
//inline
vec vsub(vec a, vec b, vec res)
{
res->x = a->x - b->x;
res->y = a->y - b->y;
}
// Does point c lie on the left side of directed edge a->b?
// 1 if left, -1 if right, 0 if on the li... | dancor/perfract | c/vec.c | C | mit | 504 |
#pragma config(Sensor, in1, linefollower, sensorLineFollower)
#pragma config(Sensor, dgtl5, OutputBeltSonar, sensorSONAR_mm)
#pragma config(Motor, port6, WhipCreamMotor, tmotorVex393, openLoop)
#pragma config(Motor, port7, InputBeltMotor, tmotorServoContinuousRotation, openLoop)
#pragma conf... | patkub/pltw-vex-robotc | CookieMaker_Sensor.c | C | mit | 1,901 |
#include <stdio.h>
#include "list.h"
#define N 10
link reverse(link);
int main(void) {
int i;
link head, x;
// Population
head = new_link(0);
x = head;
for (i = 1; i < N; ++i) {
x = insert_after(x, new_link(i));
}
// Reversal
head = reverse(head);
// Traversal
x = head;
do {
printf("%i\n", x->i... | bartobri/data-structures-c | linked-lists/circular-reversal/main.c | C | mit | 546 |
/**
* Reverb for the OpenAL cross platform audio library
* Copyright (C) 2008-2009 by Christopher Fitzgerald.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 ... | ghoulsblade/vegaogre | lugre/baselib/openal-soft-1.8.466/Alc/alcReverb.c | C | mit | 31,015 |
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <assert.h>
#include <sys/epoll.h>
#include "reactor.h"
struct state
{
reactor_handler input;
reactor_handler output;
char buffer[4096];
data remaining;
};
int fill(struct state *state)
{
ssize_t n;
... | fredrikwidlund/libreactor | example/fd.c | C | mit | 1,952 |
/*
* Search first occurence of a particular string in a given text [Finite Automata]
* Author: Progyan Bhattacharya <progyanb@acm.org>
* Repo: Design-And-Analysis-of-Algorithm [MIT LICENSE]
*/
#include "Search.h"
static int NextState(int m, char* pattern, int state, int symbol) {
if (state < m && pattern[stat... | Progyan1997/Design-and-Analysis-of-Algorithm | String Search/Finite Automata/Search.c | C | mit | 1,307 |
/************************
BUBBLE SORT
Author:Rhysn Date:2015
*************************/
#include <stdio.h>
#include <stdlib.h>
typedef int ElemType;
void swap(ElemType *left,ElemType *right){
ElemType temp = *left;
*left = *right;
*right = temp;
}
void BubbleSort(ElemType *array,int num){
... | Rhysn/Data-Structure-And-Algorithm | Sort/BubbleSort.c | C | mit | 917 |
/****************************************************************
Copyright (C) 2014 All rights reserved.
> File Name: < echo_server.c >
> Author: < Sean Guo >
> Mail: < iseanxp+code@gmail.com >
> Created Time: < 2014/06/19 >
> ... | SeanXP/ARM-Tiny6410 | linux/linux-example/socket_echo_server/echo_server.c | C | mit | 6,157 |
#include <compiler.h>
#if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32)
#include <common/strres.h>
#include <cpucore.h>
#include <pccore.h>
#include <io/iocore.h>
#include <generic/memdbg32.h>
#define MEMDBG32_MAXMEM 16
#define MEMDBG32_DATAPERLINE 128
#define MEMDBG32_LEFTMARGIN 8
typedef struct... | AZO234/NP2kai | generic/memdbg32.c | C | mit | 3,962 |
/* crypto/cryptlib.c */
/* ====================================================================
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:... | vbloodv/blood | extern/openssl.orig/crypto/thr_id.c | C | mit | 9,864 |
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include "server.h"
#include "rio.h"
int wri... | cheniison/Experiment | OS/WebServer/server.c | C | mit | 4,428 |
#include <assert.h>
#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// #include <antlr3.h>
#include "toml.h"
#include "toml-parser.h"
// #include "tomlParser.h"
// #include "tomlLexer.h"
struct _TOMLStringifyData {
TOMLError *error;
int bufferSi... | mzgoddard/tomlc | toml.c | C | mit | 25,919 |
#include "udivmodti4.h"
__int128 __modti3(__int128 a, __int128 b)
{
unsigned __int128 r;
unsigned __int128 sign = a >> 127;
udivmodti4_(a + sign ^ sign, b < 0 ? -b : b, &r);
return r + sign ^ sign;
}
| jdh8/metallic | src/soft/integer/modti3.c | C | mit | 219 |
/* Error handling */
#include "Python.h"
void
PyErr_Restore(PyObject *type, PyObject *value, PyObject *traceback)
{
PyThreadState *tstate = PyThreadState_GET();
PyObject *oldtype, *oldvalue, *oldtraceback;
/* Save these in locals to safeguard against recursive
invocation through Py_XDECREF */
oldtype = tsta... | jtauber/cleese | necco/python/Python/errors.c | C | mit | 8,613 |
/*
* mysplit.c - Another handy routine for testing your tiny shell
*
* usage: mysplit <n>
* Fork a child that spins for <n> seconds in 1-second chunks.
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
int main(int argc, char **argv)
{
... | heapsters/shelldon | routines/mysplit.c | C | mit | 640 |
/* This is a managed file. Do not delete this comment. */
#include <include/lifecycle.h>
static void echo(lifecycle_Foo this, char* hook) {
corto_state s = corto_stateof(this);
char *stateStr = corto_ptr_str(&s, corto_state_o, 0);
corto_info("callback: %s [%s]",
hook,
stateStr);
free(... | cortoproject/examples | c/modeling/lifecycle/src/Foo.c | C | mit | 1,051 |
//#include <stdio.h>
//#include <stdlib.h>
//#include <stdint.h>
//#include <stdbool.h>
//#include <string.h>
//#include <stddef.h>
#include "esp_common.h"
#include "coap.h"
#include "shell.h"
//#include <rtthread.h>
//#define shell_printf rt_kshell_printf
extern void endpoint_setup(void);
extern const... | AccretionD/ESP8266_freertos_coap | app/user/coap.c | C | mit | 12,020 |
#include <stdio.h>
#include <stdlib.h> /* exit, free */
#include <string.h> /* for manipulating filename */
#include "defines.h" /* type definitions and macros for flags and MAX limits */
#include "structs.h" /* structures used (needs defines.h) */
Category* cats[ MAX_TOT_CATS... | pastoref/VendingMachine | support/categoryPartitionTool-TSL/main.c | C | mit | 6,585 |
/* Aranea
* Copyright (c) 2011-2012, Quoc-Viet Nguyen
* See LICENSE file for copyright and license details.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <aranea/aranea.h>
#define CGI_E... | nqv/aranea | src/cgi.c | C | mit | 5,878 |
#include "minunit.h"
#include <lcthw/darray_algos.h>
#include <stdlib.h>
#include <time.h>
#include <limits.h>
static inline int intcmp(int **a, int **b) {
return **a - **b;
}
static inline int sintcmp(int *a, int *b) {
return *a - *b;
}
int make_random(DArray *array, size_t n) {
srand(time(NULL));
s... | reem/LCTHW-Lib | tests/darray_algos_tests.c | C | mit | 3,747 |
/*
* (C) Copyright 2012 SAMSUNG Electronics
* Jaehoon Chung <jh80.chung@samsung.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <dm.h>
#include <malloc.h>
#include <sdhci.h>
#include <fdtdec.h>
#include <linux/libfdt.h>
#include <asm/gpio.h>
#include <asm/arch/mmc.h>
#include <asm/arch/... | guileschool/BEAGLEBONE-tutorials | BBB-firmware/u-boot-v2018.05-rc2/drivers/mmc/s5p_sdhci.c | C | mit | 6,778 |
#include <stdio.h>
#include <stdlib.h>
static inline void swap(int *a, int *b)
{
int tmp = *a;
*a = *b;
*b = tmp;
}
static int firstMissingPositive(int* nums, int numsSize)
{
if (numsSize == 0) {
return 1;
}
int i = 0;
while (i < numsSize) {
/* nums[i] should be i+1 and nu... | begeekmyfriend/leetcode | 0041_first_missing_positive/missing_positive.c | C | mit | 989 |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <pthread.h>
#include <errno.h>
#include "semaphore.h"
typedef struct lock {
Semaphore *sem;
} Lock;
Lock *make_lock ()
{
Lock *lock = (Lock *) malloc (sizeof(Lock));
lock->sem = make_semaphore(1);
return lock;
}
void l... | AllenDowney/ExercisesInC | examples/lock/semlock.c | C | mit | 445 |
/*
* The MIT License (MIT): http://opensource.org/licenses/mit-license.php
*
* Copyright (c) 2013-2014, Chris Behrens
*
* 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 restrict... | comstud/filament | src/locking/fil_lock.c | C | mit | 16,390 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "liste.h"
#include "atl.h"
#include "es.h"
#define FILE_ATLETI "atleti.txt"
#define FILE_ESERCIZI "esercizi.txt"
#define MAX_NOME 25
#define LUNG_CODICE 5
#define non_strutturato ;;
#ifdef _WIN32
#define F_CLEAR "cls"
#else
... | supermirtillo/polito-c-apa | L08/E04/main.c | C | mit | 8,509 |
/* 1023 组个最小数 (20 分)
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
// 处理输入
int n = 10;
int quantities[n];
for (int i = 0; i < n; i++)
{
if (scanf("%d", &quantities[i]) != 1)
return EXIT_FAILURE;
}
// 组装数字
int nums[5... | StudyExchange/PatPractise | pat-basic-level/1023.c | C | mit | 939 |
//
// console777.c
// crypto777
//
// Created by James on 4/9/15.
// Copyright (c) 2015 jl777. All rights reserved.
//
#ifdef DEFINES_ONLY
#ifndef crypto777_console777_h
#define crypto777_console777_h
#include <stdio.h>
#include <stdio.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.... | mezzovide/btcd | libjl777/plugins/common/console777.c | C | mit | 11,054 |
#include "icu.h"
#include "unicode/uspoof.h"
#define GET_SPOOF_CHECKER(_data) icu_spoof_checker_data* _data; \
TypedData_Get_Struct(self, icu_spoof_checker_data, &icu_spoof_checker_type, _data)
VALUE rb_cICU_SpoofChecker;
VALUE rb_mChecks;
VALUE rb_mRestrictionLevel;
typedef struct {... | fantasticfears/icu4r | ext/icu/icu_spoof_checker.c | C | mit | 9,203 |
/*
* Simple Vulkan application
*
* Copyright (c) 2016 by Mathias Johansson
*
* This code is licensed under the MIT license
* https://opensource.org/licenses/MIT
*/
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "util/vulkan.h"
#include "util/window.h"
int main() {... | Mathias9807/Vulkan-Demo | src/main.c | C | mit | 1,993 |
#include <stdio.h>
struct Employee {
unsigned int id;
char name[256];
char gender;
float salary;
};
void addEmployee(FILE *f) {
struct Employee emp;
printf("Adding a new employee, please type his id \n");
int id;
scanf("%d", &id);
if (id > 0) {
while (1) { //search if id already in use
struct Employee t... | Macelai/operating-systems | system-call/main.c | C | mit | 4,505 |
#include<stdio.h>
int main(void)
{
double a,b;
printf("Enter a\&b:\n");
while(scanf("%lf%lf",&a,&b)==2)
{
printf("%.3g - %.3g / %.3g * %.3g = %.3g .\n",a,b,a,b,(double)(a-b)/(a*b));
printf("\n");
printf("Enter a\&b:\n");
}
printf("done!");
return 0;
}
| programingc42/testC | ch6/PE6.8.c | C | mit | 252 |
//Generated by the Argon Build System
/***********************************************************************
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Re... | skylersaleh/ArgonEngine | common/opus/silk/float/warped_autocorrelation_FLP.c | C | mit | 3,596 |
/*
Fontname: -Adobe-Times-Medium-R-Normal--11-80-100-100-P-54-ISO10646-1
Copyright: Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved.
Glyphs: 191/913
BBX Build Mode: 0
*/
const uint8_t u8g2_font_timR08_tf[... | WiseLabCMU/gridballast | Source/framework/main/u8g2/tools/font/build/single_font_files/u8g2_font_timR08_tf.c | C | mit | 6,149 |
/*
* @brief This file contains USB HID Keyboard example using USB ROM Drivers.
*
* @note
* Copyright(C) NXP Semiconductors, 2013
* All rights reserved.
*
* @par
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* LPC pro... | miragecentury/M2_SE_RTOS_Project | Project/LPC1549_Keil/examples/usbd_rom/usbd_rom_hid_keyboard/hid_keyboard.c | C | mit | 7,219 |
//
// main.c
// demo14
//
// Created by weichen on 15/1/9.
// Copyright (c) 2015年 weichen. All rights reserved.
//
#include <stdio.h>
int main() {
// 求输入的数的平均数,并输出大于平均数的数字
int x = 0; //输入的数
double num = 0; //总和(这个定义为double, 因为计算结果可能出现浮点数)
int count = 0; //个数
double per; //平均数(结果... | farwish/Clang-foundation | demo14/demo14/main.c | C | mit | 841 |
/*
* Copyright (c) 2010, ETH Zurich.
* All rights reserved.
*
* INTERFACE NAME: mem
* INTEFACE FILE: ../if/mem.if
* INTERFACE DESCRIPTION: Memory allocation RPC interface
*
* This file is distributed under the terms in the attached LICENSE
* file. If you do not find this file, copies can be found by
* writi... | daleooo/barrelfish | build/x86_64/lib/barrelfish/_for_lib_barrelfish/mem_flounder_bindings.c | C | mit | 156,625 |
#include <stdio.h>
#include <stdint.h>
#include <ibcrypt/chacha.h>
#include <ibcrypt/rand.h>
#include <ibcrypt/sha256.h>
#include <ibcrypt/zfree.h>
#include <libibur/util.h>
#include <libibur/endian.h>
#include "datafile.h"
#include "../util/log.h"
int write_datafile(char *path, void *arg, void *data, struct forma... | iburinoc/ibchat | client/datafile.c | C | mit | 5,238 |
/**
* @file main.c
* @brief Main routine
*
* @section License
*
* Copyright (C) 2010-2015 Oryx Embedded SARL. 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; eit... | miragecentury/M2_SE_RTOS_Project | Project/LPC1549_Keil/CycloneTCP_SSL_Crypto_Open_1_6_4/demo/st/stm32f4_discovery/smtp_client_demo/src/main.c | C | mit | 12,503 |
#include <assert.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <video/gl.h>
#include <xxhash.h>
#include <memtrack.h>
#include "base/stack.h"
#include "core/common.h"
#include "base/math_ext.h"
#include "core/asset.h"
#include "core/configs.h"
#include "core/frame.h"
#include "core/logerr.h"
#include <c... | m1nuz/neon-core | neon/src/core/application.c | C | mit | 3,306 |
/*
* optimization needed.
*/
struct ListNode {
int val;
struct ListNode *next;
};
#ifndef NULL
#define NULL ((struct ListNode *)0)
#endif
struct ListNode *detectCycle(struct ListNode *head)
{
if (!head || !head->next)
return(NULL);
if (head->next == head)
return(head);
struct ListNode *p1, *p2;
int has... | wuzhouhui/leetcode | 142_linked_list_cycle_II.c | C | mit | 866 |
//
// MultibandBank.c
// FxDSP
//
// Created by Hamilton Kibbe on 11/24/13.
// Copyright (c) 2013 Hamilton Kibbe. All rights reserved.
//
#include "MultibandBank.h"
#include "LinkwitzRileyFilter.h"
#include "RBJFilter.h"
#include "FilterTypes.h"
#include <stdlib.h>
// Sqrt(2)/2
#define FILT_Q (0.70... | hamiltonkibbe/FxDSP | FxDSP/src/MultibandBank.c | C | mit | 8,273 |
#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>
int main(){
int pid1,pid2,pid3,pid4;
int p1[2],p2[2];
char bufr[30],rev[30];
int countL=0,countU=0,i=-1,j=0,countV=0,len;
pipe(p1);
pipe(p2);
if(pid1=fork()==0){
if(pid2=fork()==0){
read(p2[0],bufr,sizeof(bu... | CSE-SOE-CUSAT/NOSLab | csb/extras/a-b-c-d-pipe.c | C | mit | 1,716 |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* get_next_line.c :+: :+: :+: ... | gmange/RT | src/get_next_line.c | C | mit | 4,184 |
#include "src/math/float/log10f.c"
#include "log.h"
int main(void)
{
test(log10f, log10);
}
| jdh8/metallic | test/native/math/float/log10f.c | C | mit | 97 |
#include <math.h>
#include <stdio.h>
#include <pthread.h>
#include <stdlib.h>
#define THREAD_COUNT 4
typedef struct {
int start;
int end;
} range_t;
void *calculate_range(void* range) {
range_t* curr_range = (range_t*)range;
void* result = (void*)1;
for (int i = curr_range->start; i < curr_range... | arnaudoff/elsys | 2015-2016/operating-systems/threads_homework/main.c | C | mit | 1,476 |
#include "cf_internal.h"
#define CACHE_SIZE 1024
#define INDEX(i) ((i) % CACHE_SIZE)
static frame_cache_t* open_real_video_cache(cf_session_t* s)
{
frame_cache_t* cache = calloc(1, sizeof(frame_cache_t));
cache->wait_timer = s->proc->rtt + 2 * s->proc->rtt_val;
cache->state = buffer_waiting;
cache->frame_timer ... | yuanrongxi/sharing | sharing/buffer/cf_real_video.c | C | mit | 10,971 |
#include <pthread.h>
#include <assert.h>
int g = 17; // matches expected precise read
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&B);
pthread_mutex_lock(&C);
g = 42;
pt... | goblint/analyzer | tests/regression/13-privatized/42-traces-ex-mini.c | C | mit | 671 |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may ... | jlawton/ObjectiveAvro | Avro-C/src/resolved-reader.c | C | mit | 107,543 |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "search.h"
#include "marcov.h"
#define ORDER 2
int main(int argc, char **argv) {
int limit = 128;
if(argc > 1) {
limit = atoi(argv[1]);
}
void *strings = NULL;
struct timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
srand... | Cat-Ion/marcov | run-lines.c | C | mit | 745 |
/*
* main.c
*
* Created on: 31 May 2016
* Author: ajuaristi <a@juaristi.eus>
*/
#include <stdio.h>
#include <signal.h>
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <linux/videodev2.h>
#include <sys/stat.h>
#include "utils.h"
#include "appbase.h"
#include "uvc.h"
#... | juaristi/appbase-cctv | daemon-main.c | C | mit | 5,533 |
#include <stdio.h>
int main() {
int current_char, previous_char;
printf("Input text below, multiple spaces will be escaped:\n");
previous_char = -1;
while((current_char = getchar()) != EOF) {
if (!(current_char == ' ' && previous_char == ' ')) {
putchar(current_char);
}
previous_char = cu... | moki/The-C-Programming-Language-walkthrough | chapter-1-A-Tutorial-Introduction/escape-multiple-blanks.c | C | mit | 337 |
6650 #include "types.h"
6651 #include "x86.h"
6652
6653 void*
6654 memset(void *dst, int c, uint n)
6655 {
6656 if ((int)dst%4 == 0 && n%4 == 0){
6657 c &= 0xFF;
6658 stosl(dst, (c<<24)|(c<<16)|(c<<8)|c, n/4);
6659 } else
6660 stosb(dst, c, n);
6661 return dst;
6662 }
6663
6664 int
6665 memcmp(const... | animesh2049/xv6 | fmt/string.c | C | mit | 2,236 |
#include<stdio.h>
#include<math.h>
#include<conio.h>
#include<ctype.h>
int i,j,cash=100;
void wheel();
void game(int r);
void game_over();
int suit_bet();
int cash_bet();
int roll_wheel();
int roll_dice();
void wheel_count(int c,int h,int s);
void dice_count(int d,int h);
int w[9][9]={
{32,32,32,32,2,32,32,32,32... | abrarShariar/Roll-the-dice | final.c | C | mit | 4,262 |
#include "utlua.h"
#ifdef __linux__
#include <limits.h>
#include <linux/netfilter_ipv4.h>
#endif
#include <net/if.h>
#define LUA_TCPD_CONNECTION_TYPE "<tcpd.connect>"
#define LUA_TCPD_SERVER_TYPE "<tcpd.bind %s %d>"
#define LUA_TCPD_ACCEPT_TYPE "<tcpd.accept %s %d>"
#if FAN_HAS_OPENSSL
typedef struct
{
SSL_CTX *s... | luafan/luafan | src/tcpd.c | C | mit | 34,905 |
#include <stdint.h>
const uint8_t
#if defined __GNUC__
__attribute__((aligned(4)))
#elif defined _MSC_VER
__declspec(align(4))
#endif
mrblib_extman_irep[] = {
0x45,0x54,0x49,0x52,0x30,0x30,0x30,0x33,0x5a,0x89,0x00,0x00,0x44,0xcb,0x4d,0x41,
0x54,0x5a,0x30,0x30,0x30,0x30,0x49,0x52,0x45,0x50,0x00,0x00,0x32,0x2d,0x30,0x30,... | sdottaka/mruby-bin-scite-mruby | tools/scite/mrblib/mrblib_extman.c | C | mit | 89,318 |
/********************************************************************
Software License Agreement:
The software supplied herewith by Microchip Technology Incorporated
(the "Company") for its PIC(R) Microcontroller is intended and
supplied to you, the Company's customer, for use solely and
exclusively on Microchip ... | timwuu/PK3SP24 | v2014_07_22/apps/usb/host/hid_bridgeHost/firmware/src/system_config/exp16/pic24fj64gb002_pim/system.c | C | mit | 6,072 |
#include "mesh_adapt.h"
#include "mesh_adj.h"
#include "mesh_mod.h"
#include "cavity_op.h"
static void find_best_edge_split(mesh* m, split* s, ment e, ment v[2])
{
double mq;
double q;
unsigned ne;
unsigned i;
ment v_[2];
ne = simplex_ndown[e.t][EDGE];
mq = -1;
for (i = 0; i < ne; ++i) {
mesh_down(... | ibaned/tetknife | mesh_adapt.c | C | mit | 933 |
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h> /* Definition of AT_* constants */
#ifndef _MSC_VER
#include <unistd.h>
#include <dirent.h>
#else
#pragma warning(disable:4996)
#endif
#include "logging.h"
#include "config.h"
#include "... | usrecnik/ddlfs | src/dbro_refresh.c | C | mit | 5,152 |
// EX.1 - READ A TEXT FILE CHAR BY CHAR
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
FILE *bin; //declare a file pointer variable
FILE *numfile;
char s[20] = "1234";
int ch;
int i;
char line[50];
numfile = fopen("numbers.txt","r");
bin = fopen("numbers.... | RobertEviston/CollegeWork | C Programming/PersisTest.c | C | mit | 747 |
/*****************************************************************
* syscall.c
* adapted from MIT xv6 by Zhiyi Huang, hzy@cs.otago.ac.nz
* University of Otago
*
********************************************************************/
#include "types.h"
#include "defs.h"
#include "param.h"
#include "mem... | fosler/xv6-rpi-port | source/syscall.c | C | mit | 3,791 |
/*******************************************************************************
Copyright © 2016, STMicroelectronics International N.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redis... | svanacker/cen-electronic | drivers/tof/vl53l0x/vl53l0x_api_strings.c | C | mit | 17,182 |
/**
* The MIT License (MIT)
*
*
* Copyright (C) 2013 Yu Jing (yujing5b5d@gmail.com)
*
* 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 li... | yuikns/eiparser | src/dirTraversal.c | C | mit | 4,209 |
#include "../common/gba.h"
#include "../common/fixed.c"
typedef struct{
union{
struct{
fixed x;
fixed y;
};
fixed vec[2];
};
} Vec2;
fixed DotProduct(Vec2 a, Vec2 b){
return fixMult(a.x, b.x) + fixMult(a.y, b.y);
}
Vec2 VecSub(Vec2 a, Vec2 b){
Vec2 retVal = {a.x - b.x, a.y - b.y};
return retVal;
}
... | Benjins/GBADev | 3dproper/main.c | C | mit | 5,048 |
/**
* @file sdram.c
* @brief SDRAM configuration
*
* @section License
*
* Copyright (C) 2010-2015 Oryx Embedded SARL. 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 Foundat... | miragecentury/M2_SE_RTOS_Project | Project/LPC1549_Keil/CycloneTCP_SSL_Crypto_Open_1_6_4/demo/common/atmel/boards/sam3x_ek/sdram.c | C | mit | 7,070 |
static void cnrom_switchchr(int bank)
{
int size = 8192;
backend_read(romfn, 16 + (16384 * header.prgromsize) + (bank * size), size, ppu_memory);
}
static void cnrom_access(unsigned int address, unsigned char data)
{
if (address > 0x7fff && address < 0x10000)
cnrom_switchchr(data & (header.chrr... | jezze/nes | cnrom.c | C | mit | 370 |
/* Copyright (c) 2015 Mathias Panzenböck
*
* 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 rights
* to use, copy, modify, merge, pub... | panzi/mediaextract | src/au.c | C | mit | 2,119 |
/*---------------------------------------------------------------------------------
Name : amixer.c
Author : Marvin Raaijmakers
Description : Plugin for keyTouch that can change the volume (using amixer).
Date of last change: 24-Sep-2006
History : 24-Sep-2006 Added two new pl... | paulmadore/G-Keymap | Reference Code/keymap/keytouch-2.2.4/plugins/amixer.c | C | mit | 13,098 |
#include "strm.h"
#include <math.h>
static int
num_plus(strm_stream* strm, int argc, strm_value* args, strm_value* ret)
{
strm_value x, y;
strm_get_args(strm, argc, args, "NN", &x, &y);
if (strm_int_p(x) && strm_int_p(y)) {
*ret = strm_int_value(strm_value_int(x)+strm_value_int(y));
return STRM_OK;
}
... | matz/streem | src/number.c | C | mit | 4,205 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__wchar_t_connect_socket_w32spawnl_18.c
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-18.tmpl.c
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: connect_socket Read data u... | maurer/tiamat | samples/Juliet/testcases/CWE78_OS_Command_Injection/s05/CWE78_OS_Command_Injection__wchar_t_connect_socket_w32spawnl_18.c | C | mit | 5,742 |
/* $Id: get_attachments.c,v 1.13 2015/07/20 10:35:53 tm Exp $
*
* PDFlib TET sample application.
*
* PDF text extractor which also searches PDF file attachments.
* The file attachments may be attached to the document or
* to page-level annotations of type FileAttachment. The former construct
* also covers PDF 1.... | kentaiwami/masamon | masamon/TET/c/get_attachments.c | C | mit | 7,568 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | adafruit/micropython | ports/nrf/common-hal/microcontroller/Pin.c | C | mit | 6,219 |
#include "../include/csl.h"
void
MultipleEscape ( )
{
_MultipleEscape ( _Context_->Lexer0 ) ;
}
void
CSL_Strlen ( )
{
DataStack_Push ( (int64) Strlen ( (char*) DataStack_Pop ( ) ) ) ;
}
void
CSL_Strcmp ( )
{
DataStack_Push ( (int64) Strcmp ( (byte*) DataStack_Pop ( ), (byte*) DataStack_Pop ( ) ) ) ;
}
... | dennisj001/openvmtil64 | src/primitives/strings.c | C | mit | 1,290 |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2014 Damien P. George
* Copyright (c) 2016 Paul Sokolovsky
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation file... | Peetz0r/micropython-esp32 | extmod/vfs_fat.c | C | mit | 12,566 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__char_connect_socket_w32_execv_34.c
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-34.tmpl.c
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: connect_socket Read data usin... | maurer/tiamat | samples/Juliet/testcases/CWE78_OS_Command_Injection/s01/CWE78_OS_Command_Injection__char_connect_socket_w32_execv_34.c | C | mit | 6,320 |
#include "genfft.h"
/**
* NAME: cc1fft
*
* DESCRIPTION: complex to complex FFT
*
* USAGE:
* void cc1fft(complex *data, int n, int sign)
*
* INPUT: - *data: complex 1D input vector
* - n: number of samples in input vector data
* - sign: sign of the Fourier kernel
*
* OUTP... | sun031/Jan | FFTlib/cc1fft.c | C | epl-1.0 | 3,110 |
/*
* This file contains pieces of the Linux TCP/IP stack needed for modular
* TOE support.
*
* Copyright (C) 2006-2009 Chelsio Communications. All rights reserved.
* See the corresponding files in the Linux tree for copyrights of the
* original Linux code a lot of this file is based on.
*
* Written by Dimitris... | nal-epfl/line-sigcomm14 | PF_RING-5.6.2/drivers/PF_RING_aware/chelsio/cxgb3-2.0.0.1/src/t3_tom/module_support/module_support-tom-2.6.23.c | C | gpl-2.0 | 5,114 |
/*
* Synopsys DesignWare I2C adapter driver (master only).
*
* Partly based on code of similar driver from U-Boot:
* Copyright (C) 2009 ST Micoelectronics
*
* and corresponding code from Linux Kernel
* Copyright (C) 2006 Texas Instruments.
* Copyright (C) 2007 MontaVista Software Inc.
* Copyright (... | masahir0y/barebox-yamada | drivers/i2c/busses/i2c-designware.c | C | gpl-2.0 | 15,486 |
/* Name: usbdrv.c
* Project: AVR USB driver
* Author: Christian Starkjohann
* Creation Date: 2004-12-29
* Tabsize: 4
* Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
* This Revision: $Id: usbdrv.c,v 1.1.1.1 2008-01-22 20:2... | sambrista/9-buttons-arcade-controller | usbdrv/usbdrv.c | C | gpl-2.0 | 23,890 |
/*****************************************************************************
* xa.c : xa file demux module for vlc
*****************************************************************************
* Copyright (C) 2005 Rémi Denis-Courmont
* $Id$
*
* Authors: Rémi Denis-Courmont <rem # videolan.org>
*
* This progra... | r1k/vlc | modules/demux/xa.c | C | gpl-2.0 | 7,523 |
#include <string.h>
#include <stdlib.h>
#include "libterm.h"
#include "cursor.h"
#include "screen.h"
#include "bitarr.h"
int cursor_visibility(int tid, int sid, char visibility) {
if(SCR(tid, sid).curs_invisible != !visibility) {
SCR(tid, sid).curs_invisible = !visibility;
if(!record_update(tid, sid, visibility... | atrigent/libterm | src/cursor.c | C | gpl-2.0 | 3,083 |
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* Implementation of the Transmission Control Protocol(TCP).
*
* Authors: Ross Biro
* Fred N. van Kempen, <wa... | ShogoFujii/PS-MPTCP | net/ipv4/tcp_output.c | C | gpl-2.0 | 99,138 |
/* Copyright (C) 2005-2006 Jean-Marc Valin
File: fftwrap.c
Wrapper for various FFTs
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
... | gabrieldelsaint/uol-messenger | src/libuolfone/wengophone-ng/current/wifo/phapi/speex/libspeex/fftwrap.c | C | gpl-2.0 | 7,664 |
/*
* IPv6 Address [auto]configuration
* Linux INET6 implementation
*
* Authors:
* Pedro Roque <roque@di.fc.ul.pt>
* Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published ... | lawnn/Dorimanx-LG-G2-D802-Kernel | net/ipv6/addrconf.c | C | gpl-2.0 | 130,583 |
/* Copyright (c) 2010-2012, Code Aurora Forum. 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 version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the ho... | Gaojiquan/android_kernel_zte_digger | drivers/video/msm/hdmi_msm.c | C | gpl-2.0 | 145,025 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "errno-util.h"
#include "format-table.h"
#include "hexdecoct.h"
#include "homectl-pkcs11.h"
#include "libcrypt-util.h"
#include "memory-util.h"
#include "openssl-util.h"
#include "pkcs11-util.h"
#include "random-util.h"
#include "strv.h"
struct pkcs11_callback... | endlessm/systemd | src/home/homectl-pkcs11.c | C | gpl-2.0 | 16,567 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.