doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
5833da19-e90c-422f-8b49-50f648c92435 | {
"language": "C"
} | ```c
/* * This file is part of meego-im-framework *
*
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* Contact: Nokia Corporation (directui@nokia.com)
*
* If you have questions regarding the use of this file, please contact
* Nokia at directui@nokia.com.
*
* This lib... | ```c
/* * This file is part of meego-im-framework *
*
* Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* Contact: Nokia Corporation (directui@nokia.com)
*
* If you have questions regarding the use of this file, please contact
* Nokia at directui@nokia.com.
*
* This lib... |
bde5ab45-f7cf-4c56-95b2-db51faa60e14 | {
"language": "C"
} | ```c
```
Add global exception functions to CONFIG | ```c
/**
* nlp_exception.h
* Copyright (C) 2015 Tony Lim <atomictheorist@gmail.com>
*
* Distributed under terms of the MIT license.
*/
#ifndef NLP_EXCEPTION_H
#define NLP_EXCEPTION_H
#include <exception>
using namespace std;
namespace NLP
{
class unimplemented_exc: public exception
{
virtual con... |
1df8f3c0-86ac-4a6e-b43d-15c76535a435 | {
"language": "C"
} | ```c
/*********************************** LICENSE **********************************\
* Copyright 2017 Morphux *
* *
* Licensed under the Apache License, Version 2.0 (the "License");... | ```c
/*********************************** LICENSE **********************************\
* Copyright 2017 Morphux *
* *
* Licensed under the Apache License, Version 2.0 (the "License");... |
3470b168-52c6-482c-b28c-9f1d76aaf658 | {
"language": "C"
} | ```c
/*
* Copyright © 2017 AperLambda <aper.entertainment@gmail.com>
*
* This file is part of λcommon.
*
* Licensed under the MIT license. For more information,
* see the LICENSE file.
*/
#ifndef LAMBDACOMMON_DOCUMENT_H
#define LAMBDACOMMON_DOCUMENT_H
#include "../lambdacommon.h"
#include <map>
namespace lamb... | ```c
/*
* Copyright © 2017 AperLambda <aper.entertainment@gmail.com>
*
* This file is part of λcommon.
*
* Licensed under the MIT license. For more information,
* see the LICENSE file.
*/
#ifndef LAMBDACOMMON_DOCUMENT_H
#define LAMBDACOMMON_DOCUMENT_H
#include "../lambdacommon.h"
#include <map>
namespace lamb... |
388a4d22-1344-4ca6-9299-dddb06628edf | {
"language": "C"
} | ```c
```
Add example for working threads and events | ```c
/**
* @file
*
* @brief
*
* @date 15.01.2013
* @author Lapshin Alexander
*/
#include <stdio.h>
#include <errno.h>
#include <framework/example/self.h>
#include <kernel/thread/api.h>
#include <kernel/thread/event.h>
#include <util/macro.h>
/**
* This macro is used to register this example at the system.
*/... |
ee4b8a85-6dd9-494d-8078-f7643baf90a6 | {
"language": "C"
} | ```c
/*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#include <stdlib.h>
#include <vdp1.h>
#include <vdp2.h>
#include <vdp2/tvmd.h>
#include <vdp2/vram.h>
#include <cons.h>
void __noreturn
internal_exception_show(const char *buffer)
{
/* ... | ```c
/*
* Copyright (c) 2012-2016 Israel Jacquez
* See LICENSE for details.
*
* Israel Jacquez <mrkotfw@gmail.com>
*/
#include <stdlib.h>
#include <vdp1.h>
#include <vdp2.h>
#include <vdp2/tvmd.h>
#include <vdp2/vram.h>
#include <cons.h>
void __noreturn
internal_exception_show(const char *buffer)
{
/* ... |
173bd9da-7386-4ce5-a399-cc816d15b0c9 | {
"language": "C"
} | ```c
```
Check in an old testcase | ```c
/* Provide Declarations */
#ifndef NULL
#define NULL 0
#endif
#ifndef __cplusplus
typedef unsigned char bool;
#endif
/* Support for floating point constants */
typedef unsigned long long ConstantDoubleTy;
typedef unsigned int ConstantFloatTy;
/* Global Declarations */
/* External Global Variable Decl... |
202750f0-3f28-4c98-9584-8e3f84cf6d3e | {
"language": "C"
} | ```c
```
Test "list" embeding to arbitary struct It is not confortable for me to use too much "address of". | ```c
#include <stdio.h>
#include <stdlib.h>
#include "list.h"
struct list {
int ctx;
struct list_head loc;
};
int main(int argc, char *argv[])
{
struct list l[3];
for(int i = 0; i < 3; i++)
{
l[i].ctx = i * 10;
//l[i].loc = (struct list_head *) malloc(sizeof(struct list_head));
... |
1e32a887-636a-4353-9a8a-521409540ab1 | {
"language": "C"
} | ```c
#ifndef _TOKU_DIRENT_H
#define _TOKU_DIRENT_H
#if defined(__cplusplus)
extern "C" {
#endif
//The DIR functions do not exist in windows, but the Linux API ends up
//just using a wrapper. We might convert these into an toku_os_* type api.
enum {
DT_UNKNOWN = 0,
DT_DIR = 4,
DT_REG = 8
};
stru... | ```c
#ifndef _TOKU_DIRENT_H
#define _TOKU_DIRENT_H
#include "toku_os_types.h"
#if defined(__cplusplus)
extern "C" {
#endif
//The DIR functions do not exist in windows, but the Linux API ends up
//just using a wrapper. We might convert these into an toku_os_* type api.
enum {
DT_UNKNOWN = 0,
DT_DIR = 4,
... |
1cc0d84a-7de3-4c1f-b38d-50371abd807c | {
"language": "C"
} | ```c
/*
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <debug.h>
/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>
/*
* mbed TLS heap
*/
#if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDS... | ```c
/*
* Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <debug.h>
/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>
/*
* mbed TLS heap
*/
#if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDS... |
1997ef7d-5031-4286-93fb-6cc3ed2c4e28 | {
"language": "C"
} | ```c
#ifndef LZ4MT_COMPAT_H
#define LZ4MT_COMPAT_H
namespace Lz4Mt {
unsigned getHardwareConcurrency();
struct launch {
#if defined(_MSC_VER)
typedef std::launch::launch Type;
#else
typedef std::launch Type;
#endif
static const Type deferred;
static const Type async;
};
}
#endif
```
Fix compile error with VC+... | ```c
#ifndef LZ4MT_COMPAT_H
#define LZ4MT_COMPAT_H
namespace Lz4Mt {
unsigned getHardwareConcurrency();
struct launch {
#if defined(_MSC_VER) && (_MSC_VER <= 1700)
typedef std::launch::launch Type;
#else
typedef std::launch Type;
#endif
static const Type deferred;
static const Type async;
};
}
#endif
``` |
da644ebc-c917-4439-aba3-bcb21fd19d88 | {
"language": "C"
} | ```c
```
Add an OS mutex to Halide runtime. | ```c
#ifndef HALIDE_RUNTIME_MUTEX_H
#define HALIDE_RUNTIME_MUTEX_H
#include "HalideRuntime.h"
// Avoid ODR violations
namespace {
// An RAII mutex
struct ScopedMutexLock {
halide_mutex *mutex;
ScopedMutexLock(halide_mutex *mutex) : mutex(mutex) {
halide_mutex_lock(mutex);
}
~ScopedMutexLock... |
5001f1bf-e647-4998-9d3c-fee41ca3e9f7 | {
"language": "C"
} | ```c
//
// OctoKit.h
// OctoKit
//
// Created by Piet Brauer on 25/08/15.
// Copyright (c) 2015 nerdish by nature. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for OctoKit.
FOUNDATION_EXPORT double OctoKitVersionNumber;
//! Project version string for OctoKit.
FOUNDATION_EXPORT const... | ```c
//
// OctoKit.h
// OctoKit
//
// Created by Piet Brauer on 25/08/15.
// Copyright (c) 2015 nerdish by nature. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for OctoKit.
FOUNDATION_EXPORT double OctoKitVersionNumber;
//! Project version string for OctoKit.
FOUNDATION_EX... |
1fba2c16-b4c6-4131-98c2-98f4ed7554e9 | {
"language": "C"
} | ```c
#ifndef APIMOCK_H
#define APIMOCK_H
#include "core/server.h"
#endif```
Include exceptions in main header | ```c
#ifndef APIMOCK_H
#define APIMOCK_H
#include "core/server.h"
#include "core/exceptions.h"
#endif``` |
c7d9bd41-852f-44c2-a81b-4d577f741c03 | {
"language": "C"
} | ```c
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdynamic flag to GCC for any sort of decent output.
*/
void e_sigseg_act(int x, siginfo_t *info, void *data){
void *array[255];
size_t... | ```c
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
* NOTE TO FreeBSD users. Install libexecinfo from
* ports/devel/libexecinfo and add -lexecinfo to LDFLAGS
* to add backtrace support.
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdy... |
244ae251-b359-41ce-aa2e-19210c1292f8 | {
"language": "C"
} | ```c
//===-- ipcreg_internal.h -------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... | ```c
//===-- ipcreg_internal.h -------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... |
4bad4696-902f-494b-87e8-893c557fc399 | {
"language": "C"
} | ```c
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_MONITOR_H
# define E_SMART_MONITOR_H
# endif
#endif
```
Add header function for creating new monitors. | ```c
#ifdef E_TYPEDEFS
#else
# ifndef E_SMART_MONITOR_H
# define E_SMART_MONITOR_H
Evas_Object *e_smart_monitor_add(Evas *evas);
# endif
#endif
``` |
ac7a003d-e740-47bb-b6e9-0b1a82b34d1e | {
"language": "C"
} | ```c
/*
* Copyright (C) 2019 The Android Open Source Project
*
* 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 b... | ```c
/*
* Copyright (C) 2019 The Android Open Source Project
*
* 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 b... |
6d3d68b9-b748-4c0d-b0e8-656d2b498152 | {
"language": "C"
} | ```c
//
// APIRouter.h
// APIClient
//
// Created by Klaas Pieter Annema on 14-09-13.
// Copyright (c) 2013 Klaas Pieter Annema. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "APIInflector.h"
@protocol APIRouter <NSObject>
@property (nonatomic, readonly, strong) id<APIInflector> inflector;
-... | ```c
//
// APIRouter.h
// APIClient
//
// Created by Klaas Pieter Annema on 14-09-13.
// Copyright (c) 2013 Klaas Pieter Annema. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "APIInflector.h"
@protocol APIRouter <NSObject>
- (NSString *)pathForAction:(NSString *)action onResource:(Class)resou... |
408b28c1-8945-49ee-a46a-4b6c911d38e7 | {
"language": "C"
} | ```c
#pragma once
#if defined(_MSC_VER)
#define DLL_API __declspec(dllexport)
#define STDCALL __stdcall
#define CDECL __cdecl
#else
#define DLL_API __attribute__ ((visibility ("default")))
#define STDCALL __attribute__((stdcall))
#define CDECL __attribute__((cdecl))
#endif
#define CS_OUT```
Check for defines before ... | ```c
#pragma once
#if defined(_MSC_VER)
#define DLL_API __declspec(dllexport)
#ifndef STDCALL
#define STDCALL __stdcall
#endif
#ifndef CDECL
#define CDECL __cdecl
#endif
#else
#define DLL_API __attribute__ ((visibility ("default")))
#ifndef STDCALL
#define STDCALL __attribute__((stdcall))
#endif
#ifndef CDECL
#def... |
7cf3153c-1e5a-4534-b017-d60fc0ba22f4 | {
"language": "C"
} | ```c
```
Add basic interface for recordable modules | ```c
//
// CLURecordableModule.h
// Clue
//
// Created by Ahmed Sulaiman on 5/18/16.
// Copyright © 2016 Ahmed Sulaiman. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol CLURecordableModule <NSObject>
@required
- (void)startRecording;
- (void)stopRecording;
- (BOOL)addNewFrameWithTimestamp:(CF... |
7e948a34-5f9c-4001-98b8-4ec049de6467 | {
"language": "C"
} | ```c
//
// SecretConstant.example.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define Client_id @"kHOugsx4dmcXwvVbmLkd"
#define Client_secret @"PuuFCrF94MloSbSkxpwS"
#define UMENG_APPKEY @"Set up UMEng App Key"
#define UMENG_QQ_ID @"Set up ... | ```c
//
// SecretConstant.example.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#if DEBUG
#define Client_id @"kHOugsx4dmcXwvVbmLkd"
#define Client_secret @"PuuFCrF94MloSbSkxpwS"
#else
#define Client_id @"Set up a client id for production env"
... |
0df524cd-aff1-4175-9d96-04249b745021 | {
"language": "C"
} | ```c
//
// Prefix header for all source files of the 'Pester' target in the 'Pester' project
//
#import "NJROperatingSystemVersion.h"```
Fix Pester prefix header to import Cocoa again. | ```c
//
// Prefix header for all source files of the 'Pester' target in the 'Pester' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#import "NJROperatingSystemVersion.h"
#endif
``` |
55c7f09c-c79d-4068-8d91-aa67f5c667ea | {
"language": "C"
} | ```c
#include <stdio.h>
#include "lib/proc.h"
int
main(int argc, char **argv)
{
char* gitbuff;
int out = run_proc(&gitbuff, "git", "branch", "--list", 0);
//int out = run_proc(&gitbuff, "ls", "-l", "-h", 0);
if (out != 0)
{
fprintf(stderr, "Error running subprocess:%d\n", out);
exit(1);
}
//pri... | ```c
#include <stdio.h>
#include <string.h>
#include "lib/proc.h"
int
main(int argc, char **argv)
{
char* gitbuff;
int out = run_proc(&gitbuff, "git", "branch", "--list", 0);
if (out != 0)
{
exit(1);
}
char *token;
char *sep=" \r\n";
int next = 0;
while((token = strsep(&gitbuff, sep)) != NULL)
... |
9993c985-9723-4293-80cf-7316cbf0137b | {
"language": "C"
} | ```c
//
// PKTClient.h
// PodioKit
//
// Created by Sebastian Rehnby on 16/01/14.
// Copyright (c) 2014 Citrix Systems, Inc. All rights reserved.
//
#import "PKTRequest.h"
#import "PKTResponse.h"
#import "PKTRequestSerializer.h"
#import "PKTResponseSerializer.h"
typedef void(^PKTRequestCompletionBlock)(PKTRespons... | ```c
//
// PKTClient.h
// PodioKit
//
// Created by Sebastian Rehnby on 16/01/14.
// Copyright (c) 2014 Citrix Systems, Inc. All rights reserved.
//
#import "PKTRequest.h"
#import "PKTResponse.h"
#import "PKTRequestSerializer.h"
#import "PKTResponseSerializer.h"
typedef void(^PKTRequestCompletionBlock)(PKTRespons... |
9bbe9640-c555-4300-a45d-2e2a4f0c86fd | {
"language": "C"
} | ```c
```
Fix previous commit: by committing new include file. | ```c
//---------------------------------------------------------- -*- Mode: C++ -*-
// $Id$
//
// Created 2012/10/25
// Author: Mike Ovsiannikov
//
// Copyright 2012 Quantcast Corp.
//
// This file is part of Kosmos File System (KFS).
//
// Licensed under the Apache License, Version 2.0
// (the "License"); you may not ... |
9e122a2a-9b42-4745-af1b-5a4746cfa76d | {
"language": "C"
} | ```c
```
Add test for def_exc bool fixpoint error | ```c
// PARAM: --enable ana.sv-comp.functions
// manually minimized from sv-benchmarks/c/seq-mthreaded/pals_lcr.3.ufo.UNBOUNDED.pals.c
// used to not reach fixpoint due to def_exc range
_Bool __VERIFIER_nondet_bool(void) ;
_Bool mode1 ;
void node1(void)
{
if (mode1)
mode1 = 0;
else
mode1 = 1;
}
int main(... |
09e52fd1-557b-4491-a439-dacb33b18253 | {
"language": "C"
} | ```c
#include "../rts/PosixSource.h"
#include "Rts.h"
#include "HsFFI.h"
int main (int argc, char *argv[])
{
RtsConfig conf = defaultRtsConfig;
// We never know what symbols GHC will look up in the future, so
// we must retain CAFs for running interpreted code.
conf.keep_cafs = 1;
extern StgClos... | ```c
#include "../rts/PosixSource.h"
#include "Rts.h"
#include "HsFFI.h"
int main (int argc, char *argv[])
{
RtsConfig conf = defaultRtsConfig;
// We never know what symbols GHC will look up in the future, so
// we must retain CAFs for running interpreted code.
conf.keep_cafs = 1;
conf.rts_opts_... |
6e48226c-4c18-4321-ac74-2f01a8f45957 | {
"language": "C"
} | ```c
```
Add test for octApron combine forgetting return assign locally | ```c
// SKIP PARAM: --sets ana.activated[+] octApron
#include <assert.h>
int f(int x) {
return x + 1;
}
int main(void) {
int y = 42;
y = f(42);
// combine should forget caller's y before unifying with y == 43 to avoid bottom
assert(y);
return 0;
}
``` |
84f743de-b6e1-4f39-8ec7-adbe2bbd6fac | {
"language": "C"
} | ```c
/*
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/utils.h>
#include "rpi3_private.h"
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#define TRNG_NBYTES 16U
u_regist... | ```c
/*
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <lib/utils.h>
#include <lib/utils_def.h>
#include "rpi3_private.h"
/* Get 128 bits of entropy and fuse the values together to form the canary. */
#defin... |
239b2201-0baf-4532-a589-10fbc154f9af | {
"language": "C"
} | ```c
#pragma once
#include <jni.h>
/**
* Support for using JNI in a multi-threaded environment.
*/
class JniSupport {
public:
JniSupport(JavaVM* jvm);
JniSupport(JNIEnv* env);
protected:
jclass findClass(const char* className);
JNIEnv* getThreadEnv();
protected:
JavaVM* jvm;
};
/**
* Attach ... | ```c
#pragma once
#include <jni.h>
#include <stdexcept>
/**
* Support for using JNI in a multi-threaded environment.
*/
class JniSupport {
public:
JniSupport(JavaVM* jvm);
JniSupport(JNIEnv* env);
protected:
jclass findClass(const char* className);
JNIEnv* getThreadEnv();
protected:
JavaVM* jv... |
99c9bb92-5166-40c3-b382-550738fc0331 | {
"language": "C"
} | ```c
#ifndef DIRECTORY_H
#define DIRECTORY_H
#if defined (ULTRIX42) || defined(ULTRIX43) /* _POSIX_SOURCE should have taken care of this, */
#define __POSIX /* but for some reason the ULTRIX version of dirent.h */
#endif /* is not POSIX conforming without it... */
#include <dirent.h>
class Directory
{
public:
... | ```c
#ifndef DIRECTORY_H
#define DIRECTORY_H
#if defined (ULTRIX42) || defined(ULTRIX43)
/* _POSIX_SOURCE should have taken care of this,
but for some reason the ULTRIX version of dirent.h
is not POSIX conforming without it...
*/
# define __POSIX
#endif
#include <dirent.h>
#if defined(SUNOS41)
/* Note that fu... |
b7b2169c-520a-4225-abce-63dc60a0be9a | {
"language": "C"
} | ```c
```
Add basic test for long constants | ```c
/*
name: TEST023
description: Basic test for long constants
comments: This test is done for z80 data types
output:
F1
G1 F1 main
{
-
A2 W i
A3 Z u
A2 #W1 :W
A2 #WFFFFFFFF :W
A2 #WFFFFFFFF :W
A2 #WFFFFFFFF :W
A2 #WFFFFFFFF :W
A2 #W3 :W
A2 #W1 :W
A2 #W0 :W
A3 #Z1 :Z
A3 #ZFFFFFFFF :Z
A3 #ZFFFFFFFF :Z
A3 ... |
52968471-91e4-4e58-9548-9c87d6087f63 | {
"language": "C"
} | ```c
#ifndef __MACROS_H__
#define __MACROS_H__
/**
* @file macros.h
*
* This file contains simple helper macros
*/
/**
* @addtogroup internal_util_helper_macros "(internal) helper macros"
*
* This group contains helper macros for internal use only.
*
* @{
*/
/**
* Computes the maximum value of the two pas... | ```c
#ifndef __MACROS_H__
#define __MACROS_H__
/**
* @file macros.h
*
* This file contains simple helper macros
*/
/**
* @addtogroup internal_util_helper_macros "(internal) helper macros"
*
* This group contains helper macros for internal use only.
*
* @{
*/
/**
* Computes the maximum value of the two pas... |
25745d77-0c33-46c5-b727-76d05a6dc901 | {
"language": "C"
} | ```c
```
Add setup and teardown for hashtable tests | ```c
/*
* File: test_hashtable.c
*
* Testing suite for hashtables.
*
* Author: Jack Romo <sharrackor@gmail.com>
*/
#include "../cnoodle.h"
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct {
hashtable table;
} hfixture;
void table_setup(hfixture *hf, gconstpointer test_data) {
... |
803ebbb1-76a0-4625-9220-d84827413c16 | {
"language": "C"
} | ```c
/*
kngrouppropdlg.h
KNode, the KDE newsreader
Copyright (c) 1999-2001 the KNode authors.
See file AUTHORS for details
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;... | ```c
/*
kngrouppropdlg.h
KNode, the KDE newsreader
Copyright (c) 1999-2001 the KNode authors.
See file AUTHORS for details
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;... |
df61648e-6923-47f5-be80-4b2ee8355114 | {
"language": "C"
} | ```c
//
// Paystack.h
// Paystack
//
// Created by Ibrahim Lawal on 02/02/16.
// Copyright (c) 2016 Paystack. All rights reserved.
//
// The code in this workspace was adapted from https://github.com/stripe/stripe-ios.
// Stripe was replaced with Paystack - and STP with PSTCK - to avoid collisions within
// apps ... | ```c
//
// Paystack.h
// Paystack
//
// Created by Ibrahim Lawal on 02/02/16.
// Copyright (c) 2016 Paystack. All rights reserved.
//
// The code in this workspace was adapted from https://github.com/stripe/stripe-ios.
// Stripe was replaced with Paystack - and STP with PSTCK - to avoid collisions within
// apps ... |
129f26d9-3300-40f5-8283-d64b12c07e67 | {
"language": "C"
} | ```c
```
Create file to implement commands | ```c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define PFIX_CLI "[MTd]"
#define MAX_BUF_SIZE 200
int mtd_server_cmd_run_HOSTNAME(char *msg_cmd, char *message);
/* Get hostname */
int mtd_server_cmd_run_HOSTNAME(char *msg_cmd, char *message)
{
FILE *fd;
char str_cmd[MAX_BUF_SIZE], str_buf[MAX_BUF_SIZ... |
8ad6450c-814b-4205-bd01-e431788150d8 | {
"language": "C"
} | ```c
//
// SDLMacros.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 10/17/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#ifndef SDLMacros_h
#define SDLMacros_h
// Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability.
#ifndef SDL_SWIFT_ENUM
#if __h... | ```c
//
// SDLMacros.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 10/17/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#ifndef SDLMacros_h
#define SDLMacros_h
// Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability.
#ifndef SDL_SWIFT_ENUM
#if __h... |
d563a6e2-9906-4d8d-91f3-c8a75d212397 | {
"language": "C"
} | ```c
#define CHAR_BIT 8
#define INT_MAX 2147483647
#define INT_MIN -2147483648
#define LONG_MAX 0x7fffffffffffffffL
#define LONG_MIN -0x8000000000000000L
#define SCHAR_MAX 127
#define SCHAR_MIN -128
#define CHAR_MAX 127
#define CHAR_MIN -128
#define SHRT_MAX 32767
#define SHRT_MIN -32768
#define UCHAR_MAX 255
#define ... | ```c
#define CHAR_BIT 8
#define INT_MAX 2147483647
#define INT_MIN ((int)(-2147483647 - 1))
#define LONG_MAX 0x7fffffffffffffffL
#define LONG_MIN (-0x7fffffffffffffffL - 1)
#define CHAR_MAX SCHAR_MAX
#define CHAR_MIN SCHAR_MIN
#define SCHAR_MAX 127
#define SCHAR_MIN ((char)(-127 - 1))
#define SHRT_MAX 32767
#define SH... |
43007f20-b97d-4592-acce-ff0365dad3d2 | {
"language": "C"
} | ```c
//
// DataUtils.h
// CFC_Tracker
//
// Created by Kalyanaraman Shankari on 3/9/15.
// Copyright (c) 2015 Kalyanaraman Shankari. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
@interface BEMServerSyncCommunicationHelper: NSObject
// Top level method
+ (void) ba... | ```c
//
// DataUtils.h
// CFC_Tracker
//
// Created by Kalyanaraman Shankari on 3/9/15.
// Copyright (c) 2015 Kalyanaraman Shankari. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
typedef void (^SilentPushCompletionHandler)(UIBackgroundFetchResult);
@interface BEM... |
ed768baa-3f07-4107-8c38-99007fe54f88 | {
"language": "C"
} | ```c
#pragma once
#include <stdlib.h>
#include <stdint.h>
#define PHS_NCOLS 64
int lyra2(char *key, uint32_t keylen, const char *pwd, uint32_t pwdlen, const char *salt, uint32_t saltlen, uint32_t R, uint32_t C, uint32_t T);
int PHS(void *out, size_t outlen, const void *in, size_t inlen, const void *salt, size_t salt... | ```c
#pragma once
#include <stdlib.h>
#include <stdint.h>
#define PHS_NCOLS 256
int lyra2(char *key, uint32_t keylen, const char *pwd, uint32_t pwdlen, const char *salt, uint32_t saltlen, uint32_t R, uint32_t C, uint32_t T);
int PHS(void *out, size_t outlen, const void *in, size_t inlen, const void *salt, size_t sal... |
08b32180-18f2-43cf-9426-e0139d70b90f | {
"language": "C"
} | ```c
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#ifndef __LIBSEL4_ARCH_MAPPING
#define __LIBSEL4_ARCH_MAPPING
#define SEL4_MAP... | ```c
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#ifndef __LIBSEL4_ARCH_MAPPING
#define __LIBSEL4_ARCH_MAPPING
#include <autoco... |
24425a37-fe66-4d0d-b100-2ab5dbbbe707 | {
"language": "C"
} | ```c
/*
* Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief ssp test app... | ```c
/*
* Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief ssp test app... |
1e00b4f6-70ad-46be-934b-82e7ab55397c | {
"language": "C"
} | ```c
/*
* Author: NagaChaitanya Vellanki
*
* TRY/THROW/CATCH/FINALLY - example
* Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#define FOO_EXCEPTION (1)
#define BAR_EXCEPTION (2)
#define GOO_EXCEPTION (3)
#define TRY d... | ```c
/*
* Author: NagaChaitanya Vellanki
*
* TRY/THROW/CATCH/FINALLY - example
* Reference: http://www.di.unipi.it/~nids/docs/longjump_try_trow_catch.html
*
* use gcc -E -P exception_handling_3.c to see the result of the preprocessing
* step
*/
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#defi... |
faaf5ff1-0c1e-4f9d-9172-fa0be578beec | {
"language": "C"
} | ```c
#ifndef TIMER_H_
#define TIMER_H_ 1
/*
* By default, the timer calls the function a few extra times that aren't
* measured to get it into cache and ensure more consistent running times.
* Specifying this option in flags will stop this.
*/
#define TIMER_NO_EXTRA 1
struct timer {
unsigned long long ns;
... | ```c
#ifndef TIMER_H_
#define TIMER_H_ 1
/*
* By default, the timer calls the function a few extra times that aren't
* measured to get it into cache and ensure more consistent running times.
* Specifying this option in flags will stop this.
*/
#define TIMER_NO_EXTRA 1
/*
* By default, each of these functions ass... |
88839b6b-7a3c-46c9-a689-f13bbe182dc7 | {
"language": "C"
} | ```c
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#... | ```c
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_MANAGEMENT_API_CONSTANTS_H_
#... |
eb6b8155-7fc7-464e-83e2-56b61d2a630b | {
"language": "C"
} | ```c
```
Add header file defining standard image sizes | ```c
/*
* Standard image size definitions
*
* Copyright (C) 2013, Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef... |
b9656141-ca1c-4895-882f-0a6d1f321e57 | {
"language": "C"
} | ```c
#ifndef CALLER_CONFIGURABLE_CLASS_WRAPPER_H
#define CALLER_CONFIGURABLE_CLASS_WRAPPER_H
#include <memory>
#include <nan.h>
#include <string>
#include "cleanup_handle.h"
namespace nodegit {
class Context;
template<typename Traits>
class ConfigurableClassWrapper : public CleanupHandle {
public:
typed... | ```c
#ifndef CALLER_CONFIGURABLE_CLASS_WRAPPER_H
#define CALLER_CONFIGURABLE_CLASS_WRAPPER_H
#include <memory>
#include <nan.h>
#include <string>
#include "cleanup_handle.h"
namespace nodegit {
class Context;
template<typename Traits>
class ConfigurableClassWrapper : public CleanupHandle {
public:
typed... |
46b61742-886d-4c32-807e-1761c008c92a | {
"language": "C"
} | ```c
// REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \
// RUN: | FileCheck %s --check-pref... | ```c
// REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \
// RUN: | FileCheck %s --check-pref... |
64ffa925-0118-452e-9b77-f1c675ec7242 | {
"language": "C"
} | ```c
#ifndef _SERVER_H
#define _SERVER_H
#include <time.h>
#include <sys/epoll.h>
#include "list.h"
#include "threadpool.h"
int open_listenfd(int port);
void* check_connections(void* data);
struct http_socket {
int fd;
/*struct pollfd* poll_fd;*/
struct epoll_event event;
char* read_buffer;
int rea... | ```c
#ifndef _SERVER_H
#define _SERVER_H
#include <time.h>
#include <sys/epoll.h>
#include "list.h"
#include "threadpool.h"
struct http_socket;
int open_listenfd(int port);
void* check_connections(void* data);
int watch_read(struct http_socket* http);
int watch_write(struct http_socket* http);
int destroy_socket(struc... |
338576c0-87e1-49f2-b6b1-01f07145f841 | {
"language": "C"
} | ```c
//
// PBMacros.h
// pblib
//
// Created by haxpor on 3/5/15.
// Copyright (c) 2015 Maethee Chongchitnant. All rights reserved.
//
#ifndef pblib_PBMacros_h
#define pblib_PBMacros_h
#define PB_IS_NSNull(obj) ((obj == (id)[NSNull null]) ? YES : NO)
#define PB_IS_NIL_OR_NSNull(obj) ((obj == nil) || (obj ==... | ```c
//
// PBMacros.h
// pblib
//
// Created by haxpor on 3/5/15.
// Copyright (c) 2015 Maethee Chongchitnant. All rights reserved.
//
#ifndef pblib_PBMacros_h
#define pblib_PBMacros_h
/**
Check against NSNull.
If input obj is NSNull then return YES, otherwise return NO.
*/
#define PB_IS_NSNull(obj) ((obj ==... |
092342e4-2c1b-4d96-8b99-6b4462620312 | {
"language": "C"
} | ```c
C $Header$
C $Name$
c Land Grid Horizontal Dimension (Number of Tiles)
c ------------------------------------------------
integer nchp, maxtyp
parameter (maxtyp = 10)
c parameter (nchp = sNx*sNy*maxtyp)
parameter (nchp = 2048)
```
Make sure nchp is big enough for real vegetation tiles | ```c
C $Header$
C $Name$
c Land Grid Horizontal Dimension (Number of Tiles)
c ------------------------------------------------
integer nchp, maxtyp
parameter (maxtyp = 10)
parameter (nchp = sNx*sNy*maxtyp)
``` |
65696c98-a11c-4204-8203-22ef08493631 | {
"language": "C"
} | ```c
```
Add test for ana.base.context.int disabled | ```c
// PARAM: --enable ana.int.interval --disable exp.widen-context --disable ana.base.context.int
#include <assert.h>
int f(int x) {
if (x)
return f(x+1);
else
return x;
}
int main () {
int a = f(1);
assert(!a);
return 0;
}
``` |
e0c4eb61-2dac-49ff-ad15-a9a483eb2f4a | {
"language": "C"
} | ```c
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_AURA_AURA_SWITCHES_H_
#define UI_AURA_AURA_SWITCHES_H_
#pragma once
namespace switches {
extern const char kAuraHostWindowSize[];
ex... | ```c
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_AURA_AURA_SWITCHES_H_
#define UI_AURA_AURA_SWITCHES_H_
#pragma once
#include "ui/aura/aura_export.h"
namespace switches {
AURA_EXPO... |
65dfbe4a-8a83-43f4-b4e6-a5ba2cf56008 | {
"language": "C"
} | ```c
// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result}
struct X { int m, n; };
struct X p(int n) {
struct X c(int m) {
struct X x;
x.m = m;
x.n = n;
return x;
}
return c(n);
}
```
Make the struct bigger, in an attempt to get a "struct return" on more platforms. | ```c
// RUN: %llvmgcc %s -S -fnested-functions -o - | grep {sret *%agg.result}
struct X { int m, n, o, p; };
struct X p(int n) {
struct X c(int m) {
struct X x;
x.m = m;
x.n = n;
return x;
}
return c(n);
}
``` |
336a842e-761c-4ddd-978e-c616c52540dd | {
"language": "C"
} | ```c
```
Support using KURLRequester with remote files | ```c
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** init() function... |
4c4cb0c1-f560-4184-98ad-765af731b0c9 | {
"language": "C"
} | ```c
//
// OCTFileContent.h
// OctoKit
//
// Created by Aron Cedercrantz on 14-07-2013.
// Copyright (c) 2013 GitHub. All rights reserved.
//
#import "OCTContent.h"
// A file in a git repository.
@interface OCTFileContent : OCTContent
// The encoding of the file content.
@property (nonatomic, copy, readonly) NSS... | ```c
//
// OCTFileContent.h
// OctoKit
//
// Created by Aron Cedercrantz on 14-07-2013.
// Copyright (c) 2013 GitHub. All rights reserved.
//
#import "OCTContent.h"
// A file in a git repository.
@interface OCTFileContent : OCTContent
// The encoding of the file content.
@property (nonatomic, copy, readonly) NSS... |
9e8bcf7d-b94e-4fc8-b3b6-8f41210d080f | {
"language": "C"
} | ```c
```
Add example to run an command on linux using C language | ```c
#include<stdlib.h>
#include<stdio.h>
/* Run an program (in this case 'ls -la') and show it in stdout */
int main(void)
{
FILE *fd;
char str_cmd[1024], str_buf[1024];
sprintf(str_cmd, "ls -la /tmp >/dev/null && echo testmt > /tmp/sysmt.log && cat /tmp/sysmt.log");
//sprintf(str_cmd, "ls -la /tmp");
f... |
853c088d-dbe7-4735-a999-d957c405706f | {
"language": "C"
} | ```c
#pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyContainer;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI ReflectionView: public QWidget,... | ```c
#pragma once
#include <QtGui/QMouseEvent>
#include <QtGui/QPaintEvent>
#include <QtWidgets/QWidget>
#include "binaryninjaapi.h"
#include "dockhandler.h"
#include "uitypes.h"
class ContextMenuManager;
class DisassemblyContainer;
class Menu;
class ViewFrame;
class BINARYNINJAUIAPI ReflectionView: public QWidget,... |
2ace2518-5afa-4216-a5ac-a9b762b75f50 | {
"language": "C"
} | ```c
#include <stdio.h>
#ifndef ENV_NAME
# define ENV_NAME "host"
#endif
int main(int argc, char* argv)
{
printf("Hello World from Rebuild environment " ENV_NAME "\n");
return 0;
}
```
Fix main parameter of the test application | ```c
#include <stdio.h>
#ifndef ENV_NAME
# define ENV_NAME "host"
#endif
int main(int argc, char** argv)
{
printf("Hello World from Rebuild environment " ENV_NAME "\n");
return 0;
}
``` |
5cf2acca-e38b-4675-b139-f7c4668f04f1 | {
"language": "C"
} | ```c
```
Add new cube-based LCD test | ```c
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include "stm32746g_discovery.h"
#include "stm32746g_discovery_lcd.h"
#include "stm32746g_discovery_sdram.h"
#define LCD_FRAMEBUFFER SDRAM_DEVICE_ADDR
static void lcd_test(void) {
if (BSP_LCD_Init() != LCD_OK) {
printf(">>> BSP_LCD_Init failed\n");
... |
6689a8dd-0adf-407a-8a59-1fbeefecc66a | {
"language": "C"
} | ```c
```
Add octapron test where base gets precise value for variable from octapron via EvalInt query | ```c
// SKIP PARAM: --sets ana.activated[+] octApron --enable ana.int.interval
#include <assert.h>
void foo(int a, int *pb) {
int b = *pb;
// base knows a == 4 and b == 4, octApron only knows a == 4
assert(a == b);
}
void main() {
int x, y, z, a, b;
if (x < y && y < z) {
// base doesn't know anything, ... |
2445b574-8458-4260-b7ab-e209dfaadd1f | {
"language": "C"
} | ```c
//
// AXTabBar.h
// Pods
//
#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
AXTabBarStyleDefault = 0,
AXTabBarStyleVariableWidthButton,
} AXTabBarStyle;
@class AXTabBar;
@protocol AXTabBarDelegate <NSObject>
@optional
- (BOOL)tabBar:(AXTabBar *)tabBar shouldSelectItem:(UITabBarItem *)item;
- (void)ta... | ```c
//
// AXTabBar.h
// Pods
//
#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
AXTabBarStyleDefault = 0,
AXTabBarStyleVariableWidthButton,
} AXTabBarStyle;
@class AXTabBar;
@protocol AXTabBarDelegate <NSObject>
@optional
- (BOOL)tabBar:(AXTabBar *)tabBar shouldSelectItem:(UITabBarItem *)item;
- (void)ta... |
945323c0-ceb1-4e30-8dfe-1214074c0434 | {
"language": "C"
} | ```c
```
Update files, Alura, Introdução a C - Parte 2, Aula 5.1 | ```c
#include <stdio.h>
void calcula(int* c) {
printf("calcula %d %d\n", (*c), c);
(*c)++;
printf("calcula %d %d\n", (*c), c);
}
int main() {
int c = 10;
printf("main %d %d\n", c, &c);
calcula(&c);
printf("main %d %d\n", c, &c);
}
``` |
8822e09e-2f78-4161-bc84-2582e17a9dd1 | {
"language": "C"
} | ```c
//
// NSDictionary+BONEquality.h
// BonMot
//
// Created by Zev Eisenberg on 7/11/15.
// Copyright © 2015 Zev Eisenberg. All rights reserved.
//
@import Foundation;
@import CoreGraphics.CGBase;
OBJC_EXTERN const CGFloat kBONCGFloatEpsilon;
OBJC_EXTERN BOOL BONCGFloatsCloseEnough(CGFloat float1, CGFloat floa... | ```c
//
// NSDictionary+BONEquality.h
// BonMot
//
// Created by Zev Eisenberg on 7/11/15.
// Copyright © 2015 Zev Eisenberg. All rights reserved.
//
@import Foundation;
@import CoreGraphics.CGBase;
OBJC_EXTERN const CGFloat kBONCGFloatEpsilon;
OBJC_EXTERN BOOL BONCGFloatsCloseEnough(CGFloat float1, CGFloat floa... |
bdfe919e-8469-4957-8857-8dc7d5110978 | {
"language": "C"
} | ```c
#include "lua.h"
#include "lua_debug.h"
int main() {
return 0;
}
```
Add a test program with a bit more substance. | ```c
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include "lua_debug.h"
static const luaL_Reg STANDARD_LIBS[] = {
{ "_G", luaopen_base },
{ LUA_TABLIBNAME, luaopen_table },
{ LUA_STRLIBNAME, luaopen_string },
{ LUA_MATHLIBNAME, luaopen_math },
{ LUA_DBLIBNAME, luaopen_debug },
{ ... |
960fb454-313e-4571-8a39-a195681d37c8 | {
"language": "C"
} | ```c
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#include <string>
#include <vector>
#include "bas... | ```c
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#define CONTENT_COMMON_RESOURCE_DEVTOOLS_INFO_H_
#include <string>
#include <vector>
#include "bas... |
4d0b4df5-b85d-4b24-970d-0c61d1e7b1cc | {
"language": "C"
} | ```c
#ifndef _ASM_POWERPC_BYTEORDER_H
#define _ASM_POWERPC_BYTEORDER_H
/*
* 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 ve... | ```c
#ifndef _ASM_POWERPC_BYTEORDER_H
#define _ASM_POWERPC_BYTEORDER_H
/*
* 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 ve... |
5b848dc6-f9ac-4614-8ac8-50bf1eb694a4 | {
"language": "C"
} | ```c
```
Add regression test with deep integer expressions | ```c
// from SV-COMP: nla-digbench-scaling/ps6-ll_valuebound5.c
// contains deep integer expressions that shouldn't cause extremely exponential slowdown
// when evaluated by base's eval_rv and EvalInt jointly
// runs (as unknown) under 0.1s
#include <assert.h>
void assume_abort_if_not(int cond) {
if(!cond) {abort();... |
219ab7fc-df93-4539-a2ef-3212b5bebeb8 | {
"language": "C"
} | ```c
#pragma once
void draw_seconds(GContext *ctx, uint8_t seconds, Layer *layer);
void draw_minutes(GContext *ctx, uint8_t minutes, Layer *layer);
void draw_hours(GContext *ctx, uint8_t hours, Layer *layer);
```
Add comment to header file about change | ```c
#pragma once
/*
This header file declares drawing methods that are defined in rect.c or round.c,
depending on the platform being built. Since the methods share the same function
signature, they can share the same header file, even though the implementations
of the functions themselves are different.
*/
void dr... |
a6946a64-b93b-4e5e-9fdb-8887f5cfa6c0 | {
"language": "C"
} | ```c
#include "ring.h"
/*
OpenGL 1.1 Extension
Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com>
*/
#include <GL/glew.h>
#include <GL/glut.h>
RING_FUNC(ring_get_gl_zero)
{
RING_API_RETNUMBER(GL_ZERO);
}
RING_FUNC(ring_get_gl_false)
{
RING_API_RETNUMBER(GL_FALSE);
}
RING_FUNC(ring_get_gl_logic_op)
{
RI... | ```c
#include "ring.h"
/*
OpenGL 1.1 Extension
Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com>
*/
#include <GL/glew.h>
#include <GL/glut.h>
RING_FUNC(ring_get_gl_zero)
{
RING_API_RETNUMBER(GL_ZERO);
}
RING_FUNC(ring_get_gl_false)
{
RING_API_RETNUMBER(GL_FALSE);
}
RING_FUNC(ring_get_gl_logic_op)
{
RI... |
89c9e5d6-52c5-45d2-b18e-d87be597c0da | {
"language": "C"
} | ```c
```
Add module that prints YOU HAVE BEEN HACKED when writing to /proc/buddyinfo | ```c
#include <linux/module.h> // included for all kernel modules
#include <linux/kernel.h> // included for KERN_INFO
#include <linux/init.h> // included for __init and __exit macros
#include <linux/proc_fs.h>
#define MODULE_NAME "rootkit"
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Julia Evans");
MODULE_DESCRIP... |
fffff270-c98e-4cba-baaa-6181d876881a | {
"language": "C"
} | ```c
#ifndef _IRC_H
#define _IRC_H
#define NICK "slackboat"
#define SERVER "irc.what.cd"
#define PASSWORD "thisistheonlygoodbot"
void irc_notice_event(char *, char *, char *);
void irc_welcome_event(void);
void irc_privmsg_event(char *, char *, char *);
void irc_privmsg(const char *, const char *);
void irc_join_chan... | ```c
#ifndef _IRC_H
#define _IRC_H
#define NICK "slackboat"
#define SERVER "irc.what.cd"
#define PASSWORD "PASSWORD"
void irc_notice_event(char *, char *, char *);
void irc_welcome_event(void);
void irc_privmsg_event(char *, char *, char *);
void irc_privmsg(const char *, const char *);
void irc_join_channel(const ch... |
953725b5-5e4e-4df9-bb09-878b0f72a35d | {
"language": "C"
} | ```c
/* Copyright (c) 2016, Nokia
* Copyright (c) 2016, ENEA Software AB
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OFP_EPOLL_H__
#define __OFP_EPOLL_H__
#include <stdint.h>
typedef union ofp_epoll_data {
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} ofp_epo... | ```c
/* Copyright (c) 2016, Nokia
* Copyright (c) 2016, ENEA Software AB
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OFP_EPOLL_H__
#define __OFP_EPOLL_H__
#include <stdint.h>
#if __GNUC__ >= 4
#pragma GCC visibility push(default)
#endif
typedef union ofp_epoll_data {
void... |
08493c1e-5242-4eb8-baea-bb739708e9d8 | {
"language": "C"
} | ```c
```
Add float comparison utility macros for tests | ```c
#include <string.h>
#include <math.h>
#include <float.h>
#include <glib.h>
#include <json-glib/json-glib.h>
#define json_fuzzy_equals(n1,n2,epsilon) \
(((n1) > (n2) ? ((n1) - (n2)) : ((n2) - (n1))) < (epsilon))
#define json_assert_fuzzy_equals(n1,n2,epsilon) \
G_STMT_START { \
double __n1 = (n1), __n2 = ... |
849bbb9c-268c-49a5-bd2b-45d34a05d9e5 | {
"language": "C"
} | ```c
/*
* 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.
*
*/
#in... | ```c
/*
* 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.
*
*/
#in... |
a0f2a74f-f840-491b-bc78-edcc1a0a2f89 | {
"language": "C"
} | ```c
#include <stdio.h>
int int_func(void)
{
return 42;
}
float float_func(void)
{
return 13.5f;
}
int main(int argc, char *argv[])
{
printf("calltest.c\n");
printf(" Calling int function: %d\n", int_func());
printf(" Calling float function: %f\n", float_func());
return 0;
}
```
Add test for doubl... | ```c
#include <stdio.h>
int int_func(void)
{
return 42;
}
float float_func(void)
{
return 13.5f;
}
double double_func(void)
{
return 13.5;
}
int main(int argc, char *argv[])
{
printf("calltest.c\n");
printf(" Calling int function: %d\n", int_func());
printf(" Calling float function: %f\n", float_... |
4bb85a2c-65aa-48ee-867b-9d0ee252c654 | {
"language": "C"
} | ```c
#include <stdio.h>
int main()
{
printf("hello, world\n");
}```
Fix gcc warning when -Wall (implicit return). | ```c
#include <stdio.h>
int main()
{
printf("hello, world\n");
return 0;
}
``` |
d0b90b58-b0cd-41f6-a60f-00d67153b419 | {
"language": "C"
} | ```c
/**
* @file
* @brief Paranoia checks of doubly-linked lists
*
* @date 05.12.2013
* @author Eldar Abusalimov
*/
#include <inttypes.h>
#include <assert.h>
#include <util/dlist.h>
#if DLIST_DEBUG_VERSION
void __dlist_debug_check(const struct dlist_head *head) {
const struct dlist_head *p = head->prev;
cons... | ```c
/**
* @file
* @brief Paranoia checks of doubly-linked lists
*
* @date 05.12.2013
* @author Eldar Abusalimov
*/
#include <inttypes.h>
#include <assert.h>
#include <util/dlist.h>
#if DLIST_DEBUG_VERSION
void __dlist_debug_check(const struct dlist_head *head) {
#ifndef NDEBUG
const struct dlist_head *p = he... |
19fb6ffd-0f1b-4644-b516-363e3c753ad7 | {
"language": "C"
} | ```c
```
Add little program that generates random binaries | ```c
// compile with clang:
// clang -march=skylake randbin.c
// or whatever architecture you have. It only works on certain architectures.
#include <math.h>
#include <stdio.h>
int main(int argc, char **argv) {
int filesize = 0;
char byte_multiplier = 0;
if (argc <= 1) {
filesize = 512 ... |
5393ffc6-027e-4c80-aa89-7e2d910ee3b3 | {
"language": "C"
} | ```c
```
Add longest increasing subsequence in C language. | ```c
#include <stdio.h>
const int N = 1e5;
int lis(int a[], int n) {
int i, j;
int dp[N];
for(i = 0; i < n; ++i)
dp[i] = 1;
for(i = 0; i < n; ++i)
for(j = 0; j < i; ++j)
if(a[j] < a[i])
if(dp[i] < dp[j] + 1)
dp[i] = dp[j] + 1;
int mx = 0;
for(i = 0; i < n; ++i)
if(mx < dp[i])
mx = dp[i];... |
85920b7e-3a25-4ccc-9f8c-13cc3db143af | {
"language": "C"
} | ```c
#ifndef _PKG_UTIL_H
#define _PKG_UTIL_H
#include <sys/types.h>
#include <sys/sbuf.h>
#include <sys/param.h>
#define ARRAY_INIT {0, 0, NULL}
struct array {
size_t cap;
size_t len;
void **data;
};
#define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0)
#define ERROR_SQLITE(db) ... | ```c
#ifndef _PKG_UTIL_H
#define _PKG_UTIL_H
#include <sys/types.h>
#include <sys/sbuf.h>
#include <sys/param.h>
#define STARTS_WITH(string, needle) (strncasecmp(string, needle, strlen(needle)) == 0)
#define ERROR_SQLITE(db) \
EMIT_PKG_ERROR("sqlite: %s", sqlite3_errmsg(db))
int sbuf_set(struct sbuf **, const char... |
54a42534-6e64-4505-9ab0-1a040886299b | {
"language": "C"
} | ```c
//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===---... | ```c
//===-- GenericValue.h - Represent any type of LLVM value -------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===---... |
c85bb3ad-d3fa-4220-849c-c92126ea880c | {
"language": "C"
} | ```c
//
// NSDate+GTTimeAdditions.h
// ObjectiveGitFramework
//
// Created by Danny Greg on 27/03/2013.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "git2.h"
@interface NSDate (GTTimeAdditions)
// Creates a new `NSDate` from the provided `git_time`.
//
// ... | ```c
//
// NSDate+GTTimeAdditions.h
// ObjectiveGitFramework
//
// Created by Danny Greg on 27/03/2013.
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "git2.h"
@interface NSDate (GTTimeAdditions)
// Creates a new `NSDate` from the provided `git_time`.
//
// ... |
4b40d0f7-c7b1-4e37-b0e8-3184cedcdb9b | {
"language": "C"
} | ```c
#include <stdlib.h>
#include <curses.h>
#include <time.h>
#include "game.h"
#include "ui.h"
static void shutdown(void);
int main(int argc, char ** argv)
{
srand(time(NULL));
initscr();
cbreak();
noecho();
curs_set(0);
keypad(stdscr, TRUE);
start_color();
init_pair(color_black, ... | ```c
#include <stdlib.h>
#include <curses.h>
#include <time.h>
#include "game.h"
#include "ui.h"
static void shutdown(void);
int main(int argc, char ** argv)
{
time_t random_seed = time(NULL);
printf("Random game #%ld\n", random_seed);
srand(random_seed);
initscr();
cbreak();
noecho();
c... |
0cae64f4-4610-41d3-8e66-853789ccca07 | {
"language": "C"
} | ```c
/* Main program for TGL (Text Generation Language). */
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
int main(int argc, char** argv) {
printf("hello world\n");
return 0;
}
```
Add length-prefixed string handling functions. | ```c
/* Main program for TGL (Text Generation Language). */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <fcntl.h>
/* BEGIN: String handling (strings may have NUL bytes within, and are not
* NUL-terminated).
*/... |
dd15603e-2ee9-44eb-80f9-9c490112ff03 | {
"language": "C"
} | ```c
//
// BBASearchSuggestionsResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data returned from the book search suggestions service (search/sugge... | ```c
//
// BBASearchSuggestionsResult.h
// BBBAPI
//
// Created by Owen Worley on 12/01/2015.
// Copyright (c) 2015 Blinkbox Entertainment Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FEMObjectMapping;
/**
* Represents data returned from the book search suggestions service (search/sugge... |
c93fa27b-8568-4ceb-80ae-3e237c250636 | {
"language": "C"
} | ```c
#include <stdlib.h>
#include <stdio.h>
typedef struct Poly Poly;
struct Poly {
int32_t coef;
int32_t abc;
Poly *link;
};
int add(Poly *q, Poly *p);
Poly *avail;
int
main(int argc, char **argv)
{
Poly *pool, *p;
pool = calloc(500, sizeof(*pool));
for(p = pool; p < pool+499; p++)
p->link = p+1;
p->lin... | ```c
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
typedef struct Poly Poly;
struct Poly {
int32_t coef;
int32_t abc;
Poly *link;
};
int add(Poly *q, Poly *p);
Poly *avail;
Poly*
makepoly(void)
{
Poly *p;
if(avail == NULL)
return NULL;
p = avail;
avail = avail->link;
p->abc = -1;
p->coef =... |
0ebe10f4-cdbc-4730-b808-04135cf179fb | {
"language": "C"
} | ```c
//
// ASFRequestBuilder.h
// ASFFeedly
//
// Created by Anton Simakov on 12/12/13.
// Copyright (c) 2013 Anton Simakov. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSURL *ASFURLByAppendingParameters(NSURL *URL, NSDictionary *parameters);
extern NSString *ASFQueryFromURL(NSURL *URL);
exte... | ```c
//
// ASFRequestBuilder.h
// ASFFeedly
//
// Created by Anton Simakov on 12/12/13.
// Copyright (c) 2013 Anton Simakov. All rights reserved.
//
#import <Foundation/Foundation.h>
extern NSURL *ASFURLByAppendingParameters(NSURL *URL, NSDictionary *parameters);
extern NSString *ASFQueryFromURL(NSURL *URL);
exte... |
c4561110-15a6-4708-af83-4bd7d7412cd2 | {
"language": "C"
} | ```c
//
// OCErrorMsg.h
// Owncloud iOs Client
//
// Copyright (c) 2014 ownCloud (http://www.owncloud.org/)
//
// 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, includ... | ```c
//
// OCErrorMsg.h
// Owncloud iOs Client
//
// Copyright (c) 2014 ownCloud (http://www.owncloud.org/)
//
// 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, includ... |
0edc76b7-7558-48dc-90ad-695f239d669c | {
"language": "C"
} | ```c
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base48 entry widget validator.
Corrects near-miss characters and refuses characters that are no part of base48.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddres... | ```c
#ifndef BITCOINADDRESSVALIDATOR_H
#define BITCOINADDRESSVALIDATOR_H
#include <QValidator>
/** Base58 entry widget validator.
Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddressValidator : public QValidator
{
Q_OBJECT
public:
explicit BitcoinAddre... |
1fd911f4-2f34-46f8-b616-b7851e8d63dc | {
"language": "C"
} | ```c
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/eval/eval/tensor_spec.h>
#include <vespa/eval/tensor/default_tensor_engine.h>
#include <vespa/vespalib/testkit/test_kit.h>
namespace vespalib::tensor::test {
template <t... | ```c
// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/eval/eval/tensor_spec.h>
#include <vespa/eval/tensor/default_tensor_engine.h>
#include <vespa/vespalib/testkit/test_kit.h>
namespace vespalib::tensor::test {
template <t... |
4a0e93c1-dde0-4bc3-83f5-5b975b5bb22f | {
"language": "C"
} | ```c
/*=========================================================================
Program: Visualization Toolkit
Module: Tokenizer.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is ... | ```c
/*=========================================================================
Program: Visualization Toolkit
Module: Tokenizer.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is ... |
6119ad47-096b-4227-88b3-77133127e486 | {
"language": "C"
} | ```c
//
// OEXRegistrationFieldValidation.h
// edXVideoLocker
//
// Created by Jotiram Bhagat on 03/03/15.
// Copyright (c) 2015 edX. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "OEXRegistrationFormField.h"
@interface OEXRegistrationFieldValidator : NSObject
+(NSString *)validateField:(OEXReg... | ```c
//
// OEXRegistrationFieldValidation.h
// edXVideoLocker
//
// Created by Jotiram Bhagat on 03/03/15.
// Copyright (c) 2015 edX. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "OEXRegistrationFormField.h"
@interface OEXRegistrationFieldValidator : NSObject
/// Returns an error string, or ni... |
276501ad-9853-4aef-ac88-205b4e9802b7 | {
"language": "C"
} | ```c
#ifndef FUSTATE_H
#define FUSTATE_H
#include <SFML/Window/Event.hpp>
#include <SFML/System/Time.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <memory>
class FUStateManager;
class FUState
{
public:
struct FUContext
{
FUContext(std::shared_ptr<sf::RenderWindow> window)
: render... | ```c
#ifndef FUSTATE_H
#define FUSTATE_H
#include <SFML/Window/Event.hpp>
#include <SFML/System/Time.hpp>
#include <SFML/Graphics/RenderWindow.hpp>
#include <memory>
class FUState
{
public:
struct FUContext
{
FUContext(std::shared_ptr<sf::RenderWindow> window)
: renderWindow(window) {}
... |
2a3685cd-128a-40c4-90c0-d03c6f0ce957 | {
"language": "C"
} | ```c
#ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__CYGWIN__)
#include <sys/cdefs.h>
#endif
#if defined(__sun__)
#define _POSIX_C_SOURCE 200112L
#else
#if !(defined(__APPLE__) && defined(__MACH__)) && !(defined(__FreeBSD__... | ```c
#ifndef __HIREDIS_FMACRO_H
#define __HIREDIS_FMACRO_H
#if defined(__linux__)
#define _BSD_SOURCE
#define _DEFAULT_SOURCE
#endif
#if defined(__CYGWIN__)
#include <sys/cdefs.h>
#endif
#if defined(__linux__) || defined(__OpenBSD__) || defined(__NetBSD__)
#define _XOPEN_SOURCE 600
#elif defined(__APPLE__) && define... |
7cb1a22c-a665-49e9-8e70-022e284d7b49 | {
"language": "C"
} | ```c
#pragma once
#include "../Controls/Controls.h"
#include "../Controls/TabPage.h"
/// <summary>
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
/// </summary>
class SettingsTab : public TabPage {
public:
SettingsTab(HINSTANCE hInstance, LPCWSTR tabTemplate, ... | ```c
#pragma once
#include "../Controls/Controls.h"
#include "../Controls/TabPage.h"
#include "../resource.h"
/// <summary>
/// Abstract class that encapsulates functionality for dealing with
/// property sheet pages (tabs).
/// </summary>
class SettingsTab : public TabPage {
public:
SettingsTab(HINSTANCE hInstan... |
3300cf64-5779-4c48-956d-d58e2c08e07b | {
"language": "C"
} | ```c
#ifndef THM_CONFIG_HG
#define THM_CONFIG_HG
// Vertex ID type
// # of vertices < MAX(thm_Vid)
typedef unsigned long thm_Vid;
// Arc reference type
// # of arcs in any digraph <= MAX(thm_Arcref)
typedef unsigned long thm_Arcref;
// Block label type
// # of blocks < MAX(thm_Blklab)
typedef unsigned long thm_Blkla... | ```c
#ifndef THM_CONFIG_HG
#define THM_CONFIG_HG
// Block label type (must be unsigned)
// # of blocks <= MAX(thm_Blklab)
typedef uint32_t thm_Blklab;
#endif
``` |
a3d5cac2-1838-49b8-bfee-b1fa3402d4de | {
"language": "C"
} | ```c
#ifndef MEM_H__
#define MEM_H__
#include <stdlib.h>
void *xmalloc (size_t size);
void *xcalloc (size_t count, size_t size);
void *xrealloc (void *ptr, size_t size);
char *xstralloc (size_t len);
void *xmemdupz (const void *data, size_t len);
char *xstrndup (const char *str, size_t len);
void xfree (void *ptr);
... | ```c
#ifndef MEM_H__
#define MEM_H__
#include <stdlib.h>
void *xmalloc (size_t size);
void *xcalloc (size_t count, size_t size);
void *xrealloc (void *ptr, size_t size);
char *xstralloc (size_t len);
void *xmemdupz (const void *data, size_t len);
char *xstrndup (const char *str, size_t len);
void xfree (void *ptr);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.