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
/* * This file is part of PET. * * PET 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 3 of the License, or * (at your option) any later version. * * PET is distributed in the hope that ...
fredmorcos/attic
projects/pet/archive/pet_c_20130615_master/file.c
C
isc
2,195
// Copyright (C) 2012 Nick Johnson <nickbjohnson4224 at gmail.com> // // Permission to use, copy, modify, and 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...
nickbjohnson4224/pinion64
src/pinion64/log.c
C
isc
3,757
/* Copyright Joyent, Inc. and other Node contributors. All rights reserved. * * 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 * righ...
bnoordhuis/suv
deps/libuv/test/test-fs.c
C
isc
47,266
/* Copyright (c) 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 DISCLAI...
dennis95/dennix
libc/src/thread/thrd_create.c
C
isc
1,238
/* * Author: NagaChaitanya Vellanki * * * Use the run_stats_file_write_with_buf_sizes.sh to run with various * buffer sizes * * /run_stats_file_write_with_buf_sizes.sh nvellanki@l-desktop-268 * Bu...
chaitanyav/cprograms
stats_file_write.c
C
isc
2,659
/* * \file cpsw.c * * \brief This file contains functions which configure CPSW instance */ /* * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
Chester-Gillon/AM3352-SOM-EVB_bare_metal
source/AM3352_SOM_platform/platform_cpsw.c
C
isc
9,634
/* $Id$ */ /* * %ISC_START_LICENSE% * --------------------------------------------------------------------- * Copyright 2006-2018, Pittsburgh Supercomputing Center * All rights reserved. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, pro...
pscedu/slash2-stable
pfl/tests/prsig/prsig_test.c
C
isc
1,426
#include <stdio.h> #include "list_queue.h" int main() { Queue q; ElementType i; ElementType tmp; q = CreateQueue(); PrintQueue(q); if(IsEmptyQueue(q)) { printf("\nEmpty queue.\n"); } printf("\n\n"); for(i = 0; i < 10; i++) { printf("Push %d into queue. \n", i); ...
Cyw1104/data-structures-and-algorithm-in-c
tests/list_queue_test.c
C
mit
1,324
#include<stdio.h> #include<process.h> int main(int argc,char* argv[]) //dir *.* argv[0]="dir" argv[1]="*.*" { system("cla one two three"); return 0; }
AungWinnHtut/PHPlearning
caller.c
C
mit
158
/******************************************************************************* * Copyright (c) 2017 Vasiliy Nerozin * * This library is free software; you can redistribute it and/or modify it * under the terms of the MIT license. See LICENSE.md for details. *******************************************************...
vnerozin/cimlib
platforms/portable/sc_math/sc_log2_u16.c
C
mit
3,160
/************************************************************************/ /* */ /* Copyright (C) 1996 by Frank Mueller. */ /* This code was developed at Humboldt University Berlin. */ /* Distributed by th...
rahlk/Parallel-Systems
src/hw2/mympi/sock_msg.c
C
mit
10,843
#include "simpleDSP_fir.h" void firInit(FIR *fir, int coefBLen, float *coefsB) { fir->coefBLen = coefBLen; fir->coefsB = (float *)malloc(fir->coefBLen * 4); fir->dlyX = (float *)malloc(fir->coefBLen * 4); for (int i = 0; i < fir->coefBLen; i++) fir->dlyX[i] = 0.0; fir->coefsB = coefsB; } ...
mozanunal/SimpleDSP
simpleDSP_fir.c
C
mit
603
#include "../include/apue.h" int main(int argc, char * argv[]){ if(chdir("/tmp") < 0){ err_sys("chdir failed!"); } printf("chdir to /tmp succeeded \n"); exit(0); }
larryjiang/cs_study
system/book_apue/apue_copy/chapter4/chdir.c
C
mit
190
#include <stdio.h> #include <stdarg.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <assert.h> #include "../util/util.h" #include "../util/alloc.h" #include "../util/dynarray.h" #include "decl_init.h" #include "funcargs.h" #include "tokenise.h" #include "tokconv.h" #include "sue.h" #include "s...
8l/ucc-c-compiler
src/cc1/parse_type.c
C
mit
50,274
/** * Linux-specific functions to handle a segmentation fault * * Some documentation: * * http://feepingcreature.github.io/handling.html * Cleanly recovering from Segfaults under Windows and Linux (32-bit, x86) */ #include "recover_segfault.h" #include <assert.h> #include <signal.h> #include <stddef.h> #includ...
fishilico/shared
c/recover_segfault/os_linux.c
C
mit
3,430
/*============================================================================ This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic Package, Release 3b, by John R. Hauser. Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. All rights reserved. Redistribution and use ...
quyse/inanity
deps/softfloat/softfloat/source/i64_to_f64.c
C
mit
2,297
#include <stdio.h> #include <math.h> #define log2(x) log(x)/log(2) #define MAX 100 const double p[MAX] = {0.2, 0.2, 0.15, 0.15, 0.10, 0.10, 0.05, 0.05}; const unsigned n = 8; /* Брой вероятности */ /* Пресмята ентропията на източника */ double calcEntropy(const double *p, const unsigned n) { unsigned i; ...
vladislav-karamfilov/Algorithms-CSharp-Translation
Sources-C/Programming=++Algorithms;/chapter10/entropy.c
C
mit
1,598
#include <stdlib.h> #include <stdint.h> #include "model.h" #include "util.h" model_t *model; model_t *init_model(){ model = malloc(sizeof(model_t)); model->map = malloc(GAME_HEIGHT * GAME_WIDTH); model->selectedX = 0; model->selectedY = 0; model->selectedWidth = 1; model->selectedHeight = 1; ...
demisardonic/battletested
Editor/model.c
C
mit
411
/* * The MIT License * * Copyright © 2016 2sui. * * 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, ...
2sui/QPHi
src/core/qp_io_core.c
C
mit
6,671
/** * \file * * \brief megaAVR Timer/Counter (TC) Timeout Driver Example 1 * * Copyright (c) 2014 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following ...
femtoio/femto-usb-blink-example
blinky/blinky/asf-3.21.0/mega/drivers/tc/tc_timeout_example1/tc_timeout_example1.c
C
mit
4,874
/* * Copyright (c) 2007 - 2020 Joseph Gaeddert * * 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, mer...
JayKickliter/liquid-dsp
src/filter/tests/iirdes_autotest.c
C
mit
2,715
/** ****************************************************************************** * @file Projects/Multi/Examples/IKS01A2/LSM6DSL_FIFOContinuousMode/Src/stm32l4xx_hal_msp.c * @author CL * @version V4.0.0 * @date 1-May-2017 * @brief HAL MSP module. *****************************************...
PPA-Kerhoas-BLE/MeteoStation
STM32CubeExpansion_MEMS1_V4.1.0/Projects/Multi/Examples/IKS01A2/LSM6DSL_FIFOContinuousMode/Src/stm32l4xx_hal_msp.c
C
mit
6,293
/* * $QNXLicenseC: * Copyright 2008, QNX Software Systems. * * Licensed under the Apache License, Version 2.0 (the "License"). You * may not reproduce, modify or distribute this software except in * compliance with the License. You may obtain a copy of the License * at: http://www.apache.org/licenses/LICENS...
guileschool/BEAGLEBONE-tutorials
BBB-firmware/qnxbsp-nto650-ti-beaglebone-sp1/src/hardware/startup/lib/hwitag_set_busattr.c
C
mit
1,692
/* The single most stupid mapping object interface EVER WRITTEN. * f03lipe, 2013. */ #include "mapObj.h" /* MapObj interface */ MapObj * copyMapObj(MapObj * dest, MapObj * source) { /* Copies a mapping object from source to dest. */ dest = memcpy(dest, source, sizeof(MapObj)); return dest; } void freeMapObj(...
f03lipe/decipher
src/mapObj.c
C
mit
1,408
#pragma config(Hubs, S1, HTMotor, HTMotor, none, none) #pragma config(Sensor, S1, , sensorI2CMuxController) #pragma config(Motor, mtr_S1_C1_1, motorBL, tmotorTetrix, openLoop, driveLeft) #pragma config(Motor, mtr_S1_C1_2, motorFL, tmotorTetrix, openLoop, driveLeft) #pragma...
lightning-robotics/FTC-Cascade-Effect
Practice/motor_movement_examples.c
C
mit
2,923
/* quirc - QR-code recognition library * Copyright (C) 2010-2012 Daniel Beer <dlbeer@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 in all copies. ...
wynd2608/OpenSiv3D
Siv3D/src/ThirdParty/quirc/identify.c
C
mit
26,856
/* * windows_ime.c -- Input method engine support for windows platform. * * Copyright (c) 2018, Liu chao <lc-soft@live.cn> All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistribu...
lc-soft/LCUI
src/platform/windows/windows_ime.c
C
mit
3,073
/* ** 2012-02-08 ** ** 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. ** *************************...
audioprog/lsmdb
lsm/lsm_varint.c
C
mit
4,431
/* * gptimer_base.c * Copyright (C) 2014 xent * Project is distributed under the terms of the MIT License */ #include <halm/platform/lpc/clocking.h> #include <halm/platform/lpc/gptimer_base.h> #include <halm/platform/lpc/system.h> #include <assert.h> /*--------------------------------------------------------------...
stxent/halm
platform/lpc/lpc11exx/gptimer_base.c
C
mit
8,903
/* vi:set ts=4 sts=4 expandtab: */ #include <stdlib.h> /* exit */ #include <stdio.h> /* [f]printf perror */ #include <signal.h> /* signal */ #include <unistd.h> /* getpid pause */ void handler(int signum) { printf("\n=== SIGNAL %d handler ===\n", signum); printf("First round ... ignored. Next...
osamuaoki/fun2prog
process/c/signal.c
C
mit
723
/** * @file gsmmng.c * */ /********************* * INCLUDES *********************/ #include "gsmmng.h" #if USE_GSMMNG != 0 #include <string.h> #include "hal/gsm/gsm.h" #include "hal/systick/systick.h" #include "../os/ptask.h" #include "hw/dev/ui/log.h" /********************* * DEFINES ***********...
littlevgl/misc
comm/gsmmng.c
C
mit
4,629
/* * Copyright (c) 2012-2019 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <vdp2/scrn.h> #include <assert.h> #include "vdp-internal.h" void vdp2_scrn_reduction_set(vdp2_scrn_t scroll_screen, vdp2_scrn_reduction_t reduction) { #ifdef DEBUG /* Check if the b...
ijacquez/libyaul
libyaul/scu/bus/b/vdp/vdp2_scrn_reduction.c
C
mit
2,344
#include <stdio.h> #include <stdlib.h> #include "objectlist.h" /** author: mayukh * github.com/mayukh42 */ void test_basic_OList () { int n = 8; void ** items = (void **) malloc (sizeof (void *) * n); for (int i = 0; i < n; i++) { int val = i + 1; items[i] = wrap_Item (&val); } OList * xs_list = create_OL...
mayukh42/cpl
objectlist.c
C
mit
560
#include <stdio.h> #include <CoreFoundation/CoreFoundation.h> #include <ApplicationServices/ApplicationServices.h> int generatePages(const char *documentPath) { int error = 0; CFStringRef path = CFStringCreateWithCString( NULL, documentPath, kCFStringEncodingUTF8 ); CFURLRef url = CFURLCreateWithFileSystemPath( ...
ndfred/python-pdfkit
kindergarden/extract.c
C
mit
1,835
/* Teem: Tools to process and visualize scientific data and images Copyright (C) 2008, 2007, 2006, 2005 Gordon Kindlmann Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah This library is free software; you can redistribute it and/or modify it under the terms of the GNU...
sinkpoint/hodaie-teem
src/air/math.c
C
mit
17,799
// // level.c // // // Created by Dirk Mika on 23.04.13. // // #include <pebble.h> #include "level.h" #include "config.h" #include "block.h" void level_load(Level *level, uint8_t nr) { uint8_t levelData[LEVEL_NUM_ROWS][LEVEL_DATA_BYTES_PER_ROW]; ResHandle levelResource = resource_get_handle(RESOURCE_ID_RA...
pebble-hacks/pebloid-xl
src/level.c
C
mit
1,329
#include <stdio.h> #include <string.h> #define SIZE 10 int palindrome(int); void dec_to_hex(int); char hex_number[SIZE]; int main() { int number; scanf("%d", &number); if(number==0) { printf("0"); return 0; } if(palindrome(number)) printf("%s", hex_number); else { while(!palindrome(number)) number++;...
Ivan-Killer/po-homework
2015-2016/A/27/07/task3.c
C
mit
928
/* * Demonstration TLS client * * Compile with * * gcc -Wall -o tls_client tls_client.c -L/usr/lib -lssl -lcrypto * * Execute with * * ./tls_client <server_INET_address> <port> <client message string> * * Generate certificate with * * openssl req -x509 -nodes -days 365...
arjun372/CS111_Spring16
Lab 4/TLS/tls_header.c
C
mit
3,037
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <sys/errno.h> #include "hash_table.h" #include "../codes.h" char* readFile(char* name) { FILE *input = fopen(name, "r"); fseek(input, 0, SEEK_END); size_t size = ftell(input); rewind(input); char* buffer = mal...
andars/vm
assembler/assembler.c
C
mit
2,749
/* * (C) Copyright 2009 Stefan Roese <sr@denx.de>, DENX Software Engineering * * Copyright (C) 2006 Micronas GmbH * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <linux/errno.h> #include "vct.h" /* * List of statically defined buffers per SCC. * The first entry in the table is the numbe...
guileschool/BEAGLEBONE-tutorials
BBB-firmware/u-boot-v2018.05-rc2/board/micronas/vct/scc.c
C
mit
24,099
#include "pnlist.h" #include "list.h" #include "pnstring.h" #include "pnobject.h" #include "pnfunction.h" #include "pnbool.h" #include <stdlib.h> #include <string.h> #include <stdbool.h> /** * decrease reference counting, and delete item */ static void pn_list_item_deleter(void *item) { PnObject_Destroy((pn_ob...
peanut-lang/peanut
src/pnlist.c
C
mit
9,951
/* * Copyright (c) 2002-2003 NONAKA Kimihiro * All rights reserved. * * 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 retain the above copyright * notice, this list of...
AZO234/NP2kai
x/gtk2/gtk_mouse.c
C
mit
5,404
// Intel 8259A programmable interrupt controllers. #include "types.h" #include "x86.h" #include "traps.h" // I/O Addresses of the two programmable interrupt controllers #define IO_PIC1 0x20 // Master (IRQs 0-7) #define IO_PIC2 0xA0 // Slave (IRQs 8-15) #define IRQ_SLAVE 2 // IRQ at ...
Tachibana-General-Laboratories/lainos-fail
kernel/picirq.c
C
mit
2,336
#include <stdio.h> /* print Fahrenheit-Celsius table for fahr = 0, 20, ..., 300 */ int main(void) { int fahr, celsius; int lower, upper, step; lower = 0; /* lower limit of temperature table */ upper = 300; /* upper limit */ step = 20; /* step size */ fahr = lower; while (f...
robertpogue/k_and_r
chapter_1/temp_conv.c
C
mit
466
#include "device.h" #include "FDCdrv.h" #include "keyboard.h" #include "ATAdrv.h" #include "system.h" #include "vga.h" #include "pci-main.h" #include "dp8390.h" #include "clock.h" #include "gdebug.h" #include "idt.h" /* ‚±‚±‚Ƀf...
ddk50/tinyos
device.c
C
mit
4,789
/* * $Id: pa_win_wmme.c 1340 2008-02-15 08:31:42Z rossb $ * pa_win_wmme.c * Implementation of PortAudio for Windows MultiMedia Extensions (WMME) * * PortAudio Portable Real-Time Audio Library * Latest Version at: http:...
pikoro/sharpsdr
PortAudio/tags/v19p-2008-03-20/src/hostapi/wmme/pa_win_wmme.c
C
mit
148,429
/* This code is placed in the public domain. */ #include <stdlib.h> #include <math.h> #include "soundpipe.h" #include "openlpc.h" int sp_lpc_create(sp_lpc **lpc) { *lpc = malloc(sizeof(sp_lpc)); return SP_OK; } int sp_lpc_destroy(sp_lpc **lpc) { sp_lpc *plpc; plpc = *lpc; free(plpc->e); free(...
PaulBatchelor/Soundpipe
modules/lpc.c
C
mit
2,289
/*-*/ /******************************************************** * Name: Init matrix * * * * An example of how to initialize a matrix. * ********************************************************/ /*+*/ #include <memory.h> /* Gets definition of memset */ #define X_SIZE 60 #define Y_SIZE 30 int matrix[X_SI...
trevstanhope/scratch-C
examples/pracc/matrix/matrix7.c
C
mit
571
#include <math.h> #include <stdio.h> #include <string.h> float freqs[] = { 246.94, 261.63, 277.18, 293.66, 311.13, 329.63, 349.23, 369.99, 392.00, 415.30, 440.00, 466.16, 493.88, 523.25 }; void getLine(FILE * file, char * buffer, int size) { int i = 0; char c = fgetc(file); while(c != '\r' && c != '\n' && c != EO...
FTCTeam772/Competition
Music/Compiler/MusicCompiler.c
C
mit
6,598
/********************************************************************** vm_insnhelper.c - instruction helper functions. $Author: usa $ Copyright (C) 2007 Koichi Sasada **********************************************************************/ /* finish iseq array */ #include "insns.inc" #include <math.h> #inclu...
ontouchstart/docker-ruby-1.9
ruby-1.9.3-p551/vm_insnhelper.c
C
mit
40,580
#include "uart.h" #include "s5pv210.h" #define IRQ_PUSH __asm__( \ "ldr sp, =0xD0034000 \n"\ "subs lr, lr, #4 \n"\ "stmfd sp!, {r0-r12, lr} \n"\ ); #define IRQ_POP __asm__( \ "ldmfd sp!, {r0-r12,pc}^ \n"\ ); /*enable CPSR I-bit*/ #define IRQ_ENABLE __asm__ (\ "mrs r0, cpsr \n"\ "bic ...
misizeji/StudyNote_201308
platform/day4/01-all-key-int/drivers/interrupt/interrupt.c
C
mit
1,445
/* * Copyright (c) 1998-2003 Bart Massey * All Rights Reserved * Please see end of file for license information */ typedef int bb_names; typedef int item_names; typedef int item_types; #include "bbb.h" #include "bbbpri.h" #define ELEM _callback_rec #include "ll.c" #undef ELEM #define ELEM _item #include "ll.c" #u...
berkus/bbb
bbb.c
C
mit
6,321
#include "mesh_bbox.h" #include "classif.h" #include "comm.h" unsigned const bbox_verts[DIMS] = { 1, 2, 4, 8 }; unsigned const bbox_simplices[DIMS] = { 1, 1, 2, 6 }; static unsigned const e10[2] = {0,1}; static unsigned const* const e1[1] = {e10}; static unsigned const e20[3] = {0,1,3}; static unsign...
ibaned/tetknife
mesh_bbox.c
C
mit
2,911
//programma che mi stampa la tabellina di tutti i numeri naturali compresi tra 2 e 0 #include <stdio.h> #include <stdlib.h> main() { n int; tab int; i int; n=2; while(n<==10){//tramite il ciclo while stampo tutte le tabelline da 2 a 10 ...
giglios/Informatica_3
E9_tabellina di n numeri.c
C
mit
709
/* ** $Id: ldo.c,v 2.135 2014/11/11 17:13:39 roberto Exp $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ #define ldo_c #define LUA_CORE #include "lprefix.h" #include <setjmp.h> #include <stdlib.h> #include <string.h> #include "lua.h" #include "lapi.h" #include "ldebug.h" #include "ldo.h" ...
CaringLabs/MediaFramework
support/lua/ldo.c
C
mit
22,438
#include <string.h> #include <strings.h> #include "sway/config.h" #include "sway/commands.h" #include "sway/input/input-manager.h" struct cmd_results *input_cmd_xkb_capslock(int argc, char **argv) { struct cmd_results *error = NULL; if ((error = checkarg(argc, "xkb_capslock", EXPECTED_AT_LEAST, 1))) { return error...
taiyu-len/sway
sway/commands/input/xkb_capslock.c
C
mit
1,017
#include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/wait.h> #include <fcntl.h> #include "../rvm.h" /* proc1 writes some data, commits it, then exits */ void proc1() { rvm_t rvm; trans_t trans; char* segs[1]; rvm = rvm_init("rvm_segments"); rvm_destroy(rvm, "testseg"); se...
adamacosta/bvt
aos/bvt/rvm/tests/rvm_test1.c
C
mit
1,479
//231. Power of Two //LeetCode: https://leetcode.com/problems/power-of-two/ #include<stdio.h> #include<stdbool.h> bool isPowerOfTwo(int n) { if(n==0) return false; int val = n&1; while(val==0) { n >>= 1; val = n&1; } val = n^0; if(val==1) return true; else ...
fivezh/Keepgoing
leetcode.com/231-Power-of-Two/main.c
C
mit
492
// Author: Alen Archuleta #include <stdio.h> #include <stdlib.h> #include <string.h> #include <gif_lib.h> #include <jpeglib.h> #include <cairo/cairo.h> static unsigned char *ImageDataFromRaster(ColorMapObject *colorMap, GifByteType *rasterBits, ...
binape/code-snippets
00-QuickExamples/gifdump.c
C
mit
3,313
//***************************************************************************** // // startup_ccs.c - Startup code for use with TI's Code Composer Studio. // // Copyright (c) 2012-2013 Texas Instruments Incorporated. All rights reserved. // Software License Agreement // // Texas Instruments (TI) is supplying this sof...
djchopp/POV_Globe
startup_ccs.c
C
mit
14,502
/* ** calc_delta.c for raytracer in /home/fische_s//dossier/projets/rt ** ** Made by sylvain fischer ** Login <fische_s@epitech.net> ** ** Started on Tue Apr 12 19:23:51 2011 sylvain fischer ** Last update Fri Jun 3 14:43:48 2011 xavier schmerber */ #include <math.h> #include "rt.h" double calc_delta(t_coord *a...
Geod24/Raytracer
part_struct/calc_delta.c
C
mit
789
#include <stdio.h> #include <stdlib.h> //WARNING: The prof's solution is clearer and much more logical to follow. int main () { /* This one’s a bit more complicated. Write a program to calculate a babysitting charge. Imagine that a babysitter is willing to work anytime between 6:00 pm and 5:59 am. Ask the...
NanoSmasher/aps106-problems
set2/wk3_n4.c
C
mit
2,192
/* * This file is part of the MicroPython project, http://micropython.org/ * * The MIT License (MIT) * * Copyright (c) 2019 Jeff Epler for Adafruit Industries * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), ...
adafruit/micropython
py/proto.c
C
mit
1,927
#include "duktape.h" duk_ret_t mn_bi_fs_watch(duk_context *ctx) { return 0; }
hypoalex/mininode
src/modules/fs/methods/watch.c
C
mit
81
/* Copyright (c) 2017 Foudil Brétel. All rights reserved. */ #include <stdbool.h> #include <stddef.h> #include <string.h> #include <sys/types.h> #include "safer.h" // http://blog.liw.fi/posts/strncpy/ bool strcpy_safer(char *dst, const char *src, size_t size) { if (strlen(src) + 1 > size) return false; ...
foudfou/ptp
src/utils/safer.c
C
mit
360
// // Simple OpenGL FX // Original by Epsilum // Pluginized by Enlar // #include <epopeia/epopeia_system.h> #include "fx.h" // // Epopeia plugin API 1.4.0 implementation // //----------------------------------------------------------------------------- static void* FX_New(int width, int height) { TFx *self; ...
reality3d/rgba
plugins/simplefx/fx_epopeia.c
C
mit
3,067
#include <X11/Xlib.h> #include <stdio.h> #include <sys/stat.h> #include <ctype.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <unistd.h> // #includ ur #life int main(int argc, char *argv[]) { bool q = false; if(argv[1] != NULL && strcmp(argv[1], "-q") == 0) q=true; Display *disp; Windo...
danieltroger/X
keyboard.c
C
mit
5,043
/* * iperf, Copyright (c) 2014, The Regents of the University of * California, through Lawrence Berkeley National Laboratory (subject * to receipt of any required approvals from the U.S. Dept. of * Energy). All rights reserved. * * If you have questions about your rights to use or distribute this * software, pl...
yeahdongcn/iperf-iOS
Pod/Classes/iperf_util.c
C
mit
9,379
/* MIT License * * Copyright (c) 2017 Johan Kinnander * * 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, mod...
jokki/rover
controller/controls.c
C
mit
1,414
/* * BTRFS filesystem implementation for U-Boot * * 2017 Marek Behun, CZ.NIC, marek.behun@nic.cz * * SPDX-License-Identifier: GPL-2.0+ */ #include "btrfs.h" #include <config.h> #include <malloc.h> #include <linux/time.h> struct btrfs_info btrfs_info; static int readdir_callback(const struct btrfs_root *root, ...
guileschool/BEAGLEBONE-tutorials
BBB-firmware/u-boot-v2018.05-rc2/fs/btrfs/btrfs.c
C
mit
4,771
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_file_w32_spawnv_51b.c Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-51b.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: file Read input from a file * G...
maurer/tiamat
samples/Juliet/testcases/CWE78_OS_Command_Injection/s08/CWE78_OS_Command_Injection__wchar_t_file_w32_spawnv_51b.c
C
mit
2,227
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_listen_socket_w32_execvp_68b.c Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-68b.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: listen_socket Read data ...
maurer/tiamat
samples/Juliet/testcases/CWE78_OS_Command_Injection/s08/CWE78_OS_Command_Injection__wchar_t_listen_socket_w32_execvp_68b.c
C
mit
3,130
//Author: Michael Harrison #include "my_malloc.h" void *coalesce(void *mem){ int len, alloc, i, x; //read current header head = (struct hdr*)&mem[0]; len = head->len*8; alloc = head->allocated; //check next header head = (struct hdr*)&mem[len+2]; x = head->len*8; alloc = head->allocated; //if not allocated ...
MHarrison72/Malloc_Harrison
coalesce.c
C
mit
682
/** * copyright 2002-2004 Bryce "Zooko" Wilcox-O'Hearn * mailto:zooko@zooko.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software to deal in this software without restriction (including the * rights to use, modify, distribute, sublicense, and/or sell copies) provi...
zooko/libzutil
zutil.c
C
cc0-1.0
5,493
/* $Id: circularinit.c,v 1.16 2008/04/21 19:12:09 erg Exp $ $Revision: 1.16 $ */ /* vim:set shiftwidth=4 ts=8: */ /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * * ...
ekoontz/graphviz
lib/circogen/circularinit.c
C
epl-1.0
7,983
/* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * * Copyright (C) 2002-2011 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * * Created by Charles Manning <charles@aleph1.co.uk> * * This program is free software; you can redistribute it and/or modify ...
pzhaoyang/OpenWRT
target/linux/generic/files/fs/yaffs2/yaffs_attribs.c
C
gpl-2.0
3,339
#include "dlmalloc.h" /* This is a version (aka dlmalloc) of malloc/free/realloc written by Doug Lea and released to the public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/ Send questions, comments, complaints, performance data, etc to dl@cs.oswego.edu * Version 2.8.6 Wed Aug 29 0...
AliceLR/megazeux
arch/nds/dlmalloc.c
C
gpl-2.0
221,509
/*************************************************************** bwb_var.c Variable-Handling Routines for Bywater BASIC Interpreter Copyright (c) 1993, Ted A. Campbell Bywater Software email: t...
yantrabuddhi/bwbasic3
bwb_var.c
C
gpl-2.0
77,922
#include "builtin.h" #include "cache.h" #include "commit.h" #include "tree.h" #include "blob.h" #include "tag.h" #include "refs.h" #include "pack.h" #include "cache-tree.h" #include "tree-walk.h" #include "fsck.h" #include "parse-options.h" #include "dir.h" #include "progress.h" #include "streaming.h" ...
haglerchristopher/automation
src/3rd_party/git/builtin/fsck.c
C
gpl-2.0
18,194
/* * NET3 Protocol independent device support routines. * * 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 your option) any later version. * ...
dduval/kernel-rhel5
net/core/dev.c
C
gpl-2.0
104,628
/*! * \file spline.c * * \author Copyright (C) 2013 ... 2016 by Bert Timmerman <bert.timmerman@xs4all.nl>. * * \brief Functions for a DXF spline entity (\c SPLINE). * * A spline is a smooth curve that passes through or near a given set of * points.\n * You can control how closely the curve fits the points.\n...
paolo-caroni/libdxf
src/spline.c
C
gpl-2.0
86,470
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> #include <ngx_md5.h> static ngx_int_t ngx_http_file_cache_lock(ngx_http_request_t *r, ngx_http_cache_t *c); static void ngx_http_file_cache_lock_wait_handler(ngx_event_t *ev); st...
pvlltvk/profile
.vim/plugged/nginx/src/http/ngx_http_file_cache.c
C
gpl-2.0
67,606
/* * Copyright (C) 2011-2012 Quantum ESPRESSO Foundation * Copyright (C) 2010-2011 Irish Centre for High-End Computing (ICHEC) * * This file is distributed under the terms of the * GNU General Public License. See the file `License' * in the root directory of the present distribution, * or http://www.gnu.org/copy...
fspiga/phiGEMM
src/phigemm_zgemm_specialK.c
C
gpl-2.0
8,560
/* -------------------------------------------------------------------- */ /* CALCULIX */ /* - GRAPHICAL INTERFACE - */ /* */ /* A 3-dimen...
prool/cgx_prool
cgx_2.16/src/mergEntity.c
C
gpl-2.0
41,275
/* * drivers/cpufreq/cpufreq_interactive.c * * Copyright (C) 2010 Google, Inc. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distrib...
davidmueller13/lt03lte_tw_kernel_5.1.1
drivers/cpufreq/cpufreq_interactive.c
C
gpl-2.0
51,090
/* * SDLA An implementation of a driver for the Sangoma S502/S508 series * multi-protocol PC interface card. Initial offering is with * the DLCI driver, providing Frame Relay support for linux. * * Global definitions for the Frame relay interface. * * Version: @(#)sdla.c 0.30 12 Sep 1996 * * Credits: S...
sarnobat/knoppix
drivers/net/wan/sdla.c
C
gpl-2.0
39,745
/* itoa.c <ndf@linux.mit.edu> */ #define __MAX_INT_CHARS 7 char *itoa(int i) { static char a[__MAX_INT_CHARS]; char *b = a + sizeof(a) - 1; int sign = (i < 0); if (sign) i = -i; *b = 0; do { *--b = '0' + (i % 10); i /= 10; } while (i); if (sign) *--b = '-'; r...
codenewcomer/FUZIX
Library/libs/itoa.c
C
gpl-2.0
331
/* * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). * m_capab.c: Negotiates capabilities with a remote server. * * Copyright (C) 2002 by the past and present ircd coders, and others. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General ...
digitalabhorrence/ircd-hybrid-8.1.7
modules/m_capab.c
C
gpl-2.0
2,321
#include <linux/init.h> #include <linux/kernel.h> #include <linux/debugfs.h> #include <linux/unwind.h> #include <linux/dwarf.h> #include <linux/module.h> #include <linux/interrupt.h> #include <linux/completion.h> struct table_entry { int32_t start_ip_offset; int32_t fde_offset; }; static struct table_entry* table_...
siis/pfwall
kernel/unwind.c
C
gpl-2.0
4,817
/* Copyright (c) 2011-2013, The Linux Foundation. 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 ...
maxwen/android_kernel_oppo_apq8064
drivers/media/radio/radio-iris.c
C
gpl-2.0
113,085
/* $Id$ * * Module for AVM C4 & C2 card. * * Copyright 1999 by Carsten Paeth <calle@calle.de> * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * */ #include <linux/module.h> #include <linux/kernel.h> #include <linux/s...
hackndev/linux-hnd
drivers/isdn/hardware/avm/c4.c
C
gpl-2.0
33,388
/* Control flow graph manipulation code for GNU compiler. Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GCC. GCC 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 3,...
totalspectrum/gcc-propeller
gcc/cfgrtl.c
C
gpl-2.0
143,408
/* * osi.c - _OSI implementation * * Copyright (C) 2016 Intel Corporation * Author: Lv Zheng <lv.zheng@intel.com> * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Genera...
linux-scraping/linux-grsecurity
drivers/acpi/osi.c
C
gpl-2.0
13,379
/* string.c: functions for string manipulation * * Copyright (C) 2003, 2004 Eggheads Development Team * * 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, ...
Talustus/eggdrop-1.9
lib/eggdrop/string.c
C
gpl-2.0
6,107
#include "cache.h" #include "commit.h" #include "tag.h" #include "diff.h" #include "revision.h" #include "list-objects.h" #include "progress.h" #include "pack-revindex.h" #include "pack.h" #include "pack-bitmap.h" #include "sha1-lookup.h" #include "pack-objects.h" struct bitmapped_commit { struct commit...
haglerchristopher/automation
src/3rd_party/git/pack-bitmap-write.c
C
gpl-2.0
13,164
/********************************************************************** * $Id: lwgeom_geos.c 5258 2010-02-17 21:02:49Z strk $ * * PostGIS - Spatial Types for PostgreSQL * http://postgis.refractions.net * * Copyright 2009-2010 Sandro Santilli <strk@keybit.net> * * This is free software; you can redistribute and/...
fredj/postgis
liblwgeom/lwgeom_geos_clean.c
C
gpl-2.0
23,032
/* * Copyright (C) International Business Machines Corp., 2000-2004 * * 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 your option) any ...
caglar10ur/linux-2.6.27.y
fs/jfs/jfs_extent.c
C
gpl-2.0
18,523
/***************************************************************************** * analyse.c: h264 encoder library ***************************************************************************** * Copyright (C) 2003-2008 x264 project * * Authors: Laurent Aimar <fenrir@via.ecp.fr> * Loren Merritt <lorenm@u.wa...
hersonX/x264_android_armv7
encoder/analyse.c
C
gpl-2.0
137,662
/* Copyright (c) 2010-2012, The Linux Foundation. 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...
pantech-msm8960/android_kernel_pantech_msm8960
arch/arm/mach-msm/clock-rpm.c
C
gpl-2.0
7,696
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to th...
openjdk/jdk8u
jdk/src/share/native/sun/java2d/cmm/lcms/cmsopt.c
C
gpl-2.0
66,503