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 |
|---|---|---|---|---|---|
#define _XOPEN_SOURCE
#include <stdlib.h>
#include "zdtmtst.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>
#include <termios.h>
#include <sys/ioctl.h>
const char *test_doc = "Check a controlling terminal, if a proper fd belongs to another session leader";
c... | efiop/criu | test/zdtm/static/tty03.c | C | lgpl-2.1 | 2,090 |
/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford
* Junior University
*
* We are making the OpenFlow specification and associated documentation
* (Software) available for public use and benefit with the expectation
* that others will use, modify and enhance the Software and contribute
* tho... | MeshSr/ofs-sw | udatapath/datapath.c | C | lgpl-2.1 | 22,571 |
/* -*- OpenSAF -*-
*
* (C) Copyright 2010 The OpenSAF Foundation
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
* under the GNU Les... | kenzaburo/OpenSaf-FrameWork | osaf/services/saf/cpsv/cpd/cpd_main.c | C | lgpl-2.1 | 1,526 |
#include <hildon/hildon.h>
#include <exempi/xmp.h>
#include <json-glib/json-glib.h>
#include <libintl.h>
#include <sharing-tag.h>
#include <locale.h>
#include <math.h>
#include <string.h>
#include <gst/gst.h>
#include "places.h"
#define SCHEMA_IPTC "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/"
#define SCHEMA_EXIF "h... | community-ssu/sharing-service-facebook | src/places.c | C | lgpl-2.1 | 13,837 |
/*
(c) Copyright 2001-2010 The world wide DirectFB Open Source Community (directfb.org)
(c) Copyright 2000-2004 Convergence (integrated media) GmbH
All rights reserved.
Written by Denis Oliver Kropp <dok@directfb.org>,
Andreas Hundt <andi@fischlustig.de>,
Sven Neumann <neo@di... | ecbtnrt/my-dfb | src/core/input.c | C | lgpl-2.1 | 94,789 |
/* $Id: glade-databox.c 4 2008-06-22 09:19:11Z rbock $ */
/* -*- Mode: C; c-basic-offset: 4 -*-
* libglade - a library for building interfaces from XML files at runtime
* Copyright (C) 1998-2001 James Henstridge <james@daa.com.au>
* Copyright 2001 Ximian, Inc.
*
* glade-databox.c: support for canvas widgets in li... | drahnr/gtkdatabox-radioactive | ui/glade-databox.c | C | lgpl-2.1 | 1,875 |
/* Test driver for thbrk
*/
#define MAXLINELENGTH 1000
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <thai/thbrk.h>
/* run with "-i" argument to get the interactive version
otherwise it will run the self test and exit */
int main (int argc, char* argv[])
{
thchar_t str[MAXLINELENGTH];
... | pexip/os-libthai | tests/test_thbrk.c | C | lgpl-2.1 | 2,400 |
/**
* OpenAL cross platform audio library
* Copyright (C) 1999-2007 by authors.
* 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 of the License, or (at your op... | jims/openal-soft | Alc/ALc.c | C | lgpl-2.1 | 89,222 |
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <rpnmacros.h>
#include <unistd.h>
#include <zfstlib.h>
#include <malloc.h>
#include <string.h>
int c_armn_compress32(unsigned char *, float *, int, int, int, int);
int c_armn_uncompress32(float *fld, unsigned char *zstream, int ni, int nj, int nk, int... | mfvalin/rmnlib | compresseur/armn_compress_32.c | C | lgpl-2.1 | 32,194 |
/*
* Copyright (C) 2009-2012 Felipe Contreras
*
* Author: Felipe Contreras <felipe.contreras@gmail.com>
*
* This file may be used under the terms of the GNU Lesser General Public
* License version 2.1.
*/
#include "gstav_h264enc.h"
#include "gstav_venc.h"
#include "plugin.h"
#include <libavcodec/avcodec.h>
#in... | felipec/gst-av | gstav_h264enc.c | C | lgpl-2.1 | 2,840 |
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2003> David Schleef <ds@schleef.org>
* Copyright (C) <2010> Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library G... | jahrome/gst-plugins-good | gst/videofilter/gstvideobalance.c | C | lgpl-2.1 | 25,489 |
/* Static5 is engaged with type BIGINT and ggd(vec) */
#include "lie.h"
#ifdef __STDC__
static entry gcd(entry x,entry y);
static entry abs_minimum(vector* v_vec);
static boolean equal_elements(vector* v_vec);
#endif
static bigint* bin_from_int(i) intcel* i;
{ entry k = i->intval; freemem(i); return entry2bigint(k); ... | garetxe/lie-singlets | static/static5.c | C | lgpl-2.1 | 3,038 |
//
// YTS.c
//
// $Author: why $
// $Date: 2005/09/20 23:42:51 $
//
// Copyright (C) 2004 why the lucky stiff
//
// Well, this is the Yaml Testing Suite in the form of a plain C
// API. Basically, this is as good as C integration gets for Syck.
// You've got to have a symbol table around. From there, you can
// query... | ystk/tools-yocto1-rpm | syck/tests/YTS.c | C | lgpl-2.1 | 56,537 |
/*
* Library signature type test program
*
* Copyright (C) 2014-2022, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Fre... | libyal/libsigscan | tests/sigscan_test_signature.c | C | lgpl-3.0 | 11,212 |
// Created file "Lib\src\Uuid\oledbdat"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b5... | Frankie-PellesC/fSDK | Lib/src/Uuid/oledbdat0000005D.c | C | lgpl-3.0 | 448 |
/*
* Copyright (c) 2001-2003 Swedish Institute of Computer Science.
* 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 not... | PheeL79/diOS | src/osal/network/lwip/sys_arch.c | C | lgpl-3.0 | 14,130 |
// Created file "Lib\src\dxguid\X64\d3d9guid"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b... | Frankie-PellesC/fSDK | Lib/src/dxguid/X64/d3d9guid00000078.c | C | lgpl-3.0 | 469 |
#include <rlib/rbinfmt.h>
static void
dump_opt_hdr (RPeOptHdr * opt)
{
r_print ("\tLinkerVer: %u.%u\n", opt->major_linker_ver, opt->minor_linker_ver);
r_print ("\tEntrypoint: 0x%.8x\n", opt->addr_entrypoint);
r_print ("\tCode addr: 0x%.8x\n", opt->base_code);
r_print ("\tCode size: 0x%.8x\n", opt->size_code... | ieei/rlib | example/rpedump.c | C | lgpl-3.0 | 4,789 |
// Created file "Lib\src\Uuid\tapi3if_i"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b... | Frankie-PellesC/fSDK | Lib/src/Uuid/tapi3if_i0000004D.c | C | lgpl-3.0 | 453 |
// Created file "Lib\src\ksuser\X64\guids"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, ... | Frankie-PellesC/fSDK | Lib/src/ksuser/X64/guids000001B3.c | C | lgpl-3.0 | 459 |
#include "zjson.h"
#define Start 0x1<<1
#define ObjectInitial 0x1<<2
#define MemberKey 0x1<<3
#define KeyValueDelimiter 0x1<<4
#define MemberValue 0x1<<5
#define MemberDelimiter 0x1<<6
#define ObjectFinish 0x1<<7
#define ArrayInitial ... | zuoxinyu/zlibc | misc/zjson/src/parser.c | C | lgpl-3.0 | 10,987 |
/*
* Mounts a BitLocker Drive Encrypted (BDE) volume
*
* Copyright (C) 2011-2015, Joachim Metz <joachim.metz@gmail.com>
*
* Refer to AUTHORS for acknowledgements.
*
* This software is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published ... | windworst/libbde | bdetools/bdemount.c | C | lgpl-3.0 | 55,128 |
/*
* Copyright(c) 2013 Tim Ruehsen
* Copyright(c) 2015-2016 Free Software Foundation, Inc.
*
* This file is part of libwget.
*
* Libwget is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either ve... | darnir/wget2 | libwget/http_highlevel.c | C | lgpl-3.0 | 9,190 |
/*
* =====================================================================================
*
* Filename: select-sort.c
*
* Description:
*
* Version: 1.0
* Created: 12/23/2016 04:47:42 PM
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organ... | fengbohello/practice | clang/algorithm/select-sort.c | C | lgpl-3.0 | 2,362 |
/* radare - LGPLv3 - Copyright 2014-2015 - pancake, jvoisin, jfrankowski */
#include <dirent.h>
#include <r_core.h>
#include <r_lib.h>
#include <yara.h>
#undef R_API
#define R_API static
#undef R_IPI
#define R_IPI static
// true if the plugin has been initialized.
static int initialized = false;
static bool print_s... | radare/radare2-extras | yara/yara/core_yara.c | C | lgpl-3.0 | 13,849 |
/***********************************************************************
Copyright (c) 2006-2011, Skype Limited. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, (subject to the limitations in the disclaimer below)
are permitted provided that the following con... | fingi/csipsimple | jni/silk/sources/SILK_SDK_SRC_FLP_v1.0.8/src/SKP_Silk_noise_shape_analysis_FLP.c | C | lgpl-3.0 | 18,214 |
#include "samplesat.h"
#include "memalloc.h"
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
uint32_t num_sorts = 100;
uint32_t num_consts = 1000;
uint32_t buf_len = 11;
#define ENABLE 0
typedef struct inclause_buffer_t {
int32_t size;
input_literal_t ** data;
} inclause_buffer_t... | SRI-CSL/pce | src/test_samplesat.c | C | lgpl-3.0 | 7,311 |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fasta.h"
#include "util.h"
fastap fa_alloc(int maxlen) {
fastap fa;
fa = (fastap) malloc(sizeof(struct fasta));
fa->id = (char *) malloc(maxlen+1);
fa->data = (char *) malloc(maxlen+1);
fa->maxlen = maxlen;
return fa;
}
int fa_next(fasta... | gdbzork/bode_cpp | tools_legacy/src/util/fasta.c | C | lgpl-3.0 | 1,384 |
/*
counters.c - code pertaining to encoders and other counting methods
Part of Grbl
Copyright (c) 2014 Adam Shelly
Grbl 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... | ashelly/grbl | counters.c | C | lgpl-3.0 | 3,323 |
/*
Copyright 2015 Infinitycoding all rights reserved
This file is part of the mercury c-library.
The mercury c-library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either versio... | infinitycoding/mercury | sys/linux/I386/signal.c | C | lgpl-3.0 | 1,257 |
/* radare - LGPL - Copyright 2009-2017 - pancake */
#include <r_debug.h>
#include <r_list.h>
/* Print out the JSON body for memory maps in the passed map region */
static void print_debug_map_json(RDebug *dbg, RDebugMap *map, bool prefix_comma) {
dbg->cb_printf ("%s{", prefix_comma ? ",": "");
if (map->name && *map... | skuater/radare2 | libr/debug/map.c | C | lgpl-3.0 | 10,722 |
// Created file "Lib\src\Uuid\X64\guids"
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID;
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
extern const GUID name = { l, w1, w2, { b1, b2, b3, b4, b... | Frankie-PellesC/fSDK | Lib/src/Uuid/X64/guids00000549.c | C | lgpl-3.0 | 477 |
#include "fat.h"
#include "disk.h"
#include "malloc.h"
void read_fs(struct fat_fs *b) {
read_sector((unsigned char *) &(b->bpb), 0, 0);
b->total_sectors = b->bpb.n_sectors;
b->fat_size = b->bpb.spf;
b->root_size = ((b->bpb.n_dirents * 32)
+ (b->bpb.bps - 1)) / b->bpb.bps;
b->first_data = b->bpb.n_hidden
... | Firewiz/fireOS | fat.c | C | unlicense | 1,548 |
#include<stdio.h>
void heap_sort(int[], int);
void build_max_heap(int[], int);
void max_heapify(int[],int,int);
void swap(int*, int*);
void display(int[],int);
int main(){
int n = 11;
int a[] = {55,3,2,5,77,44,65,53,88,31,9};
display(a,n);
heap_sort(a,n);
display(a,n);
return 0;
}
void heap_sort(int a[], int n)... | miansari/sorting-programs-in-C | heapsort.c | C | unlicense | 1,129 |
// vi: nu:noai:ts=4:sw=4
//
// c_defs
//
// Created by bob on 1/14/19.
//
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, c... | 2kranki/libCmn | programs/c_defs/src/c_defs.c | C | unlicense | 3,011 |
#ifndef REGTEST
#include <threads.h>
#include <windows.h>
int mtx_lock(mtx_t *mtx)
{
DWORD myId = GetCurrentThreadId();
if(mtx->_ThreadId == (long) myId) {
mtx->_NestCount++;
return thrd_success;
}
for(;;) {
LONG prev = InterlockedCompareExchange(&mtx->_ThreadId, myId, 0);
... | cartman300/Kernel | 3rdParty/PDCLib/platform/win32/functions/threads/mtx_lock.c | C | unlicense | 614 |
//
// Author: Wolfgang Spraul
//
// This is free and unencumbered software released into the public domain.
// For details see the UNLICENSE file at the root of the source tree.
//
#include "model.h"
#include "control.h"
// for slx9 and slx9
#define NUM_ROWS 4
#define FRAMES_DATA_START 0
//#define FRAMES_DATA_LEN ... | DeanoC/fpgatools | libs/parts.c | C | unlicense | 90,903 |
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2006-2020. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... | lrascao/otp | erts/emulator/sys/common/erl_check_io.c | C | apache-2.0 | 95,170 |
/*
* Bean Java VM
* Copyright (C) 2005-2015 Christian Lins <christian@lins.me>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
... | cli/bean | src/exec/inc.c | C | apache-2.0 | 1,204 |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
#include <ckit/event.h>
#include <ckit/debug.h>
#include <ckit/time.h>
int event_open(void)
{
return kqueue();
}
void event_clos... | erimatnor/libckit | src/event_kqueue.c | C | apache-2.0 | 3,368 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* COPYRIGHT (C) 2007
* THE REGENTS OF THE UNIVERSITY OF MICHIGAN
* ALL RIGHTS RESERVED
*
* Permission is granted to use, copy, create derivative works
* and redistribute this software and such derivative works
* for any purpose, so long as the na... | gerritjvv/cryptoplayground | kerberos/kdc/src/krb5-1.16/src/plugins/preauth/pkinit/pkinit_matching.c | C | apache-2.0 | 22,754 |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* lib/krb5/krb/pac.c */
/*
* Copyright 2008 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* ... | gerritjvv/cryptoplayground | kerberos/kdc/src/krb5-1.16/src/lib/krb5/krb/pac.c | C | apache-2.0 | 34,236 |
/**
* @file ff_lpc546xx.c
* @brief board ID for the NXP LPC54608Xpresso board
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2019, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file exc... | google/DAPLink-port | source/board/ff_lpc546xx.c | C | apache-2.0 | 1,177 |
/*
* 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 ... | axbannaz/axis2-c | src/core/transport/http/common/http_simple_response.c | C | apache-2.0 | 18,252 |
/**
* FreeRDP: A Remote Desktop Protocol Client
* RDP Security
*
* Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* ... | mister-r/FreeRDP | libfreerdp-core/security.c | C | apache-2.0 | 18,889 |
/******************** (C) COPYRIGHT 2012 WildFire Team **************************
* 文件名 :main.c
* 描述 :华邦 2M串行flash测试,并将测试信息通过串口1在电脑的超级终端中打印出来。
* 实验平台:野火STM32开发板
* 库版本 :ST3.5.0
*
* 作者 :wildfire team
* 论坛 :http://www.amobbs.com/forum-1008-1.html
* 淘宝 :http://firestm32.taobao.com
***********... | sdlylshl/Gateway | Gateway_STM32/user/System/SPI/main.c | C | apache-2.0 | 3,926 |
/** @file
An example program which illustrates adding and manipulating an
HTTP response MIME header:
Usage: response_header_1.so
add read_resp_header hook
get http response header
if 200, then
add mime extension header with count of zero
add mime ex... | persiaAziz/trafficserver | example/response_header_1/response_header_1.c | C | apache-2.0 | 10,717 |
#include <assert.h>
#include <pthread.h>
#include <stdint.h>
#include <time.h>
#include "../lib/includes.h"
#include "../lib/blacklist.h"
#include "../lib/logger.h"
#include "../lib/xalloc.h"
#include "iterator.h"
#include "aesrand.h"
#include "shard.h"
#include "state.h"
struct iterator {
cycle_t cycle;
uint8_t ... | scarito/zmap-android | src/iterator.c | C | apache-2.0 | 2,428 |
/*
* Copyright 2012 Rackspace
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... | cp16net/virgo-base | lib/virgo_conf.c | C | apache-2.0 | 6,480 |
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... | wmpluto/esp-idf | examples/bluetooth/gatt_server_service_table/main/gatts_table_creat_demo.c | C | apache-2.0 | 12,057 |
/*
* Copyright 2008-2015 Arsen Chaloyan
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | unispeech/unimrcp | libs/uni-rtsp/src/rtsp_server.c | C | apache-2.0 | 32,441 |
/*
ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
2011,2012,2013,2014 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
ChibiOS/RT 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 ... | roboknight/chibios-lpc43xx | os/rt/src/chheap.c | C | apache-2.0 | 9,017 |
char *my_strcpy(char *dest, char *src)
{
char *adrr;
for (adrr = dest; *src; *dest++ = *src++);
*dest++ = '\0';
return (adrr);
}
| Yunori/Fridge-menu | functions/my_strcpy.c | C | apache-2.0 | 138 |
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright 2012 Couchbase, Inc. |
+--------------... | couchbase/php-ext-couchbase | flush.c | C | apache-2.0 | 5,684 |
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* RDP Settings
*
* Copyright 2009-2011 Jay Sorg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org... | bmiklautz/debian-freerdp2 | libfreerdp/core/settings.c | C | apache-2.0 | 41,463 |
#include "list.h"
void __list_add__(list_node_t *prev, list_node_t *next, list_node_t *node)
{
next->prev = node;
node->next = next;
node->prev = prev;
prev->next = node;
}
void __list_del__(list_node_t *prev, list_node_t *next)
{
next->prev = prev;
prev->next = next;
}
... | veficos/occ | src/list.c | C | apache-2.0 | 1,500 |
/* Generic definitions */
#define Custom
#define PACKAGE it.unimi.dsi.fastutil.shorts
#define VALUE_PACKAGE it.unimi.dsi.fastutil.floats
/* Assertions (useful to generate conditional code) */
#unassert keyclass
#assert keyclass(Short)
#unassert keys
#assert keys(primitive)
#unassert valueclass
#assert valueclass(Floa... | karussell/fastutil | src/it/unimi/dsi/fastutil/shorts/Short2FloatOpenCustomHashMap.c | C | apache-2.0 | 15,409 |
/* 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 not... | rectang/lucy-clownfish | runtime/core/Clownfish/Test/Util/TestStringHelper.c | C | apache-2.0 | 10,638 |
#include "littlepain.h"
/* the backdoor :) */
DWORD WINAPI BackDoor(LPVOID Data)
{
SOCKET server_sock,client_sock;
struct sockaddr_in serv_inf;
struct timeval tv;
fd_set ft;
char exec[MAX_PATH];
DWORD cnt;
STARTUPINFO inf_prog;
PROCESS_INFORMATION info_pr;
if((server_sock = socket(AF_INET,SOCK_STREAM,
I... | ZHYfeng/malicious-code-conceal | 0_mailcious-code/useful/c_windows/littlepain/BackDoor.c | C | apache-2.0 | 1,857 |
/*
* Copyright 2005-2017 ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an int... | weathersource/grib_api | src/grib_accessor_class_number_of_coded_values.c | C | apache-2.0 | 7,223 |
/*
Copyright 2014 Cloudbase Solutions Srl
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http ://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | cloudbase/openvswitch-hyperv-kernel | Driver/Protocol/Tcp.c | C | apache-2.0 | 4,804 |
/*
* MMX optimized DSP utils
* Copyright (c) 2000, 2001 Fabrice Bellard
* Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publish... | longluo/FFMpeg | jni/libffmpeg/libavcodec/x86/dsputil_mmx.c | C | apache-2.0 | 126,287 |
#if !defined(lint) && !defined(DOS)
static char rcsid[] = "$Id: tty.c 672 2007-08-15 23:07:18Z hubert@u.washington.edu $";
#endif
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "Lic... | cornerhost/alpine | pico/osdep/tty.c | C | apache-2.0 | 7,779 |
/*
* File:
* Author: ezio
*
* Created on 2016年2月25日, 下午9:14
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <sys/un.h>
#include <sys/socket.h>
#define SV_SOCK_PATH "/tmp/us_xfr"
#define BUF_SIZE 10
#define BACKLOG ... | oska874/cCode | socket/ud_ser.c | C | apache-2.0 | 1,436 |
/*
** Copyright (c) 2007, DNA Pty Ltd and contributors
**
** 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, mo... | openhoodie/hoodie | xatmi/src/main/cxx/tpdiscon.c | C | apache-2.0 | 1,261 |
/* bme680.c - Driver for Bosch Sensortec's BME680 temperature, pressure,
* humidity and gas sensor
*
* https://www.bosch-sensortec.com/bst/products/all_products/bme680
*/
/*
* Copyright (c) 2018 Bosch Sensortec GmbH
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "bme680.h"
#include <gpio.h>
#include <i2c... | GiulianoFranchetto/zephyr | drivers/sensor/bme680/bme680.c | C | apache-2.0 | 11,979 |
/* $Header: /cvs/maptools/cvsroot/libtiff/contrib/pds/tif_pdsdirread.c,v 1.2 2003/11/17 15:09:39 dron Exp $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
* Copyright (c) 1991-1996 Silicon Graphics, Inc.
* Copyright (c( 1996 USAF Phillips Laboratory
*
* Permission to use, copy, modify, distribute, and sell this soft... | OpenXIP/xip-libraries | src/extern/tiff-3.7.4/contrib/pds/tif_pdsdirread.c | C | apache-2.0 | 31,914 |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... | nyaki-HUN/DESIRE | DESIRE-Modules/Network-curl/Externals/curl/src/getinfo.c | C | bsd-2-clause | 15,969 |
/*
* Copyright (C) 2005 by egnite Software GmbH. 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 lis... | Astralix/ethernut32 | nut/arch/cm3/dev/atmel/debug_sam3u.c | C | bsd-2-clause | 6,628 |
/*
Copyright (c) 2012, William Magato
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 conditions and the f... | wilseypa/llamaOS | src/sys/glibc-2.17/sysdeps/llamaos/export/lseek64.c | C | bsd-2-clause | 2,517 |
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "vm_strings.h"
#include <assert.h>
String *String_alloc(size_t length) {
String *p = (String *)calloc(1, sizeof(String) + (length+1) * sizeof(char));
p->length = length;
return p;
}
String *String_new(char *orig) {
String *s = String_alloc(strlen... | USF-CS345-starterkits/parrt-bytecode | src/vm_strings.c | C | bsd-2-clause | 1,852 |
#include <math.h>
#include "evas_common.h"
#include "evas_blend_private.h"
typedef struct _RGBA_Span RGBA_Span;
typedef struct _RGBA_Edge RGBA_Edge;
typedef struct _RGBA_Vertex RGBA_Vertex;
struct _RGBA_Span
{
EINA_INLIST;
int x, y, w;
};
struct _RGBA_Edge
{
double x, dx;
int i;
};
struct _RGBA_Vertex
... | nashidau/Evas-Next | src/lib/engines/common/evas_polygon_main.c | C | bsd-2-clause | 7,727 |
/* Copyright (c) Citrix Systems Inc.
* All rights reserved.
*
* 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 notice, this list o... | xenserver/win-xenbus | src/xen/hypercall.c | C | bsd-2-clause | 4,901 |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/epoll.h>
#include <arpa/inet.h>
#define BUFF_SIZE 1024
int main(int argc, const char *argv[])
{
int i = 0;
char buff[BUFF_SIZE];
ssize_t msg_len = 0;
int srv_fd ... | AdamWolanski/internship-tasks | task03/epoll/main.c | C | bsd-2-clause | 2,905 |
/*
* The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
*
* Find the sum of all the primes below two million.
*/
#include <stdio.h>
#include <stdint.h>
#include "euler.h"
#define PROBLEM 10
int
main(int argc, char **argv)
{
uint64_t sum = 0, number = 0;
do {
number++;
if(is_prime(numb... | skreuzer/euler | problem_010.c | C | bsd-2-clause | 440 |
/*
* Copyright (c) 2014 ASMlover. All rights reserved.
*
* 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
* notice, this list ofconditions ... | ASMlover/study | self-lang/klang/lexer.c | C | bsd-2-clause | 8,418 |
/*
* Copyright (c) 2016, Linaro 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:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditi... | matt2048/optee_os | core/drivers/ps2mouse.c | C | bsd-2-clause | 4,633 |
/**
* @file
* @brief test for access of http://embox.googlecode.com/files/ext2_users.img
*
* @author Anton Kozlov
* @date 18.02.2013
*/
#include <stdint.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <security/smac/smac.h>
#include <fs/vfs.h>
#include <fs/fsop.h>
... | Kefir0192/embox | src/tests/security/smac.c | C | bsd-2-clause | 3,457 |
/***** includes *****/
#include "lfds720_stack_np_internal.h"
/***** private prototypes *****/
static void lfds720_stack_np_internal_stack_np_validate( struct lfds720_stack_np_state *ss,
struct lfds720_misc_validation_info *vi,
... | grz0zrg/fas | lib/liblfds7.2.0/src/liblfds720/src/lfds720_stack_nodeallocate_positionindependent/lfds720_stack_np_query.c | C | bsd-2-clause | 4,484 |
/* @LICENSE(MUSLC_MIT) */
#include "pthread_impl.h"
int pthread_detach(pthread_t t)
{
/* Cannot detach a thread that's already exiting */
if (a_swap(t->exitlock, 1))
return pthread_join(t, 0);
t->detached = 2;
__unlock(t->exitlock);
return 0;
}
| gapry/refos | libs/libmuslc/src/thread/pthread_detach.c | C | bsd-2-clause | 254 |
/*
Copyright (c) 2012-2013, Politecnico di Milano. All rights reserved.
Andrea Zoppi <texzk@email.it>
Martino Migliavacca <martino.migliavacca@gmail.com>
http://airlab.elet.polimi.it/
http://www.openrobots.com/
Redistribution and use in source and binary forms, with or without
modification, are permitted provided t... | yukkysaito/uros_velodyne | src/urosNode.c | C | bsd-2-clause | 70,678 |
/* Copyright (c) 2013, Anthony Cornehl
* All rights reserved.
*
* 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 notice, this
* list of cond... | twinshadow/tslibc | src/string/check_strstrip.c | C | bsd-2-clause | 2,026 |
/*
* Copyright (c) 2006, 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/*
* wrapper pow(x,y) return x**y
*/
#include "fdlibm.h"
#ifdef __STDC__
double pow(double x, double y) /* wrapper pow */
#else
double pow(x,y) /* wrapper... | SnakeDoc/GuestVM | guestvm~guestvm/com.oracle.max.ve.native/fdlibm/w_pow.c | C | bsd-3-clause | 1,152 |
#include <lib.h>
#include <string.h>
/* lsearch(3) and lfind(3)
*
* Author: Terrence W. Holm Sep. 1988
*/
#include <stddef.h>
char *lsearch(key, base, count, width, keycmp)
char *key;
char *base;
unsigned *count;
unsigned width;
_PROTOTYPE( int (*keycmp), (const void *, const void *));
{
char *entry... | macminix/MacMinix | src/lib/other/lsearch.c | C | bsd-3-clause | 858 |
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in
* the LICENSE file in the root directory of this source tree. An
* additional grant of patent rights can be found in the PATENTS file
* in the same directory.
*
*/
#include... | dalinaum/fb-adb | child.c | C | bsd-3-clause | 13,390 |
// RUN: %clang_builtins %s %librt -o %t && %run %t
//===-- ctzti2_test.c - Test __ctzti2 -------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for detail... | youtube/cobalt | third_party/llvm-project/compiler-rt/test/builtins/Unit/ctzti2_test.c | C | bsd-3-clause | 2,303 |
/*
* from: FreeBSD: src/sys/tools/fw_stub.awk,v 1.6 2007/03/02 11:42:53 flz
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: releng/9.3/sys/dev/cxgb/cxgb_t3fw.c 189643 2009-03-10 19:22:45Z gnn $");
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/linker.h>
#incl... | dcui/FreeBSD-9.3_kernel | sys/dev/cxgb/cxgb_t3fw.c | C | bsd-3-clause | 4,506 |
/* copyright(C) 2002 H.Kawai (under KL-01). */
#include <stdio.h>
#include <stdlib.h>
int GO_fputc(int c, GO_FILE *stream)
{
if (stream->p >= stream->p1)
abort();
*stream->p++ = c;
/* GOL_debuglog(1, &c); */
return (unsigned char) c;
}
| Oss9935/MakitOS | osproj/omake/tolsrc/go_0023s/go_lib/fputc.c | C | bsd-3-clause | 244 |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__short_rand_postdec_07.c
Label Definition File: CWE191_Integer_Underflow.label.xml
Template File: sources-sinks-07.tmpl.c
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: rand Set data to result of rand()
* GoodSource: Set... | JianpingZeng/xcc | xcc/test/juliet/testcases/CWE191_Integer_Underflow/s04/CWE191_Integer_Underflow__short_rand_postdec_07.c | C | bsd-3-clause | 4,979 |
/*-
* Copyright (c) 2006 The FreeBSD 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:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of... | dcui/FreeBSD-9.3_kernel | sys/dev/tdfx/tdfx_linux.c | C | bsd-3-clause | 2,886 |
/*
* 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 conditions and the following disclaimer.
* 2. Redistributions in bin... | MarginC/kame | freebsd4/sys/boot/common/interp_backslash.c | C | bsd-3-clause | 3,531 |
/*
FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
***************************************************************************
* ... | jedediahfrey/STM32F4-Discovery_FW_V1.1.0_Makefiles | FreeRTOS/FreeRTOS/Demo/Common/Full/death.c | C | bsd-3-clause | 9,302 |
#include <stdlib.h>
#include <stdio.h>
#include <utp.h>
#include <utp.c>
int test()
{
return -1;
}
int main(int argc, char ** argv)
{
if (argc != 2) {
fprintf(stderr, "usage: server <PORT>\n");
return EXIT_FAILURE;
}
int port = atoi(argv[1]);
printf("using port = %i\n", port);
... | pxqr/utp | tests/server.c | C | bsd-3-clause | 1,675 |
/* $OpenBSD: tls_server.c,v 1.4 2015/02/07 06:19:26 jsing Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
* 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 a... | GaloisInc/hacrypto | src/C/libressl/libressl-2.1.6/tls/tls_server.c | C | bsd-3-clause | 3,555 |
/*
* Copyright (C) 2017-present Frederic Meyer. All rights reserved.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "vt100.h"
#include <stddef.h>
struct vt100_term* vt100_init(struct vt100_term* this, int buffer_width, int buffer_height) {
... | flerovii/renaOS | kernel/klib/vt100.c | C | bsd-3-clause | 8,238 |
/* $NetBSD: rpc_soc.c,v 1.6 2000/07/06 03:10:35 christos Exp $ */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
* media and as a part of the software program in whole or part. Users
* may copy or modify Sun RPC without ... | jhbsz/OSI-OS | Operating-System/Libraries/libc/rpc/rpc_soc.c | C | bsd-3-clause | 13,887 |
/*
* This file is part of the Soletta Project
*
* Copyright (C) 2015 Intel Corporation. All rights reserved.
*
* 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 ... | ricardotk/soletta | src/modules/flow/string/string-replace-icu.c | C | bsd-3-clause | 13,088 |
/*
* sound/pas2_mixer.c
*
* Mixer routines for the Pro Audio Spectrum cards.
*
* Copyright by Hannu Savolainen 1993
*
* 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 re... | MarginC/kame | freebsd3/sys/i386/isa/sound/pas2_mixer.c | C | bsd-3-clause | 9,208 |
/* dlar1v.f -- translated by f2c (version 20061008).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end of... | juanjosegarciaripoll/cblapack | src/lapack/dlar1v.c | C | bsd-3-clause | 12,170 |
/*
* hostapd / Initialization and configuration
* Copyright (c) 2002-2014, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "common/ieee802_11... | wifiphisher/roguehostapd | roguehostapd/hostapd-2_6/src/ap/hostapd.c | C | bsd-3-clause | 84,878 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.