doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
1edb48b3-bfe6-4722-ae3d-e0e6a4102779 | {
"language": "C"
} | ```c
/**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi... | ```c
/**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi... |
9f517dc3-d184-4290-9016-b9c42525772f | {
"language": "C"
} | ```c
int foo(int a, int b, int c) {
int arr[5] = { 1, 2, 3, 4, 5 };
int d = 4;
int *p = &d;
return a + b + c + arr[4] + arr[0] + *p;
}
int main() {
int a, b, c;
a = 2;
b = 1;
c = 3;
int d = 4;
int *p = &d;
int i;
for (i = 0; i < 1234567; i++) {
*p = foo(a, b, c);
}
return *p;
}
```
Red... | ```c
int foo(int a, int b, int c) {
int arr[5] = { 1, 2, 3, 4, 5 };
int d = 4;
int *p = &d;
return a + b + c + arr[4] + arr[0] + *p;
}
int main() {
int a, b, c;
a = 2;
b = 1;
c = 3;
int d = 4;
int *p = &d;
int i;
for (i = 0; i < 12345; i++) {
*p = foo(a, b, c);
}
return *p;
}
``` |
a4b73806-ad03-409d-9912-ef8832c7db06 | {
"language": "C"
} | ```c
//
// LVTFolder.h
// LayerVaultAPIClient
//
// Created by Matt Thomas on 12/4/13.
// Copyright (c) 2013 codecaffeine. All rights reserved.
//
#import <Mantle/Mantle.h>
#import "LVTColor.h"
@interface LVTFolder : MTLModel <MTLJSONSerializing>
@property (readonly, nonatomic, copy) NSString *name;
@property (n... | ```c
//
// LVTFolder.h
// LayerVaultAPIClient
//
// Created by Matt Thomas on 12/4/13.
// Copyright (c) 2013 codecaffeine. All rights reserved.
//
#import <Mantle/Mantle.h>
#import "LVTColor.h"
@interface LVTFolder : MTLModel <MTLJSONSerializing>
@property (readonly, nonatomic, copy) NSString *name;
@property (n... |
b70cb851-8c77-458c-814e-acffa74474ca | {
"language": "C"
} | ```c
```
Add USB control request definitions | ```c
/*
* qiprog - Reference implementation of the QiProg protocol
*
* Copyright (C) 2013 Alexandru Gagniuc <mr.nuke.me@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software wit... |
89585ed0-4c59-4288-8a95-6195c7e96a4d | {
"language": "C"
} | ```c
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_pinmux.h"
#include "sw/device/lib/dif/dif_base.h"
#include "pinmux_regs.h" // Generated.
// This just exists to check that the h... | ```c
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#include "sw/device/lib/dif/dif_pinmux.h"
#include "sw/device/lib/base/bitfield.h"
#include "sw/device/lib/dif/dif_base.h"
#include "pinmux_regs.h" // Generated.... |
50fcc3e5-b13c-4bf6-87ad-2f937068e543 | {
"language": "C"
} | ```c
// RUN: %llvmgcc -S %s -o - -O | grep ashr
// RUN: %llvmgcc -S %s -o - -O | not grep sdiv
int test(int *A, int *B) {
return A-B;
}
```
Fix for PR1567, which involves a weird bug on non-32bit architectures and silly C type sizes. | ```c
// RUN: %llvmgcc -S %s -o - -O | grep ashr
// RUN: %llvmgcc -S %s -o - -O | not grep sdiv
long long test(int *A, int *B) {
return A-B;
}
``` |
eeef9f58-e715-43e5-bc9a-635fa8083532 | {
"language": "C"
} | ```c
```
Add baisc test for goto | ```c
/*
name: TEST011
description: Basic test for goto
output:
F1
G1 F1 main
{
-
L2
j L3
yI #I1
L4
yI #I0
L3
L5
j L4
yI #I1
}
*/
#line 1
int
main() {
start:
goto next;
return 1;
success:
return 0;
next:
foo:
goto success;
return 1;
}
``` |
976d49e5-921b-40d6-bb73-380bf5dae8bf | {
"language": "C"
} | ```c
@import Foundation;
#import <VENCore/VENCreateTransactionRequest.h>
#import <VENCore/VENHTTP.h>
#import <VENCore/VENHTTPResponse.h>
#import <VENCore/VENTransaction.h>
#import <VENCore/VENTransactionTarget.h>
#import <VENCore/VENUser.h>
extern NSString *const VENErrorDomainCore;
typedef NS_ENUM(NSInteger, VENCor... | ```c
@import Foundation;
#import <VENCore/VENCreateTransactionRequest.h>
#import <VENCore/VENHTTP.h>
#import <VENCore/VENHTTPResponse.h>
#import <VENCore/VENTransaction.h>
#import <VENCore/VENTransactionTarget.h>
#import <VENCore/VENUser.h>
#import <VENCore/NSArray+VENCore.h>
#import <VENCore/NSDictionary+VENCore.h>
#... |
84613d9f-a939-4728-8afb-76ef82e3f292 | {
"language": "C"
} | ```c
#include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
size_t int_l... | ```c
#include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
if (canidate... |
ffe3a2a5-7a93-4e86-94b2-f62c23ee1efe | {
"language": "C"
} | ```c
/*
* Copyright (c) 2016 Jan Hoffmann
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#define COLOR_WINDOW_BACKGROUND GColorWhite
#define ... | ```c
/*
* Copyright (c) 2016 Jan Hoffmann
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#define COLOR_WINDOW_BACKGROUND GColorWhite
#define ... |
44b0f259-6e08-41d0-b0e7-39e4ddcb9965 | {
"language": "C"
} | ```c
/*
* rmgrdesc.c
*
* pg_xlogdump resource managers definition
*
* contrib/pg_xlogdump/rmgrdesc.c
*/
#define FRONTEND 1
#include "postgres.h"
#include "access/clog.h"
#include "access/gin.h"
#include "access/gist_private.h"
#include "access/hash.h"
#include "access/heapam_xlog.h"
#include "access/multixact.h"... | ```c
/*
* rmgrdesc.c
*
* pg_xlogdump resource managers definition
*
* contrib/pg_xlogdump/rmgrdesc.c
*/
#define FRONTEND 1
#include "postgres.h"
#include "access/clog.h"
#include "access/gin.h"
#include "access/gist_private.h"
#include "access/hash.h"
#include "access/heapam_xlog.h"
#include "access/multixact.h"... |
7c12701b-14e2-47ad-b362-7ed6cd443079 | {
"language": "C"
} | ```c
#define _XOPEN_SOURCE 4
#define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */
#define _XOPEN_VERSION 4
#define _XPG4_2
#include <unistd.h>
#include "mycrypt.h"
char *mycrypt(const char *key, const char *salt)
{
return crypt(key, salt);
}
```
Add _XPG6 macro if needed.. | ```c
#define _XOPEN_SOURCE 4
#define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */
#define _XOPEN_VERSION 4
#define _XPG4_2
#ifdef CRYPT_USE_XPG6
# define _XPG6 /* Some Solaris versions require this, some break with this */
#endif
#include <unistd.h>
#include "mycrypt.h"
char *mycrypt(const char *key, const char *... |
39c239e6-44bc-411f-abf1-fd1f9662e9f5 | {
"language": "C"
} | ```c
/*
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Full C support initialization
*
* Initialization of full C support: zero the .bss and call z_cstart().
*
* Stack is available in this module, but not the global data/bss until thei... | ```c
/*
* Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @file
* @brief Full C support initialization
*
* Initialization of full C support: zero the .bss and call z_cstart().
*
* Stack is available in this module, but not the global data/bss until thei... |
3ba58909-5bcf-49a7-81de-0500ead20bce | {
"language": "C"
} | ```c
#ifndef SRC_EIGEN_QDEBUG_H_
#define SRC_EIGEN_QDEBUG_H_
#include <Eigen/Core>
#include <QDebug>
#include <iostream>
QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vec... | ```c
#ifndef SRC_EIGEN_QDEBUG_H_
#define SRC_EIGEN_QDEBUG_H_
#include <Eigen/Core>
#include <QDebug>
#include <iostream>
QDebug operator<<(QDebug dbg, const Eigen::Vector2f &vector)
{
dbg << "[" << vector.x() << "|" << vector.y() << "]";
return dbg.maybeSpace();
}
QDebug operator<<(QDebug dbg, const Eigen::Vec... |
94369b23-95a2-4bd5-9e2f-894773192ec6 | {
"language": "C"
} | ```c
/*
* This file is a part of Hierarchical Allocator library.
* Copyright (c) 2004-2011 Alex Pankratov. All rights reserved.
*
* http://swapped.cc/halloc
*/
/*
* The program is distributed under terms of BSD license.
* You can obtain the copy of the license by visiting:
*
* http://www.opensource.org/licen... | ```c
/*
* This file is a part of Hierarchical Allocator library.
* Copyright (c) 2004-2011 Alex Pankratov. All rights reserved.
*
* http://swapped.cc/halloc
*/
/*
* The program is distributed under terms of BSD license.
* You can obtain the copy of the license by visiting:
*
* http://www.opensource.org/licen... |
6d5dc6b8-5ec8-4171-9c4e-680a447490df | {
"language": "C"
} | ```c
#ifndef PyMPI_CONFIG_MPICH2_H
#define PyMPI_CONFIG_MPICH2_H
#ifdef MS_WINDOWS
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1
#endif
#ifndef ROMIO_VERSION
#include "mpich2io.h"
#endif /* !ROMIO_VERSION */
#e... | ```c
#ifndef PyMPI_CONFIG_MPICH2_H
#define PyMPI_CONFIG_MPICH2_H
#ifdef MS_WINDOWS
#if !defined(MPICH2_NUMVERSION) || (MPICH2_NUMVERSION < 10100000)
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_INTEGER 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_REAL 1
#define PyMPI_MISSING_MPI_TYPE_CREATE_F90_COMPLEX 1
#endif /* MPICH2 ... |
a4f0c113-5f39-4990-9569-385a1edbd052 | {
"language": "C"
} | ```c
#ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_mod... | ```c
#ifndef EXPR_TOK_H
#define EXPR_TOK_H
extern expr_n tok_cur_num;
extern enum tok
{
tok_ident = -1,
tok_num = -2,
tok_eof = 0,
tok_lparen = '(',
tok_rparen = ')',
/* operators returned as char-value,
* except for double-char ops
*/
/* binary */
tok_multiply = '*',
tok_divide = '/',
tok_mod... |
d3bbe91d-5a58-478d-ade9-544d5ebd88ff | {
"language": "C"
} | ```c
//===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- 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
//===-- llvm/Assembly/CWriter.h - C Printer for LLVM programs ---*- 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.
//
//===---... |
2db9884e-2296-48ef-bbe8-d7be21288e5e | {
"language": "C"
} | ```c
#ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
typedef struct {
GtkWidget *notebook;
GList *props;
} GnomePropertyConfigurator;
/* This is the first parameter to the callback function */
typedef enum {
GNOME_PROPERTY_READ,
GNOME_PROPERTY_WRITE,
GNO... | ```c
#ifndef GNOME_PROPERTIES_H
#define GNOME_PROPERTIES_H
#include <libgnome/gnome-defs.h>
BEGIN_GNOME_DECLS
typedef struct {
GtkWidget *notebook;
GtkWidget *property_box;
GList *props;
} GnomePropertyConfigurator;
/* This is the first parameter to the callback function */
typedef enum {
GNOME_PROPERTY_R... |
ad17a826-116b-473d-92cf-10365c22fe0a | {
"language": "C"
} | ```c
```
Test for lvalue-argument function inlinling | ```c
// RUN: %ocheck 3 %s
__attribute((always_inline))
inline f(int x)
{
int i = x;
&x;
i++;
return i;
}
main()
{
int added = 5;
added = f(2);
return added;
}
``` |
1c77b215-a456-4dbc-b0c9-d252c03a00e3 | {
"language": "C"
} | ```c
```
Test the parse of the raw binary data seen in the hcidump integration for a manufacturer AD structure. | ```c
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
static int UUID_SIZE = 16;
char toHexChar(int b) {
char c;
if(b < 10)
c = '0' + b;
else
c = 'A' + b - 10;
return c;
}
int main(int argc, char **argv) {
int b = (0xa4 & 0xf0) >> 4;
printf("c0=... |
8969c893-ed02-415b-a183-088ac4025307 | {
"language": "C"
} | ```c
#include <string.h>
#include "ruby.h"
#include "rubyspec.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_RB_PROC_NEW
VALUE concat_func(VALUE args) {
int i;
char buffer[500] = {0};
if (TYPE(args) != T_ARRAY) return Qnil;
for(i = 0; i < RARRAY_LEN(args); ++i) {
VALUE v = RARRAY_PTR(args)[i];
... | ```c
#include <string.h>
#include "ruby.h"
#include "rubyspec.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_RB_PROC_NEW
VALUE concat_func(VALUE args) {
int i;
char buffer[500] = {0};
if (TYPE(val) != T_ARRAY) return Qnil;
for(i = 0; i < RARRAY_LEN(args); ++i) {
VALUE v = RARRAY_PTR(args)[i];
... |
f03bbf2f-9583-4006-b577-3cab3ace0945 | {
"language": "C"
} | ```c
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//----------------------------------------------------... | ```c
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//----------------------------------------------------... |
de377703-e9ab-448e-9013-c6e119763e06 | {
"language": "C"
} | ```c
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restr... | ```c
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restr... |
f746cf37-9303-4bd0-9c48-f47cb8aff463 | {
"language": "C"
} | ```c
#ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
bool isEmpty() co... | ```c
#ifndef MOLCORE_GRAPH_H
#define MOLCORE_GRAPH_H
#include "molcore.h"
#include <vector>
#include <cstddef>
namespace MolCore {
class MOLCORE_EXPORT Graph
{
public:
// construction and destruction
Graph();
Graph(size_t size);
~Graph();
// properties
void setSize(size_t size);
size_t size() const;
... |
d9f5b6f3-36fe-42a2-bac5-9fe04d618b7e | {
"language": "C"
} | ```c
/* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 3... | ```c
/* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 3... |
cd2cf289-d706-4ec9-bc4e-df333feac97a | {
"language": "C"
} | ```c
// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
// XFAIL: *
// See PR2452
struct {
int *name;
} syms = { L"NUL" };
```
Fix a warning, closing PR2452 | ```c
// RUN: %llvmgcc -S %s -o - | llvm-as -f -o /dev/null
#include <wchar.h>
struct {
wchar_t *name;
} syms = { L"NUL" };
``` |
4320177a-0dc7-48a7-a631-ab53d81a19fe | {
"language": "C"
} | ```c
//
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface NSTimeZone (Offset)
+ (id)timeZoneWithStringOffset:(NSString*)offset;
- (NSString*)offsetString;
@end
```
Change NSTimeZone cat... | ```c
//
// NSTimeZone+Offset.h
// CocoaGit
//
// Created by Geoffrey Garside on 28/07/2008.
// Copyright 2008 ManicPanda.com. All rights reserved.
//
#import <Foundation/NSTimeZone.h>
@interface NSTimeZone (Offset)
+ (id)timeZoneWithStringOffset:(NSString*)offset;
- (NSString*)offsetString;
@end
``` |
117aa0de-e01e-41a7-9fd7-21f36fb6339e | {
"language": "C"
} | ```c
#ifndef SCANNER_H_
#define SCANNER_H_
// I want to remove this dependecy, equivalent to yy.tab.h ?
#include "parse/GENERATED/parser.hxx"
#undef yyFlexLexer // ugly hack, because <FlexLexer> is wonky
#include <FlexLexer.h>
#include <iostream>
// Tell flex how to define lexing fn
#undef YY_DECL
#define YY_DECL ... | ```c
#ifndef SCANNER_H_
#define SCANNER_H_
// I want to remove this dependecy, equivalent to yy.tab.h ?
#include "parse/GENERATED/parser.hxx"
#undef yyFlexLexer // ugly hack, because <FlexLexer> is wonky
#include <FlexLexer.h>
#include <iostream>
// Tell flex how to define lexing fn
#undef YY_DECL
#define YY_DECL ... |
17d2f4e8-f284-44f1-a279-6946ef3df0da | {
"language": "C"
} | ```c
/* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE
ruby_xml_node2_wrap(VALUE class, xmlNo... | ```c
/* $Id$ */
/* Please see the LICENSE file for copyright and distribution information */
#ifndef __RUBY_XML_NODE__
#define __RUBY_XML_NODE__
extern VALUE cXMLNode;
extern VALUE eXMLNodeSetNamespace;
extern VALUE eXMLNodeFailedModify;
extern VALUE eXMLNodeUnknownType;
VALUE ruby_xml_node2_wrap(VALUE class, xmlNo... |
35551338-730d-4221-9e64-7c05051d1ba1 | {
"language": "C"
} | ```c
```
Add a test to make sure that vector output happens for debug info. | ```c
// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
typedef int v4si __attribute__((__vector_size__(16)));
v4si a;
// Test that we get an array type that's also a vector out of debug.
// CHECK: [ DW_TAG_array_type ] [line 0, size 128, align 128, offset 0] [vector] [from int]
``` |
0b4637e2-90f1-4d68-b8e4-d79f7be7f894 | {
"language": "C"
} | ```c
#include <config.h>
#define LIB_BULK (USR_DIR + "/Game/lib/bulk")
#define LIB_TIME (USR_DIR + "/Game/lib/time")
#define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object")
#define BULKD (USR_DIR + "/Game/sys/bulkd")
#define SNOOPD (USR_DIR + "/Game/sys/snoopd")
#define TIMED (USR_DIR + "/Game/sys/timed")
#de... | ```c
#include <config.h>
#define LIB_ACTION (USR_DIR + "/Game/lib/action")
#define LIB_BULK (USR_DIR + "/Game/lib/bulk")
#define GAME_LIB_OBJECT (USR_DIR + "/Game/lib/object")
#define BULKD (USR_DIR + "/Game/sys/bulkd")
#define SNOOPD (USR_DIR + "/Game/sys/snoopd")
#define TIMED (USR_DIR + "/Game/sys/timed")... |
58705309-188c-40bf-a88b-c6f5fba260de | {
"language": "C"
} | ```c
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 73
#endif
```
Update Skia milestone to 74 | ```c
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 74
#endif
``` |
f0855789-d8dc-4b74-a246-fb8400c936a0 | {
"language": "C"
} | ```c
/*
* Copyright 2018-present Facebook, Inc.
*
* 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... | ```c
/*
* Copyright 2018-present Facebook, Inc.
*
* 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... |
15a4ffe0-64ed-4a00-893f-4b0a259d706e | {
"language": "C"
} | ```c
//
// wren_debug.h
// wren
//
// Created by Bob Nystrom on 11/29/13.
// Copyright (c) 2013 Bob Nystrom. All rights reserved.
//
#ifndef wren_wren_debug_h
#define wren_wren_debug_h
#include "wren_value.h"
#include "wren_vm.h"
void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber);
int wrenDebugPrintInstr... | ```c
#ifndef wren_debug_h
#define wren_debug_h
#include "wren_value.h"
#include "wren_vm.h"
void wrenDebugPrintStackTrace(WrenVM* vm, ObjFiber* fiber);
int wrenDebugPrintInstruction(WrenVM* vm, ObjFn* fn, int i);
void wrenDebugPrintCode(WrenVM* vm, ObjFn* fn);
void wrenDebugPrintStack(ObjFiber* fiber);
#endif
``` |
4168d8d6-823f-4ac4-b1e2-33daa2b29a5d | {
"language": "C"
} | ```c
#pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.53f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
//... | ```c
#pragma once
// const float in a header file can lead to duplication of the storage
// but I don't really care in this case. Just don't do it with a header
// that is included hundreds of times.
const float kCurrentVersion = 1.54f;
// Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version
//... |
2cb0642d-aea3-48b6-9856-a929acfc0f87 | {
"language": "C"
} | ```c
```
Split the main file into .c and .h files to make breaking it up later easier. | ```c
/*
* TODO add copyright notice and GPL licence thingey
*
*
*
*/
#include <nds.h>
#include <stdio.h>
#include <time.h>
#include <dswifi9.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#define EMULATOR 1 //TODO automate flipping this in the makefile
/**
* Interactively lists WiFi conn... |
6d40e52d-0f9c-4d88-9e1d-7ca3bdcc3a24 | {
"language": "C"
} | ```c
//
// DZVideoPlayerViewControllerConfiguration.h
// Pods
//
// Created by Denis Zamataev on 15/07/15.
//
//
#import <Foundation/Foundation.h>
@interface DZVideoPlayerViewControllerConfiguration : NSObject
@property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to NO
@property (strong, non... | ```c
//
// DZVideoPlayerViewControllerConfiguration.h
// Pods
//
// Created by Denis Zamataev on 15/07/15.
//
//
#import <Foundation/Foundation.h>
@interface DZVideoPlayerViewControllerConfiguration : NSObject
@property (assign, nonatomic) BOOL isBackgroundPlaybackEnabled; // defaults to YES
@property (strong, no... |
e4a59002-651a-49d2-a109-63c747b68ca8 | {
"language": "C"
} | ```c
// Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
#ifndef T_ENUM_H
#define T_ENUM_H
#include "t_enum_value.h"
#include <vector>
/**
* An enumerated type. A list of constant ... | ```c
// Copyright (c) 2006- Facebook
// Distributed under the Thrift Software License
//
// See accompanying file LICENSE or visit the Thrift site at:
// http://developers.facebook.com/thrift/
#ifndef T_ENUM_H
#define T_ENUM_H
#include "t_enum_value.h"
#include <vector>
/**
* An enumerated type. A list of constant ... |
04822da6-4699-4365-b955-1f849845e783 | {
"language": "C"
} | ```c
```
Add prototype for heap_getattr() to quiet compiler | ```c
/*-------------------------------------------------------------------------
*
* heaptuple.h--
*
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heaptuple.h,v 1.1 1996/10/18 17:58:33 scrappy Exp $
*
*-------------------------------------------------------------------------
... |
a6e22105-0c3d-4cb4-a5a5-8b4792e9ae9d | {
"language": "C"
} | ```c
/*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <hwloc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
mytest_hwloc_topology_t topology;
unsigned depth;
hwloc_cpuset_t ... | ```c
/*
* Copyright © 2009 CNRS, INRIA, Université Bordeaux 1
* Copyright © 2009 Cisco Systems, Inc. All rights reserved.
* See COPYING in top-level directory.
*/
#include <hwloc.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
mytest_hwloc_topology_t topology;
unsigned depth;
hwloc_cpuset_t ... |
dfda14be-3e92-4339-8a17-3b15b51533e2 | {
"language": "C"
} | ```c
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "julina.h"
int main(int argc, char **argv) {
srand(time(NULL));
double aa[] = {2, 0, 1,
-2, 3, 4,
-5, 5, 6};
Matrix *a = new_matrix(aa, 3, 3);
Matrix *ain = inverse(a);
double bb[] = {1, -... | ```c
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "julina.h"
#define VARIABLE_START 'A'
#define VARIABLE_COUNT 26
static Matrix *variables[VARIABLE_COUNT];
Matrix *get_variable(int c) {
if (c < 0 || c >= VARIABLE_COUNT) {
return NULL;
}
return variables[c - VARIABLE_START];
}
... |
736869d5-82d9-4eb3-8344-9b9de4fbc27d | {
"language": "C"
} | ```c
#ifndef __LIBCT_ERRORS_H__
#define __LIBCT_ERRORS_H__
/*
* This file contains errors, that can be returned from various
* library calls
*/
/* Generic */
#define LCTERR_BADCTSTATE -2 /* Bad container state */
#define LCTERR_BADFSTYPE -3 /* Bad FS type */
#define LCTERR_BADNETTYPE -4 /* Bad Net type */
#define L... | ```c
#ifndef __LIBCT_ERRORS_H__
#define __LIBCT_ERRORS_H__
/*
* This file contains errors, that can be returned from various
* library calls
*/
/*
* -1 is "reserved" for generic "something went wrong" result
* since this value can be (well, is) widely explicitly used
* all over the code.
*/
/* Generic */
#defi... |
da324f68-e21c-40d7-997e-41dc279c367c | {
"language": "C"
} | ```c
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// T... | ```c
@import Foundation;
NS_ASSUME_NONNULL_BEGIN
/// Allows you to customize the style for the the view
/// controllers for your libraries.
@interface CPDStyle : NSObject
/// HTML provided to the view controller, it's nothing too fancy
/// just a string which has a collection of string replacements on it.
///
/// T... |
74723904-af6b-4ecb-b65a-847b09136c0f | {
"language": "C"
} | ```c
/*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# 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... | ```c
/*
#
# ST_HW_HC_SR04.h
#
# (C)2016-2017 Flávio monteiro
#
# 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... |
e3fcf1c3-f8da-40ab-8336-63b6941243ed | {
"language": "C"
} | ```c
```
Add AC_BITS to convert a bit number 0..N-1 to a mask. | ```c
/*
* Copyright 2015 Wink Saville
*
* 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 agre... |
ec9d75f3-8548-4bcd-a75c-19c2fe283b17 | {
"language": "C"
} | ```c
#ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
float votes;
};
class Proposer {
pub... | ```c
#ifndef PROPOSER_H
#define PROPOSER_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <map>
#include "proctor/detector.h"
#include "proctor/database_entry.h"
namespace pcl
{
namespace proctor
{
struct Candidate {
std::string id;
double votes;
};
class Proposer {
pu... |
1a2b94e6-47cd-4cf9-9954-adf22c89a271 | {
"language": "C"
} | ```c
#include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OTyp... | ```c
#include <stm32f4xx.h>
#include <stm32f4xx_gpio.h>
void delay(uint32_t count)
{
while(count--);
}
void init_GPIO()
{
GPIO_InitTypeDef GPIO_InitStruct = {
.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15,
.GPIO_Mode = GPIO_Mode_OUT,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_OType =GPIO_OTyp... |
1c0d9f1a-bb88-4649-9791-344bf24b3627 | {
"language": "C"
} | ```c
//
// APIConstant.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"]
#define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier"
#if DEBUG
#define APIBas... | ```c
//
// APIConstant.h
// PHPHub
//
// Created by Aufree on 9/30/15.
// Copyright (c) 2015 ESTGroup. All rights reserved.
//
#define APIAccessTokenURL [NSString stringWithFormat:@"%@%@", APIBaseURL, @"/oauth/access_token"]
#define QiniuUploadTokenIdentifier @"QiniuUploadTokenIdentifier"
#if DEBUG
#define APIBas... |
0d5c7f78-cd37-4149-9de5-51ce14a7bee0 | {
"language": "C"
} | ```c
#ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
#define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Values f... | ```c
#ifndef _PROJECT_CONFIG_H_
#define _PROJECT_CONFIG_H_
#ifdef USART_DEBUG // this happens by 'make USART_DEBUG=1'
#undef THERMAL_DATA_UART
#else
#define USART_DEBUG
// #define THERMAL_DATA_UART
#endif
#define TMP007_OVERLAY
#define SPLASHSCREEN_OVERLAY
#define ENABLE_LEPTON_AGC
// #define Y16
#ifndef Y16
// Value... |
1ceda4db-c9fa-47d7-8b33-065205188ef6 | {
"language": "C"
} | ```c
/*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* 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 applic... | ```c
/*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* 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 applic... |
316befc7-3600-4cc0-979c-ffa65bbb21a9 | {
"language": "C"
} | ```c
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.o... | ```c
//===--- Algorithm.h - ------------------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.o... |
8deb4bef-df70-4649-97ae-28ba974154e8 | {
"language": "C"
} | ```c
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $
C $Name: $
COMMON /INTERACT_ATMOS_NEEDS/
& co2atmos,
& total_atmos_carbon, total_ocean_carbon,
& total_atmos_carbon_year,
& total_ocean_carbon_year,
... | ```c
C $Header: /u/gcmpack/MITgcm/pkg/dic/DIC_ATMOS.h,v 1.4 2010/04/11 20:59:27 jmc Exp $
C $Name: $
COMMON /INTERACT_ATMOS_NEEDS/
& co2atmos,
& total_atmos_carbon, total_ocean_carbon,
& total_atmos_carbon_year,
& total_ocean_carbon_year,
... |
9be7209b-20ff-4130-bfc6-f87c49540d30 | {
"language": "C"
} | ```c
//
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#defin... | ```c
//
// VPUSupport.h
// QTMultiGPUTextureIssue
//
// Created by Tom Butterworth on 15/05/2012.
// Copyright (c) 2012 Tom Butterworth. All rights reserved.
//
#ifndef QTMultiGPUTextureIssue_VPUSupport_h
#define QTMultiGPUTextureIssue_VPUSupport_h
#import <Foundation/Foundation.h>
#import <QTKit/QTKit.h>
#defin... |
f70df6b6-f5c0-4452-86d9-138273d0afbf | {
"language": "C"
} | ```c
```
Add beginnings of events on hardware | ```c
#include <stdio.h>
#include "event_service.h"
#include "touchscreen.h"
#include "device.h"
typedef struct event {
int32_t device;
int16_t val;
// union here for other events like keys
} event;
#define INPUT_QUEUE_SIZE 128
static event input_queue[INPUT_QUEUE_SIZE];
// The next time that needs to be r... |
3cd3a1c3-eded-4c27-9d5f-37195348650e | {
"language": "C"
} | ```c
//===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... | ```c
//===-- LoopConvert/LoopConvert.h - C++11 for-loop migration ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... |
18520aec-0d2e-43f8-baa3-cd61ddbcccbf | {
"language": "C"
} | ```c
#ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
class SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkEd... | ```c
#ifndef SkEdgeBuilder_DEFINED
#define SkEdgeBuilder_DEFINED
#include "SkChunkAlloc.h"
#include "SkRect.h"
#include "SkTDArray.h"
struct SkEdge;
class SkEdgeClipper;
class SkPath;
class SkEdgeBuilder {
public:
SkEdgeBuilder();
int build(const SkPath& path, const SkIRect* clip, int shiftUp);
SkE... |
70990fde-40ff-4f71-816a-802c8ce8b80b | {
"language": "C"
} | ```c
#ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouse... | ```c
#ifndef CLICKLABEL_H
#define CLICKLABEL_H
#include <QLabel>
#include <QWidget>
#include <Qt>
class ClickLabel:public QLabel
{
Q_OBJECT
public:
explicit ClickLabel(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
~ClickLabel();
signals:
void clicked();
protected:
void mouseRe... |
ec9b51b5-12c2-42c8-9cde-4d4b31e9d9cf | {
"language": "C"
} | ```c
#include "f2c.h"
#define log10e 0.43429448190325182765
#ifdef KR_headers
double log();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10e * log(*x) );
}
```
Use the C library version of log10() instead of the inaccurate formula log10(x) = log1... | ```c
#include "f2c.h"
#ifdef KR_headers
double log10();
double d_lg10(x) doublereal *x;
#else
#undef abs
#include "math.h"
double d_lg10(doublereal *x)
#endif
{
return( log10(*x) );
}
``` |
7b91dbd9-42da-4e89-85cb-a84b0abd3fac | {
"language": "C"
} | ```c
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *pare... | ```c
/**
* Add a new map widget to the given parent Elementary (container) object.
*
* @param parent The parent object.
* @return a new map widget handle or @c NULL, on errors.
*
* This function inserts a new map widget on the canvas.
*
* @ingroup Map
*/
EAPI Evas_Object *elm_map_add(Evas_Object *pare... |
5946efca-7371-45ea-97af-418a31d3d95f | {
"language": "C"
} | ```c
/*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program 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
option) any later v... | ```c
/*
Copyright (C) 2016 Volker Krause <vkrause@kde.org>
This program 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
option) any later v... |
ff42d7c3-96fa-49a9-90ed-41a9e23ddd79 | {
"language": "C"
} | ```c
#ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "... | ```c
#ifndef QGC_CONFIGURATION_H
#define QGC_CONFIGURATION_H
#include <QString>
/** @brief Polling interval in ms */
#define SERIAL_POLL_INTERVAL 9
/** @brief Heartbeat emission rate, in Hertz (times per second) */
#define MAVLINK_HEARTBEAT_DEFAULT_RATE 1
#define WITH_TEXT_TO_SPEECH 1
#define QGC_APPLICATION_NAME "... |
b075b303-fc58-4060-8ab4-a3e03f93b368 | {
"language": "C"
} | ```c
/*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.4 2004-12-13 14:21:55 heikki Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
/**
* atoi_n: like a... | ```c
/*
* Copyright (c) 1997-2004, Index Data
* See the file LICENSE for details.
*
* $Id: atoin.c,v 1.5 2004-12-16 08:59:56 adam Exp $
*/
/**
* \file atoin.c
* \brief Implements atoi_n function.
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <string.h>
#include <ctype.h>
#include <yaz/marcdisp.h>... |
e332407f-75cb-404b-a7a3-b3096b2f939d | {
"language": "C"
} | ```c
#include "rbuv.h"
ID id_call;
VALUE mRbuv;
void Init_rbuv() {
id_call = rb_intern("call");
mRbuv = rb_define_module("Rbuv");
Init_rbuv_error();
Init_rbuv_handle();
Init_rbuv_loop();
Init_rbuv_timer();
Init_rbuv_stream();
Init_rbuv_tcp();
Init_rbuv_signal();
}
```
Add singleton methods to acc... | ```c
#include "rbuv.h"
ID id_call;
VALUE mRbuv;
VALUE rbuv_version(VALUE self);
VALUE rbuv_version_string(VALUE self);
void Init_rbuv() {
id_call = rb_intern("call");
mRbuv = rb_define_module("Rbuv");
rb_define_singleton_method(mRbuv, "version", rbuv_version, 0);
rb_define_singleton_method(mRbuv, "version_... |
467f1d98-ae25-4822-8b08-324ce5ef017d | {
"language": "C"
} | ```c
#pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString toString() const = 0;
};
}
```
Add conversion-to-... | ```c
#pragma once
#include "jcon.h"
#include <QString>
#include <QVariant>
namespace jcon {
class JCON_API JsonRpcResult
{
public:
virtual ~JsonRpcResult() {}
operator bool() const { return isSuccess(); }
virtual bool isSuccess() const = 0;
virtual QVariant result() const = 0;
virtual QString ... |
0c4688ca-1bcb-45b4-bdd8-e07bfcd15459 | {
"language": "C"
} | ```c
#include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
if (ptr[i++] != '(')
{
p... | ```c
#include "../parse.h"
unsigned parse_stmt_parameter(
const sparse_t* src, const char* ptr,
parse_debug_t* debug,
parse_stmt_t* stmt)
{
unsigned dpos = parse_debug_position(debug);
unsigned i = parse_keyword(
src, ptr, debug,
PARSE_KEYWORD_PARAMETER);
if (i == 0) return 0;
bool has_brackets = (ptr[i]... |
775007e6-c8d6-46f0-9efa-14e925748235 | {
"language": "C"
} | ```c
#include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
//__asm__("movb $0x0, %al; ou... | ```c
#include <arch/x64/port.h>
#include <truth/panic.h>
#define TEST_RESULT_PORT_NUMBER 0xf4
void test_shutdown_status(enum status status) {
logf(Log_Debug, "Test shutting down with status %s (%d)\n", status_message(status), status);
write_port(status, TEST_RESULT_PORT_NUMBER);
halt();
assert(Not_Rea... |
3d88522e-b80a-4d01-b036-6284f203fc15 | {
"language": "C"
} | ```c
/*===---- stddef.h - Basic type definitions --------------------------------===
*
* 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 th... | ```c
/*===---- cpuid.h - Basic type definitions ---------------------------------===
*
* 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 th... |
bed3499d-c7ba-43d8-b41f-3dec565b63eb | {
"language": "C"
} | ```c
```
Move this class back to onebusaway-iphone | ```c
@interface OBABookmarkV2 : NSObject {
NSString * _name;
NSArray * _stopIds;
}
- (id) initWithCoder:(NSCoder*)coder;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSArray * stopIds;
@end
``` |
3668cb4d-55ec-4b25-be3f-4b154ddd0eae | {
"language": "C"
} | ```c
/*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <mrko@eecs.berkeley.edu>
*/
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static struct cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp1_write(struct cons *, int, uint8_t, uint8_t);
void
cons_vdp1_init(struct c... | ```c
/*
* Copyright (c) 2012 Israel Jacques
* See LICENSE for details.
*
* Israel Jacques <mrko@eecs.berkeley.edu>
*/
#include <inttypes.h>
#include <stdbool.h>
#include <ctype.h>
#include <string.h>
#include "cons.h"
typedef struct {
} cons_vdp1_t;
static cons_vdp1_t *cons_vdp1_new(void);
static void cons_vdp... |
80510dfc-85b2-416e-8ba6-34988519a6cc | {
"language": "C"
} | ```c
#include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Instal... | ```c
#include <norby/colortest.h>
#include <norby/gdt.h>
#include <norby/idt.h>
#include <norby/irq.h>
#include <norby/isrs.h>
#include <norby/kernel.h>
#include <norby/keyboard.h>
#include <norby/panic.h>
#include <norby/version.h>
#include <norby/vga.h>
#include <stdio.h>
#include <string.h>
void kmain() {
//Instal... |
3f4848cd-9989-4411-b300-ee6c1806739d | {
"language": "C"
} | ```c
// RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
```
Fix test case RUN: line (thanks Argiris) | ```c
// RUN: clang -fexceptions -emit-llvm -o - %s | grep "@foo() {" | count 1 &&
// RUN: clang -emit-llvm -o - %s | grep "@foo() nounwind {" | count 1
int foo(void) {
}
``` |
4e9d762b-8ee2-41f9-a0c1-c92a9691001f | {
"language": "C"
} | ```c
/*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include "config.h"
/* glibc/config.h.in */
#if defined USE_REGPARMS && !defined PROF && !defined __BOUNDED_POINTERS__
# define internal_function __attribute_... | ```c
/*
* nsswitch_internal.h
* Prototypes for some internal glibc functions that we use. Shhh.
*/
#ifndef NSSWITCH_INTERNAL_H
#define NSSWITCH_INTERNAL_H
#include <features.h>
#include "config.h"
/* glibc/config.h.in */
#if __GLIBC_PREREQ(2, 27)
# define internal_function
#elif defined USE_REGPARMS && !defined ... |
ec1e0b4e-31f7-4c61-8b89-3c420b4e7cbd | {
"language": "C"
} | ```c
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 5
// Se... | ```c
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 0
#define CLIENT_VERSION_REVISION 2
#define CLIENT_VERSION_BUILD 6
// Se... |
31075ffb-89bc-4882-831d-38113a01117c | {
"language": "C"
} | ```c
#include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
int fahr;
int cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by */
... | ```c
#include <stdio.h>
/* print Fahrenheit to Celsius table
* for Fahrenheit 0, 20, ..., 300 */
int main()
{
float fahr;
float cel;
int lower;
int upper;
int step;
lower = 0; /* lower bound for the table */
upper = 300; /* upper bound for the table */
step = 20; /* amount to step by... |
d8f02e40-2cc2-45d7-adc6-69d9a2c78399 | {
"language": "C"
} | ```c
// LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext... | ```c
// LAF OS Library
// Copyright (C) 2022 Igara Studio S.A.
// Copyright (C) 2015-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_GL_CONTEXT_INCLUDED
#define OS_GL_CONTEXT_INCLUDED
#pragma once
namespace os {
class GLContext... |
30097338-ee00-477c-b57b-59d589db99fe | {
"language": "C"
} | ```c
/*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring... | ```c
/*ckwg +5
* Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to
* KITWARE_LICENSE.TXT for licensing information, or contact General Counsel,
* Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065.
*/
#ifndef VISTK_SCORING_SCORE_MASK_H
#define VISTK_SCORING_SCORE_MASK_H
#include "scoring... |
bf731b97-f509-41f2-9352-0f74bb5da54c | {
"language": "C"
} | ```c
#ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
#endif```
Create an enum for all posible function return status codes | ```c
#ifndef KERNEL_H
#define KERNEL_H
void free_write();
extern unsigned int endkernel;
enum STATUS_CODE
{
// General
GENERAL_SUCCESS,
GENERAL_FAILURE
}
#endif``` |
f4645dd0-dbe9-4b85-ae36-9ecfdcc09b78 | {
"language": "C"
} | ```c
/*
* Copyright (C) 2012 Andrew Beekhof <andrew@beekhof.net>
*
* libqb 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 version 2.1 of the License, or
* (at your option) any later versio... | ```c
/*
* Copyright (C) 2012 Andrew Beekhof <andrew@beekhof.net>
*
* libqb 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 version 2.1 of the License, or
* (at your option) any later versio... |
49701dd2-56ff-4d84-8ca9-5edfffdac24a | {
"language": "C"
} | ```c
//
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import "RCTEve... | ```c
//
// RNCallKit.h
// RNCallKit
//
// Created by Ian Yu-Hsun Lin on 12/22/16.
// Copyright © 2016 Ian Yu-Hsun Lin. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <CallKit/CallKit.h>
#import <Intents/Intents.h>
//#import <AVFoundation/AVAudioSession.h>
#import <React/... |
07e84c06-1e03-482e-ae07-e839b2fea7d1 | {
"language": "C"
} | ```c
#pragma once
#include "Rendering/RendererDX11.h"
namespace Mile
{
enum class ERenderResourceType
{
VertexBuffer,
IndexBuffer,
ConstantBuffer,
StructuredBuffer,
ByteAddressBuffer,
IndirectArgumentsBuffer,
Texture1D,
Texture2D,
Texture3D,
RenderTarge... | ```c
#pragma once
#include "Rendering/RendererDX11.h"
#include "Core/Engine.h"
namespace Mile
{
enum class ERenderResourceType
{
VertexBuffer,
IndexBuffer,
ConstantBuffer,
StructuredBuffer,
ByteAddressBuffer,
IndirectArgumentsBuffer,
Texture1D,
Texture2D,
Tex... |
901f4afe-66c0-4fbc-b21e-29d85d3b03cd | {
"language": "C"
} | ```c
#ifndef MALLOCCACHE_H
#define MALLOCCACHE_H
template <size_t blockSize, size_t blockCount>
class MallocCache
{
public:
MallocCache()
: m_blocksCached(0)
{
}
~MallocCache()
{
assert(m_blocksCached >= 0 && m_blocksCached <= blockCount);
for (size_t i = 0; i < m_blocksCach... | ```c
#ifndef MALLOCCACHE_H
#define MALLOCCACHE_H
// no-op the cache, sometimes useful for debugging memory issues
//#define MALLOCCACHE_PASSTHROUGH
template <size_t blockSize, size_t blockCount>
class MallocCache
{
public:
MallocCache()
: m_blocksCached(0)
{
}
~MallocCache()
{
#ifndef MALL... |
2316d87d-ffd1-42d0-9a01-a396a6f90856 | {
"language": "C"
} | ```c
```
Handle input by the user | ```c
#pragma once
#include "Component.h"
enum ENTITY_TYPE {PLAYER};
// Commnets
class InputComponent :
public Component
{
public:
InputComponent();
~InputComponent();
void SetEntityType(int entityType);
void HandleInput();
void HandlePlayerInput();
private:
char* m_inputMessage;
ENTITY_TYPE m_entityT... |
a4e19f8d-adff-4929-8c03-19749ff68e82 | {
"language": "C"
} | ```c
#ifndef SC_ADB_PARSER_H
#define SC_ADB_PARSER_H
#include "common.h"
#include "stddef.h"
/**
* Parse the ip from the output of `adb shell ip route`
*/
char *
sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len);
#endif
```
Add warning in function documentation | ```c
#ifndef SC_ADB_PARSER_H
#define SC_ADB_PARSER_H
#include "common.h"
#include "stddef.h"
/**
* Parse the ip from the output of `adb shell ip route`
*
* Warning: this function modifies the buffer for optimization purposes.
*/
char *
sc_adb_parse_device_ip_from_output(char *buf, size_t buf_len);
#endif
``` |
862d14a2-e592-48b4-b810-a0837b0844f2 | {
"language": "C"
} | ```c
startclose: moreInfo
New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ]
Go to Layout [ “about” (tempSetup) ]
Adjust Window
[ Resize to Fit ]
Pause/Resume Script [ Indefinitely ]
January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1-
```
Change m... | ```c
startclose: moreInfo
New Window [ Name: "More Info"; Left: Get ( WindowDesktopWidth ) - (Get ( WindowDesktopWidth ) / 2 ) ]
Go to Layout [ “moreinfo” (tempSetup) ]
Adjust Window
[ Resize to Fit ]
Pause/Resume Script [ Indefinitely ]
January 23, 平成26 3:39:22 Imagination Quality Management.fp7 - about -1-
``` |
6c0666b2-1ff7-4da3-aeab-7e8833b0b30a | {
"language": "C"
} | ```c
#ifndef __FEATURES_H
#define __FEATURES_H
#ifdef __STDC__
#define __P(x) x
#define __const const
/* Almost ansi */
#if __STDC__ != 1
#define const
#define volatile
#endif
#else /* K&R */
#define __P(x) ()
#define __const
#define const
#define volatile
#endif
/* No C++ */
#define __BEGIN_DECLS
#define __END... | ```c
#ifndef __FEATURES_H
#define __FEATURES_H
/* Major and minor version number of the uCLibc library package. Use
these macros to test for features in specific releases. */
#define __UCLIBC__ 0
#define __UCLIBC_MAJOR__ 9
#define __UCLIBC_MINOR__ 1
#ifdef __STDC__
#define __P(x) x
#define __const const
/*... |
06d014c7-a2e4-4912-8adc-3fca860a59f7 | {
"language": "C"
} | ```c
/* 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 ma... | ```c
/* 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 ma... |
cf663ee5-c1c2-4852-91b0-50ebc3eb9f2c | {
"language": "C"
} | ```c
#pragma once
#include "cqrs/artifact.h"
namespace cddd {
namespace cqrs {
template<class> class basic_artifact_view;
template<class DomainEventDispatcher, class DomainEventContainer>
class basic_artifact_view<basic_artifact<DomainEventDispatcher, DomainEventContainer>> {
public:
using id_type = typename ba... | ```c
#pragma once
#include "cqrs/artifact.h"
namespace cddd {
namespace cqrs {
template<class> class basic_artifact_view;
template<class DomainEventDispatcher, class DomainEventContainer>
class basic_artifact_view<basic_artifact<DomainEventDispatcher, DomainEventContainer>> {
public:
using id_type = typename ba... |
0db60ca1-149b-424d-89a9-2e8d8e228d86 | {
"language": "C"
} | ```c
// RUN: clang %s -fsyntax-only -verify -pedantic-errors
int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;} // expected-error {{null pointer expression is not an integer constant expression (but is allowed as an extension)}} // expected-note{{C does not permit evaluated commas in an integer constant expressi... | ```c
// RUN: clang %s -fsyntax-only -verify
int a() {int p; *(1 ? &p : (void*)(0 && (a(),1))) = 10;}
``` |
c74e11bc-2101-4d0e-9dec-9cd979711955 | {
"language": "C"
} | ```c
#ifdef E_TYPEDEFS
#define e_error_message_show(args...) \
{ \
char __tmpbuf[PATH_MAX]; \
\
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
e_error_message_show_internal(__tmpbuf); \
}
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
#endif
#endif
```
Fi... | ```c
#ifdef E_TYPEDEFS
#define e_error_message_show(args...) do \
{ \
char __tmpbuf[PATH_MAX]; \
\
snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
e_error_message_show_internal(__tmpbuf); \
} while (0)
#else
#ifndef E_ERROR_H
#define E_ERROR_H
EAPI void e_error_message_show_internal(char *txt);
#endif
#... |
094512ef-8c5e-49bc-9d3b-ebf1edf8b128 | {
"language": "C"
} | ```c
#ifndef UTIL_STRING_H
#define UTIL_STRING_H
#include "util/common.h"
char* strndup(const char* start, size_t len);
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
```
Fix build with strndup on some platforms | ```c
#ifndef UTIL_STRING_H
#define UTIL_STRING_H
#include "util/common.h"
#ifndef strndup
// This is sometimes a macro
char* strndup(const char* start, size_t len);
#endif
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
``` |
335c13b5-18e7-424f-96eb-00605bc1ab0d | {
"language": "C"
} | ```c
#import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "JTSImageViewController.h"
#import "JTSImageInfo.h"
#import "UITabBarController+NBUAdditions.h"
#import "KINWebBrowserViewController.h"
#import <SSPullToRefresh/SSPullToRefresh.h>
#import "SVGKit/SVGKit.h"
```
Update import statement f... | ```c
#import "MBProgressHUD.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "JTSImageViewController.h"
#import "JTSImageInfo.h"
#import "UITabBarController+NBUAdditions.h"
#import "KINWebBrowserViewController.h"
#import <SSPullToRefresh/SSPullToRefresh.h>
#import <SVGKit/SVGKit.h>
``` |
d10aea3d-5da4-49ad-b11c-2a996c105fc0 | {
"language": "C"
} | ```c
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result res = cgltf_parse(&options, Data, Size, &data);
if (res == cgltf_result_success) cgltf_free(data);
return 0;
}
```
Add validati... | ```c
#define CGLTF_IMPLEMENTATION
#include "../cgltf.h"
int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
{
cgltf_options options = {0};
cgltf_data* data = NULL;
cgltf_result res = cgltf_parse(&options, Data, Size, &data);
if (res == cgltf_result_success)
{
cgltf_validate(data);
cgltf_free(data);
... |
14d92803-0264-4fed-8cbe-24595953d988 | {
"language": "C"
} | ```c
/** \file common.h
* \brief Project-wide definitions and macros.
*
*
* SCL; 2012-2015
*/
#ifndef COMMON_H
#define COMMON_H
#define GR1C_VERSION "0.10.2"
#define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \
"California Institute of Technology\n\n" \
"This is free, open source soft... | ```c
/** \file common.h
* \brief Project-wide definitions and macros.
*
*
* SCL; 2012-2015
*/
#ifndef COMMON_H
#define COMMON_H
#define GR1C_VERSION "0.10.3"
#define GR1C_COPYRIGHT "Copyright (c) 2012-2015 by Scott C. Livingston,\n" \
"California Institute of Technology\n\n" \
"This is free, open source soft... |
e0cb48ed-6211-47c2-8f8c-9186f6dbdb83 | {
"language": "C"
} | ```c
//
// OCTEntity.h
// OctoKit
//
// Created by Josh Abernathy on 1/21/11.
// Copyright 2011 GitHub. All rights reserved.
//
#import "OCTObject.h"
@class OCTPlan;
@class GHImageRequestOperation;
// Represents any GitHub object which is capable of owning repositories.
@interface OCTEntity : OCTObject
// Retur... | ```c
//
// OCTEntity.h
// OctoKit
//
// Created by Josh Abernathy on 1/21/11.
// Copyright 2011 GitHub. All rights reserved.
//
#import "OCTObject.h"
@class OCTPlan;
// Represents any GitHub object which is capable of owning repositories.
@interface OCTEntity : OCTObject
// Returns `login` if no name is explici... |
224acd9e-f6ff-476e-8c6f-6f6a751d40e2 | {
"language": "C"
} | ```c
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "options.h"
static Options *
_new() {
Options *opts = (Options *)malloc(sizeof(Options));
if(opts) {
memset(opts, 0, sizeof(Options));
}
return opts;
}
static Options *
make(int argc, char *argv[]) {
Options *opts = _new();
int i = 1;... | ```c
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "options.h"
static Options *
_new() {
Options *opts = (Options *)malloc(sizeof(Options));
if(opts) {
memset(opts, 0, sizeof(Options));
}
return opts;
}
static Options *
make(int argc, char *argv[]) {
Options *opts = _new();
int i = 1;... |
1710bf3a-60cb-48f4-9910-28ee4a0d3926 | {
"language": "C"
} | ```c
#include <stdio.h>
int main()
{
puts("Hello, people!");
return 0;
}
```
Comment the main .c file | ```c
#include <stdio.h>
int main()
{
puts("Hello, people!"); /* Preferred over printf */
return 0;
}
``` |
8902fc84-0518-4a81-a584-024f7a68bf47 | {
"language": "C"
} | ```c
#define _XOPEN_SOURCE 500
#include <unistd.h>
#include <stdlib.h>
char *os_find_self(void)
{
// PATH_MAX (used by readlink(2)) is not necessarily available
size_t size = 2048, used = 0;
char *path = NULL;
do {
size *= 2;
path = realloc(path, size);
used = readlink("/proc/se... | ```c
#define _XOPEN_SOURCE 500
#include <unistd.h>
#include <stdlib.h>
char *os_find_self(void)
{
// PATH_MAX (used by readlink(2)) is not necessarily available
size_t size = 2048, used = 0;
char *path = NULL;
do {
size *= 2;
path = realloc(path, size);
used = readlink("/proc/se... |
7147d3be-af4b-4ca4-9b3c-6038cef8738e | {
"language": "C"
} | ```c
```
Add placeholder C code to finish build scripts | ```c
/**
* Copyright (c) 2011 Jon Maken, All Rights Reserved
* License: 3-Clause BSD
* Revision: 07/21/2011 2:44:32 PM
*/
#include <stdio.h>
static void usage(void)
{
printf("XVal: Validate XML documents\n");
printf("Usage: xval [--dtd DTD_FILE | --xsd XSD_FILE] XML_FILE ...\n\n");
printf(" --dtd DTD_FILE val... |
d571bb7b-d448-4f97-8c6c-a416b7e2fd4e | {
"language": "C"
} | ```c
/* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */
#ifndef __T_GC__
#define __T_GC__
#ifdef PROF
# define GC_INIT() 0
# define GC_MALLOC(s) malloc(s)
# define GC_MALLOC_ATOMIC(s) malloc(s)
#else
# include <gc.h>
#endif /* PROF */
#endif /* __T_GC__ */
```
Add dummy macro GC_register_finalizer_ignore_... | ```c
/* $Id: t_gc.h,v 1.7 2011/09/04 13:00:54 mit-sato Exp $ */
#ifndef __T_GC__
#define __T_GC__
#ifdef PROF
# define GC_INIT() 0
# define GC_MALLOC(s) malloc(s)
# define GC_MALLOC_ATOMIC(s) malloc(s)
# define GC_register_finalizer_ignore_self(o,f,c,x,y) 0
# define GC_add_roots(s,e) 0
#else
# include <... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.