doc_id stringlengths 36 36 | metadata dict | input stringlengths 28 4.3k | output stringlengths 11 5.45k |
|---|---|---|---|
8b2e79c6-cbfa-4903-b522-467ab904d130 | {
"language": "C"
} | ```c
#ifndef CPR_BODY_H
#define CPR_BODY_H
#include <cstring>
#include <initializer_list>
#include <string>
#include "defines.h"
namespace cpr {
class Body : public std::string {
public:
Body() = default;
Body(const Body& rhs) = default;
Body(Body&& rhs) = default;
Body& operator=(const Body& rhs... | ```c
#ifndef CPR_BODY_H
#define CPR_BODY_H
#include <cstring>
#include <initializer_list>
#include <string>
#include "defines.h"
namespace cpr {
class Body : public std::string {
public:
Body() = default;
Body(const Body& rhs) = default;
Body(Body&& rhs) = default;
Body& operator=(const Body& rhs... |
d6a15cce-a31b-4399-85b8-440c00f3b82e | {
"language": "C"
} | ```c
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "nv30_context.h"
void
nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
}
```
Set pipe status on clear | ```c
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
#include "pipe/p_state.h"
#include "nv30_context.h"
void
nv30_clear(struct pipe_context *pipe, struct pipe_surface *ps,
unsigned clearValue)
{
pipe->surface_fill(pipe, ps, 0, 0, ps->width, ps->height, clearValue);
ps->status = PIPE_SURFACE_STATUS_CLEA... |
4186743f-36a1-448b-829a-4ce82af73d9e | {
"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 85
#endif
```
Update Skia milestone to 86 | ```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 86
#endif
``` |
42ec7693-665f-4c23-8d1a-661dba443b99 | {
"language": "C"
} | ```c
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf try;
void handler(int sig) {
static int i = 0;
write(2, "stack overflow\n", 15);
longjmp(try, ++i);
_exit(1);
}
unsigned recurse(unsigned x) {
return recurse(x)+1;
}
i... | ```c
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <assert.h>
#include <stdlib.h>
#include <setjmp.h>
jmp_buf try;
void handler(int sig) {
static int i = 0;
write(2, "stack overflow\n", 15);
longjmp(try, ++i);
_exit(1);
}
unsigned recurse(unsigned x) {
return recurse(x)+1;
}
i... |
099cf2d3-2fc6-4cb8-a4d8-f309ef95b8fa | {
"language": "C"
} | ```c
/*
* libpatts - Backend library for PATTS Ain't Time Tracking Software
* Copyright (C) 2014 Delwink, LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation.
*
* This prog... | ```c
/*
* libpatts - Backend library for PATTS Ain't Time Tracking Software
* Copyright (C) 2014 Delwink, LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation.
*
* This prog... |
58452c14-f634-4ce4-982e-b6e5ccaca4e6 | {
"language": "C"
} | ```c
#ifndef UTILS_H
#define UTILS_H
#include <string>
/** \brief Convert given container to it's hex representation */
template< typename T >
std::string toHex( const T& data )
{
static const char charTable[] = "0123456789abcdef";
std::string ret;
if ( data.size() > 1024 )
{
ret = "*** LARGE... | ```c
#ifndef UTILS_H
#define UTILS_H
#include <string>
/** \brief Convert given container to it's hex representation */
template< typename T >
std::string toHex( const T& data )
{
static const char charTable[] = "0123456789abcdef";
std::string ret;
if ( data.size() > 80 )
{
ret = "*** LARGE *... |
1c087d86-2c40-4455-97ab-63391b5ebd81 | {
"language": "C"
} | ```c
```
Write control mode to string function | ```c
#ifndef VORTEX_HELPER_H
#define VORTEX_HELPER_H
#include "uranus_dp/control_mode_enum.h"
inline std::string controlModeString(ControlMode control_mode)
{
std::string s;
switch(control_mode)
{
case ControlModes::OPEN_LOOP:
s = "Open Loop";
break;
case ControlModes::SIXDOF:
s = "Six DOF"... |
f72306ae-1b58-4f7c-ba31-260aa7ac94f1 | {
"language": "C"
} | ```c
#include "config.h"
#include <stdio.h>
#include <string.h>
#include "lexicon.h"
#include "hash.h"
#include "array.h"
#include "util.h"
#include "mem.h"
int main(int argc, char **argv)
{
lexicon_pt l=read_lexicon_file(argv[1]);
char s[4000];
printf("Read %ld lexical entries.\n", (long int)hash_size(l->wo... | ```c
#include "config.h"
#include <stdio.h>
#include <string.h>
#include "lexicon.h"
#include "hash.h"
#include "array.h"
#include "util.h"
#include "mem.h"
int main(int argc, char **argv)
{
lexicon_pt l=read_lexicon_file(argv[1]);
char s[4000];
printf("Read %ld lexical entries.\n", (long int)hash_size(l->wo... |
165f7397-cc97-43f3-b610-f95b153795d1 | {
"language": "C"
} | ```c
#ifndef PACKET_QUEUE_H_INCLUDED__
#define PACKET_QUEUE_H_INCLUDED__
#include "radio.h"
#include <stdbool.h>
#define PACKET_QUEUE_SIZE 10
typedef struct
{
radio_packet_t * head;
radio_packet_t * tail;
radio_packet_t packets[PACKET_QUEUE_SIZE];
} packet_queue_t;
uint32_t packet_queue_init(packet_que... | ```c
#ifndef PACKET_QUEUE_H_INCLUDED__
#define PACKET_QUEUE_H_INCLUDED__
#include "radio.h"
#include <stdbool.h>
#define PACKET_QUEUE_SIZE 10
typedef struct
{
uint32_t head;
uint32_t tail;
radio_packet_t packets[PACKET_QUEUE_SIZE];
} packet_queue_t;
uint32_t packet_queue_init(packet_queue_t * queue);
... |
7c79f3bd-bff0-424a-b5e4-7707f38e62c8 | {
"language": "C"
} | ```c
/*
* Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of... | ```c
/*
* Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of... |
c9056e75-f834-4bbb-8092-1062ed519eeb | {
"language": "C"
} | ```c
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
Copyright (C) 2015 Red Hat, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of th... | ```c
/* -*- Mode: C; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
Copyright (C) 2015 Red Hat, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of th... |
836ca42a-b5ac-4fd6-ad5c-7c827c418b4f | {
"language": "C"
} | ```c
/*
* Copyright (c) 2012-2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... | ```c
/*
* Copyright (c) 2012-2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ... |
56a09023-3808-4b7d-9539-8a619a6c1bc5 | {
"language": "C"
} | ```c
// Check that calling dispatch_once from a report callback works.
// RUN: %clang_tsan %s -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <dispatch/dispatch.h>
#include <pthread.h>
#include <stdio.h>
long g = 0;
long h = 0;
void f() {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
... | ```c
// Check that calling dispatch_once from a report callback works.
// RUN: %clang_tsan %s -o %t
// RUN: not %run %t 2>&1 | FileCheck %s
#include <dispatch/dispatch.h>
#include <pthread.h>
#include <stdio.h>
long g = 0;
long h = 0;
void f() {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
... |
85c83226-7d8c-42af-9417-3cbddcd117d3 | {
"language": "C"
} | ```c
/// \file update_task.h
/// Defines action for updating tasks.
/// \author A0112054Y
#pragma once
#ifndef YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_
#define YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_
#include <functional>
#include "../../filter.h"
#include "../../api.h"
namespace You {
namespace QueryEn... | ```c
/// \file update_task.h
/// Defines action for updating tasks.
/// \author A0112054Y
#pragma once
#ifndef YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_
#define YOU_QUERYENGINE_INTERNAL_ACTION_FILTER_TASK_H_
#include <functional>
#include "../../filter.h"
#include "../../api.h"
namespace You {
namespace QueryEn... |
f142343e-e159-4b06-b486-b6ae8a4a1ab7 | {
"language": "C"
} | ```c
```
Install a sig handler using sigaction(), ensure that handler stays installed across invocations. | ```c
/*
** Copyright 1994 by Miron Livny, and Mike Litzkow
**
** Permission to use, copy, modify, and distribute this software and its
** documentation for any purpose and without fee is hereby granted,
** provided that the above copyright notice appear in all copies and that
** both that copyright notice and this pe... |
43090aef-272e-48b8-9445-9d4fa654178c | {
"language": "C"
} | ```c
/**
@file
Copyright John Reid 2013
*/
#ifndef MYRRH_PYTHON_REGISTRY_H_
#define MYRRH_PYTHON_REGISTRY_H_
#ifdef _MSC_VER
# pragma once
#endif //_MSC_VER
namespace myrrh {
namespace python {
/**
* Queries if the the type specified is in the registry.
*/
template< typename QueryT >
bool
in_registry() {
names... | ```c
/**
@file
Copyright John Reid 2013
*/
#ifndef MYRRH_PYTHON_REGISTRY_H_
#define MYRRH_PYTHON_REGISTRY_H_
#ifdef _MSC_VER
# pragma once
#endif //_MSC_VER
namespace myrrh {
namespace python {
/**
* Queries if the the type specified is in the registry. This can be used to avoid registering
* the same type more... |
ef376fde-df43-4d8f-ab18-9d9833197390 | {
"language": "C"
} | ```c
#include <stdio.h>
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
int chute;
printf("Qual é o seu chu... | ```c
#include <stdio.h>
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
int chute;
for(int i = 1; i <= 3; i... |
b0e63155-7619-44de-827c-9499591799c3 | {
"language": "C"
} | ```c
#include "../parse.h"
unsigned parse_stmt_equivalence(
const sparse_t* src, const char* ptr,
parse_stmt_t* stmt)
{
unsigned i = parse_keyword(
src, ptr, PARSE_KEYWORD_EQUIVALENCE);
if (i == 0) return 0;
stmt->type = PARSE_STMT_EQUIVALENCE;
stmt->equivalence.count = 0;
stmt->equivalence.group = NULL;
... | ```c
#include "../parse.h"
unsigned parse_stmt_equivalence(
const sparse_t* src, const char* ptr,
parse_stmt_t* stmt)
{
unsigned i = parse_keyword(
src, ptr, PARSE_KEYWORD_EQUIVALENCE);
if (i == 0) return 0;
stmt->type = PARSE_STMT_EQUIVALENCE;
stmt->equivalence.count = 0;
stmt->equivalence.group = NULL;
... |
f9cd9259-53fd-4af2-8378-383e9045d135 | {
"language": "C"
} | ```c
/*
* Copyright (C) 2015 CossackLabs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | ```c
/*
* Copyright (C) 2015 CossackLabs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
b2aeb38f-8729-474d-af93-d706f62fb24d | {
"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 PRINTING_METAFILE_IMPL_H_
#define PRINTING_METAFILE_IMPL_H_
#if defined(OS_WIN)
#include "printing/emf_win.h"
#elif defined(OS_MACOSX)
#... | ```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 PRINTING_METAFILE_IMPL_H_
#define PRINTING_METAFILE_IMPL_H_
#if defined(OS_WIN)
#include "printing/emf_win.h"
#elif defined(OS_MACOSX)
#... |
d39f145e-78a7-47f0-97b8-2e05f28c00f0 | {
"language": "C"
} | ```c
/**
* cpuid.c
*
* Checks if CPU has support of AES instructions
*
* @author kryukov@frtk.ru
* @version 4.0
*
* For Putty AES NI project
* http://putty-aes-ni.googlecode.com/
*/
#ifndef SILENT
#include <stdio.h>
#endif
#if defined(__clang__) || defined(__GNUC__)
#include <cpuid.h>
static int CheckCPUsu... | ```c
/**
* cpuid.c
*
* Checks if CPU has support of AES instructions
*
* @author kryukov@frtk.ru
* @version 4.0
*
* For Putty AES NI project
* http://putty-aes-ni.googlecode.com/
*/
#include <stdio.h>
#if defined(__clang__) || defined(__GNUC__)
#include <cpuid.h>
static int CheckCPUsupportAES()
{
unsig... |
7a781037-c1af-450e-a33d-01339b1b7e47 | {
"language": "C"
} | ```c
#ifndef ALI_TRD_PREPROCESSOR_H
#define ALI_TRD_PREPROCESSOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
////////////////////////////////////////////////////////////////////////////
// ... | ```c
#ifndef ALI_TRD_PREPROCESSOR_H
#define ALI_TRD_PREPROCESSOR_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
/* $Id$ */
////////////////////////////////////////////////////////////////////////////
// ... |
14bb0b6f-a6e3-4909-9835-439de474a60b | {
"language": "C"
} | ```c
uniform sampler2D m_SamplerY;
uniform sampler2D m_SamplerU;
uniform sampler2D m_SamplerV;
uniform mat3 yuvCoeff;
// Y - 16, Cb - 128, Cr - 128
const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5);
lowp vec3 sampleRgb(vec2 loc)
{
float y = texture2D(m_SamplerY, loc).r;
float u = texture2D(m_SamplerU, loc)... | ```c
uniform sampler2D m_SamplerY;
uniform sampler2D m_SamplerU;
uniform sampler2D m_SamplerV;
uniform mediump mat3 yuvCoeff;
// Y - 16, Cb - 128, Cr - 128
const mediump vec3 offsets = vec3(-0.0625, -0.5, -0.5);
lowp vec3 sampleRgb(vec2 loc)
{
lowp float y = texture2D(m_SamplerY, loc).r;
lowp float u = texture2... |
cbee090f-ff6c-4713-80ba-d739ed07f303 | {
"language": "C"
} | ```c
//===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=//
//
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
#define LLVM_TRANSFORMS_CLEANUPGCCOUTPUT_H
class Pass;
Pass *createCleanupGCCOutputPass();
#endif
```... | ```c
//===- llvm/Transforms/CleanupGCCOutput.h - Cleanup GCC Output ---*- C++ -*--=//
//
// These passes are used to cleanup the output of GCC. GCC's output is
// unneccessarily gross for a couple of reasons. This pass does the following
// things to try to clean it up:
//
// * Eliminate names for GCC types that we kn... |
5210d708-52d8-42a8-9bc0-28c5e1a4c413 | {
"language": "C"
} | ```c
/* ISC license. */
#include <string.h>
#include <utmpx.h>
#include <skalibs/posixishard.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/strerr2.h>
#include <skalibs/djbunix.h>
#include "hpr.h"
#ifndef UT_LINESIZE
#define UT_LINESIZE 32
#endif
void hpr_wall (char const *s)
{
size_t n = strlen(s) ;
c... | ```c
/* ISC license. */
#include <string.h>
#include <utmpx.h>
#include <skalibs/allreadwrite.h>
#include <skalibs/strerr2.h>
#include <skalibs/djbunix.h>
#include <skalibs/posixishard.h>
#include "hpr.h"
#ifndef UT_LINESIZE
#define UT_LINESIZE 32
#endif
void hpr_wall (char const *s)
{
size_t n = strlen(s) ;
c... |
f15fe538-8057-4962-8d15-f477c773fdc8 | {
"language": "C"
} | ```c
#include "visibility.h"
#include "objc/runtime.h"
#include "gc_ops.h"
#include "class.h"
#include <stdlib.h>
#include <stdio.h>
static id allocate_class(Class cls, size_t extraBytes)
{
intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1);
return (id)(addr + 1);
}
static void free_obje... | ```c
#include "visibility.h"
#include "objc/runtime.h"
#include "gc_ops.h"
#include "class.h"
#include <stdlib.h>
#include <stdio.h>
static id allocate_class(Class cls, size_t extraBytes)
{
intptr_t *addr = calloc(cls->instance_size + extraBytes + sizeof(intptr_t), 1);
return (id)(addr + 1);
}
static void free_obje... |
fb8de896-9bc2-43cb-89cc-2ffedcaccf60 | {
"language": "C"
} | ```c
```
Test for switch with return inside a case. | ```c
#include <stdio.h>
void fred(int x)
{
switch (x)
{
case 1: printf("1\n"); return;
case 2: printf("2\n"); break;
case 3: printf("3\n"); return;
}
printf("out\n");
}
int main()
{
fred(1);
fred(2);
fred(3);
return 0;
} ``` |
bfdfe387-e30a-4174-a363-d6d34ec714de | {
"language": "C"
} | ```c
```
Define a minimal unit testing framework. | ```c
// Thanks to JeraTech for this minimalist TDD code,
// which I've modified to resemble AngularJS's a bit more.
// http://www.jera.com/techinfo/jtns/jtn002.html
int tests_run = 0;
#define _it_should(message, test) do { if (!(test)) return message; } while (0)
#define _run_test(test) do { char *message = test(); te... |
e0ecd007-8d6f-4042-b317-ff415fb3cd90 | {
"language": "C"
} | ```c
//
// ENAPI_utils.h
// libechonest
//
// Created by Art Gillespie on 3/15/11. art@tapsquare.com
//
#import "NSMutableDictionary+QueryString.h"
#import "NSData+MD5.h"
#import "ENAPI.h"
#define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set... | ```c
//
// ENAPI_utils.h
// libechonest
//
// Created by Art Gillespie on 3/15/11. art@tapsquare.com
//
#import "NSMutableDictionary+QueryString.h"
#import "NSData+MD5.h"
#import "ENAPI.h"
#define CHECK_API_KEY if (nil == [ENAPI apiKey]) { @throw [NSException exceptionWithName:@"APIKeyNotSetException" reason:@"Set... |
a6e89a04-5061-4206-b1ee-9986487cf0a9 | {
"language": "C"
} | ```c
//
// ViewController.h
// AAChartKit
//
// Created by An An on 17/3/13.
// Copyright © 2017年 An An. All rights reserved.
// source code ----*** https://github.com/AAChartModel/AAChartKit ***--- source code
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,ENUM_secondeViewController_chartType){
ENUM_se... | ```c
//
// ViewController.h
// AAChartKit
//
// Created by An An on 17/3/13.
// Copyright © 2017年 An An. All rights reserved.
// source code ----*** https://github.com/AAChartModel/AAChartKit ***--- source code
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,SecondeViewControllerChartType){
SecondeViewCo... |
27dcf671-9d14-491f-953b-1acf8604a62f | {
"language": "C"
} | ```c
#ifndef TAGREADER_H
#define TAGREADER_H
#include <taglib/fileref.h>
#include <taglib/tag.h>
#include <taglib/mpegfile.h>
#include <taglib/id3v2tag.h>
#include <taglib/attachedpictureframe.h>
#include <QString>
#include <QImage>
class TagReader
{
public:
TagReader(const QString &file);
~TagReader();
... | ```c
#ifndef TAGREADER_H
#define TAGREADER_H
#include "taglib/fileref.h"
#include "taglib/tag.h"
#include "taglib/mpeg/mpegfile.h"
#include "taglib/mpeg/id3v2/id3v2tag.h"
#include "taglib/mpeg/id3v2/frames/attachedpictureframe.h"
#include <QString>
#include <QImage>
class TagReader
{
public:
TagReader(const QStr... |
066de4c9-1a19-4873-b4da-b28be8275e39 | {
"language": "C"
} | ```c
// RUN: %check -e %s
main()
{
struct A
{
int i;
} a, b, c;
a = b ? : c; // CHECK: error: struct involved in if-expr
}
```
Fix struct if-expression test warning | ```c
// RUN: %check -e %s
main()
{
struct A
{
int i;
} a, b, c;
a = b ? : c; // CHECK: error: struct involved in ?:
}
``` |
ec2ed13b-c4ba-4c6f-bb0c-dfc002f69dcf | {
"language": "C"
} | ```c
#include "mode.h"
#include <stdlib.h>
#include <string.h>
#include <termbox.h>
#include "buf.h"
#include "editor.h"
// TODO(isbadawi): Command mode needs a cursor, but modes don't affect drawing.
static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) {
char ch;
switch (ev->key) {
cas... | ```c
#include "mode.h"
#include <stdlib.h>
#include <string.h>
#include <termbox.h>
#include "buf.h"
#include "editor.h"
// TODO(isbadawi): Command mode needs a cursor, but modes don't affect drawing.
static void command_mode_key_pressed(editor_t *editor, struct tb_event *ev) {
char ch;
switch (ev->key) {
cas... |
f65449cb-eb92-4ade-907b-a8e08e545fc6 | {
"language": "C"
} | ```c
// A currentTime function for use in the tests.
#ifdef _WIN32
extern "C" bool QueryPerformanceCounter(uint64_t *);
extern "C" bool QueryPerformanceFrequency(uint64_t *);
double currentTime() {
uint64_t t, freq;
QueryPerformanceCounter(&t);
QueryPerformanceFrequency(&freq);
return (t * 1000.0) / fr... | ```c
// A currentTime function for use in the tests.
// Returns time in milliseconds.
#ifdef _WIN32
extern "C" bool QueryPerformanceCounter(uint64_t *);
extern "C" bool QueryPerformanceFrequency(uint64_t *);
double currentTime() {
uint64_t t, freq;
QueryPerformanceCounter(&t);
QueryPerformanceFrequency(&fr... |
430cc5ac-809c-4a2c-8c5a-b0e4a02c0c33 | {
"language": "C"
} | ```c
/* COR:a.bc PE:a.bc
BAC:a.bc */
void lcd_voltage() {
string top, bottom;
sprintf(top, "COR:%1.2f PE:%1.2f", nImmediateBatteryLevel * 0.001, SensorValue(PowerExpanderBattery) / 280);
sprintf(bottom, "BAC:%1.2f", BackupBatteryLevel * 0.001);
displayLCDString(LCD_LINE_TOP, 0, top);
di... | ```c
/* COR:a.bc PE:a.bc
BAC:a.bc */
void lcd_voltage() {
string top, bottom;
sprintf(top, "COR:%1.2f PE:%1.2f", nImmediateBatteryLevel * 0.001, SensorValue(PowerExpanderBattery) / 280.0);
sprintf(bottom, "BAC:%1.2f", BackupBatteryLevel * 0.001);
displayLCDString(LCD_LINE_TOP, 0, top);
... |
72466523-fcae-4275-891e-cc1da39b2c59 | {
"language": "C"
} | ```c
```
CREATE start of di in C | ```c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct URI {
char * scheme;
char * user;
char * password;
char * host;
char * port;
char * path;
char * query;
char * fragment;
};
struct rule {
char * name;
char * rule;
char * levels;
char * priority;
};
... |
a74aa519-6f3d-4cd2-96cb-8dc76198a21a | {
"language": "C"
} | ```c
//
// IFTTTAnimator.h
// JazzHands
//
// Created by Devin Foley on 9/28/13.
// Copyright (c) 2013 IFTTT Inc. All rights reserved.
//
@protocol IFTTTAnimatable;
@interface IFTTTAnimator : NSObject
- (void)addAnimation:(id<IFTTTAnimatable>)animation;
- (void)animate:(CGFloat)time;
@end
```
Add UIKit import ... | ```c
//
// IFTTTAnimator.h
// JazzHands
//
// Created by Devin Foley on 9/28/13.
// Copyright (c) 2013 IFTTT Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol IFTTTAnimatable;
@interface IFTTTAnimator : NSObject
- (void)addAnimation:(id<IFTTTAnimatable>)animation;
- (void)animate:(CGFloat)time;
@e... |
63968bca-4135-42a2-a5af-4bd5b4fcac75 | {
"language": "C"
} | ```c
/*
* Constants.h
* phonegap-mac
*
* Created by shazron on 10-04-08.
* Copyright 2010 Nitobi Software Inc. All rights reserved.
*
*/
#define kStartPage @"index.html"
//Sencha Demos
#define kStartFolder @"www/sencha"
// PhoneGap Docs Only
//#define kStartFolder @"www/phonegap-docs/template/phonegap/"
... | ```c
/*
* Constants.h
* phonegap-mac
*
* Created by shazron on 10-04-08.
* Copyright 2010 Nitobi Software Inc. All rights reserved.
*
*/
#define kStartPage @"index.html"
//Sencha Demos
//#define kStartFolder @"www/sencha"
// PhoneGap Docs Only
#define kStartFolder @"www/phonegap-docs/template/phonegap/"
... |
8207e492-e71a-4b05-b2f6-4fec125f969e | {
"language": "C"
} | ```c
//===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... | ```c
//===--- CommentBriefParser.h - Dumb comment parser -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... |
3a99635b-4639-434f-b5d3-a52a147aced7 | {
"language": "C"
} | ```c
/**
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... | ```c
/**
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... |
a99f54cc-00c8-4107-a3bf-261141a64933 | {
"language": "C"
} | ```c
#ifndef AREA_H
#define AREA_H
#include "base.h"
typedef struct area area;
struct area{
char name[10];
int capacity;
int areasAround;
char ** adjec; // STRINGS SIZE ARE ALWAYS 10
};
void listAreas(area * a, int size);
void addArea(area * a, int size);
void deleteArea(area * a, int size);
#endif
```
Add ... | ```c
#ifndef AREA_H
#define AREA_H
#include "base.h"
typedef struct area area;
struct area{
char name[10];
int capacity;
int areasAround;
char ** adjec; // STRINGS SIZE ARE ALWAYS 10
};
void listAreas(area * a, int size);
void addArea(area ** a, int *size);
void deleteArea(area ** a, int *size);
int checkAre... |
6d9c2a89-fa9e-40b1-8494-0147b1490786 | {
"language": "C"
} | ```c
```
Add test for Duff device | ```c
/*
name: TEST036
description: Duff's device
output:
*/
/* Disgusting, no? But it compiles and runs just fine. I feel a combination of
pride and revulsion at this discovery. If no one's thought of it before,
I think I'll name it after myself.
It amazes me that after 10 years of writing C there are st... |
f137cd34-04f2-4f78-a557-a61730070770 | {
"language": "C"
} | ```c
#ifndef _POLYGON_H_
#define _POLYGON_H_
/*
* geometric properties of the polygon meant for solving
*
* The default C pre-processor configuration here is to solve triangles.
*/
#define POLYGON_DEPTH 3
#if (POLYGON_DEPTH < 3)
#error You cannot have a polygon with fewer than 3 sides!
#endif
#if (POLYG... | ```c
#ifndef _POLYGON_H_
#define _POLYGON_H_
/*
* geometric properties of the polygon meant for solving
*
* The default C pre-processor configuration here is to solve triangles.
*/
#ifndef POLYGON_DEPTH
#define POLYGON_DEPTH 3
#endif
#if (POLYGON_DEPTH < 3)
#error You cannot have a polygon with fewer th... |
55c78958-a713-4e45-b9d7-efeccc50ae9f | {
"language": "C"
} | ```c
//
// ASN1Decoder.h
// ASN1Decoder
//
// Created by Filippo Maguolo on 8/29/17.
// Copyright © 2017 Filippo Maguolo. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ASN1Decoder.
FOUNDATION_EXPORT double ASN1DecoderVersionNumber;
//! Project version string for ASN1Decoder.
FOUN... | ```c
//
// ASN1Decoder.h
// ASN1Decoder
//
// Created by Filippo Maguolo on 8/29/17.
// Copyright © 2017 Filippo Maguolo. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for ASN1Decoder.
FOUNDATION_EXPORT double ASN1DecoderVersionNumber;
//! Project version string for ASN1Decoder.
FOUN... |
00b28d3b-3735-4d26-ba6d-de7ab77928d4 | {
"language": "C"
} | ```c
/*
* Copyright 2014, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __ARCH_MACHINE_CPU_REGISTERS_H
#def... | ```c
/*
* Copyright 2014, General Dynamics C4 Systems
*
* This software may be distributed and modified according to the terms of
* the GNU General Public License version 2. Note that NO WARRANTY is provided.
* See "LICENSE_GPLv2.txt" for details.
*
* @TAG(GD_GPL)
*/
#ifndef __ARCH_MACHINE_CPU_REGISTERS_H
#def... |
210bb4b4-a852-4fc2-b033-14f1638dd733 | {
"language": "C"
} | ```c
//
// CWStatusBarNotification
// CWNotificationDemo
//
// Created by Cezary Wojcik on 11/15/13.
// Copyright (c) 2013 Cezary Wojcik. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CWStatusBarNotification : NSObject
enum {
CWNotificationStyleStatusBarNotification,
CWNotification... | ```c
//
// CWStatusBarNotification
// CWNotificationDemo
//
// Created by Cezary Wojcik on 11/15/13.
// Copyright (c) 2013 Cezary Wojcik. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CWStatusBarNotification : NSObject
typedef NS_ENUM(NSInteger, CWNotificationStyle){
CWNotificationStyl... |
5775a7ef-d08f-4238-875f-8bc4ee2b26f8 | {
"language": "C"
} | ```c
/*
* Machine specific IO port address definition for generic.
* Written by Osamu Tomita <tomita@cinet.co.jp>
*/
#ifndef _MACH_IO_PORTS_H
#define _MACH_IO_PORTS_H
/* i8253A PIT registers */
#define PIT_MODE 0x43
#define PIT_CH0 0x40
#define PIT_CH2 0x42
/* i8259A PIC registers */
#define PIC_MASTER_CMD ... | ```c
/*
* Machine specific IO port address definition for generic.
* Written by Osamu Tomita <tomita@cinet.co.jp>
*/
#ifndef __ASM_I8253_H
#define __ASM_I8253_H
/* i8253A PIT registers */
#define PIT_MODE 0x43
#define PIT_CH0 0x40
#define PIT_CH2 0x42
/* i8259A PIC registers */
#define PIC_MASTER_CMD 0x20
... |
3caf9252-4156-4d01-9fc0-4f780c02777b | {
"language": "C"
} | ```c
/*
* controldata_utils.h
* Common code for pg_controldata output
*
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/common/controldata_utils.h
*/
#ifndef COMMON_CONTROLDATA_UTILS_H
#define COMMON_... | ```c
/*
* controldata_utils.h
* Common code for pg_controldata output
*
* Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/common/controldata_utils.h
*/
#ifndef COMMON_CONTROLDATA_UTILS_H
#define COMMON_... |
1400dc1c-6d52-4885-ae20-8702a08ece97 | {
"language": "C"
} | ```c
/// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_O... | ```c
/// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_O... |
956a2a00-0f23-43a8-a082-77c5932b4f3c | {
"language": "C"
} | ```c
//
// STTweetLabel.h
// STTweetLabel
//
// Created by Sebastien Thiebaud on 09/29/13.
// Copyright (c) 2013 Sebastien Thiebaud. All rights reserved.
//
typedef enum {
STTweetHandle = 0,
STTweetHashtag,
STTweetLink
} STTweetHotWord;
@interface STTweetLabel : UILabel
@property (nonatomic, strong) ... | ```c
//
// STTweetLabel.h
// STTweetLabel
//
// Created by Sebastien Thiebaud on 09/29/13.
// Copyright (c) 2013 Sebastien Thiebaud. All rights reserved.
//
typedef NS_ENUM(NSInteger, STTweetHotWord) {
STTweetHandle = 0,
STTweetHashtag,
STTweetLink
};
@interface STTweetLabel : UILabel
@property (nona... |
4582abeb-6b34-4d76-8c34-af8e3f4eae36 | {
"language": "C"
} | ```c
//
// MenuItemKit.h
// MenuItemKit
//
// Created by CHEN Xian’an on 1/16/16.
// Copyright © 2016 lazyapps. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Headers.h"
//! Project version number for MenuItemKit.
FOUNDATION_EXPORT double MenuItemKitVersionNumber;
//! Project version string for MenuIte... | ```c
//
// MenuItemKit.h
// MenuItemKit
//
// Created by CHEN Xian’an on 1/16/16.
// Copyright © 2016 lazyapps. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <MenuItemKit/Headers.h>
//! Project version number for MenuItemKit.
FOUNDATION_EXPORT double MenuItemKitVersionNumber;
//! Project version string... |
86db20e8-3a8e-48e5-b50a-0fad2ed780d0 | {
"language": "C"
} | ```c
//
// RMGallery.h
// RMGallery
//
// Created by Hermés Piqué on 16/05/14.
// Copyright (c) 2014 Robot Media. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License ... | ```c
//
// RMGallery.h
// RMGallery
//
// Created by Hermés Piqué on 16/05/14.
// Copyright (c) 2014 Robot Media. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License ... |
79353117-adef-4882-9af1-28de8236ada4 | {
"language": "C"
} | ```c
//
// FTFountainiOS.h
// FTFountain
//
// Created by Tobias Kräntzer on 18.07.15.
// Copyright (c) 2015 Tobias Kräntzer. All rights reserved.
//
// Adapter
#import "FTTableViewAdapter.h"
#import "FTCollectionViewAdapter.h"
```
Add subclassing headers for the table and collection view adapter to the umbrella ... | ```c
//
// FTFountainiOS.h
// FTFountain
//
// Created by Tobias Kräntzer on 18.07.15.
// Copyright (c) 2015 Tobias Kräntzer. All rights reserved.
//
// Adapter
#import "FTTableViewAdapter.h"
#import "FTTableViewAdapter+Subclassing.h"
#import "FTCollectionViewAdapter.h"
#import "FTCollectionViewAdapter+Subclassing... |
ed55a58d-325f-454d-8215-54ce585f423f | {
"language": "C"
} | ```c
#pragma once
#include "SDL.h"
#include "Component.h"
#include "Point.h"
#define NUM_MOUSE_BUTTONS 5
#define CONTROLLER_JOYSTICK_DEATHZONE 8000
class Input
{
public:
Input();
~Input();
void Poll(const SDL_Event& e);
bool IsKeyPressed(SDL_Scancode key);
bool IsKeyHeld(SDL_Scancode key) const;
bool IsKeyRe... | ```c
#pragma once
#include "SDL.h"
#include "Component.h"
#include "Point.h"
#define NUM_MOUSE_BUTTONS 5
#define CONTROLLER_JOYSTICK_DEATHZONE 8000
class Input
{
public:
Input();
~Input();
void Poll(const SDL_Event& e);
bool IsKeyPressed(SDL_Scancode key);
bool IsKeyHeld(SDL_Scancode key) const;
bool IsKeyRe... |
8abeccf7-2a40-4d9a-8dd4-8efac6168af5 | {
"language": "C"
} | ```c
#include <stdio.h>
#include <linux/types.h>
#include <unistd.h>
#include <fcntl.h>
int main (int argc, char * argv [])
{
__u64 rdtsc = 0;
__u64 i = 0;
int fileStat = open (argv [1], O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
while (read (fileStat, &rdtsc, sizeof (rdtsc) ) > 0) {
... | ```c
#include <stdio.h>
#include <linux/types.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
int main (int argc, char * argv [])
{
__u64 rdtsc = 0;
__u64 i = 0;
int fileStat = open (argv [1], O_RDONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
while (read (fileStat, &rdtsc, sizeof (... |
c4cd56aa-a902-4445-9605-4fe7699fefa8 | {
"language": "C"
} | ```c
#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
int native_fallocate(int fd, uint64_t len) {
fstore_t fstore;
fstore.fst_flags = F_ALLOCATECONTIG;
fstore.fst_posmode = F_PEOFPOSMODE;
fstore.fst_offset = 0;
fstore.fst_length = len;
fstore.fst_bytesalloc = 0;
return fcntl(fd, F_PREALLOC... | ```c
#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
#include <stdint.h>
int native_fallocate(int fd, uint64_t len) {
fstore_t fstore;
fstore.fst_flags = F_ALLOCATECONTIG;
fstore.fst_posmode = F_PEOFPOSMODE;
fstore.fst_offset = 0;
fstore.fst_length = len;
fstore.fst_bytesalloc = 0;
return ... |
a7d9ec55-3ebb-4a2a-b838-dd00018c1dc0 | {
"language": "C"
} | ```c
```
Add an XFAIL test which compiles differently from a .ast. | ```c
// RUN: clang -emit-llvm -S -o %t1.ll %s &&
// RUN: clang -emit-ast -o %t.ast %s &&
// RUN: clang -emit-llvm -S -o %t2.ll %t.ast &&
// RUN: diff %t1.ll %t2.ll
// XFAIL: *
int main() {
return 0;
}
``` |
370faa85-a784-4760-bd06-6934a06e8f0f | {
"language": "C"
} | ```c
```
Add code to build arbitrary length function signature from mpl. | ```c
//use a different header for this section as it needs
//the boost pre-processor
//next step is to convert the boost mpl types back to a worklet
//signature. To get this to work with all functor we need to use
//boost pre-processor
#if !BOOST_PP_IS_ITERATING
# ifndef __buildSignature_
# define __buildSignature_
... |
cd9b120b-1c1a-4a39-8611-087b525065fc | {
"language": "C"
} | ```c
// Copyright 2016 Mitchell Kember. Subject to the MIT License.
#include "translate.h"
#include "transmit.h"
#include "util.h"
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv) {
setup_util(argv[0]);
// Initialize the default mode.
int mode = 'e';
// Get command line options.
int c;
... | ```c
// Copyright 2016 Mitchell Kember. Subject to the MIT License.
#include "translate.h"
#include "transmit.h"
#include "util.h"
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv) {
setup_util(argv[0]);
// Initialize the default mode.
int mode = 'e';
// Get command line options.
int c;
... |
20ebe783-cf52-497c-aeac-78ab06c7850a | {
"language": "C"
} | ```c
```
Add branching test for congruence domain | ```c
// PARAM: --sets solver td3 --enable ana.int.congruence --disable ana.int.def_exc
int main(){
// A refinement of a congruence class should only take place for the == and != operator.
int i;
if (i==0){
assert(i==0);
} else {
assert(i!=0); //UNKNOWN!
}
int j;
if (j != 0){
... |
ad6dd042-84a0-4fa5-a603-af14482d34d8 | {
"language": "C"
} | ```c
#ifndef LOCK_H
#define LOCK_H
enum lockstat
{
GET_LOCK_NOT_GOT=0,
GET_LOCK_ERROR,
GET_LOCK_GOT
};
typedef struct lock lock_t;
struct lock
{
int fd;
enum lockstat status;
char *path;
lock_t *next;
};
extern struct lock *lock_alloc(void);
extern int lock_init(struct lock *lock, const char *path);
extern s... | ```c
#ifndef LOCK_H
#define LOCK_H
enum lockstat
{
GET_LOCK_NOT_GOT=0,
GET_LOCK_ERROR,
GET_LOCK_GOT
};
struct lock
{
int fd;
enum lockstat status;
char *path;
struct lock *next;
};
extern struct lock *lock_alloc(void);
extern int lock_init(struct lock *lock, const char *path);
extern struct lock *lock_alloc_a... |
c6c7be60-cf08-4a7e-bc97-180436f3fca4 | {
"language": "C"
} | ```c
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSpinlock_DEFINED
#define SkSpinlock_DEFINED
#include <atomic>
class SkSpinlock {
public:
void acquire() {
// To act as a mutex, we need an acquire... | ```c
/*
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSpinlock_DEFINED
#define SkSpinlock_DEFINED
#include "SkTypes.h"
#include <atomic>
class SkSpinlock {
public:
void acquire() {
// To act as a mute... |
c8fe5657-9c4d-479d-b616-8810365bbeb6 | {
"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");... | ```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");... |
b327e321-13ae-4a30-a31c-9309aea60205 | {
"language": "C"
} | ```c
#include <string>
#include <vector>
#ifndef __hpux
using namespace std;
#endif
#pragma create TClass vector<bool>;
#pragma create TClass vector<char>;
#pragma create TClass vector<short>;
#pragma create TClass vector<long>;
#pragma create TClass vector<unsigned char>;
#pragma create TClass vector<unsigned short>;... | ```c
#include <string>
#include <vector>
#ifndef __hpux
using namespace std;
#endif
#pragma create TClass vector<bool>;
#pragma create TClass vector<char>;
#pragma create TClass vector<short>;
#pragma create TClass vector<long>;
#pragma create TClass vector<unsigned char>;
#pragma create TClass vector<unsigned short>;... |
4f006c19-90d6-4988-a44c-235e4d94ad67 | {
"language": "C"
} | ```c
//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===//
//
// A lot of this code is ripped gratuitously from glibc and libiberty.
//
//===----------------------------------------------------------------------===//
#include <stdlib.h>
void *malloc(size_t) __attribute__((weak));
void free(... | ```c
//===-- memory.c - String functions for the LLVM libc Library ----*- C -*-===//
//
// A lot of this code is ripped gratuitously from glibc and libiberty.
//
//===---------------------------------------------------------------------===//
#include <stdlib.h>
// If we're not being compiled with GCC, turn off attri... |
377989c5-b45c-411b-94c6-ef3978c72979 | {
"language": "C"
} | ```c
```
Add edge profiling support to the runtime library | ```c
/*===-- EdgeProfiling.c - Support library for edge profiling --------------===*\
|*
|* 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.
|*
|*===----... |
0bd2fae3-64f2-4a4f-a31c-b4efabd2825d | {
"language": "C"
} | ```c
```
Add octApron test where thread function has tracked arg | ```c
// SKIP PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
void *t_fun(int arg) {
assert(arg == 3); // TODO (cast through void*)
return NULL;
}
int main(void) {
int x = 3;
pthread_t id;
pthread_create(&id, NULL, t_fun, x);
return 0;
}
``` |
ef8b40e9-9c3b-46e2-8bf0-da7f03d9c2c3 | {
"language": "C"
} | ```c
//
// TrackingControllerDefs.h
//
// Created by Matt Martel on 02/20/09
// Copyright Mundue LLC 2008-2011. All rights reserved.
//
// Create an account at http://www.flurry.com
// Code and integration instructions at
// http://dev.flurry.com/createProjectSelectPlatform.do
#define USES_FLURRY
#define kFlurryAPI... | ```c
//
// TrackingControllerDefs.h
//
// Created by Matt Martel on 02/20/09
// Copyright Mundue LLC 2008-2011. All rights reserved.
//
// Create an account at http://www.flurry.com
// Code and integration instructions at
// http://dev.flurry.com/createProjectSelectPlatform.do
// Uncomment the following two lines t... |
ccded737-7742-4668-88f1-600774a5ce62 | {
"language": "C"
} | ```c
```
Add driver header for PCA9555 I/O port controller | ```c
/* Copyright 2017 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* NXP PCA9555 I/O Port expander driver header
*/
#ifndef __CROS_EC_IOEXPANDER_PCA9555_H
#define __CROS_EC_IOEXPANDER_PCA9555_H
#include "i2c... |
b06d287f-8263-4683-817c-1b382db4a205 | {
"language": "C"
} | ```c
```
Solve Event Time in c | ```c
#include <stdio.h>
int main() {
int d, dd, h, hh, m, mm, s, ss;
scanf("Dia %d", &d);
scanf("%d : %d : %d\n", &h, &m, &s);
scanf("Dia %d", &dd);
scanf("%d : %d : %d", &hh, &mm, &ss);
s = ss - s;
m = mm - m;
h = hh - h;
d = dd - d;
if (s < 0) {
s += 60;
m--... |
c86f2780-91f9-4ff2-a640-c57c2365c646 | {
"language": "C"
} | ```c
```
Add a test for line-based rules | ```c
/* Tests for preprocessor rules, comments, line continuations, etc.*/
#include <sys/neutrino.h> // comment
#include <sys/mman.h> // comment
#include <xxx.h> // comment \
comment
REGULAR LINE
#include <xxx.h> // comment \
REGULAR LINE
#include \
<xxx.h>
<REGULAR LINE>
#define macro // comment \
comm... |
1d4ab5fb-eaeb-4984-bc8d-a2426dcc7178 | {
"language": "C"
} | ```c
#ifndef __TRAIN_MASTER_H__
#define __TRAIN_MASTER_H__
void __attribute__ ((noreturn)) train_master();
typedef enum {
MASTER_CHANGE_SPEED,
MASTER_REVERSE, // step 1
MASTER_REVERSE2, // step 2 (used by delay courier)
MASTER_REVERSE3, // step 3 (used by delay courier)
MASTER_WHERE_ARE_YOU,
... | ```c
#ifndef __TRAIN_MASTER_H__
#define __TRAIN_MASTER_H__
void __attribute__ ((noreturn)) train_master();
typedef enum {
MASTER_CHANGE_SPEED,
MASTER_REVERSE, // step 1
MASTER_REVERSE2, // step 2 (used by delay courier)
MASTER_REVERSE3, // step 3 (used by delay courier)
MASTER_WHERE_ARE_YOU,
... |
c81014d8-e2af-4053-a0ef-4701ede18d62 | {
"language": "C"
} | ```c
//
// BotKit.h
// BotKit
//
// Created by Mark Adams on 9/28/12.
// Copyright (c) 2012 thoughtbot. All rights reserved.
//
#import "BKCoreDataManager.h"
#import "BKManagedViewController.h"
#import "BKManagedTableViewController.h"
#import "NSObject+BKCoding.h"
#import "NSArray+ObjectAccess.h"
#import "NSDate+R... | ```c
//
// BotKit.h
// BotKit
//
// Created by Mark Adams on 9/28/12.
// Copyright (c) 2012 thoughtbot. All rights reserved.
//
#import "BKCoreDataManager.h"
#import "BKManagedViewController.h"
#import "BKManagedTableViewController.h"
#import "NSObject+BKCoding.h"
#import "NSArray+ObjectAccess.h"
#import "NSDate+R... |
76b0abbb-1ed3-4ff3-9ea5-d50771b6158f | {
"language": "C"
} | ```c
#include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static bool flushAfterLog = false;
void proxyLogSetFlush(bool enabled)
{
flushAfterLog = enabled;
}
void proxyLog(const char* format, ...)
{
va_list args;
va_start(ar... | ```c
#include "log.h"
#include "timeutil.h"
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static bool flushAfterLog = false;
void proxyLogSetFlush(bool enabled)
{
flushAfterLog = enabled;
}
void proxyLog(const char* format, ...)
{
va_list args;
va_start(ar... |
249c85c9-5bad-44d6-9fda-646d59a39213 | {
"language": "C"
} | ```c
#include <stdio.h>
#include <mpi.h>
#include <Python.h>
const char helloworld[] = \
"from mpi4py import MPI \n"
"hwmess = 'Hello, World! I am process %d of %d on %s.' \n"
"myrank = MPI.COMM_WORLD.Get_rank() \n"
"nprocs = MPI.COMM_WORLD.Get_size() \n"
"procnm = MPI.Get_processor_name() \n"
... | ```c
/*
* You can use safely use mpi4py between multiple
* Py_Initialize()/Py_Finalize() calls ...
* but do not blame me for the memory leaks ;-)
*
*/
#include <mpi.h>
#include <Python.h>
const char helloworld[] = \
"from mpi4py import MPI \n"
"hwmess = 'Hello, World! I am process %d of %d on %s.' \... |
30a5f736-c735-4bf9-9309-88a9c35f09eb | {
"language": "C"
} | ```c
#pragma once
namespace mmh {
template <typename Size, typename Object>
constexpr Size sizeof_t()
{
return gsl::narrow<Size>(sizeof Object);
}
template <typename Size, typename Value>
constexpr Size sizeof_t(const Value& value)
{
return gsl::narrow<Size>(sizeof value);
}
} // namespace mmh
```
Add miss... | ```c
#pragma once
namespace mmh {
template <typename Size, typename Object>
constexpr Size sizeof_t()
{
return gsl::narrow<Size>(sizeof(Object));
}
template <typename Size, typename Value>
constexpr Size sizeof_t(const Value& value)
{
return gsl::narrow<Size>(sizeof value);
}
} // namespace mmh
``` |
82b96179-9c6f-4f2d-9905-a40d22ca3e4e | {
"language": "C"
} | ```c
#include <pebble.h>
#include "pebcessing/pebcessing.h"
static Window *window = NULL;
static void init(void)
{
window = window_create();
window_set_fullscreen(window, true);
window_stack_push(window, true);
}
static void deinit(void)
{
window_destroy(window);
}
int main(void)
{
init();
init_peb... | ```c
#include <pebble.h>
#include "pebcessing/pebcessing.h"
static Window *window = NULL;
static void init(void)
{
window = window_create();
// Make the window fullscreen.
// All Windows are fullscreen-only on the Basalt platform.
#ifdef PBL_PLATFORM_APLITE
window_set_fullscreen(window, true);
#endif
window... |
7da1a41f-e660-49af-9137-5f6e43ddddd7 | {
"language": "C"
} | ```c
#ifndef SKBUFF_H_
#define SKBUFF_H_
#include "netdev.h"
#include "dst.h"
#include "list.h"
#include <pthread.h>
struct sk_buff {
struct list_head list;
struct dst_entry *dst;
struct netdev *netdev;
uint16_t protocol;
uint32_t len;
uint8_t *tail;
uint8_t *end;
uint8_t *head;
ui... | ```c
#ifndef SKBUFF_H_
#define SKBUFF_H_
#include "netdev.h"
#include "dst.h"
#include "list.h"
#include <pthread.h>
struct sk_buff {
struct list_head list;
struct dst_entry *dst;
struct netdev *netdev;
uint16_t protocol;
uint32_t len;
uint8_t *tail;
uint8_t *end;
uint8_t *head;
ui... |
e458bea8-39a8-4642-a3e9-da85b350a12b | {
"language": "C"
} | ```c
```
Test precision and field-width format handling | ```c
// RUN: %check --only --prefix=linux %s -target x86_64-linux
// RUN: %check --prefix=darwin %s -target x86_64-darwin
int printf(const char *, ...)
__attribute((format(printf, 1, 2)));
typedef unsigned long size_t;
typedef long ptrdiff_t;
typedef unsigned long uintptr_t;
typedef long intptr_t;
int main()
{
// ... |
98ff6727-6e49-4495-ac31-92cd7c590182 | {
"language": "C"
} | ```c
```
Add main C file with standard includes | ```c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
int main(int argc, char* argv[]){
}``` |
5d5b9158-82e5-498e-a81e-0d7dc3884c15 | {
"language": "C"
} | ```c
/* ISC license. */
#include <sys/mman.h>
#include <skalibs/cdb.h>
extern void cdb_free (struct cdb *c)
{
if (c->map) munmap(c->map, c->size) ;
*c = cdb_zero ;
}
```
Save errno when freeing a cdb | ```c
/* ISC license. */
#include <sys/mman.h>
#include <errno.h>
#include <skalibs/cdb.h>
extern void cdb_free (struct cdb *c)
{
if (c->map)
{
int e = errno ;
munmap(c->map, c->size) ;
errno = e ;
}
*c = cdb_zero ;
}
``` |
9bddafae-276b-45c3-b2b1-e2e5eda36668 | {
"language": "C"
} | ```c
/**
* @file
*
* @date 21.04.2016
* @author Anton Bondarev
*/
#ifndef TTYS_H_
#define TTYS_H_
#include <fs/idesc.h>
#include <drivers/tty.h>
struct uart;
struct tty_uart {
struct idesc idesc;
struct tty tty;
struct uart *uart;
};
#endif /* TTYS_H_ */
```
Add TTYS_DEF macro to oldfs | ```c
/**
* @file
*
* @date 21.04.2016
* @author Anton Bondarev
*/
#ifndef TTYS_H_
#define TTYS_H_
#include <fs/idesc.h>
#include <drivers/tty.h>
#include <drivers/char_dev.h>
struct uart;
struct tty_uart {
struct idesc idesc;
struct tty tty;
struct uart *uart;
};
extern struct idesc *uart_cdev_open(struct d... |
08149c66-fe20-4c6f-abdc-0ac6ae7dcea0 | {
"language": "C"
} | ```c
#define STAT_SIZE sizeof(struct stat)
#define STATFS_SIZE sizeof(struct statfs)
#define GID_T_SIZE sizeof(gid_t)
#define INT_SIZE sizeof(int)
#define LONG_SIZE sizeof(long)
#define FD_SET_SIZE sizeof(fd_set)
#define TIMEVAL_SIZE sizeof(struct timeval)
#define TIMEVAL_ARRAY_SIZE (sizeof(struct timeval) * 2)
#define... | ```c
#define STAT_SIZE sizeof(struct stat)
#define STATFS_SIZE sizeof(struct statfs)
#define GID_T_SIZE sizeof(gid_t)
#define INT_SIZE sizeof(int)
#define LONG_SIZE sizeof(long)
#define FD_SET_SIZE sizeof(fd_set)
#define TIMEVAL_SIZE sizeof(struct timeval)
#define TIMEVAL_ARRAY_SIZE (sizeof(struct timeval) * 2)
#define... |
39e81d72-fd6b-41b1-ae4e-69821184ba3d | {
"language": "C"
} | ```c
/*
* tuple.h - define data structure for tuples
*/
#ifndef _TUPLE_H_
#define _TUPLE_H_
#define MAX_TUPLE_SIZE 4096
union Tuple {
unsigned char bytes[MAX_TUPLE_SIZE];
char *ptrs[MAX_TUPLE_SIZE/sizeof(char *)];
};
#endif /* _TUPLE_H_ */
```
Add BSD 3-clause open source header | ```c
/*
* Copyright (c) 2013, Court of the University of Glasgow
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* ... |
78b2fa74-5f96-496f-bbef-8f0ad48f2dc3 | {
"language": "C"
} | ```c
```
Solve Average 3 in c | ```c
#include <stdio.h>
int main() {
float a, b, c, d, e, m;
scanf("%f %f %f %f", &a, &b, &c, &d);
m = (a * 2 + b * 3 + c * 4 + d) / 10;
printf("Media: %.1f\n", m);
if (m >= 7.0) {
printf("Aluno aprovado.\n");
} else if (m >= 5.0) {
printf("Aluno em exame.\n");
scan... |
19db960c-330d-49fc-8e58-411051bd4f80 | {
"language": "C"
} | ```c
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Collabora Ltd.
*
* 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 Softw... | ```c
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2010 Red Hat, Inc.
* Copyright (C) 2010 Collabora Ltd.
*
* 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 Softw... |
d45cbadb-27f4-44a4-9c71-f008d4f39fb9 | {
"language": "C"
} | ```c
```
Add test case for single block | ```c
int main()
{
int b = 2, c = 3, d = 4;
int a = b + c;
b = a - d;
int e = b + c;
int f = a - d;
return 0;
}
``` |
32c1109b-8746-46bd-b28b-97c67fa46922 | {
"language": "C"
} | ```c
```
Add queuesize test with constant capacity | ```c
// SKIP PARAM: --set ana.activated[+] apron --set ana.apron.domain octagon --enable ana.apron.threshold_widening
// TODO: why needs threshold widening to succeed when queuesize doesn't?
#include <pthread.h>
#include <assert.h>
#define CAPACITY 1000
int used;
int free;
pthread_mutex_t Q = PTHREAD_MUTEX_INITIALIZE... |
7b43aec2-3534-470d-b912-6ad2ef2b30bc | {
"language": "C"
} | ```c
#pragma once
#include "llvm/ADT/StringRef.h"
#include <set>
#include <map>
#include "Types.h"
// TODO: This shouldn't really be here. More restructuring needed...
struct hipCounter {
llvm::StringRef hipName;
ConvTypes countType;
ApiTypes countApiType;
int unsupported;
};
#define HIP_UNSUPPORTED... | ```c
#pragma once
#include "llvm/ADT/StringRef.h"
#include <set>
#include <map>
#include "Types.h"
// TODO: This shouldn't really be here. More restructuring needed...
struct hipCounter {
llvm::StringRef hipName;
ConvTypes countType;
ApiTypes countApiType;
bool unsupported;
};
#define HIP_UNSUPPORTE... |
cf23e284-da93-4798-906e-5e1d1d4e7df1 | {
"language": "C"
} | ```c
// Title: sleep
// Name: sleep.c
// Author: Matayoshi
// Date: 2010/06/20
// Ver: 1.0.0
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main(int argc, char* argv[]) {
// `FbN
if(argc < 2) {
fprintf(stdout, "Usage: %s msec\n", argv[0]);
exit(1);
} else {
char buf[16];
int wait =... | ```c
// Title: sleep
// Name: sleep.c
// Author: Matayoshi
// Date: 2010/06/20
// Ver: 1.0.0
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main(int argc, char* argv[]) {
// 引数チェック
if(argc < 2) {
fprintf(stdout, "Usage: %s msec\n", argv[0]);
exit(1);
} else {
char buf[16];
int wai... |
3ae3c57e-0589-417e-8d49-8c5de3218934 | {
"language": "C"
} | ```c
/*
* Copyright 2016, 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)
*/
#pragma once
/* macros for forcing the compiler to leave in statments it would... | ```c
/*
* Copyright 2016, 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)
*/
#pragma once
/* macros for forcing the compiler to leave in statments it would... |
eaafb2fe-3c7d-4780-a9d3-8102f4bd0e42 | {
"language": "C"
} | ```c
const char *s0 = m0;
int s1 = m1;
const char *s2 = m0;
// FIXME: This test fails inexplicably on Windows in a manner that makes it
// look like standard error isn't getting flushed properly.
// RUN: true
// RUNx: echo '#define m0 ""' > %t.h
// RUNx: %clang_cc1 -emit-pch -o %t.h.pch %t.h
// RUNx: echo '' > %t.h
... | ```c
const char *s0 = m0;
int s1 = m1;
const char *s2 = m0;
// FIXME: This test fails inexplicably on Windows in a manner that makes it
// look like standard error isn't getting flushed properly.
// RUN: false
// XFAIL: *
// RUN: echo '#define m0 ""' > %t.h
// RUN: %clang_cc1 -emit-pch -o %t.h.pch %t.h
// RUN: echo... |
25f95ed5-0112-426b-b3ec-41068cd56b0f | {
"language": "C"
} | ```c
```
Verify if two lists intersect at Y point. | ```c
#include "listHelper.h"
int intersectNode(struct linkList *l1, struct linkList *l2, int m, int n) {
/* l1
\ l2
\ /
\/
|
|
l1 is list1 with length m
l2 is list2 with length n
here, m is 5 and n is 4
so diff = abs(m-n) = 1
we need to hop 1 step on l1 to reach l2's length.
from he... |
a5825a36-9707-4068-9343-7d43a8d7b526 | {
"language": "C"
} | ```c
#ifndef DRAUPNIR_H__
#define DRAUPNIR_H__
#include <cstdint>
#include "Sponge.h"
#include "CrcSponge.h"
#include "CrcSpongeBuilder.h"
#include "Constants.h"
namespace Draupnir {
// utility typedefs
typedef CrcSponge<std::uint64_t> CrcSponge64;
typedef CrcSponge<std::uint32_t> CrcSponge32;
typedef CrcSp... | ```c
#ifndef DRAUPNIR_H__
#define DRAUPNIR_H__
#include <cstdint>
#include "Sponge.h"
#include "CrcSponge.h"
#include "CrcSpongeBuilder.h"
#include "Constants.h"
namespace Draupnir {
// utility typedefs
using CrcSponge64 = CrcSponge<std::uint64_t>;
using CrcSponge32 = CrcSponge<std::uint32_t>;
using CrcSpon... |
a7998830-708f-4d37-a9e9-2cfd79027658 | {
"language": "C"
} | ```c
// PARAM: --enable exp.partition-arrays.enabled
#include <pthread.h>
pthread_t t_ids[10000];
void *t_fun(void *arg) {
return NULL;
}
int main(void) {
for (int i = 0; i < 10000; i++)
pthread_create(&t_ids[i], NULL, t_fun, NULL);
for (int i = 0; i < 10000; i++)
pthread_join (t_ids[i], NULL);
retu... | ```c
// PARAM: --set ana.activated[+] thread --enable exp.partition-arrays.enabled
#include <pthread.h>
pthread_t t_ids[10000];
void *t_fun(void *arg) {
return NULL;
}
int main(void) {
for (int i = 0; i < 10000; i++)
pthread_create(&t_ids[i], NULL, t_fun, NULL);
for (int i = 0; i < 10000; i++)
pthread_... |
73b878f5-dc7f-4ebf-b986-913a34ac0aa1 | {
"language": "C"
} | ```c
//===-- STLPostfixHeaderMap.h - hardcoded header map for STL ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... | ```c
//===-- STLPostfixHeaderMap.h - hardcoded header map for STL ----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===--------------------------------------------------... |
0ce8f320-e28b-4d92-b540-d0f7f88b26a0 | {
"language": "C"
} | ```c
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_B... | ```c
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 1
#define CLIENT_VERSION_B... |
14650d6b-761d-4c91-8ee9-f68f2047fb95 | {
"language": "C"
} | ```c
/*
* Copyright 2014 MongoDB, 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 or agree... | ```c
/*
* Copyright 2014 MongoDB, 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 or agree... |
4b260a10-80c6-4b9d-9a68-e979e28acd65 | {
"language": "C"
} | ```c
//
// Created by Scott Stark on 6/12/15.
//
#ifndef NATIVESCANNER_BEACONMAPPER_H
#define NATIVESCANNER_BEACONMAPPER_H
#include <map>
#include <string>
using namespace std;
/**
* Map a beacon id to the registered user by querying the application registration rest api
*/
class BeaconMapper {
private:
map<i... | ```c
//
// Created by Scott Stark on 6/12/15.
//
#ifndef NATIVESCANNER_BEACONMAPPER_H
#define NATIVESCANNER_BEACONMAPPER_H
#include <map>
#include <string>
using namespace std;
/**
* Map a beacon id to the registered user by querying the application registration rest api
*
* Relies on:
* git clone https://githu... |
c819c38a-b3d5-4e98-88b4-2fef12818eaf | {
"language": "C"
} | ```c
```
Add missing event fixture file. | ```c
#ifndef VAST_TEST_UNIT_EVENT_FIXTURE_H
#define VAST_TEST_UNIT_EVENT_FIXTURE_H
#include <vector>
#include "vast/event.h"
struct event_fixture
{
event_fixture();
std::vector<vast::event> events;
};
#endif
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.