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
70beeb5a61cbf12a59000c8fd1e56c638e3a6aa4
src/hardware_dep/dpdk/data_plane/dpdkx_hash.c
src/hardware_dep/dpdk/data_plane/dpdkx_hash.c
// SPDX-License-Identifier: Apache-2.0 // Copyright 2021 Eotvos Lorand University, Budapest, Hungary #include "dpdk_model_v1model.h" #include "util_packet.h" #include "util_debug.h" #include "dpdk_lib.h" #include "stateful_memory.h" #include <rte_ip.h> void hash(uint16_t* result, enum_HashAlgorithm_t hash, uint16_t...
// SPDX-License-Identifier: Apache-2.0 // Copyright 2021 Eotvos Lorand University, Budapest, Hungary #include "dpdk_model_v1model.h" #include "util_packet.h" #include "util_debug.h" #include "dpdk_lib.h" #include "stateful_memory.h" #include "rte_hash_crc.h" #include <rte_ip.h> void hash(uint16_t* result, enum_Has...
Add crc32 and identity hash functions
Add crc32 and identity hash functions
C
apache-2.0
P4ELTE/t4p4s,P4ELTE/t4p4s,P4ELTE/t4p4s
fd5beb9c4c2d17aecd6ef51810b447c22580b187
Josh_Zane_Sebastian/src/interpreter/interpreter.c
Josh_Zane_Sebastian/src/interpreter/interpreter.c
#include <stdlib.h> #include <stdio.h> #include <string.h> void runStep(struct stack_node node, struct stack_node *top) { switch( node.data.type ) { case 0: struct stack_node push; push.cdr = top; push.data = node.data; *top = push; break; } }
Add support for pushing ints to the stack.
Add support for pushing ints to the stack.
C
mit
aacoppa/final,aacoppa/final
5609a9640f7c76ebd9374f0d8bc24417314d94d2
c/src/base/ByteProducer.c
c/src/base/ByteProducer.c
#include "ByteProducer.h" static void _start (struct ByteProducerInternal *self, struct ByteListenerInternal *listener) { ByteProducer *producer = (ByteProducer *) self; producer->start (producer, (ByteListener *) listener); } static void _stop (struct ByteProducerInternal *self) { ByteProducer *producer = (Byte...
Add a factory for Producer<Byte>
Add a factory for Producer<Byte>
C
mit
artfuldev/RIoT
128380f9f4693249367c5b34ea67507fd2e822c5
src/ext/mruby_UI_control_hierarchy.c
src/ext/mruby_UI_control_hierarchy.c
{ struct RClass *Control_class = mrb_define_class_under(mrb, UI_module(mrb), "Control", mrb->object_class); #define CONTROL_SUBCLASS(name) { struct RClass* subclass = mrb_define_class_under(mrb, UI_module(mrb), #name, Control_class); } CONTROL_SUBCLASS(Area) CONTROL_SUBCLASS(Box) CONTROL_SUBCLASS(Button) CONT...
{ struct RClass *Control_class = mrb_define_class_under(mrb, UI_module(mrb), "Control", mrb->object_class); #define CONTROL_SUBCLASS(name) { mrb_define_class_under(mrb, UI_module(mrb), #name, Control_class); } CONTROL_SUBCLASS(Area) CONTROL_SUBCLASS(Box) CONTROL_SUBCLASS(Button) CONTROL_SUBCLASS(Checkbox) C...
Address compiler warning - unused variable
Address compiler warning - unused variable
C
mit
jbreeden/mruby-ui,jbreeden/mruby-ui,jbreeden/mruby-ui
7bc887f8c78d37decdb91612decd7dfd463c9727
UIColor-Expanded.h
UIColor-Expanded.h
#import <UIKit/UIKit.h> #define SUPPORTS_UNDOCUMENTED_API 1 @interface UIColor (expanded) - (CGColorSpaceModel) colorSpaceModel; - (NSString *) colorSpaceString; - (BOOL) canProvideRGBComponents; - (NSArray *) arrayFromRGBAComponents; - (CGFloat) red; - (CGFloat) blue; - (CGFloat) green; - (CGFloat) alpha; - (NSStr...
#import <UIKit/UIKit.h> #define SUPPORTS_UNDOCUMENTED_API 1 @interface UIColor (expanded) - (CGColorSpaceModel) colorSpaceModel; - (NSString *) colorSpaceString; - (BOOL) canProvideRGBComponents; - (NSArray *) arrayFromRGBAComponents; - (CGFloat) red; - (CGFloat) blue; - (CGFloat) green; - (CGFloat) alpha; - (NSStr...
Declare the properties as nonatomic
Declare the properties as nonatomic
C
bsd-3-clause
fcanas/uicolor-utilities
12dea43b35daf92a6087f3a980aff767ac0b7043
base/win/comptr.h
base/win/comptr.h
// LAF Base Library // Copyright (c) 2017 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef BASE_WIN_COMPTR_H_INCLUDED #define BASE_WIN_COMPTR_H_INCLUDED #pragma once #if !defined(_WIN32) #error This header file can be used only on Window...
// LAF Base Library // Copyright (c) 2021 Igara Studio S.A. // Copyright (c) 2017 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. #ifndef BASE_WIN_COMPTR_H_INCLUDED #define BASE_WIN_COMPTR_H_INCLUDED #pragma once #if !defined(_WIN32) #error Thi...
Add some extra operators to base::ComPtr
[win] Add some extra operators to base::ComPtr
C
mit
aseprite/laf,aseprite/laf
22513d07f2818c3697bbb8db64708a1a7258745c
tests/vio_tests/check_vio.c
tests/vio_tests/check_vio.c
#define _GNU_SOURCE /* asprintf */ #include <string.h> #include "support.h" #include "csync_private.h" #include "vio/csync_vio.h" CSYNC *csync; static void setup(void) { csync_create(&csync); csync_init(csync); } static void teardown(void) { csync_destroy(csync); } START_TEST (check_csync_vio_load) { fail...
Add test for loading the module.
Add test for loading the module.
C
lgpl-2.1
gco/csync,meeh420/csync,gco/csync,gco/csync,meeh420/csync,gco/csync,meeh420/csync
8ef7b8f1894730da660155b00e2c3b4e394ed4d7
src/id.h
src/id.h
extern void change_id(const char *string);
/*============================================================================= Copyright 2008 Francois Laupretre (francois@tekwire.net) 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 ...
Add copyright banner to source file
Add copyright banner to source file
C
apache-2.0
flaupretre/managelogs,flaupretre/managelogs
412bbb8121b91e7447b05839df64b526edec2786
event/timeout_queue.h
event/timeout_queue.h
#ifndef TIMEOUT_QUEUE_H #define TIMEOUT_QUEUE_H #include <map> class TimeoutQueue { typedef std::map<NanoTime, CallbackQueue> timeout_map_t; LogHandle log_; timeout_map_t timeout_queue_; public: TimeoutQueue(void) : log_("/event/timeout/queue"), timeout_queue_() { } ~TimeoutQueue() { } bool empty(void)...
#ifndef TIMEOUT_QUEUE_H #define TIMEOUT_QUEUE_H #include <map> #include <common/time/time.h> class TimeoutQueue { typedef std::map<NanoTime, CallbackQueue> timeout_map_t; LogHandle log_; timeout_map_t timeout_queue_; public: TimeoutQueue(void) : log_("/event/timeout/queue"), timeout_queue_() { } ~Timeout...
Use new NanoTime location header, oops.
Use new NanoTime location header, oops. git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@799 4068ffdb-0463-0410-8185-8cc71e3bd399
C
bsd-2-clause
diegows/wanproxy,splbio/wanproxy,diegows/wanproxy,diegows/wanproxy,splbio/wanproxy,splbio/wanproxy
d38a75138ffc03fd7a1fff4e00a85229549c1492
lib/libc/alpha/gen/_set_tp.c
lib/libc/alpha/gen/_set_tp.c
/*- * Copyright (c) 2004 Doug Rabson * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
/*- * Copyright (c) 2004 Doug Rabson * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditi...
Fix alpha build and add __FBSDID.
Fix alpha build and add __FBSDID. PR: 70518
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
307f1a7087c28f139693feb9f0a773c5e4f0ec33
SSPSolution/SSPSolution/GameState.h
SSPSolution/SSPSolution/GameState.h
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATE_H #define SSPAPPLICATION_GAMESTATES_GAMESTATE_H #include "InputHandler.h" #include "ComponentHandler.h" #include "../GraphicsDLL/Camera.h" #include "../NetworkDLL/NetworkModule.h" //class NetworkModule; class GameStateHandler; class GameState { private: //Variables protecte...
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATE_H #define SSPAPPLICATION_GAMESTATES_GAMESTATE_H #include "InputHandler.h" #include "ComponentHandler.h" #include "../GraphicsDLL/Camera.h" //#include "../NetworkDLL/NetworkModule.h" //class NetworkModule; class GameStateHandler; class GameState { private: //Variables protec...
UPDATE doubble checked for Fransisco
UPDATE doubble checked for Fransisco
C
apache-2.0
Chringo/SSP,Chringo/SSP
233f4d4e5bc298dbb9acf5bde745cd8504ce3f07
stratego-libraries/lib/native/stratego-lib/collection-list-common.c
stratego-libraries/lib/native/stratego-lib/collection-list-common.c
#include <srts/stratego.h> #include "stratego-lib-common.h" ATerm SSL_get_list_length(ATerm term) { ATermList list = NULL; ATerm result = NULL; if(!ATisList(term)) { _fail(term); } list = (ATermList) term; result = (ATerm) ATmakeInt(ATgetLength(term)); return result; }
#include <srts/stratego.h> #include "stratego-lib-common.h" ATerm SSL_get_list_length(ATerm term) { ATermList list = NULL; ATerm result = NULL; if(!ATisList(term)) { _fail(term); } list = (ATermList) term; result = (ATerm) ATmakeInt(ATgetLength(list)); return result; }
Fix in native implementation of length strategy: ATgetLength should be applied to an ATermList.
Fix in native implementation of length strategy: ATgetLength should be applied to an ATermList. svn path=/strategoxt/trunk/; revision=16203
C
apache-2.0
Apanatshka/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,Apanatshka/strategoxt,metaborg/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,metaborg/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,metaborg/strategoxt,lichtemo/strategoxt
91b3d8878edeba4c7d1d1ba0c75e171bb38e46d4
arch/powerpc/powerpc/db_interface.c
arch/powerpc/powerpc/db_interface.c
/* $OpenBSD: db_interface.c,v 1.2 1996/12/28 06:21:50 rahnds Exp $ */ #include <sys/param.h> #include <sys/proc.h> #include <machine/db_machdep.h> void Debugger() { db_trap(T_BREAKPOINT); /* __asm volatile ("tw 4,2,2"); */ }
/* $OpenBSD: db_interface.c,v 1.3 1999/07/05 20:23:08 rahnds Exp $ */ #include <sys/param.h> #include <sys/proc.h> #include <machine/db_machdep.h> void Debugger() { /* db_trap(T_BREAKPOINT); */ __asm volatile ("tw 4,2,2"); }
Use a breakpoint to cause an exception to cause the registers to be saved for debugging purposes.
Use a breakpoint to cause an exception to cause the registers to be saved for debugging purposes.
C
isc
orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars
e5a8e3198f1990871e65d354b1cc53ed234f75d6
src/navigationwidget.h
src/navigationwidget.h
#ifndef NAVIGATIONWIDGET_H #define NAVIGATIONWIDGET_H #include <QWidget> #include <QLabel> #include "qnavigation_global.h" class QLabel; class QPushButton; namespace QNavigation { class SlidingStackedWidget; class NavigationWidgetPrivate; class NavigationWidget : public QWidget { Q_OBJECT Q_DECLARE_PRIVATE...
#ifndef QNAVIGATION_NAVIGATIONWIDGET_H #define QNAVIGATION_NAVIGATIONWIDGET_H #include <QWidget> #include <QLabel> #include "qnavigation_global.h" class QLabel; class QPushButton; namespace QNavigation { class SlidingStackedWidget; class NavigationWidgetPrivate; class NavigationWidget : public QWidget { Q_OBJE...
Fix inclusion guard for NavigationWidget
Fix inclusion guard for NavigationWidget
C
bsd-3-clause
bimetek/qnavigation,bimetek/qnavigation
6ce02abccdb68b9a19b45df7ce91a879980fecb3
src/ios/RTCEAGLVideoView.h
src/ios/RTCEAGLVideoView.h
/* * libjingle * Copyright 2014, Google Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the f...
Add missing WebRTC header file
Add missing WebRTC header file
C
apache-2.0
rogervaas/phonertc,alongubkin/phonertc,erhuabushuo/phonertc,IgorButirsky/rtc,yogomi/phonertc,MadBelette/phonertc,ravisr/phonertc,eug17/phonertc,hcxiong/phonertc,MadBelette/phonertc,kennu/phonertc,yogomi/phonertc,eug17/phonertc,Ycfx/phonertc,egorvinogradov/phonertc,BetterVoice/phonertc,MadBelette/phonertc,alongubkin/pho...
2c3316530d25d46038526902079fde1c3c643516
Classes/Instapaper/InstapaperAPI.h
Classes/Instapaper/InstapaperAPI.h
// // InstapaperAPI.h // newsyc // // Created by Grant Paul on 3/10/11. // Copyright 2011 Xuzz Productions, LLC. All rights reserved. // #import <HNKit/NSString+URLEncoding.h> #define kInstapaperAPIRootURL [NSURL URLWithString:@"https://instapaper.com/api/"] #define kInstapaperAPIAuthenticationURL [NSURL URLWithS...
// // InstapaperAPI.h // newsyc // // Created by Grant Paul on 3/10/11. // Copyright 2011 Xuzz Productions, LLC. All rights reserved. // #import <HNKit/NSString+URLEncoding.h> #define kInstapaperAPIRootURL [NSURL URLWithString:@"https://www.instapaper.com/api/"] #define kInstapaperAPIAuthenticationURL [NSURL URLW...
Fix Instapaper Root API issue
Fix Instapaper Root API issue Fixed issue that was causing login request to return a 403.
C
bsd-3-clause
ukkari/newsyc,tangqiaoboy/newsyc,ukkari/newsyc
c2ed6a161b3242ff1f1222134fae6621e813362c
src/cons.h
src/cons.h
#ifndef MCLISP_CONS_H_ #define MCLISP_CONS_H_ namespace mclisp { class ConsCell { public: ConsCell(): car_(nullptr), cdr_(nullptr) {} ConsCell(ConsCell* car, ConsCell* cdr): car_(car), cdr_(cdr) {} private: ConsCell* car_; ConsCell* cdr_; }; } // namespace mclisp #endif // MCLISP_CONS_H_
#ifndef MCLISP_CONS_H_ #define MCLISP_CONS_H_ namespace mclisp { class ConsCell { public: ConsCell(): car_(nullptr), cdr_(nullptr) {} ConsCell(ConsCell* car, ConsCell* cdr): car_(car), cdr_(cdr) {} ConsCell* car_; ConsCell* cdr_; }; } // namespace mclisp #endif // MCLISP_CONS_H_
Make Cons::car_ and Cons::cdr_ public members.
Make Cons::car_ and Cons::cdr_ public members.
C
mit
appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp,appleby/mccarthy-lisp
52ebde7b95206e2fd04f302595fc5fbfa17c4fce
memory/local_memory.h
memory/local_memory.h
/* * Lift * * Copyright (c) 2014-2015, NVIDIA CORPORATION * Copyright (c) 2015, Nuno Subtil <subtil@gmail.com> * Copyright (c) 2015, Roche Molecular Systems Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the followi...
Add a local memory vector implementation
memory: Add a local memory vector implementation Adds a statically allocated memory container. This is meant for accessing local memory on the GPU, but can use stack memory on the CPU.
C
bsd-3-clause
nsubtil/lift,chuckseberino/lift,chuckseberino/lift,nsubtil/lift,chuckseberino/lift,nsubtil/lift
be81aa72665eaa6f2e4c84bbb7eab165dd918ad8
src/os/emscripten/preamble.c
src/os/emscripten/preamble.c
#include "emscripten.h" #include <stdlib.h> #include <unistd.h> #include "param.h" int os_preamble() { if (access("/dev/zero", R_OK)) EM_ASM(({ FS.createDevice('/dev', 'zero', function () { return 0; }); }),/* dummy arg */0); EM_ASM_(({ if (ENVIRONMENT_IS_NODE) { var mnt = Pointer_...
#include "emscripten.h" #include <stdlib.h> #include <unistd.h> #include "param.h" int os_preamble() { if (access("/dev/zero", R_OK)) EM_ASM(({ FS.createDevice('/dev', 'zero', function () { return 0; }); }),/* dummy arg */0); EM_ASM_(({ if (ENVIRONMENT_IS_NODE) { var len = 1024; /*...
Replace removed Pointer_stringify with UTF8ToString
Replace removed Pointer_stringify with UTF8ToString
C
mit
kulp/tenyr,kulp/tenyr,kulp/tenyr
3d895b974d01f2c562a869921274f1198e29ff87
test/FrontendC/2010-06-24-DbgInlinedFnParameter.c
test/FrontendC/2010-06-24-DbgInlinedFnParameter.c
// RUN: %llvmgcc -S -O2 -g %s -o - | llc -O2 -o %t.s // RUN: grep "# DW_TAG_formal_parameter" %t.s | count 4 // Radar 8122864 // XFAIL: powerpc static int foo(int a, int j) { int k = 0; if (a) k = a + j; else k = j; return k; } int bar(int o, int p) { return foo(o, p); }
// RUN: %llvmgcc -S -O2 -g %s -o - | llc -O2 -o %t.s // RUN: grep "# DW_TAG_formal_parameter" %t.s | count 4 // Radar 8122864 // XTARGET: x86,darwin static int foo(int a, int j) { int k = 0; if (a) k = a + j; else k = j; return k; } int bar(int o, int p) { return foo(o, p); }
Make this test darwin specific.
Make this test darwin specific. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@107025 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,ll...
23b1acc06565d92692ce2e56ed7ede7b45c1e3a1
iobuf/obuf_copyfromfd.c
iobuf/obuf_copyfromfd.c
#include <unistd.h> #include "iobuf.h" /** Copy all the data from an \c ibuf to an \c obuf. */ int obuf_copyfromfd(int in, obuf* out) { long rd; if (obuf_error(out)) return 0; out->count = 0; for (;;) { if ((rd = read(in, out->io.buffer + out->bufpos, out->io.bufsize - out->bufpos)) == -1) ...
#include <unistd.h> #include "iobuf.h" /** Copy all the data from an \c ibuf to an \c obuf. */ int obuf_copyfromfd(int in, obuf* out) { long rd; if (obuf_error(out)) return 0; out->count = 0; for (;;) { if ((rd = read(in, out->io.buffer + out->bufpos, out->io.bufsize - out->bufpos)) == -1) ...
Mark the copied-in data as being present before flushing the buffer. Without this patch, no data is ever written.
Mark the copied-in data as being present before flushing the buffer. Without this patch, no data is ever written.
C
lgpl-2.1
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
0cbe606c96c439637b2468663f1b74891c917ee3
test/test_parser_and.c
test/test_parser_and.c
#include "test_parser.h" void and_false(void **state) { grammar_t *grammar = grammar_init( non_terminal("And"), rule_init( "And", sequence( and(terminal("hello")), terminal("h") ) ), 1 ); parse_t *result = parse("help", grammar); assert_null(result); } void and_t...
#include "test_parser.h" void and_false(void **state) { grammar_t *grammar = grammar_init( non_terminal("And"), rule_init( "And", sequence( and(terminal("hello")), terminal("h") ) ), 1 ); parse_result_t *result = parse("help", grammar); assert_non_null(result); ...
Use new API for and parsing
Use new API for and parsing
C
mit
Baltoli/peggo,Baltoli/peggo
8829ba195ce53ec60a1d9258fd4f478eeb56e0ed
include/llvm/ExecutionEngine/JITSymbolFlags.h
include/llvm/ExecutionEngine/JITSymbolFlags.h
//===------ JITSymbolFlags.h - Flags for symbols in the JIT -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Add header that was accidentally left out of r231724.
[Orc][MCJIT][RuntimeDyld] Add header that was accidentally left out of r231724. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@231726 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asa...
dd059c831429f6d3706ff8e824cb3afcde383d37
check/tests/check_check_main.c
check/tests/check_check_main.c
#include <stdlib.h> #include <stdio.h> #include <check.h> #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, ma...
#include <stdlib.h> #include <stdio.h> #include <check.h> #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, ma...
Use correct variable for number of tests
Use correct variable for number of tests
C
lgpl-2.1
tarruda/check,tarruda/check,tarruda/check,tarruda/check,tarruda/check
461bf4f7c74b56d5944aab9b886ff30a50019e0e
check/tests/check_check_main.c
check/tests/check_check_main.c
#include <stdlib.h> #include <stdio.h> #include <check.h> #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, ma...
#include <stdlib.h> #include <stdio.h> #include <check.h> #include "check_check.h" int main (void) { int n; SRunner *sr; fork_setup(); setup_fixture(); sr = srunner_create (make_master_suite()); srunner_add_suite(sr, make_list_suite()); srunner_add_suite(sr, make_msg_suite()); srunner_add_suite(sr, ma...
Use correct variable for number of tests
Use correct variable for number of tests git-svn-id: d023f1085a36f7a677188d00334e37d38ffecf51@230 64e312b2-a51f-0410-8e61-82d0ca0eb02a
C
lgpl-2.1
libcheck/check,9fcc/check,krichter722/check,brarcher/check,brarcher/check,9fcc/check,krichter722/check,9fcc/check,libcheck/check,libcheck/check,krichter722/check,brarcher/check,brarcher/check,9fcc/check,libcheck/check,9fcc/check,libcheck/check,brarcher/check,krichter722/check,krichter722/check
0200f506b06b8fce7ae6872910915f1e40ccf1b7
framework/include/base/ComputeInitialConditionThread.h
framework/include/base/ComputeInitialConditionThread.h
/****************************************************************/ /* DO NOT MODIFY THIS HEADER */ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* */ /* (c) 2010 Battelle Energy Alliance, LLC ...
/****************************************************************/ /* DO NOT MODIFY THIS HEADER */ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* */ /* (c) 2010 Battelle Energy Alliance, LLC ...
Include headers we need directly
Include headers we need directly
C
lgpl-2.1
backmari/moose,bwspenc/moose,permcody/moose,idaholab/moose,nuclear-wizard/moose,backmari/moose,idaholab/moose,liuwenf/moose,permcody/moose,jessecarterMOOSE/moose,liuwenf/moose,SudiptaBiswas/moose,sapitts/moose,laagesen/moose,andrsd/moose,dschwen/moose,bwspenc/moose,harterj/moose,sapitts/moose,andrsd/moose,liuwenf/moose...
f53d9f6cd370743d00f9d9a882941ff84d4bfb54
LogDefer.h
LogDefer.h
#ifndef LOGDEFER_H #define LOGDEFER_H #include "picojson/picojson.h" class LogDefer { public: LogDefer(std::function<void (const std::string&)> callback); ~LogDefer(); void add_log(int verbosity, std::string msg); void error(std::string msg); void warn(std::string msg); void info(std::string...
#pragma once #include "picojson/picojson.h" class LogDefer { public: LogDefer(std::function<void (const std::string&)> callback); ~LogDefer(); void add_log(int verbosity, std::string msg); void error(std::string msg); void warn(std::string msg); void info(std::string msg); void debug(std...
Use pragma once instead of define hack (thanks Natalia)
Use pragma once instead of define hack (thanks Natalia)
C
bsd-2-clause
hoytech/LogDefer-CXX
55130b9862bc2aab6a5498b3198fbdcf1c26acc2
include/vl6180_pi.h
include/vl6180_pi.h
#ifdef __cplusplus extern "C"{ #endif typedef int vl6180; #define VL1680_DEFALUT_ADDR 0x29 int vl6180_initialise(int device, int i2cAddr); int get_distance(vl6180 handle); void set_scaling(vl6180 handle, int scaling); ///After calling that, you should discrad the handle to talk to the device and re-initialize it v...
#ifdef __cplusplus extern "C"{ #endif typedef int vl6180; #define VL1680_DEFALUT_ADDR 0x29 ///Initialize a vl6180 sensor on the i2c port /// \param device The I2C bus to open. e.g. "1" for using /dev/i2c-1 /// \param i2c_addr addres of the device. If you don't know, pass VL1680_DEFALUT_ADDR to it /// \return handle...
Comment the file "doxygen style"
Comment the file "doxygen style"
C
mit
leachj/vl6180_pi
4a1ecb67f9ff1745422aecdd5cc70a9f630d7dc8
driver/battery/bq20z453.c
driver/battery/bq20z453.c
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * Smart battery driver for BQ20Z453. */ #include "battery_smart.h" #include "host_command.h" #define PARAM_CUT_OFF 0x0010 int battery_comman...
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * * Smart battery driver for BQ20Z453. */ #include "battery_smart.h" #include "hooks.h" #include "host_command.h" #define PARAM_CUT_OFF 0x0010 ...
Fix battery cutoff command to use deferred function call
pit: Fix battery cutoff command to use deferred function call Rather than hackily sending a host response before sending the battery cutoff command, just put the cutoff command in a deferred function call and respond normally to the host command. BUG=chrome-os-partner:23568 BRANCH=none TEST=On battery power, 'ectool ...
C
bsd-3-clause
mtk09422/chromiumos-platform-ec,longsleep/ec,gelraen/cros-ec,akappy7/ChromeOS_EC_LED_Diagnostics,alterapraxisptyltd/chromium-ec,akappy7/ChromeOS_EC_LED_Diagnostics,mtk09422/chromiumos-platform-ec,coreboot/chrome-ec,coreboot/chrome-ec,fourier49/BIZ_EC,md5555/ec,md5555/ec,thehobn/ec,fourier49/BIZ_EC,thehobn/ec,fourier49/...
05a2b367b649928bee66e8acbe2d8ef3440d36a9
libc/include/sys/io.h
libc/include/sys/io.h
#ifndef _SYS_IO_H #define _SYS_IO_H #include <stdint.h> unsigned char inb(uint16_t port); void outb(uint16_t port, uint8_t value); #endif
#ifndef _SYS_IO_H #define _SYS_IO_H #include <stdint.h> uint8_t inb(uint16_t port); void outb(uint16_t port, uint8_t value); uint16_t inw(uint16_t port); void outw(uint16_t port, uint16_t value); uint32_t inl(uint16_t port); void outl(uint16_t port, uint32_t value); #endif
Add everything to header file
Add everything to header file
C
mit
simon-andrews/norby,simon-andrews/norby,simon-andrews/norby
12941ad2f700f9a2ca22057a099b1152fc86be74
critmem.h
critmem.h
#ifndef CRITMEM_H #define CRITMEM_H #include <sys/types.h> void *mycritmalloc(const char *f, long, size_t size, const char *message); void *mycritcalloc(const char *f, long, size_t size, const char *message); void *mycritrealloc(const char *f, long, void *a, size_t size, const char *message); char *mycritstrdup...
#ifndef CRITMEM_H #define CRITMEM_H #include <sys/types.h> /*@only@*//*@out@ */ void *mycritmalloc(const char *f, long, size_t size, const char *message); /*@only@*/ void *mycritcalloc(const char *f, long, size_t size, const char *message); /*@only@*//*@out@ *//*@notnull@ */ void *mycritrealloc(const ch...
Include Ralf Wildenhues' lclint annotations.
Include Ralf Wildenhues' lclint annotations.
C
lgpl-2.1
BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode
4d4fb33fce0803f9c923307bdf82b8fdd2ed140b
src/reverse_iterator.h
src/reverse_iterator.h
// Taken from https://gist.github.com/arvidsson/7231973 #ifndef BITCOIN_REVERSE_ITERATOR_HPP #define BITCOIN_REVERSE_ITERATOR_HPP /** * Template used for reverse iteration in C++11 range-based for loops. * * std::vector<int> v = {1, 2, 3, 4, 5}; * for (auto x : reverse_iterate(v)) * std::cout << x << ...
// Taken from https://gist.github.com/arvidsson/7231973 #ifndef BITCOIN_REVERSE_ITERATOR_H #define BITCOIN_REVERSE_ITERATOR_H /** * Template used for reverse iteration in C++11 range-based for loops. * * std::vector<int> v = {1, 2, 3, 4, 5}; * for (auto x : reverse_iterate(v)) * std::cout << x << " ";...
Rename member field according to the style guide.
Rename member field according to the style guide.
C
mit
guncoin/guncoin,ahmedbodi/vertcoin,anditto/bitcoin,deeponion/deeponion,shelvenzhou/BTCGPU,OmniLayer/omnicore,prusnak/bitcoin,jambolo/bitcoin,practicalswift/bitcoin,Kogser/bitcoin,jtimon/bitcoin,trippysalmon/bitcoin,myriadteam/myriadcoin,stamhe/bitcoin,namecoin/namecoin-core,Exgibichi/statusquo,AkioNak/bitcoin,BitzenyCo...
c970d8d8c6101a7e00fe91aef9a751d41c433569
mudlib/mud/home/Kotaka/sys/testd.c
mudlib/mud/home/Kotaka/sys/testd.c
#include <kotaka/paths.h> #include <kotaka/log.h> static void create() { } void test() { }
#include <kotaka/paths.h> #include <kotaka/log.h> #include <kotaka/assert.h> static void create() { } private void test_qsort() { int *arr, i; arr = allocate(1000); for (i = 0; i < 1000; i++) { arr[i] = random(1000000); } SUBD->qsort(arr, 0, 1000); for (i = 0; i < 999; i++) { ASSERT(arr[i] <= arr[i + 1]...
Add regression test for qsort
Add regression test for qsort
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
2321a73ac4bc7ae3fc543c36e690d9831040160a
Sub-Terra/include/Oscillator.h
Sub-Terra/include/Oscillator.h
#pragma once #include <math.h> #include "WaveShape.h" class Oscillator { public: WaveShape waveShape; double frequency = 1.0; double amplitude = 1.0; double speed = 1.0; uint32_t phaseAccumulator = 0; Oscillator() = default; Oscillator(const WaveShape &waveShape) : waveShape(waveShape), frequency(waveShape.pr...
#pragma once #include "WaveShape.h" class Oscillator { public: WaveShape waveShape; double frequency = 1.0; double amplitude = 1.0; double speed = 1.0; uint32_t phaseAccumulator = 0; Oscillator() = default; Oscillator(const WaveShape &waveShape) : waveShape(waveShape), frequency(waveShape.preferredFrequency) ...
Fix warnings and remove unused header
Fix warnings and remove unused header
C
mpl-2.0
polar-engine/polar,polar-engine/polar,shockkolate/polar4,shockkolate/polar4,shockkolate/polar4,shockkolate/polar4
f0b582a6639ad908211c938287fad26fc99a34dc
peertalk/PTPrivate.h
peertalk/PTPrivate.h
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (!defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)) || \ (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (!defined(__MAC_10_8) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8)) #define PT_DISPATCH_RETAIN_RELEASE 1 #endif #if PT_DISPATCH_RETAIN...
#if (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (!defined(__IPHONE_6_0) || __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0)) || \ (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && (!defined(__MAC_10_8) || __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_8)) #define PT_DISPATCH_RETAIN_RELEASE 1 #endif #define PT_PRECISE_LIF...
Fix logic that enables pre-ARC behavior
Fix logic that enables pre-ARC behavior
C
mit
fly19890211/peertalk,philikon/peertalk,fly19890211/peertalk,yexihu/peertalk,yexihu/peertalk,fly19890211/peertalk,rsms/peertalk,ChetanGandhi/peertalk,philikon/peertalk,ChetanGandhi/peertalk,yexihu/peertalk,rsms/peertalk,msdgwzhy6/peertalk,TaoXueCheng/peertalk,artifacts/peertalk,artifacts/peertalk,dguillamot/PFMacOSClien...
44415f1f4effc8953177bc365098750e92df20f4
src/mpd-shell-defines.h
src/mpd-shell-defines.h
/* * Copyright © 2010 Intel Corp. * * Authors: Rob Staudinger <robert.staudinger@intel.com> * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * Th...
/* * Copyright © 2010 Intel Corp. * * Authors: Rob Staudinger <robert.staudinger@intel.com> * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * Th...
Define actor sized as float for type safety.
shell: Define actor sized as float for type safety.
C
lgpl-2.1
meego-netbook-ux/meego-panel-devices,meego-netbook-ux/meego-panel-devices,meego-netbook-ux/meego-panel-devices
fe9f46ab6c0863c0a3c3345ebb43f32d50ab60ca
Generics/LWP/ICondVar.h
Generics/LWP/ICondVar.h
#pragma once namespace LWP { class ICondVar { public: virtual void wait() = 0; virtual void signal() = 0; virtual void broadcast() = 0; virtual ~ICondVar() {} }; }
#pragma once namespace LWP { class ICondVar { public: virtual void wait() = 0; virtual void notify() = 0; virtual void broadcast() = 0; virtual ~ICondVar() {} }; }
Change method name : `signal' => `notify'
[LWP] Change method name : `signal' => `notify'
C
mit
fiahil/R-Type,fiahil/R-Type
70065db2a0765b00473d8f40a640f0a4159f6387
include/stdlib.h
include/stdlib.h
#ifndef __STDLIB_H__ #define __STDLIB_H__ void assert(int boolean, char * msg); #endif // __STDLIB_H__
#ifndef __STDLIB_H__ #define __STDLIB_H__ #include <kernel.h> #include <task.h> #include <types.h> void assert(int boolean, char * msg); #endif // __STDLIB_H__
Add kernel.h, task.h and types.h, forming a facade interface
Add kernel.h, task.h and types.h, forming a facade interface
C
mit
gregwym/ARM-Micro-Kernel,gregwym/ARM-Micro-Kernel,gregwym/ARM-Micro-Kernel
cdbae732301c430a95c9328f6597f4ecfb26cbb0
ios/NfcManager.h
ios/NfcManager.h
#if __has_include(<React/RCTBridgeModule.h>) #import <React/RCTBridgeModule.h> #import <React/RCTEventEmitter.h> #elif __has_include(“React/RCTBridgeModule.h”) #import “React/RCTBridgeModule.h” #else #import “RCTBridgeModule.h” #import <React/RCTEventEmitter.h> #endif #import <CoreNfc/CoreNfc.h> @interface NfcManager ...
#if __has_include(<React/RCTBridgeModule.h>) #import <React/RCTBridgeModule.h> #import <React/RCTEventEmitter.h> #elif __has_include(“React/RCTBridgeModule.h”) #import “React/RCTBridgeModule.h” #else #import “RCTBridgeModule.h” #import <React/RCTEventEmitter.h> #endif #import <CoreNFC/CoreNFC.h> @interface NfcManager ...
Fix case-sensitive file import from CoreNfc -> CoreNFC
Fix case-sensitive file import from CoreNfc -> CoreNFC
C
apache-2.0
whitedogg13/react-native-nfc-manager,whitedogg13/react-native-nfc-manager,whitedogg13/react-native-nfc-manager
6ee28d6d3a65a014f4ad9f4454258b4eb5114364
machine.h
machine.h
#ifndef __MACHINE_H__ #define __MACHINE_H__ #include <string> #include <vector> #include "job.h" class Machine { public: Machine(const std::string& machine_name); const std::string& get_name() const; void add_job(Job); private: std::string name; std::vector<Job> jobs; ...
#ifndef __MACHINE_H__ #define __MACHINE_H__ #include <string> #include <vector> #include "job.h" class Machine { public: Machine(const std::string& machine_name); const std::string& get_name() const; void add_job(Job new_job); private: std::string name; std::vector<Job...
Add name to add_job param
Add name to add_job param
C
mit
mattportas/yejong
bb843fdda3313e753959fdcb90332f627a127524
inc/winchar.h
inc/winchar.h
//--------------------------------------------------------------------------// /// Copyright (c) 2017 by Milos Tosic. All Rights Reserved. /// /// License: http://www.opensource.org/licenses/BSD-2-Clause /// //--------------------------------------------------------------------------// #if...
//--------------------------------------------------------------------------// /// Copyright (c) 2017 by Milos Tosic. All Rights Reserved. /// /// License: http://www.opensource.org/licenses/BSD-2-Clause /// //--------------------------------------------------------------------------// #if...
Add (w)char casting operator to windows char classes
Add (w)char casting operator to windows char classes
C
bsd-2-clause
milostosic/rbase,milostosic/rbase
2e4e76b70806abf9a37f1a6b3f9ccdb56aa89448
include/llvm/Transforms/Utils/SizeOpts.h
include/llvm/Transforms/Utils/SizeOpts.h
//===- llvm/Transforms/Utils/SizeOpts.h - size optimization -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
//===- llvm/Transforms/Utils/SizeOpts.h - size optimization -----*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
Fix header guard typo and build error.
Fix header guard typo and build error. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@358429 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llv...
dc258e02720308981a4f8a2e4848c582c1b71123
l4common.h
l4common.h
#ifndef LBS_COMMON_H #define LBS_COMMON_H #include <stddef.h> #ifdef __STDC_VERSION__ # include <stdbool.h> # if __STDC_VERSION__ >= 201112L # define LBS_COMMON_ISO_C11 # define LBS_COMMON_CHECK_TYPE(x,type) (_Generic ((x), type: (x))) # else # define LBS_COMMON_ISO_C99 # define LBS_COMMON_CHECK_TYPE(x,type) (x) ...
#ifndef LBS_COMMON_H #define LBS_COMMON_H #include <stddef.h> #ifdef __STDC_VERSION__ # include <stdbool.h> # if __STDC_VERSION__ >= 201112L # define LBS_COMMON_ISO_C11 # define LBS_COMMON_CHECK_TYPE(x,type) (_Generic ((x), type: (x))) # else # define LBS_COMMON_ISO_C99 # define LBS_COMMON_CHECK_TYPE(x,type) (x) ...
Add macros to define getters and setters
Add macros to define getters and setters
C
bsd-3-clause
lantw44/l4basic,lantw44/l4basic
35cd59f259b7058758f70b1ad5b679191e6fc116
src/shift_objective.c
src/shift_objective.c
#include <assert.h> #include <numbbo.h> #include "numbbo_problem.c" typedef struct { double amount; } shift_objective_state_t; static void _so_evaluate_function(numbbo_problem_t *self, double *x, double *y) { assert(problem->inner_problem != NULL); assert(problem->state != NULL); numbbo_transformed_p...
Add problem transformation to shift the objective.
Add problem transformation to shift the objective.
C
bsd-3-clause
oaelhara/numbbo,oaelhara/numbbo,NDManh/numbbo,dtusar/coco,NDManh/numbbo,oaelhara/numbbo,dtusar/coco,NDManh/numbbo,oaelhara/numbbo,oaelhara/numbbo,NDManh/numbbo,oaelhara/numbbo,dtusar/coco,NDManh/numbbo,oaelhara/numbbo,dtusar/coco,oaelhara/numbbo,NDManh/numbbo,dtusar/coco,dtusar/coco,NDManh/numbbo,dtusar/coco,dtusar/coc...
0e05d29e104107803c23e5be217bd6ed497c2b2f
src/test/slist_test.c
src/test/slist_test.c
#include <stdio.h> #include <string.h> #include "ausearch-string.h" slist s; int print_list(void) { int cnt = 0; slist_first(&s); do { snode *cur = slist_get_cur(&s); if (cur) { cnt++; printf("%s\n", cur->str); } } while (slist_next(&s)); return cnt; } int main(void) { snode n; int rc; slist_cre...
Add the test program, too
Add the test program, too git-svn-id: b2ed898cf2cd3316b62ee1cc50465f4560571194@982 03a675c2-f56d-4096-908f-63dba836b7e4
C
lgpl-2.1
yubo/audit,yubo/audit,yubo/audit,yubo/audit,yubo/audit
ecb1728e6880e9368cc9bbd4ba3a82b47456152a
client_encoder/client_encoder_base.h
client_encoder/client_encoder_base.h
// Copyright (c) 2011 The WebM project authors. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing projec...
// Copyright (c) 2011 The WebM project authors. All Rights Reserved. // // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file in the root of the source // tree. An additional intellectual property rights grant can be found // in the file PATENTS. All contributing projec...
Add client name and version constants.
Add client name and version constants. Change-Id: Ic5aeafb91ebb9d04ca89679512d3088c612f84e1
C
bsd-3-clause
kleopatra999/webm.webmlive,kalli123/webm.webmlive,gshORTON/webm.webmlive,reimaginemedia/webm.webmlive,ericmckean/webm.webmlive,kim42083/webm.webmlive,ericmckean/webm.webmlive,Acidburn0zzz/webm.webmlive,Maria1099/webm.webmlive,abwiz0086/webm.webmlive,kleopatra999/webm.webmlive,Acidburn0zzz/webm.webmlive,felipebetancur/w...
cb8d20c0988384fd67ed46bc6bdc5b5c3073c63a
src/x86/regname-x86.c
src/x86/regname-x86.c
#include "unwind_i.h" static const char *regname[] = { "eax", "ebx", "ecx", "edx", "esi", "edi", "ebp", "eip", "esp" }; const char * unw_regname (unw_regnum_t reg) { if (reg < NELEMS (regname)) return regname[reg]; else return "???"; }
Use NELEMS() instead of open code.
(unw_regname): Use NELEMS() instead of open code. (Logical change 1.39)
C
mit
unkadoug/libunwind,atanasyan/libunwind,androidarmv6/android_external_libunwind,vtjnash/libunwind,mpercy/libunwind,maltek/platform_external_libunwind,atanasyan/libunwind,martyone/libunwind,frida/libunwind,jrmuizel/libunwind,fillexen/libunwind,android-ia/platform_external_libunwind,geekboxzone/lollipop_external_libunwind...
3e94540ea6dba904c4025b2773a4f7b288ad4174
polygon.h
polygon.h
/** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ /** * * */ typedef struct { float x; float y; }Point; /** * Function wich create a point with a specified abscisse and ordinate * abscisse - real * ordinate - real * return a new point */
/** Author : Paul TREHIOU & Victor SENE * Date : November 2014 **/ /** * Declaration Point structure * x - real wich is the abscisse of the point * y - real wich is the ordinate of the point */ typedef struct { float x; float y; }Point; /** * Function wich create a point with a specified abscisse and...
Add comment for struc Point definition
Add comment for struc Point definition
C
mit
UTBroM/GeometricLib
0476f5a59b5285fa625089167ef3b373525060b8
src/libreset/util/macros.h
src/libreset/util/macros.h
#ifndef __MACROS_H__ #define __MACROS_H__ /** * @file macros.h * * This file contains simple helper macros */ /** * @addtogroup internal_util_helper_macros "(internal) helper macros" * * This group contains helper macros for internal use only. * * @{ */ /** * Computes the maximum value of the two passed v...
#ifndef __MACROS_H__ #define __MACROS_H__ /** * @file macros.h * * This file contains simple helper macros */ /** * @addtogroup internal_util_helper_macros "(internal) helper macros" * * This group contains helper macros for internal use only. * * @{ */ /** * Computes the maximum value of the two passed v...
Modify MAX(x,y) to not contain a scope
Modify MAX(x,y) to not contain a scope
C
lgpl-2.1
waysome/libreset,waysome/libreset
83574cf0148dce723370e026f78e15c60ee94dec
4_TimersBasicCountdown.c
4_TimersBasicCountdown.c
/* * main.c * * Created on: 2 Nov 2016 * Author: rafpe */ #include "stm32f4xx.h" #include "stm32f407xx.h" int main(void) { volatile uint32_t delay; RCC->AHB1ENR |= RCC_AHB1ENR_GPIODEN | RCC_AHB1ENR_GPIOCEN; // enable the clock to GPIOD & GPIOC RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN | RCC_APB2ENR_TIM1E...
Add basis use of timers
Add basis use of timers
C
apache-2.0
RafPe/STM32F407VGTx-examples
bfdefc0f025657cb3ce4fb90044809b9456d1e5f
src/vbox/vbox_V5_1.c
src/vbox/vbox_V5_1.c
/** @file vbox_V5_1.c * C file to include support for multiple versions of VirtualBox * at runtime. */ #include <config.h> /** The API Version */ #define VBOX_API_VERSION 5001000 /** Version specific prefix. */ #define NAME(name) vbox51##name #include "vbox_tmpl.c"
Add vbox 5.1 driver file
Add vbox 5.1 driver file Signed-off-by: Daniel P. Berrange <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>
C
lgpl-2.1
olafhering/libvirt,jfehlig/libvirt,zippy2/libvirt,crobinso/libvirt,taget/libvirt,andreabolognani/libvirt,nertpinx/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,nertpinx/libvirt,jardasgit/libvirt,andreabolognani/libvirt,datto/libvirt,andreabolognani/libvirt,nertpinx/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,o...
c7611e7a0d2901ce05589c4815ca0f88c9788feb
src/utf.h
src/utf.h
/* * Copyright (c) 2009, 2010 Petri Lehtinen <petri@digip.org> * * Jansson is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. */ #ifndef UTF_H #define UTF_H #ifdef HAVE_CONFIG_H #include <config.h> #endif #ifdef HAVE_INTTYPES_H /* inttypes.h...
/* * Copyright (c) 2009, 2010 Petri Lehtinen <petri@digip.org> * * Jansson is free software; you can redistribute it and/or modify * it under the terms of the MIT license. See LICENSE for details. */ #ifndef UTF_H #define UTF_H #ifdef HAVE_CONFIG_H #include <config.h> #ifdef HAVE_INTTYPES_H /* inttypes.h includ...
Make int32_t available when the configure script is not used
Make int32_t available when the configure script is not used
C
mit
markalanj/jansson,yahoo/ygloo-external-jansson,Mephistophiles/jansson,rogerz/jansson,chrullrich/jansson,rogerz/jansson,akheron/jansson,yahoo/ygloo-external-jansson,akheron/jansson-debian,slackner/jansson,attie/jansson,firepick-delta/FireSight,npmccallum/jansson,Mephistophiles/jansson,bstarynk/jansson,chrullrich/jansson...
d37ccd40dffd64fcad614f152f33ceb755112484
func_sim/func_memory/func_memory.h
func_sim/func_memory/func_memory.h
/** * func_memory.h - Header of module implementing the concept of * programer-visible memory space accesing via memory address. * @author Alexander Titov <alexander.igorevich.titov@gmail.com> * Copyright 2012 uArchSim iLab project */ // protection from multi-include #ifndef FUNC_MEMORY__FUNC_MEMORY_H #define FU...
/** * func_memory.h - Header of module implementing the concept of * programer-visible memory space accesing via memory address. * @author Alexander Titov <alexander.igorevich.titov@gmail.com> * Copyright 2012 uArchSim iLab project */ // protection from multi-include #ifndef FUNC_MEMORY__FUNC_MEMORY_H #define FU...
Delete redundant staff from FuncMemory class
[trunk] Delete redundant staff from FuncMemory class
C
mit
Nagapetyan/mipt-mips-2015,MIPT-ILab/mipt-mips,MIPT-ILab/mipt-mips-2015,RomanZavodskikh/mipt-mips-2015,grigoriy-chirkov/mipt-mips-2015,MIPT-ILab/mipt-mips,RomanZavodskikh/mipt-mips-2015,gkorepanov/mipt-mips,RomanZavodskikh/mipt-mips-2015,grigoriy-chirkov/mipt-mips-2015,MIPT-ILab/mipt-mips-2015,RomanZavodskikh/mipt-mips-...
1a064e381c2f9978dbdb7103a6d9faed5e5f3e32
StoreSim/RegisterQueue.h
StoreSim/RegisterQueue.h
#pragma once class RegisterQueue{ private: public: int numberOfCustomers; int maxLineLength; };
#pragma once #include "Customer.h" class RegisterQueue{ private: struct Node { Node *next; // After previous sequentially Node *previous; // First in line Customer value; // @next = NULL, this is a shorthand constructor to make NULL the default Node(Customer value, Node *previous = null...
Create "checkout lines" as DLinkedList
Create "checkout lines" as DLinkedList
C
mit
GPKyte/CSCI220,GPKyte/CSCI220
31a6e50a5f20b77c82cf2024ef8f0c8f586973b9
TesseractOCR/Tesseract.h
TesseractOCR/Tesseract.h
// // Tesseract.h // Tesseract // // Created by Loïs Di Qual on 24/09/12. // Copyright (c) 2012 Loïs Di Qual. // Under MIT License. See 'LICENCE' for more informations. // #import <UIKit/UIKit.h> @class Tesseract; @protocol TesseractDelegate <NSObject> @optional - (BOOL)shouldCancelImageRecognitionForTesseract:...
// // Tesseract.h // Tesseract // // Created by Loïs Di Qual on 24/09/12. // Copyright (c) 2012 Loïs Di Qual. // Under MIT License. See 'LICENCE' for more informations. // #import <UIKit/UIKit.h> @class Tesseract; @protocol TesseractDelegate <NSObject> @optional - (BOOL)shouldCancelImageRecognitionForTesseract:...
Add a deprecated warning for - (void)clear.
Add a deprecated warning for - (void)clear.
C
mit
gank0326/Tesseract,lampkicking/Tesseract-OCR-iOS,zyggit/Tesseract-OCR-iOS,hejunbinlan/Tesseract-OCR-iOS,DanielShum/Tesseract-OCR-iOS,doo/Tesseract-OCR-iOS,StratAguilar/Tesseract-OCR-iOS,gank0326/Tesseract,lampkicking/Tesseract-OCR-iOS,ws233/Tesseract-OCR-iOS,Jaelene/Tesseract-OCR-iOS,gali8/Tesseract-OCR-iOS,cotsog/Tess...
082418d73b3473c0842f2664a69b4d731b5cf0e9
netarray.h
netarray.h
#ifndef __netarray_H #define __netarray_H /* * Copyright (c) 2012 Stephen Williams (steve@icarus.com) * Copyright CERN 2012 / Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU * General Publ...
Add missing netdarray.h header file.
Add missing netdarray.h header file.
C
lgpl-2.1
CastMi/iverilog,CastMi/iverilog,themperek/iverilog,themperek/iverilog,themperek/iverilog,CastMi/iverilog
e524e7ee97dcc87aee0616328e9be64d1c3daf57
The_Eye/inc/Biquad_Filter.h
The_Eye/inc/Biquad_Filter.h
/* * Biquad_Filter.h * * Created on: 24. 6. 2017 * Author: michp */ #ifndef BIQUAD_FILTER_H_ #define BIQUAD_FILTER_H_ #include <cmath> namespace flyhero { // Many thanks to http://www.earlevel.com/main/2012/11/26/biquad-c-source-code/ class Biquad_Filter { private: const double PI = 3...
/* * Biquad_Filter.h * * Created on: 24. 6. 2017 * Author: michp */ #ifndef BIQUAD_FILTER_H_ #define BIQUAD_FILTER_H_ #include <cmath> namespace flyhero { // Many thanks to http://www.earlevel.com/main/2012/11/26/biquad-c-source-code/ class Biquad_Filter { private: const double PI = 3...
Add source of formulas used in biquad filters
Add source of formulas used in biquad filters
C
mit
michprev/flyhero-esp32,michprev/flyhero-esp32
49444c722a3915e3eba1d478432f10fb32742a22
src/test/call2.c
src/test/call2.c
#include <stdio.h> int assertCount, errorCount; void assertEq(int x, int y){ assertCount++; if(x == y) return; errorCount++; printf("ASSERTION %d FAILED: %d does not equal %d\n", assertCount, x, y); } void endTest(){ if(errorCount > 0) printf("TEST FAILED: Encountered %d assertion error%s out of %d!", er...
Test function that uses global value
Test function that uses global value
C
mit
Sibert-Aerts/c2p,Sibert-Aerts/c2p,Sibert-Aerts/c2p
597f26ce83a9cf540db9b4af20b34066c931fdf1
src/mi-init.c
src/mi-init.c
/* libunwind - a platform-independent unwind library Copyright (C) 2002-2003 Hewlett-Packard Co Contributed by David Mosberger-Tang <davidm@hpl.hp.com> This file is part of libunwind. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (...
Include "tdep.h". (unwi_full_sigmask): Define here. (mi_init): Initialize unwi_full_sigmask.
Include "tdep.h". (unwi_full_sigmask): Define here. (mi_init): Initialize unwi_full_sigmask. (Logical change 1.59)
C
mit
olibc/libunwind,atanasyan/libunwind-android,Chilledheart/libunwind,libunwind/libunwind,joyent/libunwind,rntz/libunwind,tronical/libunwind,atanasyan/libunwind,libunwind/libunwind,pathscale/libunwind,geekboxzone/lollipop_external_libunwind,atanasyan/libunwind-android,rantala/libunwind,Keno/libunwind,jrmuizel/libunwind,fi...
e5e5f7dff34caa4772119ec04b7356abd25fde95
src/transfer_function_parser.h
src/transfer_function_parser.h
#ifndef SRC_TRANSFER_FUNCTION_PARSER_H_ #define SRC_TRANSFER_FUNCTION_PARSER_H_ #include <QGradient> #include <QString> #include <QXmlDefaultHandler> /** * \brief * * */ class QGradientContentHandler; class TransferFunctionParser { public: TransferFunctionParser(QString path); QGradient *parse(); priv...
#ifndef SRC_TRANSFER_FUNCTION_PARSER_H_ #define SRC_TRANSFER_FUNCTION_PARSER_H_ #include <QGradient> #include <QString> #include <QXmlDefaultHandler> class QGradientContentHandler; /** * \brief Parser for XML representation of a QGradient used as transfer function * */ class TransferFunctionParser { public: T...
Add brief description for TransferFunctionParser.
Add brief description for TransferFunctionParser.
C
mit
Christof/tf-parser
af2944ac5488f8d7e5f109f8a55f98d072ec377c
arch/mips/pci/pci-ev64120.c
arch/mips/pci/pci-ev64120.c
#include <linux/pci.h> int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { int irq; if (!pin) return 0; irq = allocate_irqno(); if (irq < 0) return 0; return irq; } /* Do platform specific device initialization at pci_enable_device() time */ int pcibios_plat_dev_init(struct pci_dev *dev) { ...
#include <linux/pci.h> #include <asm/irq.h> int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) { int irq; if (!pin) return 0; irq = allocate_irqno(); if (irq < 0) return 0; return irq; } /* Do platform specific device initialization at pci_enable_device() time */ int pcibios_plat_dev_init(st...
Include <asm/irq.h> to fix warning.
[MIPS] EV64120: Include <asm/irq.h> to fix warning. arch/mips/pci/pci-ev64120.c:10: warning: implicit declaration of function 'allocate_irqno' Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_k...
e5bda7a4c107e91faa87657611bbd9ef174fadce
templates/c.c
templates/c.c
#include <stdio.h> int main(int argc, char const *argv[]) { int answer = 0; printf("%d\n"); return 0; }
#include <stdio.h> int main(int argc, char const *argv[]) { int answer = 0; printf("%d\n", answer); return 0; }
Fix mistake in C template
Fix mistake in C template
C
mit
yaworsw/euler-manager,yaworsw/euler-manager,yaworsw/euler-manager,yaworsw/euler-manager,yaworsw/euler-manager,yaworsw/euler-manager,yaworsw/euler-manager
10698eca9f9890e28f60f6a417951e23d65ebfb6
src/lib/serialize/str_join.h
src/lib/serialize/str_join.h
/* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */ #pragma once #include <sstream> namespace turbo { namespace str { template <class Iter> std::string join(const Iter& start, const Iter& end, char delim=' ') { std::stringstream ss; Iter it = start; if (...
/* This code is subject to the terms of the Mozilla Public License, v.2.0. http://mozilla.org/MPL/2.0/. */ #pragma once #include <sstream> namespace turbo { namespace str { template <class Iter> inline std::string join(const Iter& start, const Iter& end, char delim=' ') { std::stringstream ss; Iter it = start;...
Make this explicitly inline for consistency's sake.
Make this explicitly inline for consistency's sake.
C
mpl-2.0
sz3/turbolib,sz3/turbolib,sz3/turbolib,sz3/turbolib
831a01c04c02b61998d3adadf5db00eb7829427b
src/qt-ui/basicui.h
src/qt-ui/basicui.h
#ifndef BASICUI_H_ #define BASICUI_H_ #include <QMainWindow> #include "QsLog.h" #include "mainwidget.h" #include "workspace.h" #include "uicontroller.h" class BasicUi: public QMainWindow { Q_OBJECT public: BasicUi(UiController * controller, QWidget *parent = 0); void setWorkspace(Workspace ...
#ifndef BASICUI_H_ #define BASICUI_H_ #include <QMainWindow> #include "QsLog.h" #include "mainwidget.h" #include "workspace.h" #include "uicontroller.h" class BasicUi: public QMainWindow { Q_OBJECT public: BasicUi(UiController * controller, QWidget *parent = 0); void setWorkspace(Workspace ...
Revert of a previous commit "Delete main widget in BasicUi"
Revert of a previous commit "Delete main widget in BasicUi"
C
apache-2.0
jbruggem/jingles-impro,jbruggem/jingles-impro,jbruggem/jingles-impro
ded8ea7469b305ee6ceb65103af010329b97ce9a
src/time-module.c
src/time-module.c
#include <stdlib.h> #include "graphics.h" #include "surface.h" #include "time-module.h" typedef struct TimeModule { Module base; } TimeModule; Module* newTimeModule() { TimeModule* module = malloc(sizeof(TimeModule)); module->base.width = 150; module->base.height = 100; module->base.updateFunc = updateTime...
#include <stdlib.h> #include <time.h> #include "graphics.h" #include "surface.h" #include "time-module.h" typedef struct TimeModule { Module base; } TimeModule; Module* newTimeModule() { TimeModule* module = malloc(sizeof(TimeModule)); module->base.width = 150; module->base.height = 100; module->base.updat...
Replace placeholder string in time module with time.
Replace placeholder string in time module with time.
C
mit
jamiesyme/minfo,jamiesyme/minfo
de041647db8aeed049ce1124362a022472e7d899
src/main.c
src/main.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "emulator.h" void usage(char *programName); int main(int argsNum, char *args[]) { int i; int debugMode = 0; char *filename = NULL; emulator *e; /* Handle arguments */ for (i = 0; i < argsNum; i++) { char *arg...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "emulator.h" void usage(char *programName); int main(int argsNum, char *args[]) { int i; int debugMode = 0; char *filename = NULL; emulator *e; /* Handle arguments */ for (i = 1; i < argsNum; i++) { char *arg...
Print usage if the only argument is "-d"
Print usage if the only argument is "-d"
C
mit
andrewrothman/4917,andrewrothman/4917
fb9ae2faae28b7ab57651261c1ec98f9bf5b87bb
components/TARGET_PSA/services/platform/COMPONENT_PSA_SRV_EMUL/platform_emul.c
components/TARGET_PSA/services/platform/COMPONENT_PSA_SRV_EMUL/platform_emul.c
/* Copyright (c) 2019 ARM Limited * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
/* Copyright (c) 2019 ARM Limited * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
Fix incorrect return value in psa_security_lifecycle_state (emul)
Fix incorrect return value in psa_security_lifecycle_state (emul) psa_security_lifecycle_state should return uint32_t of the security lifecycle state. bug: psa_platfrom_lifecycle_get_impl return value is psa_status_t.
C
apache-2.0
mbedmicro/mbed,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,andcor02/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,mbedmicro/mbed,kjbracey-arm/mbed,kjbracey-arm/mbed,kjbracey-arm/mbed,andcor02/mbed-os,mbedmicro/mbed,mbedmicro/mbed
1308c45bcd3738e339e257bf17899230a4a62456
src/search/util/atomic_int.h
src/search/util/atomic_int.h
/* -*- mode:linux -*- */ /** * \file atomic_int.h * * Atomic integer operations. This code uses code from * liblinuxkernel, which means that it was indirrectly taken from the * Linux kernel. * * \author Ethan Burns * \date 2008-10-14 */ #if !defined(_ATOMIC_INT_H_) #define _ATOMIC_INT_H_ #define LOCK_PREFIX...
Add an AtomicInt class... completely untested.
Add an AtomicInt class... completely untested.
C
mit
eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf
596cd371eab5e2a5a7112f6fe62adc68e3527526
tests/regression/00-sanity/20-if-0-realnode.c
tests/regression/00-sanity/20-if-0-realnode.c
#include <assert.h> void stuff() { } int main() { // MyCFG shouldn't ignore loops with exp 0 because they may have else branches bar: if (0) { foo: // label prevents CIL from optimizing away this branch stuff(); // something non-empty } else { goto bar; // direct realnode ...
#include <assert.h> void stuff() { } int main() { // MyCFG shouldn't ignore loops with exp 0 because they may have else branches bar: if (0) { foo: // label prevents CIL from optimizing away this branch stuff(); // something non-empty } else { goto bar; // direct realnode ...
Remove unreachable code after goto in 00/20
Remove unreachable code after goto in 00/20
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
31d76c90b066974ce8fe710d75c8d315f8a45d03
MBContactPicker/ContactCollectionViewCellModel.h
MBContactPicker/ContactCollectionViewCellModel.h
// // ContactCollectionViewCellModel.h // MBContactPicker // // Created by Matt Bowman on 11/20/13. // Copyright (c) 2013 Citrrus, LLC. All rights reserved. // #import <Foundation/Foundation.h> @interface ContactCollectionViewCellModel : NSObject @property (nonatomic, weak) id contactObject; @property (nonatomic...
// // ContactCollectionViewCellModel.h // MBContactPicker // // Created by Matt Bowman on 11/20/13. // Copyright (c) 2013 Citrrus, LLC. All rights reserved. // #import <Foundation/Foundation.h> @interface ContactCollectionViewCellModel : NSObject @property (nonatomic) id contactObject; @property (nonatomic, copy...
Use a strong reference for the contactObject on the contact view model. Makes it easier to use if you don't have a object that is strongly ref'ed to begin with, like a string ID.
Use a strong reference for the contactObject on the contact view model. Makes it easier to use if you don't have a object that is strongly ref'ed to begin with, like a string ID.
C
mit
xuzhiming/MBContactPicker,octanner/MBContactPicker,Citrrus/MBContactPicker
e6281f57ea8ea965db6dfa7ed45f07c1ac95aeaa
src/auth/mycrypt.c
src/auth/mycrypt.c
#define _XOPEN_SOURCE 4 #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */ #define _XOPEN_VERSION 4 #define _XPG4_2 #include <unistd.h> #include "mycrypt.h" char *mycrypt(const char *key, const char *salt) { return crypt(key, salt); }
#define _XOPEN_SOURCE 4 #define _XOPEN_SOURCE_EXTENDED 1 /* 1 needed for AIX */ #define _XOPEN_VERSION 4 #define _XPG4_2 #ifdef CRYPT_USE_XPG6 # define _XPG6 /* Some Solaris versions require this, some break with this */ #endif #include <unistd.h> #include "mycrypt.h" char *mycrypt(const char *key, const char *salt)...
Add _XPG6 macro if needed..
Add _XPG6 macro if needed.. --HG-- branch : HEAD
C
mit
jwm/dovecot-notmuch,jwm/dovecot-notmuch,dscho/dovecot,dscho/dovecot,jkerihuel/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,dscho/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,jkerihuel/dovecot,dscho/dovecot,jkerihuel/dovecot,jwm/dovecot-notmuch,dscho/dovecot
e6dfb05d7deddc82060c8a34944b2166e8e26870
DeltaDNA/DeltaDNA.h
DeltaDNA/DeltaDNA.h
// // Copyright (c) 2016 deltaDNA Ltd. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
// // Copyright (c) 2016 deltaDNA Ltd. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by ...
Remove header that is no longer present
DDSDK-7: Remove header that is no longer present
C
apache-2.0
deltaDNA/ios-sdk,deltaDNA/ios-sdk,deltaDNA/ios-sdk
273595f90735f3294c1a33968db69cfc3031cb0d
runtime/libprofile/Profiling.h
runtime/libprofile/Profiling.h
/*===-- Profiling.h - Profiling support library support routines --*- C -*-===*\ |* |* The LLVM Compiler Infrastructure |* |* This file was developed by the LLVM research group and is distributed under |* the University of Illinois Open Source License. See LICENSE.TXT for details. |* |*===---------...
/*===-- Profiling.h - Profiling support library support routines --*- C -*-===*\ |* |* The LLVM Compiler Infrastructure |* |* This file was developed by the LLVM research group and is distributed under |* the University of Illinois Open Source License. See LICENSE.TXT for details. |* |*===---------...
Add basic block tracing information as a type of "profiling" information.
Add basic block tracing information as a type of "profiling" information. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@13337 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-...
5bb57a199d5ba7b70b2f1c4a566bfe9bdb0ce1c1
sauce/internal/self_injector.h
sauce/internal/self_injector.h
#ifndef SAUCE_INTERNAL_SELF_INJECTOR_H_ #define SAUCE_INTERNAL_SELF_INJECTOR_H_ #include <sauce/memory.h> namespace sauce { namespace internal { /** * If a type requests injection of its own smart pointer, do so. * * An interface Iface requests this by exposing void setSelf(sauce::weak_ptr<Iface>), detected by SF...
#ifndef SAUCE_INTERNAL_SELF_INJECTOR_H_ #define SAUCE_INTERNAL_SELF_INJECTOR_H_ #include <sauce/memory.h> namespace sauce { namespace internal { /** * If a type requests injection of its own smart pointer, do so. * * An interface Iface requests this by exposing void setSelf(sauce::weak_ptr<Iface>), detected by SF...
Make SelfInjector aware of inherited methods.
Make SelfInjector aware of inherited methods. See http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
C
mit
phs/sauce,phs/sauce,phs/sauce,phs/sauce
717bd6ed8cd2f28f9838de3d8506ba2ab5152d0d
test.c
test.c
/* a test file for ArgyrisPack */ #include <stdio.h> #include "argyris_pack.h" #define ORDER(row,col,nrows,ncols) (row)*(ncols) + (col) void print_matrix(double* matrix, int rows, int cols) { int i, j; for (i = 0; i < rows; i++) { for (j = 0; j < cols; j++) { pr...
/* a test file for ArgyrisPack */ #include <stdio.h> #include "argyris_pack.h" #include "order_logic.h" void print_matrix(double* matrix, int rows, int cols) { int i, j; for (i = 0; i < rows; i++) { for (j = 0; j < cols; j++) { printf("%.16f ", matrix[ORDER(i,j,r...
REFACTOR include the more general macro collection in order_logic.h
REFACTOR include the more general macro collection in order_logic.h
C
bsd-3-clause
VT-ICAM/ArgyrisPack,VT-ICAM/ArgyrisPack,VT-ICAM/ArgyrisPack
33231a276ae9ac84ae779531e9f346fb7719a4cb
Include/sysmodule.h
Include/sysmodule.h
/* System module interface */ #ifndef Py_SYSMODULE_H #define Py_SYSMODULE_H #ifdef __cplusplus extern "C" { #endif DL_IMPORT(PyObject *) PySys_GetObject(char *); DL_IMPORT(int) PySys_SetObject(char *, PyObject *); DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *); DL_IMPORT(void) PySys_SetArgv(int, char **); DL_IMPORT...
/* System module interface */ #ifndef Py_SYSMODULE_H #define Py_SYSMODULE_H #ifdef __cplusplus extern "C" { #endif DL_IMPORT(PyObject *) PySys_GetObject(char *); DL_IMPORT(int) PySys_SetObject(char *, PyObject *); DL_IMPORT(FILE *) PySys_GetFile(char *, FILE *); DL_IMPORT(void) PySys_SetArgv(int, char **); DL_IMPORT...
Add declarations for PySys_ResetWarnOptions() and PySys_AddWarnOption().
Add declarations for PySys_ResetWarnOptions() and PySys_AddWarnOption().
C
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
fceeec91fa4bba9f4240e7e43eec3066b434cc6b
test/Sema/stdcall-fastcall.c
test/Sema/stdcall-fastcall.c
// RUN: clang -fsyntax-only -verify %s // CC qualifier can be applied only to functions int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}} int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' attribute only applies to function types}} // Differe...
// RUN: clang -fsyntax-only -verify %s // CC qualifier can be applied only to functions int __attribute__((stdcall)) var1; // expected-warning{{'stdcall' attribute only applies to function types}} int __attribute__((fastcall)) var2; // expected-warning{{'fastcall' attribute only applies to function types}} // Differe...
Complete the test after adding handling of merged attributes on decls.
Complete the test after adding handling of merged attributes on decls. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@61438 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,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,apple/swift-clang,apple/swift-cl...
ccf3af77c10c3b06acde8ee55930051a862bd728
src/qt/bitcoinaddressvalidator.h
src/qt/bitcoinaddressvalidator.h
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base48 entry widget validator. Corrects near-miss characters and refuses characters that are no part of base48. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressVali...
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base58 entry widget validator. Corrects near-miss characters and refuses characters that are not part of base58. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressVal...
Fix typo in a comment: it's base58, not base48.
Fix typo in a comment: it's base58, not base48.
C
mit
GroundRod/anoncoin,Mrs-X/Darknet,donaloconnor/bitcoin,sstone/bitcoin,ahmedbodi/vertcoin,11755033isaprimenumber/Feathercoin,Earlz/renamedcoin,jimmykiselak/lbrycrd,shouhuas/bitcoin,litecoin-project/litecoin,rustyrussell/bitcoin,nmarley/dash,pstratem/elements,goku1997/bitcoin,BTCTaras/bitcoin,NicolasDorier/bitcoin,Flowdal...
0d689b75f51c61e0fd54169a714770a4b8573985
7segments.c
7segments.c
#define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="$ֶ<&"[*c++-48])&u/2?33:32,y&u?95:32,y&u/4?33:32,*c?32:10);u*=8; main(int u,char**a){L;L;L}
#define L for(char*c=a[1],y;*c;)printf("%c%c%c ",(y="$ֶ<&"[*c++-48])&u/2?33:32,y&u?95:32,y&u/4?33:32);puts("");u*=8; main(int u,char**a){L;L;L}
Use puts() to save 1 byte.
Use puts() to save 1 byte.
C
mit
McZonk/7segements,McZonk/7segements
464f20cf7bef622fcdc77fa636388e9a3e207aca
src/include/libpq/hba.h
src/include/libpq/hba.h
/*------------------------------------------------------------------------- * * hba.h * Interface to hba.c * * * $Id: hba.h,v 1.27 2001/09/21 20:31:48 tgl Exp $ * *------------------------------------------------------------------------- */ #ifndef HBA_H #define HBA_H #ifndef WIN32 #include <netinet/in.h> #...
/*------------------------------------------------------------------------- * * hba.h * Interface to hba.c * * * $Id: hba.h,v 1.28 2001/10/01 02:26:36 ishii Exp $ * *------------------------------------------------------------------------- */ #ifndef HBA_H #define HBA_H #ifndef WIN32 #include <netinet/in.h>...
Fix a compile error on a platform that does not have PAM.
Fix a compile error on a platform that does not have PAM.
C
apache-2.0
zaksoup/gpdb,edespino/gpdb,oberstet/postgres-xl,ovr/postgres-xl,janebeckman/gpdb,CraigHarris/gpdb,janebeckman/gpdb,postmind-net/postgres-xl,ashwinstar/gpdb,Quikling/gpdb,ahachete/gpdb,rubikloud/gpdb,cjcjameson/gpdb,edespino/gpdb,greenplum-db/gpdb,royc1/gpdb,yazun/postgres-xl,foyzur/gpdb,xuegang/gpdb,royc1/gpdb,janebeck...
8578c3133ace5a4cc6cca7119e6ed96eeee37f78
src/ia64/Gget_accessors-ia64.c
src/ia64/Gget_accessors-ia64.c
/* libunwind - a platform-independent unwind library Copyright (C) 2002 Hewlett-Packard Co Contributed by David Mosberger-Tang <davidm@hpl.hp.com> This file is part of libunwind. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "...
Declare libunwind-entry-points as PROTECTED to ensure local uses get resolved within the library itself.
Declare libunwind-entry-points as PROTECTED to ensure local uses get resolved within the library itself. 2004/01/03 00:24:50-08:00 hp.com!davidm Rename: src/ia64/get_accessors-ia64.c -> src/ia64/Gget_accessors-ia64.c (Logical change 1.151)
C
mit
yuyichao/libunwind,Keno/libunwind,vegard/libunwind,olibc/libunwind,igprof/libunwind,krytarowski/libunwind,vegard/libunwind,evaautomation/libunwind,ehsan/libunwind,pathscale/libunwind,androidarmv6/android_external_libunwind,libunwind/libunwind,rogwfu/libunwind,tony/libunwind,maltek/platform_external_libunwind,jrmuizel/l...
1b0055bb70f3d1a0650f25b53c68b9984414ed87
examples/double-check.c
examples/double-check.c
#include "rmc.h" struct mutex_t; struct foo_t; typedef struct mutex_t mutex_t; typedef struct foo_t foo_t; extern void mutex_lock(mutex_t *p); extern void mutex_unlock(mutex_t *p); extern foo_t *new_foo(void); extern mutex_t *foo_lock; foo_t *get_foo(void) { static foo_t *single_foo = 0; XEDGE(read, post...
Add a double check locking example
Add a double check locking example
C
mit
msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler,msullivan/rmc-compiler
1c48d320cbd3c0789d4bdf4039f2d4188a3087b9
src/utils/cuda_helper.h
src/utils/cuda_helper.h
#ifndef SRC_UTILS_CUDA_HELPER_H_ #define SRC_UTILS_CUDA_HELPER_H_ #include <cuda.h> #include <cuda_runtime.h> #include <iostream> static void HandleError(cudaError_t err, const char *file, int line) { if (err != cudaSuccess) { printf("%s in %s at line %d\n", cudaGetErrorString(err), file, line); exit(EXI...
#ifndef SRC_UTILS_CUDA_HELPER_H_ #define SRC_UTILS_CUDA_HELPER_H_ #include <cuda.h> #include <cuda_runtime.h> #include <iostream> #include <stdexcept> static void HandleError(cudaError_t error, const char *file, int line) { if (error != cudaSuccess) { printf("%s in %s at line %d\n", cudaGetErrorString(error)...
Throw exception on cuda error to get a stack trace.
Throw exception on cuda error to get a stack trace.
C
mit
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
be22d2f84576fc2ff93aea23da44d004529d84d5
tests/regression/13-privatized/57-singlethreaded-unlock.c
tests/regression/13-privatized/57-singlethreaded-unlock.c
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { // just for going to multithreaded mode return NULL; } int main() { pthread_mutex_lock(&A); g = 1; pthread_mutex_unlock(&A); // singlethreaded mode unlock g = 2; pthread_t id; ...
Add regression test (based on ctrace_comb) where singlethreaded mode unlock causes side effect with lazy-mine
Add regression test (based on ctrace_comb) where singlethreaded mode unlock causes side effect with lazy-mine
C
mit
goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer
e6420a303bfdeeba04ec7b00367ef4474e96e5a3
UIforETW/Version.h
UIforETW/Version.h
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.52f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // incr...
#pragma once // const float in a header file can lead to duplication of the storage // but I don't really care in this case. Just don't do it with a header // that is included hundreds of times. const float kCurrentVersion = 1.53f; // Put a "#define VERSION_SUFFIX 'b'" line here to add a minor version // incr...
Increase version number to 1.53
Increase version number to 1.53
C
apache-2.0
google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW,google/UIforETW,ariccio/UIforETW
f35ae9ff1a231a0db7e0046aedeece0b894a46b9
src/kbase/basic_types.h
src/kbase/basic_types.h
/* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KBASE_BASIC_TYPES_H_ #define KBASE_BASIC_TYPES_H_ #include <cstdint> #include <string> // Defines types that would be shared by among several files. namespace kbase { // |PathKey| is used by |PathService| and |BasePathProvider|. using PathKey = ...
/* @ 0xCCCCCCCC */ #if defined(_MSC_VER) #pragma once #endif #ifndef KBASE_BASIC_TYPES_H_ #define KBASE_BASIC_TYPES_H_ #include <cstdint> #include <string> #include "kbase/basic_macros.h" // Defines types that would be shared by among several files. namespace kbase { // |PathKey| is used by |PathService| and |Ba...
Make PathChar compatible with other platform
Make PathChar compatible with other platform
C
mit
kingsamchen/KBase,kingsamchen/KBase_Demo,kingsamchen/KBase,kingsamchen/KBase_Demo
12335f0514a13e146f88c7ada3416d2ab99aa5a8
include/parrot/stacks.h
include/parrot/stacks.h
/* stacks.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Stack handling routines for Parrot * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_STACKS_H_GUARD) #define PARROT_STACKS_H_GUARD #include "parrot/parr...
/* stacks.h * Copyright: (When this is determined...it will go here) * CVS Info * $Id$ * Overview: * Stack handling routines for Parrot * Data Structure and Algorithms: * History: * Notes: * References: */ #if !defined(PARROT_STACKS_H_GUARD) #define PARROT_STACKS_H_GUARD #include "parrot/parr...
Fix typo in function name
Fix typo in function name git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@255 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
C
artistic-2.0
FROGGS/parrot,parrot/parrot,youprofit/parrot,tewk/parrot-select,youprofit/parrot,tewk/parrot-select,tkob/parrot,gagern/parrot,FROGGS/parrot,gagern/parrot,FROGGS/parrot,tewk/parrot-select,parrot/parrot,tkob/parrot,gagern/parrot,parrot/parrot,gitster/parrot,youprofit/parrot,tkob/parrot,tkob/parrot,tkob/parrot,gagern/parr...
5b89216a3f55e7ad439beac105896ca881555b4f
proctitle.c
proctitle.c
#include <lua.h> #include <lauxlib.h> #include <string.h> static char * find_argv0(lua_State *L) { extern char *__progname; return __progname; } static int set_proctitle(lua_State *L) { const char *title = luaL_checkstring(L, 1); char *argv0 = find_argv0(L); // XXX no length check strcpy(arg...
/* * Copyright (c) 2015 Rob Hoelz <rob AT SIGN hoelz.ro> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, m...
Add license header to source
Add license header to source
C
mit
hoelzro/lua-proctitle
1042c0104d33ab2a3a220ef5f91c9e225af8c080
include/tcframe/type.h
include/tcframe/type.h
#ifndef TCFRAME_TYPE_H #define TCFRAME_TYPE_H #include <ostream> #include <type_traits> using std::enable_if; using std::integral_constant; using std::is_arithmetic; using std::is_same; using std::ostream; using std::string; namespace tcframe { class Variable { public: virtual void printTo(ostream& out) = 0; ...
#ifndef TCFRAME_TYPE_H #define TCFRAME_TYPE_H #include <ostream> #include <type_traits> using std::enable_if; using std::integral_constant; using std::is_arithmetic; using std::is_same; using std::ostream; using std::string; namespace tcframe { class Variable { public: virtual void printTo(ostream& out) = 0; ...
Simplify SFINAE expression for RequiresScalar
Simplify SFINAE expression for RequiresScalar
C
mit
tcframe/tcframe,ia-toki/tcframe,fushar/tcframe,ia-toki/tcframe,tcframe/tcframe,fushar/tcframe
458ca11952e77331db5bc4b9e9e8e3682e3b1de3
lib/quagga/src/quagga.h
lib/quagga/src/quagga.h
/* * OLSRd Quagga plugin * * Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de> * Copyright (C) 2007-2010 Vasilis Tsiligiannis <acinonyxs@yahoo.gr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 a...
/* * OLSRd Quagga plugin * * Copyright (C) 2006-2008 Immo 'FaUl' Wehrenberg <immo@chaostreff-dortmund.de> * Copyright (C) 2007-2012 Vasilis Tsiligiannis <acinonyxs@yahoo.gr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 a...
Add missing declaration of zebra_hello()
Add missing declaration of zebra_hello()
C
bsd-3-clause
diogomg/olsrd,zioproto/olsrd,ninuxorg/olsrd,diogomg/olsrd-binary-heap,acinonyx/olsrd,nolith/olsrd,diogomg/olsrd,zioproto/olsrd,tdz/olsrd,tdz/olsrd,servalproject/olsr,tdz/olsrd,acinonyx/olsrd,nolith/olsrd,ninuxorg/olsrd,diogomg/olsrd-binary-heap,ninuxorg/olsrd,acinonyx/olsrd,duydb2/olsr,diogomg/olsrd,cholin/olsrd,diogom...
6d99092c13cadd87fd123590fd29006d04648a2c
lib/System/Win32/Win32.h
lib/System/Win32/Win32.h
//===- Win32/Win32.h - Common Win32 Include File ----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===- Win32/Win32.h - Common Win32 Include File ----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Use normalized case and include method.
System/Windows: Use normalized case and include method. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@118503 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm...
ff408a945f4d59d4f289ec00c267002b2d0892bb
AFToolkit/AFToolkit.h
AFToolkit/AFToolkit.h
// // Toolkit header to include the main headers of the 'AFToolkit' library. // #import "AFDefines.h" #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "UITableViewCell+Universal.h" #import "AFDBClient.h" #import "AFVi...
// // Toolkit header to include the main headers of the 'AFToolkit' library. // #import "AFDefines.h" #import "AFLogHelper.h" #import "AFFileHelper.h" #import "AFPlatformHelper.h" #import "AFKVO.h" #import "AFArray.h" #import "AFMutableArray.h" #import "NSBundle+Universal.h" #import "UITableViewCell+Universal.h" #impo...
Add NSBundle+Universal.h to toolkit header
Add NSBundle+Universal.h to toolkit header
C
mit
mlatham/AFToolkit
99f65931e88b3a22b2bd5e9e88bf6798c529023c
cc1/tests/test038.c
cc1/tests/test038.c
/* name: TEST038 description: Basic test for tentative definitions output: G1 I x G1 #I0 :I F2 I E X3 F2 main F4 P E G5 F4 foo { \ r X3 'P } G3 F2 main { \ G1 #I0 :I r G1 } */ int x; int x = 0; int x; int main(); void * foo() { return &main; } int main() { x = 0; return x; }
Add basic test for tentative definitions
Add basic test for tentative definitions
C
isc
8l/scc,k0gaMSX/scc,8l/scc,8l/scc,k0gaMSX/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/kcc
b8b54f0d5c97324a7534bfeed523660c7296f9da
cc1/tests/test031.c
cc1/tests/test031.c
/* name: TEST031 description: Test concatenation in preprocessor output: F5 I G6 F5 main { \ A7 I foo A8 I bar A9 I foobar A9 A7 A8 +I :I A9 A7 A8 +I :I r #I0 } */ #define CAT(x,y) x ## y #define XCAT(x,y) CAT(x,y) #define FOO foo #define BAR bar int main(void) { int foo, bar, foobar; CAT(foo,bar) = foo + bar;...
Add test for concatenation in the preprocessor
Add test for concatenation in the preprocessor
C
isc
k0gaMSX/scc,k0gaMSX/kcc,8l/scc,8l/scc,8l/scc,k0gaMSX/kcc,k0gaMSX/scc,k0gaMSX/scc
d22e16e698bbc6c64666bf0f1e46015adecb0ce5
constant-helper.c
constant-helper.c
#include <fcntl.h> #include <stdio.h> int main(void) { printf("F_GETFL=%d\n", F_GETFL); printf("F_SETFL=%d\n", F_SETFL); printf("O_NONBLOCK=%d\n", O_NONBLOCK); return 0; }
#if _WIN32 || _WIN64 # define F_GETFL 0 # define F_SETFL 0 # define O_NONBLOCK 0 #else # include <fcntl.h> #endif #include <stdio.h> int main(void) { printf("F_GETFL=%d\n", F_GETFL); printf("F_SETFL=%d\n", F_SETFL); printf("O_NONBLOCK=%d\n", O_NONBLOCK); return 0; }
Use zeroes for fcntl constants on Windows
Use zeroes for fcntl constants on Windows We don't need to fcntl on Windows, so let's just use dummy values
C
mit
hoelzro/p6-linenoise,hoelzro/p6-linenoise
4f130e6c40d5da1b47c398edaf3979c3fab4a9b2
languages/c-language/magic-primes.c
languages/c-language/magic-primes.c
/* * Compute prime numbers up to 67. * * https://spamsink.dreamwidth.org/1197779.html */ #include <stdio.h> #include <math.h> double magic(double f) { double ff = floor(f); double r = log(ff + 6) * (log(ff + 6) - 1); return (f - ff) * floor(r) + f; } double C = 2.6358597414547913; int main() { in...
Add demo of magic primes.
Add demo of magic primes.
C
apache-2.0
sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-o...
ee462489f1da5ea332851843d10541594f6fc7b0
stm/usart.h
stm/usart.h
typedef enum { PYB_USART_NONE = 0, PYB_USART_1 = 1, PYB_USART_2 = 2, PYB_USART_3 = 3, PYB_USART_6 = 4, PYB_USART_MAX = 4, } pyb_usart_t; extern pyb_usart_t pyb_usart_global_debug; void usart_init(pyb_usart_t usart_id, uint32_t baudrate); bool usart_rx_any(pyb_usart_t usart_id); int usart_rx_ch...
typedef enum { PYB_USART_NONE = 0, PYB_USART_1 = 1, PYB_USART_2 = 2, PYB_USART_3 = 3, PYB_USART_6 = 4, PYB_USART_MAX = 4, //PYB_USART_XA = // USART4 on X1, X2 = PA0, PA1 PYB_USART_XB = 1, // USART1 on X9, X10 = PB6, PB7 PYB_USART_YA = 4, // USART6 on Y1, Y2 = PC6, PC7 PYB_USART...
Add USART enum for pyboard skin labels.
stm: Add USART enum for pyboard skin labels.
C
mit
pozetroninc/micropython,TDAbboud/micropython,bvernoux/micropython,infinnovation/micropython,jimkmc/micropython,feilongfl/micropython,chrisdearman/micropython,jimkmc/micropython,suda/micropython,dmazzella/micropython,ericsnowcurrently/micropython,paul-xxx/micropython,SungEun-Steve-Kim/test-mp,chrisdearman/micropython,jm...
3443bd38e91cc5babc5f49b063571c818dc80990
arduino/OpenROV/Motors.h
arduino/OpenROV/Motors.h
#ifndef __MOTORS_H_ #define __MOTORS_H_ #include <Servo.h> #define MIDPOINT 128 class Motors { private: Servo port, vertical, starbord; int port_pin, vertical_pin, starbord_pin; public: Motors(int p_pin, int v_pin, int s_pin); void reset(); void go(int p, int v, int s); void stop(...
#ifndef __MOTORS_H_ #define __MOTORS_H_ #include <Servo.h> #define MIDPOINT 90 class Motors { private: Servo port, vertical, starbord; int port_pin, vertical_pin, starbord_pin; public: Motors(int p_pin, int v_pin, int s_pin); void reset(); void go(int p, int v, int s); void stop()...
Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180)
Set MIDPOINT to 90 instead of 128 (servo lib goes from 0 to 180)
C
mit
codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software
b9bcb1f7994994213d18d97f4c04582b9d6a04b2
board/bluepill/pins.h
board/bluepill/pins.h
#ifndef PINS_H_ #define PINS_H_ typedef GPIO_PIN_LED<3,13,false> LED_BUILTIN_; typedef GPIO_PIN<1,9> TX1_PIN; typedef GPIO_PIN<1,10> RX1_PIN; typedef TX1_PIN TX_PIN; typedef RX1_PIN RX_PIN; typedef GPIO_PIN<1,2> TX2_PIN; typedef GPIO_PIN<1,3> RX2_PIN; typedef GPIO_PIN<2,10> TX3_PIN; typedef GPIO_PIN<2,11> RX3_PIN;...
#ifndef PINS_H_ #define PINS_H_ typedef GPIO_PIN_LED<3,13,false> LED_BUILTIN_; typedef GPIO_PIN<1,9> TX1_PIN; typedef GPIO_PIN<1,10> RX1_PIN; typedef GPIO_PIN<1,2> TX2_PIN; typedef GPIO_PIN<1,3> RX2_PIN; typedef GPIO_PIN<2,10> TX3_PIN; typedef GPIO_PIN<2,11> RX3_PIN; typedef GPIO_PIN<0,0xFFFF> NO_PIN; typedef TX2...
Change default serial to USART2 for bluepill stm32f103 board
Change default serial to USART2 for bluepill stm32f103 board
C
mit
RickKimball/fabooh,RickKimball/fabooh
78d48b4a6c7f49ee07ff9bced8df6f7379c13d6f
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
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler