commit stringlengths 40 40 | old_file stringlengths 4 264 | new_file stringlengths 4 264 | old_contents stringlengths 0 4.24k | new_contents stringlengths 1 5.44k | subject stringlengths 14 778 | message stringlengths 15 9.92k | lang stringclasses 277
values | license stringclasses 13
values | repos stringlengths 5 127k |
|---|---|---|---|---|---|---|---|---|---|
b430fafc3f57105e5c96f936e7a62b29117e8586 | include/tce/types.h | include/tce/types.h | typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned int uint;
#define __EMBEDDED_PROFILE__ 1
#undef cles_khr_int64
#define cl_khr_fp16
#undef cl_khr_fp64
typedef uint size_t;
typedef int ptrdiff_t;
typedef int intptr_t;
typedef uint uintptr_t;
| Add removed TCE type definitions back. | Add removed TCE type definitions back.
| C | mit | pocl/pocl,pocl/pocl,0charleschen0/pocl,sting47/pocl,vkorhonen/pocl,vkorhonen/pocl,maZZZu/pocl,Oblomov/pocl,0charleschen0/pocl,franz/pocl,0charleschen0/pocl,Oblomov/pocl,pocl/pocl,dsandersimgtec/pocl,Oblomov/pocl,pavanky/pocl,rjodin/pocl,hugwijst/pocl,franz/pocl,jrprice/pocl,franz/pocl,pavanky/pocl,pavanky/pocl,rjodin/p... | |
9fac183df59fc6aa4bb6c244cce394b9fa9993c1 | src/core/src/NIOperations+Subclassing.h | src/core/src/NIOperations+Subclassing.h | //
// Copyright 2011-2014 NimbusKit
//
// 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 t... | //
// Copyright 2011-2014 NimbusKit
//
// 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 t... | Add proper import for NIOperations | Add proper import for NIOperations | C | apache-2.0 | bangquangvn/nimbus,zilaiyedaren/nimbus,zilaiyedaren/nimbus,panume/nimbus,panume/nimbus,bangquangvn/nimbus,WeeTom/nimbus,bogardon/nimbus,quyixia/nimbus,kisekied/nimbus,chanffdavid/nimbus,bogardon/nimbus,quyixia/nimbus,JyHu/nimbus,Arcank/nimbus,dmishe/nimbus,chanffdavid/nimbus,kisekied/nimbus,marcobgoogle/nimbus,Arcank/n... |
4868db0afaf583dc008e842b35c1701df732333b | kernel/init/kmain.c | kernel/init/kmain.c | #include <logging.h>
#include <cedille/pmm.h>
#include <cedille/heap.h>
extern uint32_t _kernel_start,_kernel_end;
void vmm_init();
void kprocess_init();
void timing_system_engine_reportstatustoconsole();
void kernel_doperiodic(int force, int tick);
int kernel_idle_process() {
int i = 0;
for(;;) {
// Attempt to r... | #include <logging.h>
#include <cedille/pmm.h>
#include <cedille/heap.h>
extern uint32_t _kernel_start,_kernel_end;
void vmm_init();
void kprocess_init();
void timing_system_engine_reportstatustoconsole();
void kernel_doperiodic(int force, int tick);
int kernel_idle_process() {
for(;;) {
// Attempt to reschedule ot... | Remove test scrolling code from idle_process | Remove test scrolling code from idle_process
| C | mit | Lionel07/Cedille,Lionel07/Cedille,Lionel07/Cedille |
cdb6e95182e874765dd7a51155534111d186d631 | src/roman_convert_to_int.c | src/roman_convert_to_int.c | #include <string.h>
#include "roman_convert_to_int.h"
int roman_convert_to_int(const char *numeral)
{
if (!numeral)
{
return -1;
}
const char first_letter = *numeral;
switch (first_letter)
{
case 'I':
return 1;
case 'V':
return 5;
case 'X':
return 10;
case 'L':
return 50;
case 'C':
re... | #include <string.h>
#include "roman_convert_to_int.h"
int roman_convert_to_int(const char *numeral)
{
const char first_letter = numeral ? *numeral : '?';
switch (first_letter)
{
case 'I':
return 1;
case 'V':
return 5;
case 'X':
return 10;
case 'L':
return 50;
case 'C':
return 100;
case '... | Simplify error handling for missing/unknown numerals | Simplify error handling for missing/unknown numerals
| C | mit | greghaskins/roman-calculator.c |
5ec58ad6ad9f1687ab4022bed72dc879f8940f98 | tests/regression/02-base/47-no-threadescape.c | tests/regression/02-base/47-no-threadescape.c | // PARAM: --set ana.activated "['base','mallocWrapper','threadflag']"
#include <pthread.h>
int g = 10;
void* t(void *v) {
int* p = (int*) v;
*p = 4711;
}
int main(void){
int l = 42;
pthread_t tid;
pthread_create(&tid, NULL, t, (void *)&l);
pthread_join(tid, NULL);
assert(l==42); //UNKNOWN!
return 0... | Add failing test without threadescape | Add failing test without threadescape
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
05489fc77e7bd485bf3333a7a5579e257e150fac | src/imap/cmd-create.c | src/imap/cmd-create.c | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mai... | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mai... | CREATE ns_prefix/box/ didn't work right when namespace prefix existed. | CREATE ns_prefix/box/ didn't work right when namespace prefix existed.
| C | mit | damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot,damoxc/dovecot |
64e8feb20086dea45debf19dacdf10bcc8587d6a | userspace/engine/falco_engine_version.h | userspace/engine/falco_engine_version.h | /*
Copyright (C) 2021 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... | /*
Copyright (C) 2021 The Falco Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... | Update fields checksum (no changes, order only) | Update fields checksum (no changes, order only)
With the new implementation of list_fields(), the order of fields
changed slightly. So update the checksum.
Signed-off-by: Mark Stemm <1b6cbc2e568a933a16c6fa30b73e50cd507debf7@gmail.com>
| C | apache-2.0 | draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco |
9fdde28b480bbdd66651b4cad1814afcfeca6698 | multiply_by_diagonal.c | multiply_by_diagonal.c | void multiply_by_diagonal(const int rows, const int cols,
double* restrict diagonal, double* restrict matrix) {
/*
* Multiply a matrix by a diagonal matrix (represented as a flat array
* of n values). The diagonal structure is exploited (so that we use
* n^2 ... | REFACTOR removed duplicates and created own file for this | REFACTOR removed duplicates and created own file for this
| C | bsd-3-clause | VT-ICAM/ArgyrisPack,VT-ICAM/ArgyrisPack,VT-ICAM/ArgyrisPack | |
c33a24ad0fc8900b1e1a4ddb1c81194a9b8feaf6 | src/Sched.h | src/Sched.h | #ifndef SCHED_H
#define SCHED_H
#include <Input.h>
#include <Watch.h>
#include <Display.h>
#include <unistd.h> // for sleep()
class Sched
{
public:
Sched(Input* input, Watch* watch, Display* display)
: input_(input)
, watch_(watch)
, display_(display)
{}
public:
void run()
{
while(!shouldStop())
{
... | #ifndef SCHED_H
#define SCHED_H
#include <Input.h>
#include <Watch.h>
#include <Display.h>
#include <unistd.h> // for sleep()
#include <iostream>
class Sched
{
public:
Sched(Input* input, Watch* watch, Display* display)
: input_(input)
, watch_(watch)
, display_(display)
{}
public:
void run()
{
while(... | Clear screen before each cycle | Clear screen before each cycle
| C | mit | dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm,dkrikun/casio-fsm |
073a4cfe77ec0117663b30156b2eade8ca751fe9 | src/libcsg/modules/io/lammpsdumpwriter.h | src/libcsg/modules/io/lammpsdumpwriter.h | /*
* Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
*
* 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
*
* Unle... | /*
* Copyright 2009-2019 The VOTCA Development Team (http://www.votca.org)
*
* 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
*
* Unle... | Add unit converter include to lammps dump writer | Add unit converter include to lammps dump writer
| C | apache-2.0 | votca/csg,votca/csg,MrTheodor/csg,MrTheodor/csg,MrTheodor/csg,votca/csg,MrTheodor/csg,MrTheodor/csg,votca/csg |
f980d4b926ede4fefa5bb5dae6fba6bf843bf6e9 | src/libguac/guacamole/parser-constants.h | src/libguac/guacamole/parser-constants.h | /*
* 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 ... | /*
* 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 ... | Merge changes allowing up to 128 elements per Guacamole instruction. | GUACAMOLE-587: Merge changes allowing up to 128 elements per Guacamole instruction.
| C | apache-2.0 | apache/guacamole-server,apache/guacamole-server,glyptodon/guacamole-server,glyptodon/guacamole-server,mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,glyptodon/guacamole-server,mike-jumper/incubator-guacamole-server,mike-jumper/incubator-guacamole-server,apache/guacamole-server |
30909be64f02c27b012e9067c6af7f7e93e41008 | inc/WikiWalker.h | inc/WikiWalker.h | //! \file WikiWalker.h
#ifndef WIKIWALKER_H
#define WIKIWALKER_H
#include <string>
#include "CurlWikiGrabber.h"
#include "Walker.h"
namespace WikiWalker
{
//! main "app" class
class WikiWalker : public Walker
{
public:
/*! given an URL, start collecting links
* \param url start point for analysis
... | //! \file WikiWalker.h
#ifndef WIKIWALKER_H
#define WIKIWALKER_H
#include <string>
#include "CurlWikiGrabber.h"
#include "Walker.h"
namespace WikiWalker
{
//! main "app" class
class WikiWalker : public Walker
{
public:
//! Creates a new instance
WikiWalker() : Walker(), fetchGenerator(false), grabbe... | Add contructor to initialize fetchGenerator correctly | Add contructor to initialize fetchGenerator correctly
| C | mit | dueringa/WikiWalker |
a9afc0a1eb8cd6e5b0ea0f766f6a3a4012770679 | media/rx/video-rx.h | media/rx/video-rx.h | #ifndef __VIDEO_RX_H__
#define __VIDEO_RX_H__
#include "libavformat/avformat.h"
typedef struct DecodedFrame {
AVFrame* pFrameRGB;
uint8_t *buffer;
} DecodedFrame;
typedef struct FrameManager {
enum PixelFormat pix_fmt;
void (*put_video_frame_rx)(uint8_t *data, int width, int height, int nframe);
DecodedFrame* (... | #ifndef __VIDEO_RX_H__
#define __VIDEO_RX_H__
#include "libavformat/avformat.h"
typedef struct DecodedFrame {
AVFrame* pFrameRGB;
uint8_t *buffer;
void *priv_data; /* User private data */
} DecodedFrame;
typedef struct FrameManager {
enum PixelFormat pix_fmt;
void (*put_video_frame_rx)(uint8_t *data, int width,... | Add priv_data field in DecodedFrame struct. | Add priv_data field in DecodedFrame struct.
| C | lgpl-2.1 | Kurento/kc-media-native,Kurento/kc-media-native,shelsonjava/kc-media-native,shelsonjava/kc-media-native |
efdec03d85fbd561f27f6bbfcb10306d9dc5ba76 | tests/simple/test-loop-3.c | tests/simple/test-loop-3.c | /* Challenging example:
To keep the relationship x = y - 1 while x <= 31 is easy.
The tricky part is when x = 32:
- We add one to x so the relationship between x and y is x = y so
the assertion still holds.
- Set err to 1.
Once err is one we don't update x or y anymore.
After the switch w... | Add test that is unprovable for now | Add test that is unprovable for now
| C | apache-2.0 | seahorn/crab-llvm,seahorn/crab-llvm,seahorn/crab-llvm | |
e80aaa099bf8da5fc89854af50cab0e93467ee01 | solutions/problem_10/solution.c | solutions/problem_10/solution.c | #include <stdlib.h>
#include <stdio.h>
#include "utils.h"
#define LIMIT 2000000
unsigned long solution(){
unsigned long n;
unsigned long total_sum = 0L;
n = 2L;
while(n <= LIMIT){
if(is_prime(n) == 1){
total_sum = total_sum + n;
}
n += 1L;
}
return total_s... | Add C implementation for problem 10 | Add C implementation for problem 10
| C | mit | mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler | |
0fa14ec3cba7347d58bc4e1ec10273c129b87b29 | src/imap/cmd-create.c | src/imap/cmd-create.c | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mai... | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mai... | CREATE ns_prefix/box/ didn't work right when namespace prefix existed. | CREATE ns_prefix/box/ didn't work right when namespace prefix existed.
| C | mit | Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot,Distrotech/dovecot |
018638ec7f304a4acd11b881be3d02bd6af966b4 | BindingShort.h | BindingShort.h | // This file is part of nbind, copyright (C) 2014-2015 BusFaster Ltd.
// Released under the MIT license, see LICENSE.
#pragma once
#ifdef BUILDING_NODE_EXTENSION
#include "Binding.h"
#define NBIND_ERR(message) nbind::Bindings::setError(message)
#define NBIND_CLASS(Name) \
template<class Bound> struct BindInvoker ... | // This file is part of nbind, copyright (C) 2014-2015 BusFaster Ltd.
// Released under the MIT license, see LICENSE.
#pragma once
#ifdef BUILDING_NODE_EXTENSION
#include "Binding.h"
#define NBIND_ERR(message) nbind::Bindings::setError(message)
#define NBIND_CLASS(Name) \
template<class Bound> struct BindInvoker ... | Fix GCC keyword conflict with simpler API. | Fix GCC keyword conflict with simpler API.
| C | mit | charto/nbind,charto/nbind,charto/nbind,charto/nbind,charto/nbind,charto/nbind |
a7894a26d2e6487555024344f3fed9f5a8828140 | thrust/detail/casts.h | thrust/detail/casts.h | /*
* Copyright 2008-2009 NVIDIA Corporation
*
* 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... | Add git r done version of detail::raw_pointer_cast | Add git r done version of detail::raw_pointer_cast
| C | apache-2.0 | Vishwa07/thrust,lishi0927/thrust,malenie/thrust,bfurtaw/thrust,UIKit0/thrust,lishi0927/thrust,UIKit0/thrust,h1arshad/thrust,UIKit0/thrust,allendaicool/thrust,levendlee/thrust,rdmenezes/thrust,google-code-export/thrust,rdmenezes/thrust,julianromera/thrust,allendaicool/thrust,hemmingway/thrust,Vishwa07/thrust,julianromer... | |
c2d80c25893d00dfb8172caa05ac39b4eecaede1 | include/swift/Runtime/Once.h | include/swift/Runtime/Once.h | //===--- Once.h - Runtime support for lazy initialization ------*- C++ -*--===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | //===--- Once.h - Runtime support for lazy initialization ------*- C++ -*--===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LI... | Change swift_once_t to be actually pointer-sized on non-Darwin | Change swift_once_t to be actually pointer-sized on non-Darwin
Swift SVN r22384
| C | apache-2.0 | nathawes/swift,danielmartin/swift,ben-ng/swift,jtbandes/swift,ken0nek/swift,gregomni/swift,Ivacker/swift,gottesmm/swift,LeoShimonaka/swift,gregomni/swift,tardieu/swift,swiftix/swift,adrfer/swift,xedin/swift,KrishMunot/swift,tardieu/swift,kentya6/swift,djwbrown/swift,swiftix/swift.old,devincoughlin/swift,zisko/swift,Swi... |
9798249d63e84964367186af697156e76dffa06c | tests/regression/02-base/56-printf-ptr.c | tests/regression/02-base/56-printf-ptr.c | #include <stdio.h>
#include <assert.h>
int main() {
int x = 42;
printf("&x = %p\n", &x); // doesn't invalidate x despite taking address
assert(x == 42);
return 0;
}
| Add test where printf shouldn't invalidate pointer argument | Add test where printf shouldn't invalidate pointer argument
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | |
b165ed7f282b736bb7fe9fa5e98455a437d23fa4 | test/CodeGen/arm-asm-variable.c | test/CodeGen/arm-asm-variable.c | // RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
#include <stdint.h>
#define ldrex_func(p, rl, rh) \
__asm__ __volatile__( \
"ldrexd%[_rl], %[_rh], [%[_p]]" \
: [_rl] "=&r" (rl), [_rh] "=&r" (rh) \
: [_p] "p" (p) : "memory")
int64_t foo(int64_t v, volati... | // RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
#include <stdint.h>
#define ldrex_func(p, rl, rh) \
__asm__ __volatile__( \
"ldrexd%[_rl], %[_rh], [%[_p]]" \
: [_rl] "=&r" (rl), [_rh] "=&r" (rh) \
: [_p] "p" (p) : "memory")
int64_t foo(int64_t v, volati... | Make this test suitable for optimized builds by avoiding the name. | Make this test suitable for optimized builds by avoiding the name.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@133238 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
cf6afff7e568d87b92f9bbdae6e3c6608a981e6a | Classes/KRCloudSyncBlocks.h | Classes/KRCloudSyncBlocks.h | //
// KRCloudSyncBlocks.h
// CloudSync
//
// Created by allting on 12. 10. 19..
// Copyright (c) 2012년 allting. All rights reserved.
//
#ifndef CloudSync_KRCloudSyncBlocks_h
#define CloudSync_KRCloudSyncBlocks_h
@class KRSyncItem;
typedef void (^KRCloudSyncStartBlock)(NSArray* syncItems);
typedef void (^KRCloudS... | //
// KRCloudSyncBlocks.h
// CloudSync
//
// Created by allting on 12. 10. 19..
// Copyright (c) 2012년 allting. All rights reserved.
//
#ifndef CloudSync_KRCloudSyncBlocks_h
#define CloudSync_KRCloudSyncBlocks_h
@class KRSyncItem;
typedef void (^KRCloudSyncStartBlock)(NSArray* syncItems);
typedef void (^KRCloudS... | Support amd64. Release 2.3.5. Replace crittercism sdk.(ver 4.3.7) | Support amd64.
Release 2.3.5.
Replace crittercism sdk.(ver 4.3.7)
| C | mit | MindPreview/KRCloudSync,MindPreview/KRCloudSync |
2e1f71bdc24f162a88b0262350743d641b67bc4d | src/os/Win32/plugin.h | src/os/Win32/plugin.h | #ifndef PLUGIN_H_
#define PLUGIN_H_
#include <windows.h>
#define EXPORT_CALLING __stdcall
#define EXPORT __declspec(dllexport) EXPORT_CALLING
#include "common.h"
// just defined to make compilation work ; ignored
#define RTLD_DEFAULT NULL
#define RTLD_LOCAL -1
#define RTLD_LAZY -1
static inline void *dlopen(c... | #ifndef PLUGIN_H_
#define PLUGIN_H_
#include <windows.h>
// TODO use __stdcall
#define EXPORT_CALLING __cdecl
#define EXPORT __declspec(dllexport) EXPORT_CALLING
#include "common.h"
// just defined to make compilation work ; ignored
#define RTLD_DEFAULT NULL
#define RTLD_LOCAL -1
#define RTLD_LAZY -1
static i... | Switch to __cdecl till we get --kill-at to work | Switch to __cdecl till we get --kill-at to work
With this build, 32-bit windows DLL loads and checks out, but we really
want to use __stdcall for the DLL entry points.
| C | mit | kulp/tenyr,kulp/tenyr,kulp/tenyr |
7752089ccdc6fd6c25c0af25275752cf2317eb0b | common.h | common.h | #ifndef _COMMON_H
#define _COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#ifdef _LINUX
#include <bsd/string.h>
#endif
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlsave.h>
#include <libxml/encoding.h>
#include <libxml/xmlstring.h>... | #ifndef _COMMON_H
#define _COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#ifdef _LINUX
#include <bsd/string.h>
#endif
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xmlsave.h>
#include <libxml/encoding.h>
#include <libxml/xmlstring.h>... | Call this version what it is. Missed in earlier. | Call this version what it is. Missed in earlier.
| C | bsd-2-clause | levaidaniel/kc,levaidaniel/kc,levaidaniel/kc |
c3767e9e67b7cf8d3b1c562ba5d260a42baabf1d | config.h | config.h | #ifndef PICAM_CONFIG_H
#define PICAM_CONFIG_H
#if defined(__cplusplus)
extern "C" {
#endif
// Even if we specify 30 FPS, Raspberry Pi Camera provides slighly lower FPS.
#define TARGET_FPS 30
#define GOP_SIZE TARGET_FPS
#define H264_BIT_RATE 3000 * 1000 // 3 Mbps
// 1600x900 is the upper limit if you don't use tunn... | #ifndef PICAM_CONFIG_H
#define PICAM_CONFIG_H
#if defined(__cplusplus)
extern "C" {
#endif
// 1600x900 is the upper limit if you don't use tunnel from camera to video_encode.
// 720p (1280x720) is good enough for most cases.
#define WIDTH 1280
#define HEIGHT 720
// Even if we specify 30 FPS, Raspberry Pi Camera prov... | Change video bitrate to 2 Mbps | Change video bitrate to 2 Mbps
| C | lgpl-2.1 | iizukanao/picam,Rutong/picam,thagenbeek/picam,thagenbeek/picam,iizukanao/picam,iizukanao/picam,thagenbeek/picam,Rutong/picam |
a07ddde4fa630539f5bd13d22485dd4715b067e1 | argv.h | argv.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in
* the LICENSE file in the root directory of this source tree. An
* additional grant of patent rights can be found in the PATENTS file
* in the same directory.
*
*/
#pragma ... | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in
* the LICENSE file in the root directory of this source tree. An
* additional grant of patent rights can be found in the PATENTS file
* in the same directory.
*
*/
#pragma ... | Add ARGV and ARGV_CONCAT macros | Add ARGV and ARGV_CONCAT macros
| C | bsd-3-clause | JuudeDemos/fb-adb,JuudeDemos/fb-adb,tcmulcahy/fb-adb,JuudeDemos/fb-adb,0359xiaodong/fb-adb,tcmulcahy/fb-adb,biddyweb/fb-adb,biddyweb/fb-adb,tcmulcahy/fb-adb,biddyweb/fb-adb,0359xiaodong/fb-adb,0359xiaodong/fb-adb |
6ffac22050217acb02c85c9f199c2bb18131b484 | main.c | main.c | // Copyright 2016, Jeffrey E. Bedard
#include "xstatus.h"
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static const char * helptext =
"DESCRIPTION: Simple X toolbar for minimalistic"
" window managers.\n"
"USAGE: xstatus [-d DELAY][-f FILE][-h]\n"
"\t-d DELAY Set delay between ... | // Copyright 2016, Jeffrey E. Bedard
#include "xstatus.h"
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
static const char helptext[] =
"DESCRIPTION: Simple X toolbar for minimalistic"
" window managers.\n"
"USAGE: xstatus [-d DELAY][-f FILE][-h]\n"
"\t-d DELAY Set delay between ... | Use write(2) to display helptext. | Use write(2) to display helptext.
| C | mit | jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus |
f9e0b90cd8c66238a9e267fd78b95d0146b89064 | SmartDeviceLink/SDLMacros.h | SmartDeviceLink/SDLMacros.h | //
// SDLMacros.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 10/17/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#ifndef SDLMacros_h
#define SDLMacros_h
// Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability.
#ifndef SDL_SWIFT_ENUM
#if __has_at... | //
// SDLMacros.h
// SmartDeviceLink-iOS
//
// Created by Muller, Alexander (A.) on 10/17/16.
// Copyright © 2016 smartdevicelink. All rights reserved.
//
#ifndef SDLMacros_h
#define SDLMacros_h
// Resolves issue of pre-xcode 8 versions due to NS_STRING_ENUM unavailability.
#ifndef SDL_SWIFT_ENUM
#if __has_at... | Revert "Changed macro to look specifically for NS_STRING_ENUM" | Revert "Changed macro to look specifically for NS_STRING_ENUM"
This reverts commit de01a9f7b3ed63f683604d3595568bacf5f54a5e.
| C | bsd-3-clause | FordDev/sdl_ios,FordDev/sdl_ios,kshala-ford/sdl_ios,smartdevicelink/sdl_ios,smartdevicelink/sdl_ios,APCVSRepo/sdl_ios,kshala-ford/sdl_ios,smartdevicelink/sdl_ios,APCVSRepo/sdl_ios,kshala-ford/sdl_ios,smartdevicelink/sdl_ios,kshala-ford/sdl_ios,APCVSRepo/sdl_ios,APCVSRepo/sdl_ios,smartdevicelink/sdl_ios,FordDev/sdl_ios,... |
6634d796894e48cdd9247687eb7edc233fb77d23 | slavetypes.h | slavetypes.h | typedef struct
{
uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready
uint8_t *Frame; //Response frame content
} MODBUSResponseStatus; //Type containing information about frame that is set up at slave side
typedef struct
{
uint8_t Address;
uint16_t *Registers;
uint16_t RegisterCount;
MODBUSR... | Move types declarations to new file | Move types declarations to new file
| C | mit | Jacajack/modlib | |
d4aa975d6504cf9c0653775cb9bee4976db48f36 | src/mmu.h | src/mmu.h | #pragma once
#include "address.h"
#include "options.h"
#include "cartridge/cartridge.h"
#include <vector>
#include <memory>
class Video;
class CPU;
class Serial;
class Input;
class Timer;
class MMU {
public:
MMU(std::shared_ptr<Cartridge> inCartridge, CPU& inCPU, Video& inVideo, Input& input, Serial& serial, Ti... | #pragma once
#include "address.h"
#include "options.h"
#include "cartridge/cartridge.h"
#include <vector>
#include <memory>
class Video;
class CPU;
class Serial;
class Input;
class Timer;
class MMU {
public:
MMU(std::shared_ptr<Cartridge> inCartridge, CPU& inCPU, Video& inVideo, Input& input, Serial& serial, Ti... | Remove unnecessary const qualifier in function declaration | Remove unnecessary const qualifier in function declaration
| C | bsd-3-clause | jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator |
3225819105d4aeea7f374963cfb9d001e3add21b | include/inform/inform.h | include/inform/inform.h | // Copyright 2016 ELIFE. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
#pragma once
#include <inform/dist.h>
#include <inform/entropy.h>
#include <inform/state_encoding.h>
#include <inform/active_info.h>
#include <inform/entropy_rate.h>
#include... | // Copyright 2016 ELIFE. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
#pragma once
#include <inform/dist.h>
#include <inform/shannon.h>
#include <inform/state_encoding.h>
#include <inform/active_info.h>
#include <inform/entropy_rate.h>
#include... | Include shannon.h instead of entropy.h | Include shannon.h instead of entropy.h
| C | mit | dglmoore/Inform,ELIFE-ASU/Inform,ELIFE-ASU/Inform,dglmoore/Inform |
b50d0ebfcb55a818f6ffd78838fef642e8a9ca07 | include/dt-bindings/clock/mcux_lpc_syscon_clock.h | include/dt-bindings/clock/mcux_lpc_syscon_clock.h | /*
* Copyright (c) 2020, NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_CLOCK_MCUX_LPC_SYSCON_H_
#define MCUX_FLEXCOMM0_CLK 0
#define MCUX_FLEXCOMM1_CLK 1
#define MCUX_FLEXCOMM2_CLK 2
#define MCUX_FLEXCOMM3_CLK 3
#d... | Add NXP LPC clock control driver | include: Add NXP LPC clock control driver
DTS bindings file for NXP LPC clock control driver that
uses the MCUX SDK drivers
Signed-off-by: Mahesh Mahadevan <7f315ec3481825d543f8bec256ad86a4adc9dd8a@nxp.com>
| C | apache-2.0 | Vudentz/zephyr,Vudentz/zephyr,finikorg/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,... | |
cdf007579b40a6de97eed519fae989398f9dcf26 | src/lib/RandomnessDelegate.h | src/lib/RandomnessDelegate.h | //
// RandomnessDelegate.h
// jdemon
//
// Created by Mark Larus on 3/19/13.
// Copyright (c) 2013 Kenyon College. All rights reserved.
//
#ifndef __jdemon__RandomnessDelegate__
#define __jdemon__RandomnessDelegate__
#include <gsl/gsl_rng.h>
#include <stdexcept>
namespace Randomness {
class Delegate {
pr... | //
// RandomnessDelegate.h
// jdemon
//
// Created by Mark Larus on 3/19/13.
// Copyright (c) 2013 Kenyon College. All rights reserved.
//
#ifndef __jdemon__RandomnessDelegate__
#define __jdemon__RandomnessDelegate__
#include <gsl/gsl_rng.h>
#include <stdexcept>
namespace Randomness {
class Delegate {
pr... | Use gsl_rng_uniform instead of gsl_rng_get | Use gsl_rng_uniform instead of gsl_rng_get
| C | mit | marblar/demon,marblar/demon,marblar/demon,marblar/demon |
ad59ece0e473ce0278ab3516e9d0a757955a5da1 | test/cfi/icall/external-call.c | test/cfi/icall/external-call.c | // RUN: %clang_cfi -lm -o %t1 %s
// RUN: %t1 c 1 2>&1 | FileCheck --check-prefix=CFI %s
// RUN: %t1 s 2 2>&1 | FileCheck --check-prefix=CFI %s
// This test uses jump tables containing PC-relative references to external
// symbols, which the Mach-O object writer does not currently support.
// XFAIL: darwin
#include <s... | // RUN: %clang_cfi -lm -o %t1 %s
// RUN: %t1 c 1 2>&1 | FileCheck --check-prefix=CFI %s
// RUN: %t1 s 2 2>&1 | FileCheck --check-prefix=CFI %s
// This test uses jump tables containing PC-relative references to external
// symbols, which the Mach-O object writer does not currently support.
// The test passes on i386 Da... | Mark a test as unsupported on darwin. | [cfi] Mark a test as unsupported on darwin.
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@315007 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
82525d9d804d64d3f5ec9b999e0a2996a33e6900 | examples/help_output.c | examples/help_output.c | #include <argparse.h>
#include <stdio.h>
int main(int argc, char **argv) {
args *args = args_new();
args_add_option(args, option_new("f", "feature", "description of feature"));
args_help(args, stdout);
args_free(args);
}
| Add example for help output | Add example for help output
| C | mit | ntnn/libargparse,ntnn/libargparse | |
098c879ed8c055047261c5cce0567b81fecbf197 | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | Add flags to stage Skia API changes | Add flags to stage Skia API changes
Test: make
Bug: 178700363
Change-Id: I5d214f8fd69f7419f8b98f61a6e2f26f08587ff7
| C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-... |
a55236affb0c47b07533db1a13b094b0b567606c | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | Add flag to stage api change | Add flag to stage api change
Related skia cl: https://skia-review.googlesource.com/c/skia/+/358736
Test: make
Change-Id: Ic02219b27117280addfd083481a1ae2440584d65
| C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-... |
20abb0f77e5ddbf3481d9bd4e9335d7a32fcfc40 | lib/GPIOlib.h | lib/GPIOlib.h | #ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
//direction is either FORWARD or BACKWARD. speed can be an integer ranging from 0 to 100.
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
... | #ifndef GPIOLIB_H
#define GPIOLIB_H
#define FORWARD 1
#define BACKWARD 0
namespace GPIO
{
int init();
int controlLeft(int direction,int speed);
int controlRight(int direction,int speed);
int stopLeft();
int stopRight();
int resetCounter();
void getCounter(int *countLeft,int *countRight);
int turnTo(int an... | Remove texts for unserstanding to Wiki pages | Remove texts for unserstanding to Wiki pages
| C | mit | miaoxw/EmbeddedSystemNJU2017-Demo |
bcb8a9fa53da3a99f9ee035e7c5407dd61853d6f | common/c_cpp/src/c/windows/wombat/wUuid.h | common/c_cpp/src/c/windows/wombat/wUuid.h | /* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE 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... | /* $Id: wUuid.h,v 1.1.2.2 2012/03/20 11:15:17 emmapollock Exp $
*
* OpenMAMA: The open middleware agnostic messaging API
* Copyright (C) 2011 NYSE 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... | Change uuid to char* from int for Windows | [common] Change uuid to char* from int for Windows
| C | lgpl-2.1 | MattMulhern/OpenMAMA,cloudsmith-io/openmama,dmaguire/OpenMAMA,dmaguire/OpenMAMA,dmaguire/OpenMAMA,vulcanft/openmama,fquinner/OpenMAMA,fquinner/OpenMAMA,jacobraj/MAMA,dpauls/OpenMAMA,dmaguire/OpenMAMA,philippreston/OpenMAMA,dmaguire/OpenMAMA,philippreston/OpenMAMA,philippreston/OpenMAMA,jacobraj/MAMA,cloudsmith-io/openm... |
c33df657a16fbc23df2b6ec1c38060060cd3608a | include/config/SkUserConfigManual.h | include/config/SkUserConfigManual.h | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | /*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT ... | Maintain the legacy behavior for WebP loop count | Maintain the legacy behavior for WebP loop count
Bug: 145995037
Test: No change in behavior; no new tests
https://skia-review.googlesource.com/c/skia/+/259161 updates Skia to
report the proper number of repetitions for a WebP file. This build flag
ensures that we stick with the existing behavior until we're ready to
... | C | bsd-3-clause | aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-... |
24ccdf6f2a0802a286416133d31364d42d18d720 | slave/sregisters.h | slave/sregisters.h | #define _SLAVEREGISTERS
#include <inttypes.h>
//Functions needed from other modules
extern void MODBUSBuildException( uint8_t, uint8_t );
//Functions for parsing requests
extern void MODBUSParseRequest03( union MODBUSParser *Parser );
extern void MODBUSParseRequest06( union MODBUSParser *Parser );
extern void MODBUS... | #define _SLAVEREGISTERS
#include <inttypes.h>
//Functions needed from other modules
extern void MODBUSBuildException( uint8_t, uint8_t );
//Functions for parsing requests
extern void MODBUSParseRequest03( union MODBUSParser *Parser );
extern void MODBUSParseRequest06( union MODBUSParser *Parser );
extern void MODBUS... | Add prototypes of response-building functions | Add prototypes of response-building functions
| C | mit | Jacajack/modlib |
a57adb1ba137c47d7ebaef9f64e265fcf653debe | include/config.h | include/config.h | /*************************************************
* Configuration Handling Header File *
* (C) 1999-2007 Jack Lloyd *
*************************************************/
#ifndef BOTAN_POLICY_CONF_H__
#define BOTAN_POLICY_CONF_H__
#include <botan/mutex.h>
#include <string>
#include <v... | /*************************************************
* Configuration Handling Header File *
* (C) 1999-2008 Jack Lloyd *
*************************************************/
#ifndef BOTAN_POLICY_CONF_H__
#define BOTAN_POLICY_CONF_H__
#include <botan/mutex.h>
#include <string>
#include <m... | Remove unused include of <vector> | Remove unused include of <vector>
| C | bsd-2-clause | randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/b... |
1ab12bed7f1c38c280876197408bd32e289ac41f | modlib.c | modlib.c | #include "modlib.h"
uint16_t MODBUSSwapEndian( uint16_t Data )
{
//Change big-endian to little-endian and vice versa
unsigned char Swap;
//Create 2 bytes long union
union Conversion
{
uint16_t Data;
unsigned char Bytes[2];
} Conversion;
//Swap bytes
Conversion.Data = Data;
... | #include "modlib.h"
uint16_t MODBUSSwapEndian( uint16_t Data )
{
//Change big-endian to little-endian and vice versa
unsigned char Swap;
//Create 2 bytes long union
union Conversion
{
uint16_t Data;
unsigned char Bytes[2];
} Conversion;
//Swap bytes
Conversion.Data = Data;
... | Add CRC16 checksum calculation function | Add CRC16 checksum calculation function
| C | mit | Jacajack/modlib |
d4ea2ac1a1bbf61ed190ac9b6e78d6be4ce687f6 | src/utils.h | src/utils.h | #ifndef _INC_UTILS_H
#define _INC_UTILS_H
#include "basetypes.h"
void *advancePtr(void *vp, SizeType len) {
return (void*)((unsigned char *)(vp) + len);
}
const void *advancePtr(const void *vp, SizeType len) {
return (void*)((unsigned char *)(vp) + len);
}
#endif//_INC_UTILS_H | #ifndef _INC_UTILS_H
#define _INC_UTILS_H
#include "basetypes.h"
inline void *advancePtr(void *vp, SizeType len) {
return (void*)((unsigned char *)(vp) + len);
}
inline const void *advancePtr(const void *vp, SizeType len) {
return (void*)((unsigned char *)(vp) + len);
}
#endif//_INC_UTILS_H | Fix header methods to be inline | Fix header methods to be inline
| C | mit | aroxby/cpu,aroxby/cpu |
0b78dce3a2bd416375327b1e4436883da673009e | test2/type_parsing_printing/typeof_skip.c | test2/type_parsing_printing/typeof_skip.c | // RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') xyz()"
long *x;
__typeof(int *) ip;
__typeof(int *) *a1;
__typeof(int *) a2[2];
__typeof(i... | // RUN: %ucc -Xprint %s 2>/dev/null | grep 'typeof' | %output_check -w "/typeof\(int \*\) ip.*/" "/typeof\(int \*\) \*a1.*/" "/typeof\(int \*\) a2\[2\].*/" "/typeof\(int \*\) a3\(\).*/" "typeof(expr: identifier) (aka 'long *') abc()" "typeof(expr: identifier) (aka 'long *') xyz()"
long *x;
__typeof(int *) ip;
__type... | Add trailing return type to type printing test | Add trailing return type to type printing test
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
d7dcfd3383fe903697b6aac817df17426de2f5a7 | cbits/hashByteString.c | cbits/hashByteString.c | /* Bernstein's hash */
int djb_hash(const char* str, int len, int hash) {
while (len--) {
hash = (hash * 33) ^ *str++;
}
return hash;
}
| /* Bernstein's hash */
int djb_hash(const unsigned char* str, int len, int hash) {
while (len--) {
hash = (hash * 33) ^ *str++;
}
return hash;
}
| Fix the handling of signedness, which caused a nasty bug | Fix the handling of signedness, which caused a nasty bug
| C | bsd-3-clause | ekmett/hashable |
fa52b947edea97d14f48e656125c7d640d748e85 | cbits/hashByteString.c | cbits/hashByteString.c | int hashByteString(const char* str, int len) {
int hash = 0;
while (len--) {
hash = (hash * 33) ^ *str++;
}
return hash;
}
| /* Bernstein's hash */
int hashByteString(const char* str, int len) {
int hash = 0;
while (len--) {
hash = (hash * 33) ^ *str++;
}
return hash;
}
| Document where our hash function comes from | Document where our hash function comes from
| C | bsd-3-clause | ekmett/hashable |
e7a73040132035225ee11a735afb54c3590f7648 | lib/journal.h | lib/journal.h | /* libcopy -- journal support
* (c) 2011 Michał Górny
* 2-clause BSD-licensed
*/
#pragma once
#ifndef _ATOMIC_INSTALL_JOURNAL_H
#define _ATOMIC_INSTALL_JOURNAL_H
typedef struct ai_journal *journal_t;
int ai_journal_create(const char *journal_path, const char *location);
int ai_journal_open(const char *journal_pa... | /* libcopy -- journal support
* (c) 2011 Michał Górny
* 2-clause BSD-licensed
*/
#pragma once
#ifndef _ATOMIC_INSTALL_JOURNAL_H
#define _ATOMIC_INSTALL_JOURNAL_H
typedef struct ai_journal *journal_t;
int ai_journal_create(const char *journal_path, const char *location);
int ai_journal_open(const char *journal_pa... | Fix comment in header guard. | Fix comment in header guard.
| C | bsd-2-clause | mgorny/atomic-install |
0bc5dac3db25de42dfd86cfd7c3e4cc33587d8f3 | src/client/crypt.c | src/client/crypt.c | #include <openssl/aes.h>
#include <openssl/rand.h>
#include <stdio.h>
#include <string.h>
#include "crypt.h"
typedef unsigned char aes_t;
void generate_bytes(aes_t *buf) {
if (!RAND_bytes(buf, sizeof(buf))) {
fprintf(stderr, "[!] Could not generate key");
}
}
aes_t *encrypt(char *plaintext, aes_t *k... | #include <openssl/aes.h>
#include <openssl/rand.h>
#include <stdio.h>
#include <string.h>
#include "crypt.h"
typedef unsigned char aes_t;
void generate_bytes(aes_t *buf) {
if (!RAND_bytes(buf, sizeof(buf))) {
fprintf(stderr, "[!] Could not generate key");
}
}
aes_t *encrypt(char *plaintext, aes_t *k... | Use strlen instead of sizeof | Use strlen instead of sizeof
| C | mit | ThisIsMyNick/CChat,ThisIsMyNick/CChat |
9aa854c9ff8be24d6d16404b591f9a5b2e2e5237 | priv/qfappscriptdispatcherwrapper.h | priv/qfappscriptdispatcherwrapper.h | #ifndef QFAPPSCRIPTDISPATCHERWRAPPER_H
#define QFAPPSCRIPTDISPATCHERWRAPPER_H
#include <QQuickItem>
#include <QPointer>
#include "qfappdispatcher.h"
class QFAppScriptDispatcherWrapper : public QQuickItem
{
Q_OBJECT
public:
QFAppScriptDispatcherWrapper();
QString type() const;
void setType(const QStri... | #ifndef QFAPPSCRIPTDISPATCHERWRAPPER_H
#define QFAPPSCRIPTDISPATCHERWRAPPER_H
#include <QQuickItem>
#include <QPointer>
#include "qfappdispatcher.h"
class QFAppScriptDispatcherWrapper : public QObject
{
Q_OBJECT
public:
QFAppScriptDispatcherWrapper();
QString type() const;
void setType(const QString ... | Change parent of QFAppScriptDispatcherWrapper from QQuickItem to QObject | Change parent of QFAppScriptDispatcherWrapper from QQuickItem to QObject
| C | apache-2.0 | benlau/quickflux,benlau/quickflux |
6f5ad61c73d1a214864716d55dddbf723fe1b3bc | src/test/for_all.c | src/test/for_all.c | int sum = 0;
void test_sum(){
if(sum == 45)
printf("Ok!\n");
else
printf("Wrong!\n");
sum = 0;
}
int main(){
int x;
for(int x; x < 10; x++)
sum += x;
test_sum();
for(x = 0; x < 10; x++)
sum += x;
test_sum();
x = 0;
for(;... | Add file testing all forms of for loop | Add file testing all forms of for loop
| C | mit | Sibert-Aerts/c2p,Sibert-Aerts/c2p,Sibert-Aerts/c2p | |
1505139f741e601408dc4aaddf8e352d28085f00 | test/Driver/offloading-interoperability.c | test/Driver/offloading-interoperability.c | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | ... | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -no-canonical-prefixes -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | ... | Allow .exe extension to ld to fix test with mingw. | Allow .exe extension to ld to fix test with mingw.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277334 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... |
5446062ac8d33adda2927d122e7fe4e7052c2666 | sys/pc98/include/param.h | sys/pc98/include/param.h | /*-
* This file is in the public domain.
*/
/* $FreeBSD$ */
#include <i386/param.h>
| /*-
* Copyright (c) 2005 TAKAHASHI Yoshihiro.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list o... | Switch MACHINE to "pc98" on FreeBSD/pc98. Add copyright. | Switch MACHINE to "pc98" on FreeBSD/pc98.
Add copyright.
Approved by: FreeBSD/pc98 development team.
| C | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase |
7cbd4e0a5c84abd6c23672e4e87ecab24b70c00a | tests/test_empty.c | tests/test_empty.c | /*
====================================================================
Copyright (c) 2008 Ian Blumel. All rights reserved.
This software is licensed as described in the file LICENSE, which
you should have received as part of this distribution.
====================================================================
File... | Add missing 'empty' test program. | Add missing 'empty' test program.
| C | bsd-3-clause | imb/fctx,imb/fctx,imb/fctx,imb/fctx | |
617ff31664d7aaaf391272da30d3ae65d0426df7 | test/Analysis/array-struct.c | test/Analysis/array-struct.c | // RUN: clang -checker-simple -verify %s
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
... | // RUN: clang -checker-simple -verify %s
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
... | Add test cast for struct array. | Add test cast for struct array.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59522 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-cl... |
f49f7674b9ec11b777b0954ea9fa0fe73a7ad4be | RobotC/Headers/Helper.h | RobotC/Headers/Helper.h | #ifndef HELPER_H
#define HELPER_H
/*Helper function for calculating ABSOLUTE maximum of two floats
Will return maximum absolute value (ignores sign) */
float helpFindMaxAbsFloat(float a, float b) {
float aAbs = abs(a);
float bAbs = abs(b);
if (aAbs > bAbs) {
return aAbs;
} else {
return bAbs;
}
}
//Helper ... | #ifndef HELPER_H
#define HELPER_H
/*Helper function for calculating ABSOLUTE maximum of two floats
Will return maximum absolute value (ignores sign) */
float helpFindMaxAbsFloat(float a, float b) {
float aAbs = abs(a);
float bAbs = abs(b);
if (aAbs > bAbs) {
return aAbs;
} else {
return bAbs;
}
}
//Helper ... | Fix helpFindSign (floats don't have signs....) | Fix helpFindSign (floats don't have signs....)
| C | mit | RMRobotics/FTC_5421_2014-2015,RMRobotics/FTC_5421_2014-2015 |
0d06b78d10a5648560158f958973f9e07edd194b | swap.c | swap.c | #include <stdio.h>
#define SWAP(x, y) { \
typeof (x) tmp = y; \
y = x; \
x = tmp; \
}
int main() {
int a = 1;
int b = 2;
SWAP(a, b);
printf("a: %d, b: %d\n", a, b);
return 0;
}
| #include <stdio.h>
#define SWAP(x, y) { \
typeof (x) tmp = y; \
y = x; \
x = tmp; \
}
int main() {
int a = 1;
int b = 2;
SWAP(a, b);
printf("a: %d, b: %d\n", a, b);
float arr[2] = {3.0, 4.0};
SWAP(arr[0], arr[1]);
printf("arr[0]: ... | Test we work with other, more complex types. | Test we work with other, more complex types.
| C | mit | Wilfred/comparative_macrology,Wilfred/comparative_macrology,Wilfred/comparative_macrology,Wilfred/comparative_macrology |
cf45dd1238806c0a9ff74043694f5d276efc7f4a | phase-01/main.c | phase-01/main.c | /**
* Phase 01 - Get a Window that works and can be closed.
*
* This code won't be structured very well, just trying to get stuff working.
*/
#include <stdlib.h>
int main(int argc, char *argv[])
{
return EXIT_SUCCESS;
}
| /**
* Phase 01 - Get a Window that works and can be closed.
*
* This code won't be structured very well, just trying to get stuff working.
*/
#include <stdlib.h>
#include <X11/Xlib.h>
int main(int argc, char *argv[])
{
Display *dpy = XOpenDisplay(NULL);
if (dpy == NULL) {
return EXIT_FAILURE;
}
XClos... | Create the display, free it at the end, exit with failure if the display doesn't open | Create the display, free it at the end, exit with failure if the display doesn't open
| C | mit | Faison/xlib-learning |
af533b7e864c9a3790abe2095110924cc374af3c | DocFormats/DFTypes.h | DocFormats/DFTypes.h | // Copyright 2012-2014 UX Productivity Pty 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 applicable law or ... | // Copyright 2012-2014 UX Productivity Pty 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 applicable law or ... | Disable warnings about insecure functions | Win32: Disable warnings about insecure functions
Set the _CRT_SECURE_NO_WARNINGS macro so that VC++ doesn't complain
about commonly-used functions like open and vsnprintf that it considers
"unsafe". The alternatives it suggests are not available on Unix-based
platforms, and they're used extensively throughout the code... | C | apache-2.0 | apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,apache/incubator-corinthia,corinthia/corinthia-docformats,apache/incubator-corinthia,corinthia/corinthia-docformats,corinthia/corinthia-docformats,corinthia/corinthia-docformats,apa... |
991fa7648b54c6d03bfe0d112a37d17dd2054d52 | test_utils/mock_queue.h | test_utils/mock_queue.h | #ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const ... | #ifndef TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#define TACHYON_TEST_UTILS_MOCK_QUEUE_H_
#include "gmock/gmock.h"
#include "lib/queue_interface.h"
namespace tachyon {
namespace testing {
// Mock class for queues.
template <class T>
class MockQueue : public QueueInterface<T> {
public:
MOCK_METHOD1_T(Enqueue, bool(const ... | Fix issue with mock method. | Fix issue with mock method.
| C | mit | djpetti/gaia,djpetti/gaia,djpetti/gaia |
21ae225c5b7e15ef2ea46608f8cb4d9b8777a9cf | test2/initialisation/struct/empty/init.c | test2/initialisation/struct/empty/init.c | // RUN: %layout_check %s
// RUN: %check %s
struct A
{
}; // CHEKC: /warning: empty struct/
struct Containter
{
struct A a;
};
struct Pre
{
int i;
struct A a;
int j;
};
struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/
struct Pre q = { 1, {}, 2 };
main()
{
struct ... | // RUN: %layout_check %s
// RUN: %check %s
struct A
{
}; // CHECK: /warning: empty struct/
struct Container
{
struct A a;
};
struct Pre
{
int i;
struct A a;
int j;
};
struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/
struct Pre q = { 1, {}, 2 };
main()
{
struct A... | Fix typo in empty struct test check | Fix typo in empty struct test check
| C | mit | 8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler,8l/ucc-c-compiler |
eebb04875392e162a7372d79b8eb2f72d9086d65 | src/gallium/targets/egl/pipe_i915.c | src/gallium/targets/egl/pipe_i915.c |
#include "target-helpers/inline_wrapper_sw_helper.h"
#include "target-helpers/inline_debug_helper.h"
#include "state_tracker/drm_driver.h"
#include "i915/drm/i915_drm_public.h"
#include "i915/i915_public.h"
static struct pipe_screen *
create_screen(int fd)
{
struct brw_winsys_screen *bws;
struct pipe_screen *sc... | Add missing egl pipe file | i915g: Add missing egl pipe file
| C | mit | benaadams/glsl-optimizer,adobe/glsl2agal,adobe/glsl2agal,wolf96/glsl-optimizer,mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,mcanthony/glsl-optimiz... | |
9e95e999cf87215b33d0b5b203b4a3cd0381a368 | verilog/tools/kythe/kythe_proto_output.h | verilog/tools/kythe/kythe_proto_output.h | // Copyright 2017-2020 The Verible Authors.
//
// 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 o... | // Copyright 2017-2020 The Verible Authors.
//
// 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 o... | Remove unnecessary default constructor from KytheProtoOutput | [kythe] Remove unnecessary default constructor from KytheProtoOutput
| C | apache-2.0 | chipsalliance/verible,chipsalliance/verible,chipsalliance/verible,chipsalliance/verible,chipsalliance/verible |
3a999bf6de5a6c4963f448c5498cd2c9c488d1a0 | temperature.c | temperature.c | // Copyright 2016, Jeffrey E. Bedard
#include "temperature.h"
#include "config.h"
#include "font.h"
#include "util.h"
#include <stdio.h>
#include <string.h>
// Returns x offset for next item
uint16_t draw_temp(xcb_connection_t * xc, const uint16_t offset)
{
const uint8_t v
= xstatus_system_value(XSTATUS_SYSFILE_TEMP... | // Copyright 2016, Jeffrey E. Bedard
#include "temperature.h"
#include "config.h"
#include "font.h"
#include "util.h"
#include <stdio.h>
static uint16_t get_offset(const uint16_t fw, const uint16_t offset,
const uint8_t len)
{
return fw * len + offset + XSTATUS_CONST_WIDE_PAD
+ XSTATUS_CONST_PAD;
}
// Returns x off... | Split out get_offset(). Eliminated unnecessary call to strlen(). | Split out get_offset(). Eliminated unnecessary call to strlen().
| C | mit | jefbed/xstatus,jefbed/xstatus,jefbed/xstatus,jefbed/xstatus |
1c0969525f2500603fbb9f2360fbda3439831003 | thingshub/CDZThingsHubErrorDomain.h | thingshub/CDZThingsHubErrorDomain.h | //
// CDZThingsHubErrorDomain.h
// thingshub
//
// Created by Chris Dzombak on 1/14/14.
// Copyright (c) 2014 Chris Dzombak. All rights reserved.
//
#import "CDZThingsHubApplication.h"
extern NSString * const kThingsHubErrorDomain;
typedef NS_ENUM(NSInteger, CDZErrorCode) {
CDZErrorCodeConfigurationValidatio... | //
// CDZThingsHubErrorDomain.h
// thingshub
//
// Created by Chris Dzombak on 1/14/14.
// Copyright (c) 2014 Chris Dzombak. All rights reserved.
//
#import "CDZThingsHubApplication.h"
extern NSString * const kThingsHubErrorDomain;
typedef NS_ENUM(NSInteger, CDZErrorCode) {
CDZErrorCodeTestError = 0,
CDZ... | Make error domain constants mirror app return codes | Make error domain constants mirror app return codes | C | mit | cdzombak/thingshub,cdzombak/thingshub,cdzombak/thingshub |
d01500c7ed2b6445d37176a05c911f25a299f38a | Pod/Classes/Private/IRLSizePrivate.h | Pod/Classes/Private/IRLSizePrivate.h | //
// IRLSizePrivate.h
// IRLSize
//
// Created by Jeff Kelley on 6/29/16.
// Copyright © 2016 Detroit Labs. All rights reserved.
//
#ifndef IRLSizePrivate_h
#define IRLSizePrivate_h
typedef float RawLengthMeasurement; // meters
typedef struct {
RawLengthMeasurement width;
RawLengthMeasurement height;
} ... | //
// IRLSizePrivate.h
// IRLSize
//
// Created by Jeff Kelley on 6/29/16.
// Copyright © 2016 Detroit Labs. All rights reserved.
//
#ifndef IRLSizePrivate_h
#define IRLSizePrivate_h
typedef float RawLengthMeasurement; // meters
typedef struct {
RawLengthMeasurement width;
RawLengthMeasurement height;
} ... | Use the class property instead of getter method | Use the class property instead of getter method | C | mit | detroit-labs/IRLSize,detroit-labs/IRLSize,detroit-labs/IRLSize |
ad18456cbcd2a498a259eaefa98d77263a5eebb5 | src/gdomdebug.c | src/gdomdebug.c | #include <gdomdebug.h>
#include <glib/gprintf.h>
static gboolean debug_enabled = FALSE;
void
gdom_debug (char const *format, ...)
{
va_list args;
if (!debug_enabled)
return;
va_start (args, format);
g_vprintf (format, args);
g_printf ("\n");
va_end (args);
}
void
gdom_debug_enable (void)
{
debug_enabled =... | #include <gdomdebug.h>
#include <glib/gprintf.h>
#include <stdlib.h>
static gboolean debug_checked = FALSE;
static gboolean debug_enabled = FALSE;
static gboolean
_is_debug_enabled ()
{
const char *debug_var;
if (debug_checked)
return debug_enabled;
debug_var = g_getenv ("GMATHML_DEBUG");
debug_enabled = deb... | Allow debug messages using GMATHML_DEBUG environment variable. | [debug] Allow debug messages using GMATHML_DEBUG environment variable.
| C | lgpl-2.1 | wavewave/lasem,gjtorikian/lasem,janmarthedal/mathml2svg,wavewave/lasem,gjtorikian/lasem,wavewave/lasem,janmarthedal/mathml2svg,wavewave/lasem,gjtorikian/lasem,janmarthedal/mathml2svg,gjtorikian/lasem,janmarthedal/mathml2svg |
7cc016a29a41f110f50f7863e184afef85185aa5 | tests/test-static-link-gen.c | tests/test-static-link-gen.c | /* libunwind - a platform-independent unwind library
Copyright (C) 2004 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
Copyright (c) 2003 Hewlett-Packard Co.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software a... | Clean it up so it compiles cleanly and works for REMOTE_ONLY case. | (test_generic): Clean it up so it compiles cleanly and works for
REMOTE_ONLY case.
(Logical change 1.158)
| C | mit | ehsan/libunwind,yuyichao/libunwind,vtjnash/libunwind,Chilledheart/libunwind,olibc/libunwind,lat/libunwind,vegard/libunwind,adsharma/libunwind,unkadoug/libunwind,djwatson/libunwind,cloudius-systems/libunwind,adsharma/libunwind,libunwind/libunwind,jrmuizel/libunwind,mpercy/libunwind,geekboxzone/lollipop_external_libunwin... | |
982c1323303be930ecafb072c7075de0319dd48c | src/starlight.h | src/starlight.h | #pragma once
#include <string>
#if 0
int Stricmp(const char* str1, const char* str2) {
int d;
while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) {
str1++;
str2++;
}
return d;
}
int Strnicmp(const char* str1, const char* str2, int count) {
int d = 0;
while (count > 0 && (d = toupper(*str2) - toupper... | #pragma once
#include <string>
#if 0
int Stricmp(const char* str1, const char* str2) {
int d;
while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) {
str1++;
str2++;
}
return d;
}
int Strnicmp(const char* str1, const char* str2, int count) {
int d = 0;
while (count > 0 && (d = toupper(*str2) - toupper... | Add space between date and time | Add space between date and time
| C | mit | darkedge/starlight,darkedge/starlight,darkedge/starlight |
d9ee51a1ce04dfe0db1f89c34aa21ebc408ad869 | input.c | input.c | #include "input.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void read_line(char *p)
{
if (fgets(p, MAX_SIZE, stdin) == NULL){
p[0] = '\0';
return;
}
remove_space(p);
}
int is_exit(const char* p)
{
const char* exit_words[] = {
"exit",
"quit",
};
... | #include "input.h"
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void read_line(char *p)
{
if (fgets(p, MAX_SIZE, stdin) == NULL){
p[0] = '\0';
return;
}
remove_space(p);
}
int is_exit(const char* p)
{
const char* exit_words[] = {
"exit",
"quit",
"b... | Add bye to exit words | Add bye to exit words
| C | mit | Roadagain/Calculator,Roadagain/Calculator |
0872c7be8541e059241d0bbe89a442a8c4b90215 | Include/genobject.h | Include/genobject.h |
/* Generator object interface */
#ifndef Py_LIMITED_API
#ifndef Py_GENOBJECT_H
#define Py_GENOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
struct _frame; /* Avoid including frameobject.h */
typedef struct {
PyObject_HEAD
/* The gi_ prefix is intended to remind of generator-iterator. */
/* Note: gi_fr... |
/* Generator object interface */
#ifndef Py_LIMITED_API
#ifndef Py_GENOBJECT_H
#define Py_GENOBJECT_H
#ifdef __cplusplus
extern "C" {
#endif
struct _frame; /* Avoid including frameobject.h */
typedef struct {
PyObject_HEAD
/* The gi_ prefix is intended to remind of generator-iterator. */
/* Note: gi_fr... | Fix regression after c8d1df9ac987 (PPC buildbot) | Fix regression after c8d1df9ac987
(PPC buildbot)
| C | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator |
c2475f236c7da439da5acc27114a92ae9ffe5ef4 | LYCategory/Classes/_UIKit/UIColor+Speed.h | LYCategory/Classes/_UIKit/UIColor+Speed.h | //
// UIColor+Speed.h
// LYCategory
//
// CREATED BY LUO YU ON 26/10/2016.
// COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <UIKit/UIKit.h>
@interface UIColor (Speed)
- (UIColor *)colorWithR:(CGFloat)redValue G:(CGFloat)greenValue B:(CGFloat)blueValue;
@end
| //
// UIColor+Speed.h
// LYCategory
//
// CREATED BY LUO YU ON 26/10/2016.
// COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <UIKit/UIKit.h>
@interface UIColor (Speed)
/**
generate color object with red-green-blue values
@param redValue red color value, 0~255
@param greenValue green color value, 0~... | Modify : doc for color | Modify : doc for color
| C | mit | blodely/LYCategory,blodely/LYCategory,blodely/LYCategory,blodely/LYCategory |
a2a0e6f33f8b84f80a558c382214378fa156ecee | findbarcode.c | findbarcode.c | #include <stdio.h>
#include "stb_image.c"
#define FILENAME "wikipedia_barcode.png"
int main(int argc, char **argv)
{
int width, height, bytes_per_pixel;
unsigned char *data = stbi_load(FILENAME, &width, &height, &bytes_per_pixel, STBI_default);
if (data) {
// Run through every pixel and print its greyscal... | #include <stdio.h>
#include "stb_image.c"
#define FILENAME "wikipedia_barcode.png"
int main(int argc, char **argv)
{
int width, height, bytes_per_pixel;
unsigned char *data = stbi_load(FILENAME, &width, &height, &bytes_per_pixel, STBI_default);
if (data) {
// Run through every pixel and print its greyscal... | Print grey pixel value as unsigned | Print grey pixel value as unsigned
| C | mit | jakeboxer/findbarcode |
2c1b1a2343f5882ee6f98328ff391478d0d58c23 | src/3rdparty/win32_src/pdcurses/wincon/pdcwin.h | src/3rdparty/win32_src/pdcurses/wincon/pdcwin.h | /* PDCurses */
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(PDC_WIDE) && !defined(... | /* PDCurses */
#ifndef __PDC_WIN_H__
#define __PDC_WIN_H__
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */
#endif
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings ... | Add include guard to fix wincon compile. | Add include guard to fix wincon compile.
| C | bsd-3-clause | clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube,clangen/musikcube |
0f034d699c77ae4c7c989bf41405ff1b433e37ca | core/base/inc/LinkDef.h | core/base/inc/LinkDef.h | #include "core/base/inc/LinkDef1.h"
#include "core/base/inc/LinkDef2.h"
#include "core/base/inc/LinkDef3.h"
#include "core/clib/inc/LinkDef.h"
#include "core/cont/inc/LinkDef.h"
#include "core/meta/inc/LinkDef.h"
#include "core/metautils/inc/LinkDef.h"
#include "core/textinput/inc/LinkDef.h"
#include "core/zip/inc/Link... | #include "core/base/inc/LinkDef1.h"
#include "core/base/inc/LinkDef2.h"
#include "core/base/inc/LinkDef3.h"
#include "core/clib/inc/LinkDef.h"
#include "core/cont/inc/LinkDef.h"
#include "core/meta/inc/LinkDef.h"
#include "core/metautils/inc/LinkDef.h"
#include "core/textinput/inc/LinkDef.h"
#include "core/zip/inc/Link... | Verify that one of SYSTEM_TYPE_... is set. | Verify that one of SYSTEM_TYPE_... is set.
| C | lgpl-2.1 | agarciamontoro/root,abhinavmoudgil95/root,abhinavmoudgil95/root,buuck/root,beniz/root,BerserkerTroll/root,BerserkerTroll/root,beniz/root,beniz/root,davidlt/root,simonpf/root,agarciamontoro/root,gganis/root,davidlt/root,karies/root,olifre/root,zzxuanyuan/root-compressor-dummy,simonpf/root,gbitzes/root,BerserkerTroll/roo... |
c28b765893ed505ac62864c9d4ce67cd4f9b9fc0 | include/bl2/bl2.h | include/bl2/bl2.h | /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef BL2_H__
#define BL2_H__
struct entry_point_info;
void bl2_main(void);
struct entry_point_info *bl2_load_images(void);
#endif /* BL2_H__ */
| /*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef BL2_H__
#define BL2_H__
void bl2_main(void);
#endif /* BL2_H__ */
| Fix MISRA rule 8.5 in common code | Fix MISRA rule 8.5 in common code
Rule 8.5: An external object or function shall be declared
once in one and only one file.
Change-Id: I7c3d4ec7d3ba763fdb4600008ba10b4b93ecdfce
Signed-off-by: Roberto Vargas <d75e640c49defb97bd074f828210df57ed181e1f@arm.com>
| C | bsd-3-clause | achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware |
4575d0a769a4b85012bd82f328038a80555917bd | config.h | config.h | #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT \
11122
#define LISTEN_BACKLOG \
40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE \
256
/* Linux specific configs */
#define MAX_EPOLL_EVENTS \
100
#endif
| #ifndef CJET_CONFIG_H
#define CJET_CONFIG_H
#define SERVER_PORT \
11122
#define LISTEN_BACKLOG \
40
/*
* It is somehow beneficial if this size is 32 bit aligned.
*/
#define MAX_MESSAGE_SIZE \
512
/* Linux specific configs */
#define MAX_EPOLL_EVENTS \
100
#endif
| Increase read and write buffer size per peer. | Increase read and write buffer size per peer.
| C | mit | mloy/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet,mloy/cjet,mloy/cjet,gatzka/cjet,gatzka/cjet |
04c226aab970da86fc9f59ec3a808cf916458261 | test/CodeGen/arm-neon-fma.c | test/CodeGen/arm-neon-fma.c | // REQUIRES: arm-registered-target
// RUN: %clang -target thumbv7-none-linux-gnueabihf \
// RUN: -mcpu=cortex-a8 -mfloat-abi=hard \
// RUN: -O3 -S -emit-llvm -o - %s | FileCheck %s
#include <arm_neon.h>
float32x2_t test_fma_order(float32x2_t accum, float32x2_t lhs, float32x2_t rhs) {
return vfma_f32(accum, lhs,... | // REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple thumbv7-none-linux-gnueabihf \
// RUN: -target-abi aapcs \
// RUN: -target-cpu cortex-a8 \
// RUN: -mfloat-abi hard \
// RUN: -ffreestanding \
// RUN: -O3 -S -emit-llvm -o - %s | FileCheck %s
#include <arm_neon.h>
float32x2_t test_fma_order(float... | Fix recent test for more diverse environments. | Fix recent test for more diverse environments.
I think the main issue was the lack of -ffreestanding, which pulled in
the host's stdint.h. After that things went rapidly downhill.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@172653 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/cl... |
b288888c9a5546844c146d8b7161d24ebbd7c7f7 | tests/testutils.h | tests/testutils.h | #ifndef _TESTUTILS_H
#define _TESTUTILS_H
/*
* tslib/tests/testutils.h
*
* Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org>
*
* This file is placed under the LGPL.
*
*
* Misc utils for ts test programs
*/
#define RESET "\033[0m"
#define RED "\033[31m"
#define GREEN "\033[32m"
#define B... | #ifndef _TESTUTILS_H
#define _TESTUTILS_H
/*
* tslib/tests/testutils.h
*
* Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org>
*
* This file is placed under the GPL.
*
* SPDX-License-Identifier: GPL-2.0+
*
*
* Misc utils for ts test programs
*/
#define RESET "\033[0m"
#define RED "\033[31... | Fix license statement in header comment and add SPDS identifier | tests: Fix license statement in header comment and add SPDS identifier
This file had been copied around a long time ago, and included a wrong
license. All files in the tests directory (except for this small header)
are GPL licensed.
I actually doubt that the copyright notice is accurate here -.-
Signed-off-by: Marti... | C | lgpl-2.1 | kergoth/tslib,kergoth/tslib,kergoth/tslib,kergoth/tslib |
b1e1910a974865a362546d7d4bee35becb69b5e2 | src/condor_syscall_lib/scanner.h | src/condor_syscall_lib/scanner.h | #define FUNC 1
#define PARAM 2
#define PTR_PARAM 3
struct token {
int tok_type;
char *val;
};
struct node {
int node_type;
char *type_name;
char *id;
int is_ptr;
int is_const;
int is_mapped;
int is_array;
int extract;
struct node *next;
struct node *prev;
};
union yystype {
struct token tok;
... | #define FUNC 1
#define PARAM 2
#define PTR_PARAM 3
struct token {
int tok_type;
char *val;
};
struct node {
int node_type;
char *type_name;
char *id;
int is_ptr;
int is_const;
int is_const_ptr;
int is_mapped;
int is_array;
int in_param;
int out_param;
int extract;
struct node *next;
struct ... | Add boolean type so yacc productions can return a boolean value. Add parameter mode type so we can tag parameters as IN, OUT, or BOTH. | Add boolean type so yacc productions can return a boolean value.
Add parameter mode type so we can tag parameters as IN, OUT, or BOTH.
| C | apache-2.0 | htcondor/htcondor,djw8605/condor,htcondor/htcondor,htcondor/htcondor,djw8605/condor,bbockelm/condor-network-accounting,neurodebian/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,djw8605/condor,neurodebian/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,bbockelm/... |
894bbab6314e85b5bdc5b03b97d8561fbe8545a7 | test/CodeGen/PR2001-bitfield-reload.c | test/CodeGen/PR2001-bitfield-reload.c | // RUN: clang --emit-llvm-bc -o - %s | opt --std-compile-opts | llvm-dis > %t &&
// RUN: grep "ret i32" %t | count 1 &&
// RUN: grep "ret i32 1" %t | count 1
// PR2001
/* Test that the result of the assignment properly uses the value *in
the bitfield* as opposed to the RHS. */
static int foo(int i) {
struct {
... | Add test case for PR2001. | Add test case for PR2001.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@54352 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl... | |
e501b91a4a8f680ed453a6ad372f07d0836ab42b | Core/Code/Testing/mitkRenderingTestHelper.h | Core/Code/Testing/mitkRenderingTestHelper.h | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Inf... | /*=========================================================================
Program: Medical Imaging & Interaction Toolkit
Language: C++
Date: $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
Version: $Revision: 21985 $
Copyright (c) German Cancer Research Center, Division of Medical and
Biological Inf... | Fix linker warnings in rendering tests | Fix linker warnings in rendering tests
| C | bsd-3-clause | nocnokneo/MITK,danielknorr/MITK,iwegner/MITK,NifTK/MITK,danielknorr/MITK,danielknorr/MITK,NifTK/MITK,lsanzdiaz/MITK-BiiG,MITK/MITK,nocnokneo/MITK,rfloca/MITK,fmilano/mitk,fmilano/mitk,lsanzdiaz/MITK-BiiG,rfloca/MITK,MITK/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,lsanzdiaz/MITK-BiiG,iwegner/MITK,MITK/MITK,NifTK/MITK,danielk... |
3cd04e32a8cd9497bd2882d7767e40ae9a936e24 | test/sanitizer_common/print_address.h | test/sanitizer_common/print_address.h | #include <stdio.h>
#include <stdarg.h>
void print_address(const char *str, int n, ...) {
fprintf(stderr, "%s", str);
va_list ap;
va_start(ap, n);
while (n--) {
void *p = va_arg(ap, void *);
#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
// On FreeBSD, the %p conversion specif... | #include <stdio.h>
#include <stdarg.h>
void print_address(const char *str, int n, ...) {
fprintf(stderr, "%s", str);
va_list ap;
va_start(ap, n);
while (n--) {
void *p = va_arg(ap, void *);
#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
// On FreeBSD, the %p conversion specif... | Use 0-padding for i386 and arm print format specifiers | Use 0-padding for i386 and arm print format specifiers
Summary:
This is used for the other architectures in print_address, but is
missing from i386 and arm.
Reviewers: m.ostapenko, spetrovic
Subscribers: aemerson, rengolin, llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D31977
git-svn-id:... | C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
3fff79f7dd1d8821a2d6c730f2aff3f994a15558 | crypto/s2n_hkdf.h | crypto/s2n_hkdf.h | /*
* Copyright 2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... | /*
* Copyright 2016 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" ... | Add missing header changes from previous commit | Add missing header changes from previous commit
| C | apache-2.0 | wcs1only/s2n,awslabs/s2n,gibson-compsci/s2n,PKRoma/s2n,awslabs/s2n,PKRoma/s2n,colmmacc/s2n,alexeblee/s2n,raycoll/s2n,raycoll/s2n,wcs1only/s2n,PKRoma/s2n,alexeblee/s2n,gibson-compsci/s2n,wcs1only/s2n,colmmacc/s2n,raycoll/s2n,wcs1only/s2n,colmmacc/s2n,wcs1only/s2n,awslabs/s2n,raycoll/s2n,PKRoma/s2n,PKRoma/s2n,alexeblee/s... |
412865c8ea9f94a487d9887360b8adb6032e6a80 | test/Profile/profile-does-not-exist.c | test/Profile/profile-does-not-exist.c | // RUN: not %clang_cc1 -emit-llvm %s -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s
// CHECK: error: Could not read profile:
// CHECK-NOT: Assertion failed
| // RUN: not %clang_cc1 -emit-llvm %s -o - -fprofile-instr-use=%t.nonexistent.profdata 2>&1 | FileCheck %s
// CHECK: error: Could not read profile:
// CHECK-NOT: Assertion failed
| Fix this test so it doesn't try to open a file to write to the source tree | Fix this test so it doesn't try to open a file to write to the source tree
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@234173 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... |
75488d5639819f31b01f76433b82d6259323230d | unix-cpy/mpconfigport.h | unix-cpy/mpconfigport.h | // options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_ENABLE_FLOAT (1)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsigned long machine_uint_t... | // options to control how Micro Python is built
#define MICROPY_EMIT_CPYTHON (1)
#define MICROPY_ENABLE_LEXER_UNIX (1)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
// type definitions for the specific machine
#ifdef __LP64__
typedef long machine_int_t; // must be pointer size
typedef unsi... | Switch to use MICROPY_FLOAT_IMPL config define. | unix-cpy: Switch to use MICROPY_FLOAT_IMPL config define.
| C | mit | micropython/micropython-esp32,SHA2017-badge/micropython-esp32,torwag/micropython,AriZuu/micropython,xhat/micropython,utopiaprince/micropython,AriZuu/micropython,ahotam/micropython,heisewangluo/micropython,firstval/micropython,hiway/micropython,cloudformdesign/micropython,mianos/micropython,kostyll/micropython,Timmenem/... |
1a3c1576138400b28ca7093a842dc7d044d5892b | MKFirebaseObjectMapping/Classes/MKFirebaseModel.h | MKFirebaseObjectMapping/Classes/MKFirebaseModel.h | //
// Created by Michael Kuck on 7/7/16.
// Copyright (c) 2016 Michael Kuck. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FIRDatabaseReference;
@class FIRDataSnapshot;
//============================================================
//== Public Interface
//=================... | //
// Created by Michael Kuck on 7/7/16.
// Copyright (c) 2016 Michael Kuck. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class FIRDatabaseReference;
@class FIRDataSnapshot;
//============================================================
//== Public Interface
//=================... | Add `isEqualToFirebaseModel:` to public header | Add `isEqualToFirebaseModel:` to public header
| C | mit | mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping,mikumi/MKFirebaseObjectMapping |
8e1f636ced4380a559aaf8eb14cae88442fc15c1 | lib/Solenoid/Solenoid.h | lib/Solenoid/Solenoid.h | /****************************************************************************
* Copyright 2016 BlueMasters
*
* 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... | /****************************************************************************
* Copyright 2016 BlueMasters
*
* 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... | Put states inside the class | Put states inside the class
| C | apache-2.0 | BlueMasters/arduino-wolves,BlueMasters/arduino-wolves,BlueMasters/arduino-wolves |
34ac8717bf58b13a6c2b8743e57506255434d731 | src/Developer/ImageFilterMultipleOutputs.h | src/Developer/ImageFilterMultipleOutputs.h | #ifndef __itkImageFilterMultipleOutputs_h
#define __itkImageFilterMultipleOutputs_h
#include "itkImageToImageFilter.h"
namespace itk
{
template <class TImage>
class ImageFilterMultipleOutputs : public ImageToImageFilter<TImage, TImage>
{
public:
/** Standard class type alias. */
using Self = ImageFilterMultipleOu... | #ifndef __itkImageFilterMultipleOutputs_h
#define __itkImageFilterMultipleOutputs_h
#include "itkImageToImageFilter.h"
namespace itk
{
template <class TImage>
class ImageFilterMultipleOutputs : public ImageToImageFilter<TImage, TImage>
{
public:
/** Standard class type alias. */
using Self = ImageFilterMultipleOu... | Remove redundant void argument lists | STYLE: Remove redundant void argument lists
Find and remove redundant void argument lists.
| C | apache-2.0 | InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples,InsightSoftwareConsortium/ITKExamples |
fdeab35e4997c16515efea32d97845786d373990 | tests/test_utilities.h | tests/test_utilities.h | #pragma once
#include <string>
#include <sstream>
#include <Eigen/Dense>
std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) {
std::stringstream ss;
ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl;
return ss.str();
}
| #pragma once
#include <string>
#include <sstream>
#include <Eigen/Dense>
std::string output_matrices(Eigen::MatrixXd expected, Eigen::MatrixXd actual) {
std::stringstream ss;
ss << "expected:\n" << expected << "\nactual:\n" << actual << std::endl;
return ss.str();
}
/*
* allclose() function to match nump... | Add allclose function for testing | Add allclose function for testing
Compare relative and absolute tolerence of matrix elements. Eigen
isApprox() functions compare matrix norms.
| C | bsd-2-clause | oliverlee/bicycle,oliverlee/bicycle |
01167b09c4f76073a9846cf5bfe745350e8fca5a | example/ex-defer01.c | example/ex-defer01.c | #include "m-core.h"
// Stubs defined for the example. Real code will use soundio library.
struct SoundIo { int x; };
struct SoundIoDevice { int x; };
struct SoundIoOutStream { int x; };
static struct SoundIo *soundio_create(void) { return (struct SoundIo *) malloc(sizeof(struct SoundIo)); }
static void soundio_destro... | Add an example of M_LET_IF | Add an example of M_LET_IF
| C | bsd-2-clause | P-p-H-d/mlib,P-p-H-d/mlib | |
4282ccf09f23c582b16cdc4570de238ac959a2dd | firmware/MDNS.h | firmware/MDNS.h | #include "application.h"
#ifndef _INCL_MDNS
#define _INCL_MDNS
#include "Buffer.h"
#include "Label.h"
#include "Record.h"
#include <map>
#include <vector>
#define MDNS_PORT 5353
#define BUFFER_SIZE 512
#define HOSTNAME ""
class MDNS {
public:
bool setHostname(String hostname);
bool addService(String protocol... | #include "application.h"
#ifndef _INCL_MDNS
#define _INCL_MDNS
#include "Buffer.h"
#include "Label.h"
#include "Record.h"
#include <map>
#include <vector>
#define MDNS_PORT 5353
#define BUFFER_SIZE 512
#define HOSTNAME ""
class MDNS {
public:
bool setHostname(String hostname);
bool addService(String protocol... | Fix for particle firmware v0.6.2 | Fix for particle firmware v0.6.2 | C | mit | mrhornsby/spark-core-mdns,mrhornsby/spark-core-mdns |
3cfe2d2e5b57ff33d4febcb0668d1d71fce2dd21 | acacia_tests.c | acacia_tests.c | #include <string.h>
#include "lib/minunit.h"
#include "acacia.h"
//#define TEST_KEY "abcd1111"
#define TEST_KEY "abcdefghijklmnopqrstuvwxyz"
#define TEST_VALUE "foo_bar_baz_111"
MU_TEST(test_check) {
struct Node *cache = cache_init();
cache_set(TEST_KEY, TEST_VALUE, cache);
mu_check(strcmp(cache_get(TEST_KEY, cac... | #include <string.h>
#include "lib/minunit.h"
#include "acacia.h"
#define TEST_KEY "abcdefghijklmnopqrstuvwxyz"
#define TEST_VALUE "foo_bar_baz_111"
MU_TEST(test_store_fetch_simple) {
struct Node *cache = cache_init();
cache_set(TEST_KEY, TEST_VALUE, cache);
mu_check(strcmp(cache_get(TEST_KEY, cache), TEST_VALUE) ... | Add a test for caching an empty string | Add a test for caching an empty string
| C | mit | zedr/acacia |
3a04ce29a2d92f58ab07f83f4970c544e4afdf00 | testsuite/tests/rts/exec_signals_prepare.c | testsuite/tests/rts/exec_signals_prepare.c | #include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
// Invokes a process, making sure that the state of the signal
// handlers has all been set back to the unix default.
int main(int argc, char **argv)
{
int i;
sigset_t blockedsigs;
struct sigaction action;
// unblock all sig... | #include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
// Invokes a process, making sure that the state of the signal
// handlers has all been set back to the unix default.
int main(int argc, char **argv)
{
int i;
sigset_t blockedsigs;
struct sigaction action;
... | Fix below warning by including "unistd.h" also | Fix below warning by including "unistd.h" also
exec_signals_prepare.c:26:5: warning: implicit declaration of function 'execv' is invalid in C99
[-Wimplicit-function-declaration]
execv(argv[1], argv+1);
^
1 warning generated.
| C | bsd-3-clause | vTurbine/ghc,sdiehl/ghc,vTurbine/ghc,GaloisInc/halvm-ghc,nathyong/microghc-ghc,ryantm/ghc,urbanslug/ghc,jstolarek/ghc,sdiehl/ghc,TomMD/ghc,vTurbine/ghc,TomMD/ghc,snoyberg/ghc,sdiehl/ghc,spacekitteh/smcghc,jstolarek/ghc,jstolarek/ghc,ezyang/ghc,snoyberg/ghc,mcschroeder/ghc,lukexi/ghc,acowley/ghc,elieux/ghc,christiaanb/g... |
c1e92e075a259543719f7410290aeaffefe783b2 | include/Map.h | include/Map.h | #ifndef LAND_H
#define LAND_H
#include <string>
#include "Plant.h"
class Land
{
public:
~Land();
const std::string getPlantName() const { return isStood_? plant_->getName() : "Empty"; }
bool put(Plant & plant);
bool getStood()const{return isStood_;}
private:
Plant * plant_ = nullptr;
bool isStood... | #ifndef LAND_H
#define LAND_H
#include <string>
#include "Plant.h"
class Land
{
public:
~Land();
bool put(Plant & plant);
bool getStood()const{return isStood_;}
Plant & getPlant() { return *plant_; }
const Plant & getPlant() const { return *plant_; }
private:
Plant * plant_ = nullptr;
bool isStood_ =... | Remove getPlantName metohod & Add getPlant mathod | Remove getPlantName metohod & Add getPlant mathod
| C | mit | wi1d5ky/AP-Team-Project |
b3f4c5d49830a8ef77ec1d74e8100fe3cc561230 | include/api/ofp_odp_compat.h | include/api/ofp_odp_compat.h | /* Copyright (c) 2015, ENEA Software AB
* Copyright (c) 2015, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OFP_ODP_COMPAT__
#define __OFP_ODP_COMPAT__
#if ODP_VERSION == 102
#include "linux.h"
#else
#include "odp/helper/linux.h"
#endif /* odp_version == 102 */
#if ODP_... | /* Copyright (c) 2015, ENEA Software AB
* Copyright (c) 2015, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef __OFP_ODP_COMPAT__
#define __OFP_ODP_COMPAT__
#if ODP_VERSION == 102
#include "linux.h"
#else
#include "odp/helper/linux.h"
#endif /* odp_version == 102 */
#if ODP_... | Define ODP_THREAD_WORKER and ODP_THREAD_CONTROL as in it's original enum, instead of mangling them. | Define ODP_THREAD_WORKER and ODP_THREAD_CONTROL as in it's original enum, instead of mangling them.
Defining odp_init_local like this we can initialized properly the
values of ODP_THREAD_WORKER and ODP_THREAD_CONTROL. This is important
for the following patch where we need to define odp_threat_type_t.
Signed-off-by: ... | C | bsd-3-clause | OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,TolikH/ofp,TolikH/ofp,OpenFastPath/ofp,TolikH/ofp |
00126c32c776459b75e5d2bfaba28bd261c1510a | h5py/api_compat.h | h5py/api_compat.h | /***** Preamble block *********************************************************
*
* This file is part of h5py, a Python interface to the HDF5 library.
*
* http://www.h5py.org
*
* Copyright 2008-2013 Andrew Collette and contributors
*
* License: Standard 3-clause BSD; see "license.txt" for full license terms
* ... | /***** Preamble block *********************************************************
*
* This file is part of h5py, a Python interface to the HDF5 library.
*
* http://www.h5py.org
*
* Copyright 2008-2013 Andrew Collette and contributors
*
* License: Standard 3-clause BSD; see "license.txt" for full license terms
* ... | Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py. | Add conditional definition of PyMPI_MPI_Message and MPI_Message PyMPI_MPI_Message. This is needed for MPI_VERSION<3 and a recent version of mpi4py.
Follows gh-401 https://groups.google.com/d/topic/h5py/Uw5x3BKwJGU/discussion and https://groups.google.com/d/topic/mpi4py/xnDyYvawB-Q/discussion.
| C | bsd-3-clause | h5py/h5py,h5py/h5py,h5py/h5py |
7a79b1da0c124fb642658c3698a38fdd9e77eb01 | libc/string/strlcpy.c | libc/string/strlcpy.c | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(strlcpy, strxfrm)
#endif
#undef L_... | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(__strlcpy, __strxfrm)
strong_alias(... | Use correct syntax, correct weak/strong for [__]strxfrm | Use correct syntax, correct weak/strong for [__]strxfrm
| C | lgpl-2.1 | hjl-tools/uClibc,klee/klee-uclibc,ChickenRunjyd/klee-uclibc,kraj/uClibc,kraj/uclibc-ng,gittup/uClibc,groundwater/uClibc,waweber/uclibc-clang,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,ndmsystems/uClibc,mephi42/uClibc,waweber/uclibc-clang,majek/uclibc-vx32,hjl-tools/uClibc,waweber/uclibc-clang,kraj/uclibc-ng,atgreen/u... |
3b4851ccd8e04b2db4127ced955cbfecb1e99786 | libc/string/strlcpy.c | libc/string/strlcpy.c | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(strlcpy, strxfrm)
#endif
#undef L_... | /*
* Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
*
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
#define L_strlcpy
#define Wstrlcpy __strlcpy
#include "wstring.c"
strong_alias(__strlcpy, strlcpy)
#ifdef __LOCALE_C_ONLY
weak_alias(__strlcpy, __strxfrm)
strong_alias(... | Use correct syntax, correct weak/strong for [__]strxfrm | Use correct syntax, correct weak/strong for [__]strxfrm
| C | lgpl-2.1 | joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc,joel-porquet/tsar-uclibc |
e44bcd18b20baba5fa95000415440f83c36a9599 | libk/src/hook/fcntl.c | libk/src/hook/fcntl.c | #include <fcntl.h>
#include <k/sys.h>
int open(const char *path, int oflag, ...) {
return MAKE_SYSCALL(open, path, oflag);
}
int fcntl(int fildes, int cmd, ...) {
//FIXME for bash
return MAKE_SYSCALL(unimplemented, "fcntl", false);
}
| #include <fcntl.h>
#include <stdarg.h>
#include <k/sys.h>
int open(const char *path, int oflag, ...) {
int mode = 0;
if(oflag & O_CREAT) {
va_list va;
va_start(va, oflag);
mode = va_arg(va, int);
va_end(va);
}
return MAKE_SYSCALL(open, path, oflag, mode);
}
int fcntl(in... | Fix open() syscall in libk | Fix open() syscall in libk
| C | bsd-2-clause | escortkeel/k-os,escortkeel/k-os,escortkeel/k-os |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.