after stringlengths 72 2.11k | before stringlengths 21 1.55k | diff stringlengths 85 2.31k | instruction stringlengths 20 1.71k | license stringclasses 13
values | repos stringlengths 7 82.6k | commit stringlengths 40 40 |
|---|---|---|---|---|---|---|
/*
* USART.h
*
* Created: 2016/9/10 16:30:30
* Author: dusch
*/
#ifndef USART_H_
#define USART_H_
#define BAUD 9600
#define F_CPU 8000000UL
#include <avr/interrupt.h>
void USART_Init(void);
void USART_Transmit(unsigned char data);
unsigned char USART_Receive(void);
#endif /* USART_H_ ... | /*
* USART.h
*
* Created: 2016/9/10 16:30:30
* Author: dusch
*/
#ifndef USART_H_
#define USART_H_
#define BAUD 9600
#define F_CPU 12000000UL
#include <avr/interrupt.h>
void USART_Init(void);
void USART_Transmit(unsigned char data);
unsigned char USART_Receive(void);
#endif /* USART_H_... | ---
+++
@@ -10,7 +10,7 @@
#define USART_H_
#define BAUD 9600
-#define F_CPU 12000000UL
+#define F_CPU 8000000UL
#include <avr/interrupt.h>
void USART_Init(void); | Change default F_CPU from 12000000 to 8000000
| bsd-3-clause | Schummacher/AVR_SCLib,Schummacher/AVR_SCLib | 76df39bdfbc3eaa67abde2a413b0610a29502520 |
/*
* Copyright 2013 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | /*
* Copyright 2013 Couchbase, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable... | ---
+++
@@ -23,18 +23,10 @@
#include <string.h>
#include <ctype.h>
#include <assert.h>
+#include <platform/platform.h>
-#ifdef _WIN32
-#include <windows.h>
-typedef unsigned __int8 cbsasl_uint8_t;
-typedef unsigned __int16 cbsasl_uint16_t;
-typedef unsigned __int32 cbsasl_uint32_t;
-#else
-#include <unistd.h>
-#... | Include platform.h instead of ifdef'ing
Change-Id: I23b3202563623b46d94c10459837581be231f58e
Reviewed-on: http://review.couchbase.org/30386
Reviewed-by: Michael Wiederhold <a17fed27eaa842282862ff7c1b9c8395a26ac320@couchbase.com>
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
| apache-2.0 | couchbase/cbsasl | de4c5acd59de654cd1b16cf74ae94f1bd128652a |
#include "ring.h"
/*
OpenGL 2.1 Extension
Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com>
*/
#include <GL/glew.h>
#include <GL/glut.h>
RING_FUNC(ring_glAccum)
{
if ( RING_API_PARACOUNT != 2 ) {
RING_API_ERROR(RING_API_MISS2PARA);
return ;
}
if ( ! RING_API_ISNUMBER(1) ) {
RING_API_ERROR(RING_AP... | #include "ring.h"
/*
OpenGL 2.1 Extension
Copyright (c) 2017 Mahmoud Fayed <msfclipper@yahoo.com>
*/
#include <GL/glew.h>
#include <GL/glut.h>
RING_API void ringlib_init(RingState *pRingState)
{
}
| ---
+++
@@ -10,6 +10,25 @@
#include <GL/glew.h>
#include <GL/glut.h>
+
+RING_FUNC(ring_glAccum)
+{
+ if ( RING_API_PARACOUNT != 2 ) {
+ RING_API_ERROR(RING_API_MISS2PARA);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
... | Update RingOpenGL - Add Function (Source Code) : void glAccum(GLenum op,GLfloat value)
| mit | ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring,ring-lang/ring | e263b70f1126b4fdb1ade836aacd547ad0e3e3b2 |
#include <unordered_set>
#include "../src/include/gc_obj.h"
class BinaryTreeNode : public gc_obj {
public:
BinaryTreeNode(const int id);
int size() const;
void curtailToLevel(const int lvl);
void extendToLevel(const int size);
void addLeftChild(BinaryTreeNode* leftChild);
void addRightChild(BinaryTreeNode* righ... |
#include <unordered_set>
#include "../src/include/gc_obj.h"
#include "../src/include/collector.h"
class BinaryTreeNode : public gc_obj {
public:
BinaryTreeNode(const int id);
~BinaryTreeNode() = delete;
int size() const;
void curtailToLevel(const int lvl);
void extendToLevel(const int size,Collector* collector);... | ---
+++
@@ -1,15 +1,13 @@
#include <unordered_set>
#include "../src/include/gc_obj.h"
-#include "../src/include/collector.h"
class BinaryTreeNode : public gc_obj {
public:
BinaryTreeNode(const int id);
- ~BinaryTreeNode() = delete;
int size() const;
void curtailToLevel(const int lvl);
- void extendToLev... | Remove manual addObject usage from the collector | mit | henfredemars/simple-collector | 15c7a4f2089b5688f7ff3be22fd349d8e3530267 |
#import <Foundation/Foundation.h>
@interface NSString (TDTAdditions)
/**
@return A string representing a newly generated version 4 random UUID
*/
+ (instancetype)randomUUID;
/**
@return The SHA1 of the receiver
*/
- (NSString *)sha1Digest;
/**
@return A new string by trimming non alphanumeric characters from ... | #import <Foundation/Foundation.h>
@interface NSString (TDTAdditions)
/**
@return a string representing a newly generated version 4 random UUID
*/
+ (instancetype)randomUUID;
/**
@return The SHA1 of the receiver
*/
- (NSString *)sha1Digest;
/**
@return a new string by trimming non alphanumeric characters from ... | ---
+++
@@ -3,7 +3,7 @@
@interface NSString (TDTAdditions)
/**
- @return a string representing a newly generated version 4 random UUID
+ @return A string representing a newly generated version 4 random UUID
*/
+ (instancetype)randomUUID;
@@ -13,7 +13,7 @@
- (NSString *)sha1Digest;
/**
- @return a new st... | Fix initial case for header documentation sentences
| bsd-3-clause | talk-to/Chocolate,talk-to/Chocolate | acd3a4a5b459b405418b1651f59c38bca4fa0050 |
#include <stdio.h>
#include "libsass/sass_interface.h"
int main(int argc, char** argv)
{
int ret;
if (argc < 2) {
printf("Usage: sassc [INPUT FILE]\n");
return 0;
}
struct sass_file_context* ctx = sass_new_file_context();
ctx->options.include_paths = "";
ctx->options.image_path = "images";
ctx->options.ou... | #include <stdio.h>
#include "libsass/sass_interface.h"
int main(int argc, char** argv)
{
int ret;
if (argc < 2) {
printf("Usage: sassc [INPUT FILE]\n");
return 0;
}
struct sass_file_context* ctx = sass_new_file_context();
ctx->options.include_paths = "";
ctx->options.image_path = "images";
ctx->options.ou... | ---
+++
@@ -20,9 +20,9 @@
if (ctx->error_status) {
if (ctx->error_message)
- printf("%s", ctx->error_message);
+ fprintf(stderr, "%s", ctx->error_message);
else
- printf("An error occured; no error message available.\n");
+ fprintf(stderr, "An error occured; no error message available.\n");
ret =... | Print error messages to stderr.
| mit | saper/sassc,am11/sassc,am11/sassc,djam90/sassc,rightisleft/sassc,saper/sassc,am11/sassc,saper/sassc,rightisleft/sassc,djam90/sassc,rightisleft/sassc,djam90/sassc | 8348847ba77a85167f591e7c97db6d205b0a3f62 |
/* Copyright 2018 The TensorFlow Authors. 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 applicable law or a... | /* Copyright 2018 The TensorFlow Authors. 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 applicable law or a... | ---
+++
@@ -25,7 +25,7 @@
absl::string_view name() const override { return "scatter_expander"; }
StatusOr<bool> Run(HloModule* module) override;
- private:
+ protected:
StatusOr<HloInstruction*> ExpandScatter(HloInstruction* scatter);
};
| [XLA] Make ScatterExpander methods 'protected' to enable overriding them in a subclass.
PiperOrigin-RevId: 217914138
| apache-2.0 | apark263/tensorflow,seanli9jan/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,theflofly/tensorflow,gunan/tensorflow,dongjoon-hyun/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,kevin-coder/tensorflow-fork,hfp/tensorflow-xsmm,tensorflow/tensorflow-pywrap_saved_model... | 34b1c5f6bc22dbb512f5d0462153042ffc6407fa |
// itickable.h
//
// Interface definition of an object that is updated during the tick cycle.
//
#ifndef DEMO_ITICKABLE_H
#define DEMO_ITICKABLE_H
namespace demo
{
namespace obj
{
class ITickable
{
public:
// CONSTRUCTORS
/**
* Destruct the tickable.
*/
~ITickable();
// MEMBER FUNCTIONS
... | // itickable.h
//
// Interface definition of an object that is updated during the tick cycle.
//
#ifndef DEMO_ITICKABLE_H
#define DEMO_ITICKABLE_H
namespace demo
{
namespace obj
{
class ITickable
{
public:
// CONSTRUCTORS
~ITickable();
// MEMBER FUNCTIONS
/**
* Prepare for the next tick cycle... | ---
+++
@@ -15,6 +15,9 @@
{
public:
// CONSTRUCTORS
+ /**
+ * Destruct the tickable.
+ */
~ITickable();
// MEMBER FUNCTIONS
@@ -25,7 +28,7 @@
/**
* Update the object.
- * @param dt The elapsed time.
+ * @param dt The elapsed time in seconds.
*/
virtual v... | Clean up the tickable definition.
| mit | invaderjon/demo,invaderjon/demo | 57617193daeecc6ec6adf1057dbd687464558259 |
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
* NOTE TO FreeBSD users. Install libexecinfo from
* ports/devel/libexecinfo and add -lexecinfo to LDFLAGS
* to add backtrace support.
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdynamic... | /*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
#include <execinfo.h>
/* a tricky little devil, requires e and it's libs to be built
* with the -rdynamic flag to GCC for any sort of decent output.
*/
void e_sigseg_act(int x, siginfo_t *info, void *data){
void *array[255];
size_t size... | ---
+++
@@ -1,5 +1,8 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ * NOTE TO FreeBSD users. Install libexecinfo from
+ * ports/devel/libexecinfo and add -lexecinfo to LDFLAGS
+ * to add backtrace support.
*/
#include "e.h"
#include <execinfo.h> | Add note to help FreeBSD users.
| bsd-2-clause | jordemort/e17,jordemort/e17,jordemort/e17 | 4bd45e4d59931a8aa4873f40ddb77b5142fb175f |
/*
ArgParser - C++ Argument Parser reflecting the python module ArgParse.
Copyright (C) 2014-2015 Matthew Scott Krafczyk
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the Licen... | /*
ArgParser - C++ Argument Parser reflecting the python module ArgParse.
Copyright (C) 2014-2015 Matthew Scott Krafczyk
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the Licen... | ---
+++
@@ -20,7 +20,7 @@
#define ARGPARSE_ArgParse_HDR
#include "ArgParse/Message.h"
-#include "ArgParse/Option.h"
+#include "ArgParse/Argument.h"
#include "ArgParse/ArgParser.h"
#endif | Change an old Option.h to Argument.h
| mit | krafczyk/ArgParse,krafczyk/ArgParse | e8fb39c9a7aaa172a528142fb5b24aa03e224083 |
//PARAM: --enable ana.int.interval --enable ana.int.enums --exp.privatization "write" -v
#include<pthread.h>
// Test case that shows how avoiding reading integral globals can reduce the number of solver evaluations.
// Avoiding to evaluate integral globals when setting them reduced the number of necessary evaluations... | //PARAM: --enable ana.int.interval --enable ana.int.enums --exp.privatization "write" -v
#include<pthread.h>
// Test case that shows how avoiding reading integral globals can reduce the number of solver evaluations.
// Avoiding to evaluate integral globals when setting them reduced the number of necessary evaluations... | ---
+++
@@ -3,7 +3,7 @@
#include<pthread.h>
// Test case that shows how avoiding reading integral globals can reduce the number of solver evaluations.
-// Avoiding to evaluate integral globals when setting them reduced the number of necessary evaluations from 62 to 21 in this test case.
+// Avoiding to evaluate i... | Remove confusing assert from test case
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | 5e00c825d43914ce6ae0d859f72ffbef07794a6c |
changeLibraryOrLibraryName: stuffCheckBox
#
#Exit the checkbox.
Go to Field [ ]
#
#Set default layouts for a reference library.
If [ tempSetup::InventoryLibaryYN = "" ]
Set Field [ tempSetup::layoutLtagK; "" ]
Set Field [ tempSetup::layoutRtagK; "" ]
Set Field [ tempSetup::layoutLtagN; "" ]
Set Field [ tempSetup::layou... | testScreens: setup: stuffCheckBox
Go to Field [ ]
If [ tempSetup::InventoryLibaryYN = "" ]
Set Field [ tempSetup::layoutLtagK; "" ]
Set Field [ tempSetup::layoutRtagK; "" ]
Set Field [ tempSetup::layoutLtagN; "" ]
Set Field [ tempSetup::layoutRtagN; "" ]
Else
Set Field [ tempSetup::layoutLtagK; "moreltagNKs2" ]
Set Fie... | ---
+++
@@ -1,14 +1,26 @@
-testScreens: setup: stuffCheckBox
+changeLibraryOrLibraryName: stuffCheckBox
+#
+#Exit the checkbox.
Go to Field [ ]
+#
+#Set default layouts for a reference library.
If [ tempSetup::InventoryLibaryYN = "" ]
Set Field [ tempSetup::layoutLtagK; "" ]
Set Field [ tempSetup::layoutRtagK; ""... | Make library type checkbox part of the library record.
| apache-2.0 | HelpGiveThanks/Library,HelpGiveThanks/Library | 2ff0d3cfdd0920c179616e8d0738c376f787d22a |
// 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 << " ";
... | // 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 << "... | ---
+++
@@ -1,7 +1,7 @@
// Taken from https://gist.github.com/arvidsson/7231973
-#ifndef BITCOIN_REVERSE_ITERATOR_HPP
-#define BITCOIN_REVERSE_ITERATOR_HPP
+#ifndef BITCOIN_REVERSE_ITERATOR_H
+#define BITCOIN_REVERSE_ITERATOR_H
/**
* Template used for reverse iteration in C++11 range-based for loops.
@@ -14,1... | Rename member field according to the style guide.
| mit | Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnli... | 33a5982e32963ed1e0e86608acc9ef116006e32a |
//
// TWTValidationLocalization.h
// TWTValidation
//
// Created by Prachi Gauriar on 4/3/2014.
// Copyright (c) 2014 Two Toasters, LLC.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the So... | //
// TWTValidationLocalization.h
// TWTValidation
//
// Created by Prachi Gauriar on 4/3/2014.
// Copyright (c) 2014 Two Toasters, LLC. All rights reserved.
//
#define TWTLocalizedString(key) \
[[NSBundle bundleForClass:[self class]] localizedStringForKey:(key) value:@"" table:@"TWTValidation"]
| ---
+++
@@ -3,7 +3,25 @@
// TWTValidation
//
// Created by Prachi Gauriar on 4/3/2014.
-// Copyright (c) 2014 Two Toasters, LLC. All rights reserved.
+// Copyright (c) 2014 Two Toasters, LLC.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associa... | Add license to localization header
| mit | twotoasters/TWTValidation,twotoasters/TWTValidation,twotoasters/TWTValidation | f412fab9497a47ca77eece623fe53927302948c0 |
// RUN: %clang_cc1 -triple arm64-apple-ios -O3 -emit-llvm -o - %s | FileCheck %s
void f0(void *a, void *b) {
__clear_cache(a,b);
// CHECK: call {{.*}} @__clear_cache
}
// CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a)
unsigned rbit(unsigned a) {
return __builtin_arm_rbit(a);
}
// CHECK: call {{.*}} @llvm.aarch... | // RUN: %clang_cc1 -triple arm64-apple-ios -O3 -emit-llvm -o - %s | FileCheck %s
void f0(void *a, void *b) {
__clear_cache(a,b);
// CHECK: call {{.*}} @__clear_cache
}
// CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a)
void rbit(unsigned a) {
__builtin_arm_rbit(a);
}
// CHECK: call {{.*}} @llvm.aarch64.rbit.i64... | ---
+++
@@ -6,11 +6,11 @@
}
// CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a)
-void rbit(unsigned a) {
- __builtin_arm_rbit(a);
+unsigned rbit(unsigned a) {
+ return __builtin_arm_rbit(a);
}
// CHECK: call {{.*}} @llvm.aarch64.rbit.i64(i64 %a)
-void rbit64(unsigned long long a) {
- __builtin_arm_rbit64(... | AArch64: Fix silly think-o in tests.
rdar://9283021
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@211064 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | 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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/cl... | 53f7a342568c675b686f817f2a11392e486d2e8d |
//
// arch/x86_64/rsp/vmov.c
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "rsp/cpu.h"
#include "rsp/rsp.h"
__m128i rsp_vmov(struct rsp *rsp,
unsigned src, unsigned e, unsigned dest, rsp_vect_t vt_shuffle) {... | //
// arch/x86_64/rsp/vmov.c
//
// This file is subject to the terms and conditions defined in
// 'LICENSE', which is part of this source code package.
//
#include "common.h"
#include "rsp/cpu.h"
#include "rsp/rsp.h"
__m128i rsp_vmov(struct rsp *rsp,
unsigned src, unsigned e, unsigned dest, rsp_vect_t vt_shuffle) {... | ---
+++
@@ -16,9 +16,6 @@
// Copy element into data
memcpy(&data, (e & 0x7) + (uint16_t *)&vt_shuffle, sizeof(uint16_t));
- printf("src %d dest %d el %x data %x\n", src, dest, e, data);
- fflush(stdout);
-
// Write out the upper part of the result.
rsp->cp2.regs[dest].e[e & 0x7] = data;
return rsp_... | Remove debug information from VMOV code
| bsd-3-clause | tj90241/cen64,tj90241/cen64 | 3b879e32d7063b4b83867fac9a8c38f042a0fc2b |
#ifndef LEPTONICA__STDIO_H
#define LEPTONICA__STDIO_H
#ifndef BUILD_HOST
#include <stdio.h>
#include <stdint.h>
typedef struct cookie_io_functions_t {
ssize_t (*read)(void *cookie, char *buf, size_t n);
ssize_t (*write)(void *cookie, const char *buf, size_t n);
int (*seek)(void *cookie, off_t *pos, int when... | #ifndef LEPTONICA__STDIO_H
#define LEPTONICA__STDIO_H
#ifndef BUILD_HOST
#include <stdio.h>
#include <stdint.h>
typedef struct cookie_io_functions_t {
ssize_t (*read)(void *cookie, char *buf, size_t n);
ssize_t (*write)(void *cookie, const char *buf, size_t n);
int (*seek)(void *cookie, off_t *pos, int when... | ---
+++
@@ -19,6 +19,9 @@
FILE *open_memstream(char **buf, size_t *size);
+FILE *__sfp(void);
+int __sflags(const char *, int *);
+
#endif
#endif /* LEPTONICA__STDIO_H */ | Fix clang warning about implicit function declaration
| apache-2.0 | surensth/tess-two,surensth/tess-two,bhargavbhegde7/tess-two,didldum/tess-two,bhargavbhegde7/tess-two,renard314/tess-two,doo/tess-two,panzerfahrer/tess-two,rmtheis/tess-two,rxl194/tess-two,doo/tess-two,rxl194/tess-two,michyliao/tess-two,rmtheis/tess-two,Drakefrog/tess-two,bhargavbhegde7/tess-two,AlanFor301/tess-two,rmth... | dd84148bdaa2bbecf0be3385a6423e21edbdb690 |
#pragma once
// This header mainly contains functions needed by both Cpu and Debugger
#include "Base.h"
#include <type_traits>
// Convenience cast functions
template <typename T>
constexpr int16_t S16(T v) {
return static_cast<int16_t>(static_cast<std::make_signed_t<T>>(v));
}
template <typename T>
constexpr uin... | #pragma once
// This header mainly contains functions needed by both Cpu and Debugger
#include "Base.h"
// Convenience cast functions
template <typename T>
constexpr int16_t S16(T v) {
return static_cast<int16_t>(v);
}
template <typename T>
constexpr uint16_t U16(T v) {
return static_cast<uint16_t>(v);
}
tem... | ---
+++
@@ -3,11 +3,12 @@
// This header mainly contains functions needed by both Cpu and Debugger
#include "Base.h"
+#include <type_traits>
// Convenience cast functions
template <typename T>
constexpr int16_t S16(T v) {
- return static_cast<int16_t>(v);
+ return static_cast<int16_t>(static_cast<std::... | Cpu: Fix indexed mode instructions failing to add negative offset because value would not be correctly sign extended
| mit | amaiorano/vectrexy,amaiorano/vectrexy,amaiorano/vectrexy | 51889a9376cf256830db71764c72ef337e644094 |
/**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi.h>
#... | /**
* @file WidgetTimeInput.h
* @author Volodymyr Shymanskyy
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2015 Volodymyr Shymanskyy
* @date Aug 2016
* @brief
*
*/
#ifndef WidgetTimeInput_h
#define WidgetTimeInput_h
#include <Blynk/BlynkApi.h>
#... | ---
+++
@@ -19,19 +19,23 @@
public:
TimeInputParam(const BlynkParam& param)
- : mStart (param[0].asLong())
- , mStop (param[1].asLong())
{
+ if (strlen(param[0].asStr())) {
+ mStart = param[0].asLong();
+ }
+ if (strlen(param[1].asStr())) {
+ mStop = param[1].asLong();
+ }
mTZ = param[2].asLong()... | Switch to Time instead of DateTime
| mit | ivankravets/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,ivankravets/blynk-library,blynkkk/blynk-library,blynkkk/blynk-library,ivankravets/blynk-library,ivankravets/blynk-library,ivankravets/blynk-library,blynkkk/blynk-library | dd54e6b9aded46da7a74eede6f935b289a979912 |
#ifndef SEARCHRESULTCOLOR_H
#define SEARCHRESULTCOLOR_H
#include <QColor>
namespace Find {
namespace Internal {
class SearchResultColor{
public:
QColor textBackground;
QColor textForeground;
QColor highlightBackground;
QColor highlightForeground;
};
} // namespace Internal
} // namespace Find
#endi... | #ifndef SEARCHRESULTCOLOR_H
#define SEARCHRESULTCOLOR_H
#include <QColor>
namespace Find {
namespace Internal {
struct SearchResultColor{
QColor textBackground;
QColor textForeground;
QColor highlightBackground;
QColor highlightForeground;
};
} // namespace Internal
} // namespace Find
#endif // SE... | ---
+++
@@ -6,7 +6,8 @@
namespace Find {
namespace Internal {
-struct SearchResultColor{
+class SearchResultColor{
+public:
QColor textBackground;
QColor textForeground;
QColor highlightBackground; | Fix warning about struct/class mismatch
Change-Id: I832ea6ebf078e533623fb748809dd71b5abfb645
Reviewed-by: Eike Ziller <c142da16c73a95a82d35191bcc55b22835617128@digia.com>
| lgpl-2.1 | danimo/qt-creator,darksylinc/qt-creator,kuba1/qtcreator,amyvmiwei/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,amyvmiwei/qt-creator,maui-packages/qt-creator,darksylinc/qt-creator,xianian/qt-creator,richardmg/qtcreator,colede/qtcreator,danimo/qt-creator,duythanhphan/qt-creator,kuba1/qtcreator,duythanhphan/q... | 9dfc4f8efb20c07e111c556843f914376187ba13 |
/*-------------------------------------------------------------------------
*
* fork_process.h
* Exports from postmaster/fork_process.c.
*
* Copyright (c) 1996-2005, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/include/postmaster/fork_process.h,v 1.2 2005/03/13 23:32:26 tgl Exp $
*
*-------... | #ifndef FORK_PROCESS_H
#define FORK_PROCESS_H
#include "postgres.h"
extern pid_t fork_process(void);
#endif /* ! FORK_PROCESS_H */
| ---
+++
@@ -1,8 +1,17 @@
+/*-------------------------------------------------------------------------
+ *
+ * fork_process.h
+ * Exports from postmaster/fork_process.c.
+ *
+ * Copyright (c) 1996-2005, PostgreSQL Global Development Group
+ *
+ * $PostgreSQL: pgsql/src/include/postmaster/fork_process.h,v 1.2 2005/03... | Add missing identification comment, remove entirely inappropriate include
of postgres.h.
| apache-2.0 | 50wu/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,greenplum-db/gpdb,zeroae/postgres-xl,adam8157/gpdb,rubikloud/gpdb,zeroae/postgres-xl,cjcjameson/gpdb,xinzweb/gpdb,edespino/gpdb,oberstet/postgres-xl,ahachete/gpdb,lpetrov-pivotal/gpdb,adam8157/gpdb,rubikloud/gpdb,jmcatamney/gpdb,ahachete/gpdb,oberstet/postgres-xl,ovr/postgr... | bb4c88c29ab312e2be118ac857daa7c93399d6e1 |
/* KallistiOS ##version##
newlib_isatty.c
Copyright (C) 2004 Dan Potter
Copyright (C) 2012 Lawrence Sebald
*/
#include <sys/reent.h>
int isatty(int fd) {
/* Make sure that stdin, stdout, and stderr are shown as ttys, otherwise
they won't be set as line-buffered. */
if(fd >= 0 && fd <= 2) {
... | /* KallistiOS ##version##
newlib_isatty.c
Copyright (C)2004 Dan Potter
*/
#include <sys/reent.h>
int isatty(int fd) {
return 0;
}
int _isatty_r(struct _reent *reent, int fd) {
return 0;
}
| ---
+++
@@ -1,16 +1,29 @@
/* KallistiOS ##version##
newlib_isatty.c
- Copyright (C)2004 Dan Potter
+ Copyright (C) 2004 Dan Potter
+ Copyright (C) 2012 Lawrence Sebald
*/
#include <sys/reent.h>
int isatty(int fd) {
+ /* Make sure that stdin, stdout, and stderr are shown as ttys, otherwise
+ ... | Make it so that stdin/stdout/stderr will be set as line buffered (newlib has to think they're ttys if we have fcntl, which we do now).
| bsd-3-clause | DreamcastSDK/kos,DreamcastSDK/kos,DreamcastSDK/kos | a8904687f65f794ab5d01c58c6f9beeda5742325 |
//===- lld/ReaderWriter/YamlContext.h - object used in YAML I/O context ---===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | //===- lld/ReaderWriter/YamlContext.h - object used in YAML I/O context ---===//
//
// The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------... | ---
+++
@@ -30,14 +30,10 @@
/// object. We need to support hetergenous yaml documents which each require
/// different context info. This struct supports all clients.
struct YamlContext {
- YamlContext()
- : _ctx(nullptr), _registry(nullptr), _file(nullptr),
- _normalizeMachOFile(nullptr) {}
-
- co... | Use C++11 non-static member initialization.
git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@234648 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/lld,llvm-mirror/lld | bb71227a64ed0b093e31e0bddab4fa4d4462a0b6 |
/**
* Win32 UTF-8 wrapper
*
* ----
*
* main() entry point.
* Compile or #include this file as part of your sources
* if your program runs in the console subsystem.
*/
#include "src/entry.h"
#undef main
int __cdecl wmain(void)
{
return win32_utf8_entry(win32_utf8_main);
}
// If both main() and wmain(... | /**
* Win32 UTF-8 wrapper
*
* ----
*
* main() entry point.
* Compile or #include this file as part of your sources
* if your program runs in the console subsystem.
*/
#include "src/entry.h"
#undef main
int __cdecl main(void)
{
return win32_utf8_entry(win32_utf8_main);
}
| ---
+++
@@ -11,7 +11,24 @@
#include "src/entry.h"
#undef main
+int __cdecl wmain(void)
+{
+ return win32_utf8_entry(win32_utf8_main);
+}
+
+// If both main() and wmain() are defined...
+// Visual Studio (or more specifically, LINK.EXE) defaults to main()
+// Pelles C defaults to wmain(), without even printing a... | Define wmain() in addition to main().
Saving those precious nanoseconds that the C runtime would otherwise
waste with needlessly converting the command line from UTF-16 to the
ANSI codepage. Y'know, I figured it might raise questions if I omit
this, and maybe you don't want to have that feel of tainting your build
wit... | unlicense | thpatch/win32_utf8 | f9a4ae765c2d0f2b20b8520119610ae3b97f342f |
#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... | #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... | ---
+++
@@ -3,8 +3,8 @@
#include <QValidator>
-/** Base48 entry widget validator.
- Corrects near-miss characters and refuses characters that are no part of base48.
+/** Base58 entry widget validator.
+ Corrects near-miss characters and refuses characters that are not part of base58.
*/
class BitcoinAddre... | Fix typo in a comment: it's base58, not base48.
| mit | cinnamoncoin/Feathercoin,nanocoins/mycoin,nanocoins/mycoin,cinnamoncoin/Feathercoin,saydulk/Feathercoin,cinnamoncoin/Feathercoin,nanocoins/mycoin,ghostlander/Feathercoin,enlighter/Feathercoin,saydulk/Feathercoin,cqtenq/Feathercoin,enlighter/Feathercoin,cqtenq/Feathercoin,cinnamoncoin/Feathercoin,nanocoins/mycoin,ghostl... | a4d60fe0ef77abcc9d91cdca0c6f276e5a7fb627 |
// Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include ... | // Copyright (c) 2014 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#define ATOM_BROWSER_API_ATOM_API_MENU_VIEWS_H_
#include <map>
#include <memory>
#include "atom/browser/api/atom_api_menu.h"
#include ... | ---
+++
@@ -23,7 +23,8 @@
protected:
void PopupAt(
- Window* window, int x, int y, int positioning_item) override;
+ Window* window, int x, int y, int positioning_item,
+ CloseCallback callback) override;
void ClosePopupAt(int32_t window_id) override;
private: | Fix missing PopupAt overrides on windows/linux
Auditors: 47e4a4954d6a66edd1210b9b46e0a144c1078e87@bsclifton
| mit | brave/electron,brave/muon,brave/electron,brave/electron,brave/electron,brave/muon,brave/muon,brave/muon,brave/electron,brave/muon,brave/muon,brave/electron | aee358642015f5453dcca6831bc3f3a6c6df22e7 |
/* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
*
* GNU Library General Public License (LGPL) version 2 or later.
*
* Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
*/
#include "_stdio.h"
link_warning(gets, "the 'gets' function is dangerous and should not be used.")
/* UNSAFE FU... | /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
*
* GNU Library General Public License (LGPL) version 2 or later.
*
* Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
*/
#include "_stdio.h"
link_warning(gets, "the 'gets' function is dangerous and should not be used.")
/* UNSAFE FU... | ---
+++
@@ -13,7 +13,11 @@
libc_hidden_proto(getchar_unlocked)
libc_hidden_proto(__fgetc_unlocked)
+#ifdef __STDIO_GETC_MACRO
libc_hidden_proto(__stdin)
+#else
+#define __stdin stdin
+#endif
char *gets(char *s)
{ | Build if GETC_MACRO use is disabled
| lgpl-2.1 | ndmsystems/uClibc,wbx-github/uclibc-ng,klee/klee-uclibc,mephi42/uClibc,waweber/uclibc-clang,groundwater/uClibc,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,ysat0/uClibc,hwoarang/uClibc,klee/klee-uclibc,kraj/uClibc,gittup/uClibc,czankel/xtensa-uclibc,groundwater/uClibc,foss-xtensa/uClibc,groundwater/uClibc,skristiansson... | 3893e7e397b3932a3e6e604d2e7a82b260a1133e |
/*
* 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
#include <android/log.h>
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define S... | /*
* 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 ... | ---
+++
@@ -7,6 +7,7 @@
#ifndef SkUserConfigManual_DEFINED
#define SkUserConfigManual_DEFINED
+ #include <android/log.h>
#define GR_TEST_UTILS 1
#define SK_BUILD_FOR_ANDROID_FRAMEWORK
#define SK_DEFAULT_FONT_CACHE_LIMIT (768 * 1024)
@@ -30,4 +31,9 @@
#define SK_DISABLE_DAA // skbug.com/6886
+ ... | Print the message from SK_ABORT in stack traces
This will make debugging easier. Instead of using LOG_ALWAYS_FATAL, use
__android_log_assert (which the former uses internally) directly, since
SkQP can only access NDK APIs.
Depends on https://skia-review.googlesource.com/c/skia/+/521001.
Bug: 224771432
Test: manual
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-... | ba7874bd648cf81182d4c36331525fc72944743a |
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
//#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<Ga... | #ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H
#include "GameState.h"
#include "StartState.h"
#include "LevelSelectState.h"
#include <vector>
#define START_WITHOUT_MENU
class GameStateHandler
{
private:
std::vector<GameState*> m_stateStack;
std::vector<Game... | ---
+++
@@ -5,7 +5,7 @@
#include "LevelSelectState.h"
#include <vector>
-#define START_WITHOUT_MENU
+//#define START_WITHOUT_MENU
class GameStateHandler
{ | ADD commented out skip menu
| apache-2.0 | Chringo/SSP,Chringo/SSP | 0594623991b24dc37c7a9934cbd87d486f564608 |
#ifndef VAST_ACTOR_H
#define VAST_ACTOR_H
#include <cppa/event_based_actor.hpp>
#include "vast/logger.h"
namespace vast {
namespace exit {
constexpr uint32_t done = cppa::exit_reason::user_defined;
constexpr uint32_t stop = cppa::exit_reason::user_defined + 1;
constexpr uint32_t error = cppa::exit_reason::user... | #ifndef VAST_ACTOR_H
#define VAST_ACTOR_H
#include <cppa/event_based_actor.hpp>
#include "vast/logger.h"
namespace vast {
namespace exit {
constexpr uint32_t done = cppa::exit_reason::user_defined;
constexpr uint32_t stop = cppa::exit_reason::user_defined + 1;
constexpr uint32_t error = cppa::exit_reason::user... | ---
+++
@@ -28,7 +28,7 @@
{
VAST_LOG_ACTOR_ERROR(derived()->description(),
"act() did not set a behavior, terminating");
- quit();
+ quit(exit::error);
}
}
| Exit with error on missing behavior.
| bsd-3-clause | pmos69/vast,mavam/vast,mavam/vast,vast-io/vast,pmos69/vast,vast-io/vast,pmos69/vast,vast-io/vast,pmos69/vast,mavam/vast,mavam/vast,vast-io/vast,vast-io/vast | dd9f4d4919164ce842502ece64583f13df8cc737 |
// RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
// FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">"
// hack in Attr.td for attribute "Aligned".
// CHECK: int x __attribute__((aligned(4, 0)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
//... | // RUN: %clang_cc1 %s -ast-print -fms-extensions | FileCheck %s
// FIXME: we need to fix the "BoolArgument<"IsMSDeclSpec">"
// hack in Attr.td for attribute "Aligned".
// CHECK: int x __attribute__((aligned(4, 0)));
int x __attribute__((aligned(4)));
// FIXME: Print this at a valid location for a __declspec attr.
//... | ---
+++
@@ -15,3 +15,10 @@
// CHECK: void bar() __attribute__((__const));
void bar() __attribute__((__const));
+
+// FIXME: Print these at a valid location for these attributes.
+// CHECK: int *p32 __ptr32;
+int * __ptr32 p32;
+
+// CHECK: int *p64 __ptr64;
+int * __ptr64 p64; | Test that we print MS keyword attributes without a __declspec(...) adornment.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173754 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-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/cl... | cae4a5ca43323eb861d702f880a6c62dd5ef4fc5 |
#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
int wmain(int argc, wchar_t **argv)
{
char* sep = "";
int len;
/*
* Echo all arguments separated with '::', so that we can check that
* quotes are interpreted correctly.
*/
while (argc-- > 1) {
char *utf8;
len = WideCharToMulti... | #ifdef __WIN32__
#include <windows.h>
int wmain(int argc, wchar_t **argv)
{
char* sep = "";
int len;
/*
* Echo all arguments separated with '::', so that we can check that
* quotes are interpreted correctly.
*/
while (argc-- > 1) {
char *utf8;
len = WideCharToMultiByte(CP_UTF8, 0, ar... | ---
+++
@@ -1,3 +1,4 @@
+#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
@@ -25,8 +26,6 @@
}
#else
-#include <stdio.h>
-
int
main(int argc, char** argv)
{ | kernel: Fix os_SUITE compilation issue on win32
| apache-2.0 | rlipscombe/otp,bjorng/otp,dgud/otp,isvilen/otp,emacsmirror/erlang,bjorng/otp,g-andrade/otp,getong/otp,dgud/otp,isvilen/otp,potatosalad/otp,vinoski/otp,g-andrade/otp,jj1bdx/otp,emacsmirror/erlang,mikpe/otp,erlang/otp,lrascao/otp,erlang/otp,potatosalad/otp,getong/otp,rlipscombe/otp,emacsmirror/erlang,vinoski/otp,uabboli/... | 77e2e9b890807560b3db5f1e277c7445cc5d74dd |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
static int RegisterFile[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int main() {
int data_memory[1024];
char* string_memory[2014];
char* instructions[100];
... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
static int RegisterFile[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int main() {
int data_memory[1024];
char string_memeory[2014];
} | ---
+++
@@ -9,5 +9,8 @@
int main() {
int data_memory[1024];
- char string_memeory[2014];
+ char* string_memory[2014];
+ char* instructions[100];
+
+
} | Fix typos, add instruction memory
| apache-2.0 | jacobbieker/MIPS-In-C | 9e903e78de2ca4a4b4aaa80b2dc6320e581c87da |
#ifndef IDT_H
#define IDT_H
#include <stdint.h>
struct IDTEntry {
uint16_t base_address_low;
uint16_t selector;
uint8_t reserved;
uint8_t type : 4;
uint8_t storage_segment : 1;
uint8_t privilege : 2;
uint8_t present : 1;
uint16_t base_address_high;
} __attribute__((packed));
struct IDTDescriptor {
uint16_t ... | #ifndef IDT_H
#define IDT_H
#include <stdint.h>
struct IDTEntry {
uint16_t base_address_low;
uint16_t selector;
uint8_t reserved;
uint8_t type : 4;
uint8_t storage_segment : 1;
uint8_t privilege : 2;
uint8_t present : 1;
uint16_t base_address_high;
} __attribute__((packed));
struct IDTDescriptor {
uint16_t ... | ---
+++
@@ -21,7 +21,7 @@
struct IDT {
struct IDTDescriptor descriptor;
- struct IDTEntry entries[256];
+ struct IDTEntry entries[128];
} __attribute__((packed));
void idt_init(struct IDT *); | Cut space required for IDT in half
| apache-2.0 | shockkolate/shockk-os,shockkolate/shockk-os,shockkolate/shockk-os | 9bf77934c4d06067d3619abc4c40ca5adf3dde9f |
// SKIP PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 42; // matches write in t_fun
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
pthread_mutex_lock(&A);
pthread_mutex_lock(&B);
g = 42;
pthread_... | // SKIP PARAM: --sets ana.activated[+] octApron
#include <pthread.h>
#include <assert.h>
int g = 42; // matches write in t_fun
pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
// pthread_mutex_lock(&A);
// pthread_mutex_lock(&B);
// g = 42;
... | ---
+++
@@ -7,11 +7,11 @@
pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER;
void *t_fun(void *arg) {
- // pthread_mutex_lock(&A);
- // pthread_mutex_lock(&B);
- // g = 42;
- // pthread_mutex_unlock(&B);
- // pthread_mutex_unlock(&A);
+ pthread_mutex_lock(&A);
+ pthread_mutex_lock(&B);
+ g = 42;
+ pthread_mu... | Remove debugging changes from 36/17
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | a683ed193b85656e90ca7ee54298106fa6a313e4 |
#include <check.h>
/*
* Include test files below
*/
typedef Suite* (*suite_creator_f)(void);
int
main(void) {
int nfailed = 0;
Suite* s;
SRunner* sr;
suite_creator_f iter;
/*
* Insert suite creator functions here
*/
suite_creator_f suite_funcs[] = {
NULL
};
fo... | #include <check.h>
/*
* Include test files below
*/
typedef Suite* (*suite_creator_f)(void);
int
main(void) {
int nfailed = 0;
Suite* s;
SRunner* sr;
suite_creator_f iter;
/*
* Insert suite creator functions here
*/
suite_creator_f suite_funcs[] = {
NULL;
};
f... | ---
+++
@@ -20,7 +20,7 @@
*/
suite_creator_f suite_funcs[] = {
- NULL;
+ NULL
};
for (iter = suite_funcs[0]; *iter, iter++) { | Remove malicious semicolon from array constant
| lgpl-2.1 | waysome/libreset,waysome/libreset | 7b2be204701d4876a19d8aec30df87af3db8fc72 |
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands. The gro... | /*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#define ZEPHYR_INCLUDE_ZEPHYR_MCUMGR_GRP_H_
#include <kernel.h>
#ifdef __cplusplus
extern "C" {
#endif
/* The file contains definitions of Zephyr specific mgmt commands */
#def... | ---
+++
@@ -12,9 +12,10 @@
extern "C" {
#endif
-/* The file contains definitions of Zephyr specific mgmt commands */
-
-#define ZEPHYR_MGMT_GRP_BASE MGMT_GROUP_ID_PERUSER
+/* The file contains definitions of Zephyr specific mgmt commands. The group numbers decrease
+ * from PERUSER to avoid collision with user d... | subsys/mgmt/mcumgr: Fix collision with user defined groups
The commit moves definition of Zephyr specific mcumgr basic group to
PERUSER - 1. This has been done to avoid collision with application
specific groups, defined by users.
Signed-off-by: Dominik Ermel <1a1d45a9cc0c98a37f8d0a0d2dbe3cacc0b2344f@nordicsemi.no>
| apache-2.0 | galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,galak/zephyr,galak/zephyr,galak/zephyr | dfa3930196159638c475d37a89a7e0e5b395d92a |
// RUN: mkdir -p %t/UNIQUEISH_SENTINEL
// RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN: %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \
// RUN: | FileCheck %s
// RUN: cp %s %t.c
// RUN: %clang_cc1 -debug-info-ki... | // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN: %s -emit-llvm -o - | FileCheck %s
// RUN: cp %s %t.c
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE
void foo() {}
// Since %s is an absolut... | ---
+++
@@ -1,15 +1,19 @@
+// RUN: mkdir -p %t/UNIQUEISH_SENTINEL
+// RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c
+
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
-// RUN: %s -emit-llvm -o - | FileCheck %s
+// RUN: %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \
... | Make testcase more robust for completely-out-of-tree builds.
Thats to Dave Zarzycki for reprorting this!
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@348612 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-cl... | 5ac905c512d06fdbd443374f5f9fafef10bef0e1 |
//
// IFTTTAnimator.h
// JazzHands
//
// Created by Devin Foley on 9/28/13.
// Copyright (c) 2013 IFTTT Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol IFTTTAnimatable;
@interface IFTTTAnimator : NSObject
- (void)addAnimation:(id<IFTTTAnimatable>)animation;
- (void)animate:(CGFloat)time;
@end
| //
// IFTTTAnimator.h
// JazzHands
//
// Created by Devin Foley on 9/28/13.
// Copyright (c) 2013 IFTTT Inc. All rights reserved.
//
@protocol IFTTTAnimatable;
@interface IFTTTAnimator : NSObject
- (void)addAnimation:(id<IFTTTAnimatable>)animation;
- (void)animate:(CGFloat)time;
@end
| ---
+++
@@ -5,6 +5,8 @@
// Created by Devin Foley on 9/28/13.
// Copyright (c) 2013 IFTTT Inc. All rights reserved.
//
+
+#import <UIKit/UIKit.h>
@protocol IFTTTAnimatable;
| Add UIKit import to allow for compiling without precompiled header | mit | IFTTT/JazzHands,revolter/JazzHands,IFTTT/JazzHands,AlexanderMazaletskiy/JazzHands,ernestopino/JazzHands,ernestopino/JazzHands,lionkon/JazzHands,liuruxian/JazzHands,zorroblue/JazzHands,revolter/JazzHands,AlexanderMazaletskiy/JazzHands,wintersweet/JazzHands,ramoslin02/JazzHands,tangwei6423471/JazzHands,wintersweet/JazzHa... | 0c7a489e65b7bc51cc15af88197eb162f54cff13 |
// Due to ln -sf:
// REQUIRES: shell
// RUN: mkdir -p %t.real
// RUN: cd %t.real
// RUN: ln -sf %clang test-clang
// RUN: cd ..
// If %.fake already is a symlink to %t.real when `ln -sf %t.real %t.fake`
// runs, then that would symlink %t.real to itself, forming a cycle.
// The `-n` flag prevents this.
// RUN: ln -sfn ... | // Due to ln -sf:
// REQUIRES: shell
// RUN: rm -rf %t.real
// RUN: mkdir -p %t.real
// RUN: cd %t.real
// RUN: ln -sf %clang test-clang
// RUN: cd ..
// Important to remove %t.fake: If it already is a symlink to %t.real when
// `ln -sf %t.real %t.fake` runs, then that would symlink %t.real to itself,
// forming a cycl... | ---
+++
@@ -1,15 +1,13 @@
// Due to ln -sf:
// REQUIRES: shell
-// RUN: rm -rf %t.real
// RUN: mkdir -p %t.real
// RUN: cd %t.real
// RUN: ln -sf %clang test-clang
// RUN: cd ..
-// Important to remove %t.fake: If it already is a symlink to %t.real when
-// `ln -sf %t.real %t.fake` runs, then that would symlink... | Use `ln -n` to prevent forming a symlink cycle, instead of rm'ing the source
This is a better fix for the problem fixed in r334972.
Also remove the rm'ing of the symlink destination that was there to
clean up the bots -- it's over a year later, bots should be happy now.
Differential Revision: https://reviews.llvm.or... | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang | a81e238bcc471d0d8bf305a05da54d56eeef7ff5 |
#pragma once
#include <stdint.h>
#include <climits>
//#define TYPE_DOUBLE
#ifdef TYPE_DOUBLE
using real = double;
#define AT_IS_TYPE_DOUBLE (true)
#else
using real = float;
#define AT_IS_TYPE_DOUBLE (false)
#endif
| #pragma once
#include <stdint.h>
#include <climits>
//#define TYPE_DOUBLE
#ifdef TYPE_DOUBLE
using real = double;
#else
using real = float;
#endif
| ---
+++
@@ -7,7 +7,9 @@
#ifdef TYPE_DOUBLE
using real = double;
+ #define AT_IS_TYPE_DOUBLE (true)
#else
using real = float;
+ #define AT_IS_TYPE_DOUBLE (false)
#endif
| Add macro to know if "real" is double.
| mit | nakdai/aten,nakdai/aten | ad315659a48175b2875adc400413808a68d951ca |
/*------------------------------------------------------------------------------
| NuCTex | math.c
| Author | Benjamin A - Nullsrc
| Created | 30 December, 2015
| Changed | 31 December, 2015
|-------------------------------------------------------------------------------
| Overview | Implementation of various mathemati... | /*------------------------------------------------------------------------------
| NuCTex | math.c
| Author | Benjamin A - Nullsrc
| Created | 30 December, 2015
| Changed | 31 December, 2015
|-------------------------------------------------------------------------------
| Overview | Implementation of various mathemati... | ---
+++
@@ -40,7 +40,7 @@
}
int runAway(int escapingAgility, int chasingAgility) {
- if(escapingAgility > chasingAgility) {
+ if((escapingAgility + zrng(escapingAgility/3)) > chasingAgility) {
return 1;
}
else { | Add RNG to running away.
| mit | Nullsrc/nuctex,Nullsrc/nuctex | 99ad1572b7ed82443816c5aa8025e8a41332dae9 |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include "scp.h"
struct scp_header header;
unsigned char scp_processheader(FILE *scpfile)
{
fread(&header, 1, sizeof(header), scpfile);
if (strncmp((char *)&header.magic, SCP_MAGIC, strlen(SCP_MAGIC))!=0)
{
printf("Not an SCP f... | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "scp.h"
unsigned char scp_processheader(FILE *scpfile)
{
return 0;
}
void scp_processtrack(FILE *scpfile, const unsigned char track)
{
}
int main(int argc, char **argv)
{
unsigned char numtracks;
unsigned char track;
FILE *fp;
if (argc!=... | ---
+++
@@ -1,11 +1,36 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
+#include <string.h>
#include "scp.h"
+struct scp_header header;
+
unsigned char scp_processheader(FILE *scpfile)
{
+ fread(&header, 1, sizeof(header), scpfile);
+
+ if (strncmp((char *)&header.magic, SCP_MAGIC, strlen(SC... | Check magic and output header fields
| mit | picosonic/bbc-fdc,picosonic/bbc-fdc | d3f6edf4589da29a8694b00e797910e2e3f886f5 |
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include "../marquise.h"
void test_init() {
setenv("MARQUISE_SPOOL_DIR", "/tmp", 1);
mkdir("/tmp/marquisetest", 0700);
marquise_ctx *ctx = marquise_init("marquisetest");
g_assert_nonnull(ctx);
}
int main(int argc, char **argv) {
g_t... | #include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "../marquise.h"
void test_init() {
marquise_ctx *ctx = marquise_init("test");
g_assert_nonnull(ctx);
}
int main(int argc, char **argv) {
g_test_init(&argc, &argv, NULL);
g_test_add_func("/marquise_init/init", test_init);
return g_test_run();
}
| ---
+++
@@ -1,11 +1,14 @@
#include <glib.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/stat.h>
#include "../marquise.h"
void test_init() {
- marquise_ctx *ctx = marquise_init("test");
+ setenv("MARQUISE_SPOOL_DIR", "/tmp", 1);
+ mkdir("/tmp/marquisetest", 0700);
+ marquise_ctx *ctx = marquise_ini... | Use a spool directory under /tmp for testing purposes
| bsd-3-clause | anchor/libmarquise,anchor/libmarquise | 6f805776fca1835477b730ced60fe72d9905f874 |
///
/// \file cleanup.h
/// \brief Functions to clean up memory
/// \defgroup cleanup Memory Cleanup
/// \brief Frees memory before loading
/// @{
///
#ifndef UVL_CLEANUP
#define UVL_CLEANUP
#include "types.h"
int uvl_cleanup_memory ();
int uvl_unload_all_modules();
void uvl_pre_clean();
#endif
/// @}
| ///
/// \file cleanup.h
/// \brief Functions to clean up memory
/// \defgroup cleanup Memory Cleanup
/// \brief Frees memory before loading
/// @{
///
#ifndef UVL_CLEANUP
#define UVL_CLEANUP
#include "types.h"
int uvl_cleanup_memory ();
int uvl_unload_all_modules ();
#endif
/// @}
| ---
+++
@@ -11,7 +11,8 @@
#include "types.h"
int uvl_cleanup_memory ();
-int uvl_unload_all_modules ();
+int uvl_unload_all_modules();
+void uvl_pre_clean();
#endif
/// @} | Fix a warning about implicit function declaration.
| apache-2.0 | MrNetrix/UVLoader,yifanlu/UVLoader,yifanlu/UVLoader,MrNetrix/UVLoader | 669cbb41fab72b377fffd64f9ef0171fe13c5834 |
#include <pebble.h>
static Window *main_window;
static void main_window_load(){
}
static void main_window_unload(){
}
static void init(){
main_window = window_create();
window_set_window_handlers(main_window, (WindowHandlers) {
.load = main_window_load,
.unload = main_window_unload
});
windo... | #include <pebble.h>
static void init(){
}
static void deinit(){
}
int main(void){
init();
app_event_loop();
deinit();
}
| ---
+++
@@ -1,9 +1,26 @@
#include <pebble.h>
+static Window *main_window;
+
+static void main_window_load(){
+}
+
+static void main_window_unload(){
+}
+
static void init(){
+ main_window = window_create();
+
+ window_set_window_handlers(main_window, (WindowHandlers) {
+ .load = main_window_load,
+ ... | Create an initial blank window
| mit | dvberkel/chicken-o-clock,dvberkel/chicken-o-clock | fa36679e7d19880c54a222262e6cbd8a46b845cc |
/*
This file was modified from or inspired by Apache Cordova.
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 Ap... |
/*
This file was modified from or inspired by Apache Cordova.
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 Ap... | ---
+++
@@ -27,7 +27,7 @@
//
#import <Foundation/Foundation.h>
-#import <Cordova/CDVViewController.h>
+#import "Cordova/CDVViewController.h"
@protocol XApplication;
| Update the way of importing CDVViewController to avoid compiler warning when using xFaceLib in 3rd party.
| apache-2.0 | polyvi/xface-ios,polyvi/xface-ios,polyvi/xface-ios,polyvi/xface-ios | eff92ef21f2853cdde235b81b3e4427ce122787d |
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
FILE *file;
long length;
char *buffer;
if (argc < 2) {
return 1;
}
file = fopen(argv[1], "r");
if (file == NULL) {
return 1;
}
fseek(file, 0, SEEK_END);
length = ftell(file);
fseek(file, 0, SEEK_SET);
buffer = (char *)malloc(len... | #include <stdlib.h>
#include <stdio.h>
int main() {
FILE *file;
long length;
char *buffer;
file = fopen("example.minty", "r");
if (file == NULL) {
return 1;
}
fseek(file, 0, SEEK_END);
length = ftell(file);
fseek(file, 0, SEEK_SET);
buffer = (char *)malloc(length);
fread(buffer, length, 1, file);
fclose(... | ---
+++
@@ -1,11 +1,14 @@
#include <stdlib.h>
#include <stdio.h>
-int main() {
+int main(int argc, char *argv[]) {
FILE *file;
long length;
char *buffer;
- file = fopen("example.minty", "r");
+ if (argc < 2) {
+ return 1;
+ }
+ file = fopen(argv[1], "r");
if (file == NULL) {
return 1;
} | Allow program to run to be specified on command line
| mit | shanepelletier/ChocoMinty | 3f1de23eee55029056d26bd123f61adaf1ec3525 |
/*
This file is part of libkcal.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This librar... | /*
This file is part of libkcal.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This librar... | ---
+++
@@ -20,7 +20,7 @@
#define KCAL_KCALVERSION_H
#define LIBKCAL_IS_VERSION( a,b,c ) ( LIBKCAL_VERSION >= KDE_MAKE_VERSION(a,b,c) )
-#define LIBKCAL_VERSION KDE_MAKE_VERSION(1,1,0)
-#define LIBKCAL_VERSIONSTR "1.1"
+#define LIBKCAL_VERSION KDE_MAKE_VERSION(1,2,0)
+#define LIBKCAL_VERSIONSTR "1.2"
#endif | Increase libkcal version number, since we had bic changes since kde 3.3....
svn path=/trunk/kdepim/; revision=385823
| lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi | 458cc64daaccf3d2e69222538aeaf3598eed1137 |
#ifndef __HTTP_TUNNEL_H__
#define __HTTP_TUNNEL_H__
// Copyright (c) 2009 - Decho Corp.
#include "auth.h"
namespace HTTP
{
template <class T>
Stream::ptr tunnel(T &conn, const std::string &proxy, const std::string &target)
{
Request requestHeaders;
requestHeaders.requestLine.method = CONNE... | #ifndef __HTTP_TUNNEL_H__
#define __HTTP_TUNNEL_H__
// Copyright (c) 2009 - Decho Corp.
#include "auth.h"
namespace HTTP
{
template <class T>
Stream::ptr tunnel(T &conn, const std::string &proxy, const std::string &target)
{
Request requestHeaders;
requestHeaders.requestLine.method = CONNE... | ---
+++
@@ -19,7 +19,8 @@
if (request->response().status.status == HTTP::OK) {
return request->stream();
} else {
- throw std::runtime_error("proxy connection failed");
+ throw InvalidResponseException("proxy connection failed",
+ request->response()... | Throw a more useful exceptoin when proxy connection fails.
| bsd-3-clause | cgaebel/mordor,adfin/mordor,mtanski/mordor,mtanski/mordor,ccutrer/mordor,cgaebel/mordor,ccutrer/mordor,adfin/mordor,adfin/mordor,mozy/mordor,mozy/mordor,ccutrer/mordor,mtanski/mordor,mozy/mordor | 2c377d116884aa9dc8fca51830b914b127de1420 |
//
// main.c
// secure-notes-exporter
//
// Created by Greg Hurrell on 5/9/14.
// Copyright (c) 2014 Greg Hurrell. All rights reserved.
//
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
void printItem(const void *value, void *context) {
CFDictionaryRef dictionary = value;
CFNumb... | //
// main.c
// secure-notes-exporter
//
// Created by Greg Hurrell on 5/9/14.
// Copyright (c) 2014 Greg Hurrell. All rights reserved.
//
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
int main(int argc, const char * argv[])
{
// create query
CFStringRef keys[] = { kSecReturnAt... | ---
+++
@@ -8,6 +8,18 @@
#include <CoreFoundation/CoreFoundation.h>
#include <Security/Security.h>
+
+void printItem(const void *value, void *context) {
+ CFDictionaryRef dictionary = value;
+ CFNumberRef itemType = CFDictionaryGetValue(dictionary, kSecAttrType);
+ CFNumberRef noteType = (CFNumberRef)con... | Print something about "Secure Notes" while iterating
I couldn't find a constant for 'note' and there are probably more
idiomatic ways to do this, but this is what I have.
Signed-off-by: Greg Hurrell <79e2475f81a6317276bf7cbb3958b20d289b78df@hurrell.net>
| bsd-3-clause | wincent/secure-notes-exporter | 28b5c302b8d65d935fb833d5a8a583866f2e5c60 |
#define BUILD_VDSO32
#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
#undef CONFIG_OPTIMIZE_INLINING
#endif
#undef CONFIG_X86_PPRO_FENCE
#ifdef CONFIG_X86_64
/*
* in case of a 32 bit VDSO for a 64 bit kernel fake a 32 bit kernel
* configuration
*/
#undef CONFIG_64BIT
#undef CONFIG_X86_64
#undef CONFIG_PGTABLE_LEVELS
#undef ... | #define BUILD_VDSO32
#ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE
#undef CONFIG_OPTIMIZE_INLINING
#endif
#undef CONFIG_X86_PPRO_FENCE
#ifdef CONFIG_X86_64
/*
* in case of a 32 bit VDSO for a 64 bit kernel fake a 32 bit kernel
* configuration
*/
#undef CONFIG_64BIT
#undef CONFIG_X86_64
#undef CONFIG_ILLEGAL_POINTER_VALUE
... | ---
+++
@@ -14,11 +14,13 @@
*/
#undef CONFIG_64BIT
#undef CONFIG_X86_64
+#undef CONFIG_PGTABLE_LEVELS
#undef CONFIG_ILLEGAL_POINTER_VALUE
#undef CONFIG_SPARSEMEM_VMEMMAP
#undef CONFIG_NR_CPUS
#define CONFIG_X86_32 1
+#define CONFIG_PGTABLE_LEVELS 2
#define CONFIG_PAGE_OFFSET 0
#define CONFIG_ILLEGAL_POINT... | x86/vdso32: Define PGTABLE_LEVELS to 32bit VDSO
In case of CONFIG_X86_64, vdso32/vclock_gettime.c fakes a 32-bit
non-PAE kernel configuration by re-defining it to CONFIG_X86_32.
However, it does not re-define CONFIG_PGTABLE_LEVELS leaving it
as 4 levels.
This mismatch leads <asm/pgtable_type.h> to NOT include <asm-ge... | mit | KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs | fb535ccb30845fe0b7bd09caa37a838985b72ff9 |
/***************************************************************************
* Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under th... | /***************************************************************************
* Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under th... | ---
+++
@@ -18,7 +18,7 @@
class KreBorder
{
public:
- KreBorder( int w = 1, const QString & s = "none", const QColor &c = Qt::black );
+ explicit KreBorder( int w = 1, const QString & s = "none", const QColor &c = Qt::black );
int width;
QString style; | Fix Krazy warnings: explicit - KreBorder
svn path=/trunk/extragear/utils/krecipes/; revision=1119814
| lgpl-2.1 | eliovir/krecipes,eliovir/krecipes,eliovir/krecipes,eliovir/krecipes | 97a1b20724963af57de4e08b4baf17e8243ba4d5 |
/*
* nope - for noping out.
*
* Copyright 2017 by Jack Kingsman <jack.kingsman@gmail.com>
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both... | /*
* nope - for noping out.
*
* Copyright 2017 by Jack Kingsman <jack.kingsman@gmail.com>
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appear in all copies and
* that both... | ---
+++
@@ -26,7 +26,7 @@
// the meat
system("echo 1 > /proc/sys/kernel/sysrq"); // enable sysrq
- system("echo b > /proc/sysrq-trigger"); // issue shutdown command
+ system("echo o > /proc/sysrq-trigger"); // issue shutdown command
while(1) {}; // spin 'til we die
| Convert from reboot to shutdown
| mit | jkingsman/nope | 0836e697be7e08dd2489c185feb5a371bf62f6ba |
/* Copyright (C) 2011-2012 Zeex
*
* 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 i... | /* Copyright (C) 2011-2012 Zeex
*
* 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 i... | ---
+++
@@ -27,11 +27,12 @@
int timerid;
if (timer_set(&timerid, interval, repeat, (timer_callback)callback, param) >= 0) {
- return timerid;
+ return timerid + 1;
}
- return -1;
+
+ return 0;
}
SAMPGDK_NATIVE(bool, KillTimer(int timerid)) {
- return timer_kill(timerid) >= 0;
+ return timer_kill(timerid... | Make timer ID's start with 1
| apache-2.0 | Zeex/sampgdk,WopsS/sampgdk,Zeex/sampgdk,WopsS/sampgdk,WopsS/sampgdk,Zeex/sampgdk | 32a03501ea2030314b9b610ea0181f1f60bce11e |
#include <string.h>
#include "number.h"
/** Format padding for a signed number. */
unsigned fmt_sign_pad(char* buffer, int sign, unsigned width, char pad)
{
char* s = buffer;
if (buffer == 0)
return width + (sign != 0);
if (!width) {
if (sign)
*s++ = '-';
}
else {
if (pad != '0') {
me... | #include <string.h>
#include "number.h"
/** Format padding for a signed number. */
unsigned fmt_sign_pad(char* buffer, int sign, unsigned width, char pad)
{
char* s = buffer;
if (buffer == 0)
return width + (sign != 0);
if (!width) {
if (sign)
*s++ = '-';
}
else {
if (pad != '0') {
me... | ---
+++
@@ -31,6 +31,8 @@
void test(int sign, unsigned width, char pad)
{
char buf[10];
+ obuf_putu(&outbuf, fmt_sign_pad(0, sign, width, pad));
+ obuf_putc(&outbuf, ':');
buf[fmt_sign_pad(buf, sign, width, pad)] = 0;
obuf_puts(&outbuf, buf);
NL();
@@ -47,10 +49,10 @@
}
#endif
#ifdef SELFTEST_EXP
-... | Include the no-buffer length when testing this function.
| lgpl-2.1 | bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs | c3097e8290c50f7fc67920233a4d4a7a20d68dcb |
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "nrf51.h"
#include "nrf_delay.h"
#include "error.h"
#include "gpio.h"
#include "leds.h"
#include "radio.h"
void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
while (1)
{
for (uint8_t i = LED_START; i < LED_S... | #include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "nrf51.h"
#include "nrf_delay.h"
#include "error.h"
#include "gpio.h"
#include "leds.h"
#include "radio.h"
void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
while (1)
{
for (uint8_t i = LED_START; i < LED_S... | ---
+++
@@ -46,11 +46,6 @@
err_code = radio_send(&packet);
ASSUME_SUCCESS(err_code);
- packet.data[0] = i++;
- packet.data[1] = 0x12;
- err_code = radio_send(&packet);
- ASSUME_SUCCESS(err_code);
-
led_toggle(LED0);
nrf_delay_us(1000000);
} | Send only one packet at a time.
| bsd-3-clause | hlnd/nrf51-simple-radio,hlnd/nrf51-simple-radio | 971068ecfa82cea5b21a3ccc962e95b7cdb5f38d |
#ifndef _LOG_SINGLETON_H_
#define _LOG_SINGLETON_H_
#include "log.h"
#include "basedefs.h"
namespace anp
{
class LogSingleton: public anp::Log
{
public:
static LogSingleton &getInstance();
static void releaseInstance();
private:
LogSingleton() { }
~LogSingleton() { }
static uint32 m_refCount;
static LogSingl... | #ifndef _LOG_SINGLETON_H_
#define _LOG_SINGLETON_H_
#include "log.h"
#include "basedefs.h"
namespace anp
{
class LogSingleton: public anp::Log
{
public:
static LogSingleton &getInstance();
static void releaseInstance();
private:
LogSingleton() { }
~LogSingleton() { }
static uint32 m_refCount;
static LogSingl... | ---
+++
@@ -39,10 +39,18 @@
{
m_log.addMessage(message);
}
+
+ void operator()(const anp::dstring message)
+ {
+ m_log.addMessage(message);
+ }
private:
LogSingleton &m_log;
};
+#define LOG_SINGLETON_MSG(message) LogSingleton::getInstance().addMessage(message);\
+ LogSingleton::releaseInstance(... | Add overloaded () operator to LogSingletonHelper.
| bsd-2-clause | antonp/anpcode,antonp/anpcode | 7d8a38b200cd70bef0300ce482c0723e8d64406b |
#include <stdlib.h>
#ifndef __QUEUE_H__
#define __QUEUE_H__
struct Queue;
typedef struct Queue Queue;
Queue* Queue_Create(size_t n);
void Queue_Destroy(Queue* q);
void Queue_Enqueue(Queue* q, void* e);
void* Queue_Dequeue(Queue* q);
#endif | #include <stdlib.h>
#ifndef __QUEUE_H__
#define __QUEUE_H__
struct Queue;
typedef struct Queue Queue;
#endif | ---
+++
@@ -4,4 +4,8 @@
struct Queue;
typedef struct Queue Queue;
+Queue* Queue_Create(size_t n);
+void Queue_Destroy(Queue* q);
+void Queue_Enqueue(Queue* q, void* e);
+void* Queue_Dequeue(Queue* q);
#endif | Add basic operation function declaration
| mit | MaxLikelihood/CADT | 82f76d7cbaaa0839555e1054b246a5cc79b6b17d |
#ifndef FTS_FILTER_PRIVATE_H
#define FTS_FILTER_PRIVATE_H
#define FTS_FILTER_CLASSES_NR 3
/*
API that stemming providers (classes) must provide: The create()
function is called to get an instance of a registered filter class.
The filter() function is called with tokens for the specific filter.
The destroy functio... | #ifndef FTS_FILTER_PRIVATE_H
#define FTS_FILTER_PRIVATE_H
#define FTS_FILTER_CLASSES_NR 3
/*
API that stemming providers (classes) must provide: The register()
function is called when the class is registered via
fts_filter_register() The create() function is called to get an
instance of a registered filter class.... | ---
+++
@@ -4,11 +4,10 @@
#define FTS_FILTER_CLASSES_NR 3
/*
- API that stemming providers (classes) must provide: The register()
- function is called when the class is registered via
- fts_filter_register() The create() function is called to get an
- instance of a registered filter class. The destroy function i... | lib-fts: Correct comment in filter internal API.
| mit | dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot,dscho/dovecot | 965703d6abaaf700e4c5307597b7f298843b0e32 |
#include <stdio.h>
int isMagic(int n,int squere[n][n])
{
int currSum = 0;
int sum = 0;
int i = 0;
for(i=0;i<n;i++)
{
int j;
for(j=0;j<n;j++)
{
currSum+=squere[i][j];
}
if(i==0)
{
sum = currSum;
}
if(currSum != sum... | #include <stdio.h>
int isMagic(int squere[3][3])
{
int currSum = 0;
int sum = squere[0][0]+squere[0][1]+squere[0][2];
int i = 0;
for(i=1;i<3;i++)
{
int j;
for(j=0;j<3;j++)
{
currSum+=squere[i][j];
}
if(currSum != sum)
{
return 0... | ---
+++
@@ -1,15 +1,19 @@
#include <stdio.h>
-int isMagic(int squere[3][3])
+int isMagic(int n,int squere[n][n])
{
int currSum = 0;
- int sum = squere[0][0]+squere[0][1]+squere[0][2];
+ int sum = 0;
int i = 0;
- for(i=1;i<3;i++)
+ for(i=0;i<n;i++)
{
int j;
- for(j=0;j<3;j+... | Make squere.c to work with nXn
| mit | AlexAndreev/po-homework,Georgigt23/po-homework,kriss960/po-homework,VVurbanov/po-homework,ivanmilevtues/po-homework,karakonjel/po-homework,vincho7012/po-homework,Verbo1806/po-homework | f22dcf3b7c3f0c49724cb3bb097cef56543b9523 |
#ifndef _CHAIR_AFFAIR_NOTE
#define _CHAIR_AFFAIR_NOTE
#include <inttypes.h>
#include <config.h>
#include <Arduino.h>
typedef struct note_range_t {
uint16_t start;
uint16_t end;
} note_range_t;
class Note {
public:
Note(uint8_t aHue, uint16_t order, uint16_t ledCount);
void setHue(uint8_t aHue);
uint8_t hue();
... | #ifndef _CHAIR_AFFAIR_NOTE
#define _CHAIR_AFFAIR_NOTE
#include <inttypes.h>
#include <config.h>
#include <FastLED.h>
typedef struct note_range_t {
uint16_t start;
uint16_t end;
} note_range_t;
class Note {
public:
Note(CRGB aColor, uint16_t order, uint16_t ledCount);
void setColor(CRGB aColor);
private:
CRGB ... | ---
+++
@@ -3,7 +3,7 @@
#include <inttypes.h>
#include <config.h>
-#include <FastLED.h>
+#include <Arduino.h>
typedef struct note_range_t {
uint16_t start;
@@ -12,12 +12,17 @@
class Note {
public:
- Note(CRGB aColor, uint16_t order, uint16_t ledCount);
+ Note(uint8_t aHue, uint16_t order, uint16_t ledCou... | Use hue instead of color.
Also added a property for activation of the Note
| mit | NSBum/lachaise2 | f2826431a1cc428fccc352d7af91d4b0b8955a9b |
#define _GNU_SOURCE
#include <sched.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static int child_func(void* arg) {
char* buf = (char*)arg;
strcpy(buf, "hello");
return 0;
}
int main(int argc, char** argv) {
// Stack for child... | #define _GNU_SOURCE
#include <sched.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static int child_func(void* arg) {
return 0;
}
int main(int argc, char** argv) {
// Stack for child.
const int STACK_SIZE = 65536;
char* stack =... | ---
+++
@@ -8,6 +8,8 @@
#include <unistd.h>
static int child_func(void* arg) {
+ char* buf = (char*)arg;
+ strcpy(buf, "hello");
return 0;
}
@@ -22,7 +24,12 @@
}
unsigned long flags = 0;
- if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, NULL) == -1) {
+ if (argc > 1 && !strcmp(argv[1]... | Clone with/without VM sample working now
| unlicense | eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog | 11782c7860ced878fed5db2d68d8c8fe3bdfdd1d |
#include <stdlib.h>
#include "MatMulC.h"
void MatMulC(int rows, int len, double *a, double *bin, double *c)
{
int i,j,k;
double *b = malloc(len * sizeof(double));
// Transpose bin with result in b.
for(int n = 0; n < len; n++ ) {
b[n] = bin[rows * (n % rows) + (n / rows)];
}
for( i = 0; i < rows; i++... | #include <stdlib.h>
#include "MatMulC.h"
void MatMulC(int rows, int len, double *a, double *b, double *c)
{
int i,j,k;
for( i = 0; i < rows; i++ ) {
for( j = 0; j < rows; j+=2 ) {
double sum0 = 0.0;
double sum1 = 0.0;
for( k = 0; k < rows; k++ ) {
sum0 += a[i*rows+k] * b[k*rows + j];... | ---
+++
@@ -1,20 +1,28 @@
#include <stdlib.h>
#include "MatMulC.h"
-void MatMulC(int rows, int len, double *a, double *b, double *c)
+void MatMulC(int rows, int len, double *a, double *bin, double *c)
{
int i,j,k;
+ double *b = malloc(len * sizeof(double));
+
+ // Transpose bin with result in b.
+ for(int ... | Transpose the second matrix in the C reference for MatMul.
| bsd-3-clause | emwap/feldspar-compiler,emwap/feldspar-compiler | 03aa0b50b157b97af1dbaf93461c4941bc0bbfaa |
/**
* @file
*
* @brief tests if compilation works (include and build paths set correct, etc...)
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#include <openssl/evp.h>
EVP_CIPHER_CTX * nothing (void)
{
return NULL;
}
int main (void)
{
nothing ();
return 0;
}
| /**
* @file
*
* @brief tests if compilation works (include and build paths set correct, etc...)
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*
*/
#include <openssl/evp.h>
int main (void)
{
EVP_CIPHER_CTX * opensslSpecificType;
return 0;
}
| ---
+++
@@ -9,8 +9,13 @@
#include <openssl/evp.h>
+EVP_CIPHER_CTX * nothing (void)
+{
+ return NULL;
+}
+
int main (void)
{
- EVP_CIPHER_CTX * opensslSpecificType;
+ nothing ();
return 0;
} | OpenSSL: Fix detection of lib if we use `-Werror`
Before this update detecting OpenSSL would fail, if we treated warnings
as errors (`-Werror`). The cause of this problem was that compiling
`compile_openssl.cpp` produced a warning about an unused variable.
| bsd-3-clause | petermax2/libelektra,e1528532/libelektra,petermax2/libelektra,BernhardDenner/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,e1528532/libelektra,mpranj/libelektra,petermax2/libelektra,mpranj/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,petermax2... | b13325f74d96d7e0a24c6f62b0910d6739835d47 |
#ifndef __KMS_UTILS_H__
#define __KMS_UTILS_H__
#include <gst/gst.h>
#define KMS_DEBUG_PIPE(name) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS( \
GST_BIN(kms_get_pipeline()), \
GST_DEBUG_GRAPH_SHOW_ALL, name); \
GstElement* kms_get_pipeline();
void kms_dynamic_connection(GstElement *orig, GstElement *dest, const gch... | #ifndef __KMS_UTILS_H__
#define __KMS_UTILS_H__
#include <gst/gst.h>
GstElement* kms_get_pipeline();
void kms_dynamic_connection(GstElement *orig, GstElement *dest, const gchar *name);
GstElement* kms_utils_get_element_for_caps(GstElementFactoryListType type,
GstRank rank, const GstCaps *caps,
GstPadDirecti... | ---
+++
@@ -2,6 +2,10 @@
#define __KMS_UTILS_H__
#include <gst/gst.h>
+
+#define KMS_DEBUG_PIPE(name) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS( \
+ GST_BIN(kms_get_pipeline()), \
+ GST_DEBUG_GRAPH_SHOW_ALL, name); \
GstElement* kms_get_pipeline();
| Create a macro for pipeline debugging
| lgpl-2.1 | lulufei/kurento-media-server,shelsonjava/kurento-media-server,shelsonjava/kurento-media-server,mparis/kurento-media-server,todotobe1/kurento-media-server,Kurento/kurento-media-server,Kurento/kurento-media-server,mparis/kurento-media-server,TribeMedia/kurento-media-server,TribeMedia/kurento-media-server,lulufei/kurento-... | ea154d7d98f4c6d1ded69031ff583b4f4c47118b |
#ifndef SQREDIR_BLOCKLIST_H
#define SQREDIR_BLOCKLIST_H
#include <cstdio>
#include <string>
// reads the given configuration file
// returns: true/false for success/failure
bool read_config(std::string filename);
// tries to match the Squid request & writes the response to the output stream
// input: a request line... |
#ifndef SQREDIR_BLOCKLIST_H
#define SQREDIR_BLOCKLIST_H
#include <cstdio>
#include <string>
using namespace std;
// reads the given configuration file
// returns: true/false for success/failure
bool read_config(string filename);
// tries to match the Squid request & writes the response to the output stream
// inpu... | ---
+++
@@ -5,11 +5,9 @@
#include <cstdio>
#include <string>
-using namespace std;
-
// reads the given configuration file
// returns: true/false for success/failure
-bool read_config(string filename);
+bool read_config(std::string filename);
// tries to match the Squid request & writes the response to the o... | Remove 'using' directive from header, explicitly qualify std namespace.
| apache-2.0 | hhoffstaette/sqredir | 2d67979dc01cb98b74941246685e9853439dd4a8 |
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#define XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#include "xwalk/application/... | // Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#define XWALK_APPLICATION_BROWSER_APPLICATION_SYSTEM_LINUX_H_
#include "xwalk/application/... | ---
+++
@@ -24,8 +24,8 @@
DBusManager& dbus_manager();
private:
+ scoped_ptr<DBusManager> dbus_manager_;
scoped_ptr<ApplicationServiceProviderLinux> service_provider_;
- scoped_ptr<DBusManager> dbus_manager_;
DISALLOW_COPY_AND_ASSIGN(ApplicationSystemLinux);
}; | [Application][D-Bus] Fix crash when shutting down
DBusManager owns the Bus connection and was being destroyed before the
service provider that uses it.
TEST=Loaded xwalk --run-as-service and xwalkctl <APP_ID> then closed the
window. The first process should not crash but exit cleanly.
| bsd-3-clause | tedshroyer/crosswalk,minggangw/crosswalk,axinging/crosswalk,xzhan96/crosswalk,RafuCater/crosswalk,tedshroyer/crosswalk,stonegithubs/crosswalk,dreamsxin/crosswalk,Bysmyyr/crosswalk,crosswalk-project/crosswalk-efl,siovene/crosswalk,RafuCater/crosswalk,axinging/crosswalk,darktears/crosswalk,chinakids/crosswalk,xzhan96/cro... | 9be8ac9ad3f94875a9381555d8859f289c59d6df |
#ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD ... | #ifndef CLIENTVERSION_H
#define CLIENTVERSION_H
//
// client versioning and copyright year
//
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 1
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD ... | ---
+++
@@ -12,7 +12,7 @@
#define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build
-#define CLIENT_VERSION_IS_RELEASE true
+#define CLIENT_VERSION_IS_RELEASE false
// Copyright year (2009-this)
// Todo: update this when changing our copyright comments in the source | Set client release to false
| mit | Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden,Electronic-Gulden-Foundation/egulden | e3e10e5a788bd65aa65ee133f3740dfc1d91f1eb |
#ifndef SCRAPPIE_H
#define SCRAPPIE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <immintrin.h>
#include <stdbool.h>
/* Structure definitions from scrappie_structures.h */
typedef struct {
double start;
float length;
float mean, stdv;
int pos, state;
} event_t;
typedef struct {
unsigned int n, start, e... | #ifndef SCRAPPIE_H
#define SCRAPPIE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <immintrin.h>
#include <stdbool.h>
/* Structure definitions from fast5_interface.h */
typedef struct {
double start;
float length;
float mean, stdv;
int pos, state;
} event_t;
typedef struct {
unsigned int n, start, end;
... | ---
+++
@@ -10,7 +10,7 @@
-/* Structure definitions from fast5_interface.h */
+/* Structure definitions from scrappie_structures.h */
typedef struct {
double start;
float length;
@@ -29,7 +29,7 @@
} raw_table;
-/* Matrix definitions from util.h */
+/* Matrix definitions from scrappie_matrix.h ... | Update where various definitions have come from
| mpl-2.0 | nanoporetech/scrappie,nanoporetech/scrappie,nanoporetech/scrappie | 42d8167c3ac24b41e625063140bac8ac4ab31da0 |
#include "types.h"
#include "stat.h"
#include "user.h"
char buf[512];
void
cat(int fd)
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0) {
if (write(1, buf, n) != n) {
printf(1, "cat: write error\n");
exit();
}
}
if(n < 0){
printf(1, "cat: read error\n");
exit();
}
}
int
mai... | #include "types.h"
#include "stat.h"
#include "user.h"
char buf[512];
void
cat(int fd)
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0)
write(1, buf, n);
if(n < 0){
printf(1, "cat: read error\n");
exit();
}
}
int
main(int argc, char *argv[])
{
int fd, i;
if(argc <= 1){
cat(0);
e... | ---
+++
@@ -9,8 +9,12 @@
{
int n;
- while((n = read(fd, buf, sizeof(buf))) > 0)
- write(1, buf, n);
+ while((n = read(fd, buf, sizeof(buf))) > 0) {
+ if (write(1, buf, n) != n) {
+ printf(1, "cat: write error\n");
+ exit();
+ }
+ }
if(n < 0){
printf(1, "cat: read error\n");
ex... | Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@gmail)
| mit | shyandsy/xv6,shyandsy/xv6,shyandsy/xv6,ManaPoustizadeh/OS-finalProject,shyandsy/xv6,ManaPoustizadeh/OS-finalProject,gw/xv6,phf/xv6-public,voytovichs/xv6-public,voytovichs/xv6-public,ManaPoustizadeh/OS-finalProject,voytovichs/xv6-public,gw/xv6,phf/xv6-public,voytovichs/xv6-public,voytovichs/xv6-public,phf/xv6-public,phf... | 89826f41bd5c96e6b13692d03d08049c912b9365 |
#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)
... | ---
+++
@@ -16,10 +16,19 @@
# define bool char
# define true 1
# define false 0
+# define inline
# define LBS_COMMON_ISO_C89
# define LBS_COMMON_CHECK_TYPE(x,type) (x)
#endif /* __STDC_VERSION__ */
#define LBS_COMMON_NULL_PTR ((void*)NULL)
+#define LBS_COMMON_DEFINE_GETTER(ns,xt,m,mt) \
+ static inline ... | Add macros to define getters and setters
| bsd-3-clause | lantw44/l4basic,lantw44/l4basic | dc258e02720308981a4f8a2e4848c582c1b71123 |
/*
* types.h
* Ansilove 4.1.0
* https://www.ansilove.org
*
* Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
* All rights reserved.
*
* Ansilove is licensed under the BSD 2-Clause License.
* See LICENSE file for details.
*/
#ifndef TYPES_H
#define TYPES_H
#define ANSILOVE_FILETYPE_AN... | /*
* types.h
* Ansilove 4.1.0
* https://www.ansilove.org
*
* Copyright (c) 2011-2020 Stefan Vogt, Brian Cassidy, and Frederic Cambus
* All rights reserved.
*
* Ansilove is licensed under the BSD 2-Clause License.
* See LICENSE file for details.
*/
#ifndef TYPES_H
#define TYPES_H
#define ANSILOVE_FILETYPE_AN... | ---
+++
@@ -21,6 +21,9 @@
#define ANSILOVE_FILETYPE_TND 6
#define ANSILOVE_FILETYPE_XB 7
+struct ansilove_ctx;
+struct ansilove_options;
+
extern char *types[];
extern int filetypes[];
extern int (*loaders[])(struct ansilove_ctx *, struct ansilove_options *); | Add forward declarations for ansilove_ctx and ansilove_options structs.
| bsd-2-clause | ansilove/ansilove,ansilove/AnsiLove-C | 1e88990b7b2b4bfc9999b79a78a08e7decf7e416 |
#include "stdio.h"
#include "stdlib.h"
#include "sys/time.h"
#define TRIALS 4
#define MATRIX_SIZE 2048
short A[MATRIX_SIZE][MATRIX_SIZE],
B[MATRIX_SIZE][MATRIX_SIZE],
C[MATRIX_SIZE][MATRIX_SIZE] = {{0}};
int main(int argc, char* argv[])
{
// Initalize array A and B with '1's
for (int i = 0; i < MATRIX... | #include "stdio.h"
#include "stdlib.h"
#define TRIALS 4
#define MATRIX_SIZE 2048
short A[MATRIX_SIZE][MATRIX_SIZE],
B[MATRIX_SIZE][MATRIX_SIZE],
C[MATRIX_SIZE][MATRIX_SIZE] = {{0}};
int main(int argc, char* argv[])
{
// Initalize array A and B with '1's
for (int i = 0; i < MATRIX_SIZE; ++i)
for (int... | ---
+++
@@ -1,5 +1,6 @@
#include "stdio.h"
#include "stdlib.h"
+#include "sys/time.h"
#define TRIALS 4
#define MATRIX_SIZE 2048
@@ -15,14 +16,40 @@
for (int k = 0; k < MATRIX_SIZE; ++k)
A[i][k] = B[i][k] = 1;
+ // Show headings
+ for (int trial = 0; trial < TRIALS; ++trial)
+ printf(" run%d ,", trial)... | Add timing and formating for times
| mit | EvanPurkhiser/CS-Matrix-Multiplication | ea1cb775db1666406796f506da0fa98e21dccbad |
#include "sim-hab.h"
#include <stdlib.h>
int poll_arduino()
{
char response[256];
uint32_t content;
bionet_resource_t *res;
bionet_node_t *node;
node = bionet_hab_get_node_by_index(hab, 0);
// send command 100. requests analog0's value
// read value and set resource
arduino_write(... | #include "sim-hab.h"
#include <stdlib.h>
int poll_arduino()
{
char response[256];
uint32_t content;
bionet_resource_t *res;
bionet_node_t *node;
node = bionet_hab_get_node_by_index(hab, 0);
// send command 100. requests analog0's value
// read value and set resource
arduino_write(... | ---
+++
@@ -27,11 +27,16 @@
res = bionet_node_get_resource_by_index(node, 25);
bionet_resource_set_uint32(res, content, NULL);
- // testing
+ // send command 200. requests the 8 digital values
+ // read values and set resource
arduino_write(200);
arduino_read_until(response, '\n');
- ... | Modify sim-hab so that the digital inputs are accounted for.
| lgpl-2.1 | ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead,ldm5180/hammerhead | 278ef644709f6e05938be329941e4cc2207dae41 |
@interface NSData (ImageMIMEDetection)
/**
Try to deduce the MIME type.
@return string representation of detected MIME type. `nil` if not able to
detect the MIME type.
@see http://en.wikipedia.org/wiki/Internet_media_type
*/
- (NSString *)tdt_MIMEType;
@end
|
@interface NSData (ImageMIMEDetection)
@end
| ---
+++
@@ -1,4 +1,14 @@
@interface NSData (ImageMIMEDetection)
+/**
+ Try to deduce the MIME type.
+
+ @return string representation of detected MIME type. `nil` if not able to
+ detect the MIME type.
+
+ @see http://en.wikipedia.org/wiki/Internet_media_type
+ */
+- (NSString *)tdt_MIMEType;
+
@end | Add interface for the category
| bsd-3-clause | talk-to/NSData-TDTImageMIMEDetection | 3679a62c59dde625a18416f15aadaa6845bc8cfd |
#define TEST_NAME "auth"
#include "cmptest.h"
/* "Test Case 2" from RFC 4231 */
unsigned char key[32] = "Jefe";
unsigned char c[] = "what do ya want for nothing?";
unsigned char a[32];
int main(void)
{
int i;
crypto_auth(a,c,sizeof c - 1U,key);
for (i = 0;i < 32;++i) {
printf(",0x%02x",(unsigned int) a[i]... |
#define TEST_NAME "auth"
#include "cmptest.h"
/* "Test Case 2" from RFC 4231 */
unsigned char key[32] = "Jefe";
unsigned char c[] = "what do ya want for nothing?";
unsigned char a[32];
int main(void)
{
int i;
crypto_auth(a,c,sizeof c - 1U,key);
for (i = 0;i < 32;++i) {
printf(",0x%02x",(unsigned int) a[i]... | ---
+++
@@ -20,6 +20,8 @@
assert(crypto_auth_bytes() > 0U);
assert(crypto_auth_keybytes() > 0U);
assert(strcmp(crypto_auth_primitive(), "hmacsha512256") == 0);
+ assert(crypto_auth_hmacsha512256_bytes() > 0U);
+ assert(crypto_auth_hmacsha512256_keybytes() > 0U);
return 0;
} | Test the presence of some extra functions
| isc | rustyhorde/libsodium,SpiderOak/libsodium,netroby/libsodium,JackWink/libsodium,Payshares/libsodium,eburkitt/libsodium,netroby/libsodium,akkakks/libsodium,CyanogenMod/android_external_dnscrypt_libsodium,zhuqling/libsodium,rustyhorde/libsodium,pyparallel/libsodium,paragonie-scott/libsodium,eburkitt/libsodium,akkakks/libso... | b7b0436fb866c5a19769458d47c72a0d2c55f8c0 |
/**
* \file express_tests.h
* \date Jul 4, 2009
* \author anton
* \details
*/
#ifndef EXPRESS_TESTS_H_
#define EXPRESS_TESTS_H_
typedef struct _EXPRESS_TEST_DESCRIPTOR {
const char *name;
int (*exec)();
} EXPRESS_TEST_DESCRIPTOR;
/*
#define REGISTER_EXPRESS_TEST(descr) static void _register_express_test(){ \
... | /**
* \file express_tests.h
* \date Jul 4, 2009
* \author anton
* \details
*/
#ifndef EXPRESS_TESTS_H_
#define EXPRESS_TESTS_H_
typedef struct _EXPRESS_TEST_DESCRIPTOR {
const char *name;
int (*exec)();
} EXPRESS_TEST_DESCRIPTOR;
#define REGISTER_EXPRESS_TEST(descr) static void _register_express_test(){ \
... | ---
+++
@@ -12,6 +12,7 @@
int (*exec)();
} EXPRESS_TEST_DESCRIPTOR;
+/*
#define REGISTER_EXPRESS_TEST(descr) static void _register_express_test(){ \
__asm__( \
".section .express_tests\n\t" \
@@ -24,6 +25,12 @@
static int exec(); \
static const EXPRESS_TEST_DESCRIPTOR _descriptor = { name,... | Change declaration express test macros | bsd-2-clause | vrxfile/embox-trik,vrxfile/embox-trik,vrxfile/embox-trik,Kefir0192/embox,Kefir0192/embox,embox/embox,Kakadu/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,mike2390/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,gzoom13/embox,Kakadu/embox,Kakadu/embox,Kakadu/embox,abusalimov/embox,mike2390/embox,abusalimov/e... | e2c7691081b857651a031bf66e42dc1735d6b0a4 |
#ifndef LOGSMODEL
#define LOGSMODEL
#include <QString>
#include <QFile>
#include <QDir>
#include <QDebug>
#include <QTextStream>
#include <QStandardPaths>
#include "../Helpers/constants.h"
namespace Models {
class LogsModel : public QObject {
Q_OBJECT
public:
Q_INVOKABLE QString getAllLogsText... | #ifndef LOGSMODEL
#define LOGSMODEL
#include <QString>
#include <QFile>
#include <QDir>
#include <QDebug>
#include <QTextStream>
#include <QStandardPaths>
#include "Helpers/constants.h"
namespace Models {
class LogsModel : public QObject {
Q_OBJECT
public:
Q_INVOKABLE QString getAllLogsText() ... | ---
+++
@@ -7,7 +7,7 @@
#include <QDebug>
#include <QTextStream>
#include <QStandardPaths>
-#include "Helpers/constants.h"
+#include "../Helpers/constants.h"
namespace Models {
class LogsModel : public QObject { | Fix for compilation in Windows
| mpl-2.0 | Ribtoks/xpiks,Artiom-M/xpiks,Ribtoks/xpiks,Ribtoks/xpiks,Ribtoks/xpiks,Artiom-M/xpiks,Artiom-M/xpiks,Artiom-M/xpiks | 4cb0d352ed7208fc9ac71b006dcb1b0ff8d65ca2 |
#include "fitz_base.h"
void * fz_malloc(int n)
{
void *p = malloc(n);
if (!p)
fz_throw("cannot malloc %d bytes", n);
return p;
}
void * fz_realloc(void *p, int n)
{
void *np = realloc(p, n);
if (np == nil)
fz_throw("cannot realloc %d bytes", n);
return np;
}
void fz_free(void *p)
{
free... | #include "fitz_base.h"
void * fz_malloc(int n)
{
void *p = malloc(n);
if (!p)
fz_throw("cannot malloc %d bytes", n);
return p;
}
void * fz_realloc(void *p, int n)
{
void *np = realloc(p, n);
if (np == nil)
fz_throw("cannot realloc %d bytes", n);
return np;
}
void fz_free(void *p)
{
free... | ---
+++
@@ -25,7 +25,7 @@
{
char *ns = strdup(s);
if (!ns)
- fz_throw("cannot strdup %d bytes", strlen(s) + 1);
+ fz_throw("cannot strdup %lu bytes", (unsigned long)strlen(s) + 1);
return ns;
}
| Use the correct format specifier for size_t in fz_strdup.
Prior to this patch, if the strdup failed, it would throw an error
printing the number of bytes that could not be allocated. However,
this was formatted as an int, while the actual argument passed is
the return value of strdup itself, which is usually a size_t.... | agpl-3.0 | isavin/humblepdf,clchiou/mupdf,muennich/mupdf,michaelcadilhac/pdfannot,seagullua/MuPDF,tribals/mupdf,lustersir/MuPDF,loungeup/mupdf,nqv/mupdf,PuzzleFlow/mupdf,hjiayz/forkmupdf,robamler/mupdf-nacl,benoit-pierre/mupdf,tophyr/mupdf,xiangxw/mupdf,hackqiang/mupdf,Kalp695/mupdf,MokiMobility/muPDF,zeniko/mupdf,robamler/mupdf-... | 66b0664aa1347df44ff7a5a7aa5b35d07df54ea5 |
// RUN: %clang_cc1 -E -verify -fms-compatibility %s
#import "pp-record.h" // expected-error {{#import of type library is an unsupported Microsoft feature}}
// Test attributes
#import "pp-record.h" no_namespace, auto_rename // expected-error {{#import of type library is an unsupported Microsoft feature}}
#import "pp-... | // RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:100:2: error: #import of type library is an unsupported Microsoft feature'
// RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:200:2: error: #import of type library is an unsupported Microsoft feature'
// RUN: %clang_cc1 -E -fms-compatibility %s ... | ---
+++
@@ -1,17 +1,12 @@
-// RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:100:2: error: #import of type library is an unsupported Microsoft feature'
-// RUN: %clang_cc1 -E -fms-compatibility %s 2>&1 | grep 'doh.c:200:2: error: #import of type library is an unsupported Microsoft feature'
-// RUN: %clan... | Migrate a test to -verify
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@173716 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... | 13bdfcd1c659359289f373052b21fb9f998dcc0b |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_VALIDATION_H
... | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_VALIDATION_H
... | ---
+++
@@ -10,7 +10,7 @@
#include <stdint.h>
#include <string>
-static const int64_t DEFAULT_MAX_TIP_AGE = 120; // ~45 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
+static const int64_t DEFAULT_MAX_TIP_AGE = 1 * 60 * 60; // ~45 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 i... | Put back default max tip age
| mit | neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron | 7fc9119df40544c5048308be5a6ff46b61213972 |
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.04.00.13-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 4
#define QLA_DRIVER_PATCH_VER 0
#defi... | /*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2013 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.04.00.08-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 4
#define QLA_DRIVER_PATCH_VER 0
#defi... | ---
+++
@@ -7,7 +7,7 @@
/*
* Driver version
*/
-#define QLA2XXX_VERSION "8.04.00.08-k"
+#define QLA2XXX_VERSION "8.04.00.13-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 4 | [SCSI] qla2xxx: Update the driver version to 8.04.00.13-k.
Signed-off-by: Giridhar Malavali <799b6491fce2c7a80b5fedcf9a728560cc9eb954@qlogic.com>
Signed-off-by: Saurav Kashyap <88d6fd94e71a9ac276fc44f696256f466171a3c0@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
| mit | KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Program... | 231ff54e4cc4a6f1ef78fb4e1f94957bbb961aae |
#ifndef __CMPTEST_H__
#define __CMPTEST_H__
#include <stdio.h>
#include "sodium.h"
#ifndef TEST_SRCDIR
# define TEST_SRCDIR "."
#endif
#define TEST_NAME_RES TEST_NAME ".res"
#define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp"
#ifdef HAVE_ARC4RANDOM
# undef rand
# define rand(X) arc4random(X)
#endif
FILE *fp_r... |
#ifndef __CMPTEST_H__
#define __CMPTEST_H__
#include <stdio.h>
#include "sodium.h"
#ifndef TEST_SRCDIR
#define TEST_SRCDIR "./"
#endif
#define TEST_NAME_RES TEST_NAME ".res"
#define TEST_NAME_OUT TEST_SRCDIR "/" TEST_NAME ".exp"
#ifdef HAVE_ARC4RANDOM
# undef rand
# define rand(X) arc4random(X)
#endif
FILE *fp_r... | ---
+++
@@ -7,7 +7,7 @@
#include "sodium.h"
#ifndef TEST_SRCDIR
-#define TEST_SRCDIR "./"
+# define TEST_SRCDIR "."
#endif
#define TEST_NAME_RES TEST_NAME ".res" | Add a default value for TEST_SRCDIR
| isc | netroby/libsodium,tml/libsodium,SpiderOak/libsodium,optedoblivion/android_external_libsodium,Payshares/libsodium,tml/libsodium,Payshares/libsodium,rustyhorde/libsodium,JackWink/libsodium,zhuqling/libsodium,HappyYang/libsodium,Payshare/libsodium,akkakks/libsodium,pyparallel/libsodium,zhuqling/libsodium,zhuqling/libsodiu... | c1aebf3ea9e5fc1881078b6f286049090766fdfa |
//
// CCLoadingController.h
// CCKit
//
// Created by Leonardo Lobato on 3/15/13.
// Copyright (c) 2013 Cliq Consulting. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol CCLoadingControllerDelegate;
@interface CCLoadingController : NSObject
@property (nonatomic, readonly) UIView *loadingView;
#if __has... | //
// CCLoadingController.h
// CCKit
//
// Created by Leonardo Lobato on 3/15/13.
// Copyright (c) 2013 Cliq Consulting. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol CCLoadingControllerDelegate;
@interface CCLoadingController : NSObject
@property (nonatomic, readonly) UIView *loadingView;
@property... | ---
+++
@@ -13,7 +13,11 @@
@interface CCLoadingController : NSObject
@property (nonatomic, readonly) UIView *loadingView;
+#if __has_feature(objc_arc)
@property (nonatomic, weak) id<CCLoadingControllerDelegate> delegate;
+#else
+@property (nonatomic, assign) id<CCLoadingControllerDelegate> delegate;
+#endif
-... | Fix build for non-arc projects
Does **not** add no-arc support. Project will leak.
| mit | cliq/CCKit | 4545c54ecd4b9cbc13033008c78c403da996f990 |
/*
** Copyright 2002, Manuel J. Petit. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#include <stdio.h>
#include <dlfcn.h>
extern int fib(int);
extern void shared_hello(void);
int
main()
{
void *freston;
void *girlfriend;
shared_hello();
printf("%d %d %d %d %d %d\n", fib(0), fib(1... | /*
** Copyright 2002, Manuel J. Petit. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#include <stdio.h>
#include <dlfcn.h>
extern int fib(int);
extern void shared_hello(void);
int
main()
{
void *freston;
void *girlfriend;
shared_hello();
printf("%d %d %d %d %d %d\n", fib(0), fib(1... | ---
+++
@@ -18,7 +18,7 @@
shared_hello();
printf("%d %d %d %d %d %d\n", fib(0), fib(1), fib(2), fib(3), fib(4), fib(5));
- freston= dlopen("/boot/lib/girlfriend.so", RTLD_LAZY);
+ freston= dlopen("/boot/lib/girlfriend.so", RTLD_NOW);
girlfriend= dlsym(freston, "girlfriend");
((void(*)(void))girlfriend)(); | Fix serious bug. Should be RTLD_NOW... RTLD_LAZY does not work for getting a girlfriend.
git-svn-id: fb278a52ad97f7fbef074986829f2c6a2a3c4b34@547 c25cc9d1-44fa-0310-b259-ad778cb1d433
| bsd-3-clause | dioptre/newos,travisg/newos,siraj/newos,zhouxh1023/newos,siraj/newos,siraj/newos,dioptre/newos,dioptre/newos,siraj/newos,travisg/newos,zhouxh1023/newos,travisg/newos,zhouxh1023/newos | 2fbd5548c56d6cbeef46248da67cb97455a3a7ec |
// SKIP PARAM: --set solver td3 --enable ana.int.interval --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy
// Example from https://www-apr.lip6.fr/~mine/publi/arti... | // SKIP PARAM: --set solver td3 --enable ana.int.interval --set ana.base.arrays.domain partitioned --set ana.activated "['base','threadid','threadflag','expRelation','mallocWrapper','apron']" --set ana.base.privatization none --set ana.apron.privatization dummy
// Example from https://www-apr.lip6.fr/~mine/publi/arti... | ---
+++
@@ -15,8 +15,9 @@
if(X == N) {
N = 8;
} else {
- // is dead code but if that is detected or not depends on what we do in branch
- // currently we can't detect this
+ // dead code
N = 42;
}
+
+ assert(N == 8);
} | Make assert in 36/01 stronger
| mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer | 1bd3551a0fbd8bc375a9bb7a60d8152ff641f3f9 |
#define BUF_SIZE 4096
#define MAXINTERFACES 5
#define MAXNEIGHBOURS 10
#define MESSAGE_PAD1 0
#define MESSAGE_PADN 1
#define MESSAGE_ACK_REQ 2
#define MESSAGE_ACK 3
#define MESSAGE_HELLO 4
#define MESSAGE_IHU 5
#define MESSAGE_ROUTER_ID 6
#define MESSAGE_NH 7
#define MESSAGE_UPDATE 8
#define MESSAGE_REQUEST 9
#defin... | #define BUF_SIZE 4096
#define MAXINTERFACES 10
#define MAXNEIGHBOURS 20
#define MESSAGE_PAD1 0
#define MESSAGE_PADN 1
#define MESSAGE_ACK_REQ 2
#define MESSAGE_ACK 3
#define MESSAGE_HELLO 4
#define MESSAGE_IHU 5
#define MESSAGE_ROUTER_ID 6
#define MESSAGE_NH 7
#define MESSAGE_UPDATE 8
#define MESSAGE_REQUEST 9
#defi... | ---
+++
@@ -1,7 +1,7 @@
#define BUF_SIZE 4096
-#define MAXINTERFACES 10
-#define MAXNEIGHBOURS 20
+#define MAXINTERFACES 5
+#define MAXNEIGHBOURS 10
#define MESSAGE_PAD1 0
#define MESSAGE_PADN 1 | Reduce size of neighbour and interface table.
Now that we're able to expire neighbours, we can get away with a smaller table.
| mit | jech/sbabeld | aa1ee08cf779b9a07867aa315c766e663bcbc4ed |
#ifndef ABSTRACT_LEARNING_DEBUG_H
#define ABSTRACT_LEARNING_DEBUG_H
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
/*Print method*/
#ifdef BUILD_FOR_ANDROID
#include <android/log.h>
#define ALPRINT(format, ...) __android_log_print(ANDROID_LOG_INFO, "AL", format,##__VA_ARGS__)
#define ALPRINT_FL(format,...)... | #ifndef ABSTRACT_LEARNING_DEBUG_H
#define ABSTRACT_LEARNING_DEBUG_H
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#define FUNC_PRINT(x) printf(#x"=%d in %s, %d \n",x, __func__, __LINE__);
#define FUNC_PRINT_ALL(x, type) printf(#x"="#type"%"#type" in %s, %d \n",x, __func__, __LINE__);
#define CHECK_POIN... | ---
+++
@@ -4,8 +4,31 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
-#define FUNC_PRINT(x) printf(#x"=%d in %s, %d \n",x, __func__, __LINE__);
-#define FUNC_PRINT_ALL(x, type) printf(#x"="#type"%"#type" in %s, %d \n",x, __func__, __LINE__);
+/*Print method*/
+#ifdef BUILD_FOR_ANDROID
+#include <a... | Add debug for android, solve all warning
| apache-2.0 | jxt1234/Abstract_Learning,jxt1234/Abstract_Learning,jxt1234/Abstract_Learning | c78c827078ec7211971e4d42c7de8c7a0e16fd56 |
/*
============================================================================
Name : thsh.c
Authors : Collin Kruger, Denton Underwood, John Christensen, Jon Stacey
Version :
Copyright : Copyright 2009 Jon Stacey. All rights reserved.
Description : Hello World in C, Ansi-style
=================... | /*
============================================================================
Name : thsh.c
Authors : Collin Kruger, Denton Underwood, John Christensen, Jon Stacey
Version :
Copyright : Copyright 2009 Jon Stacey. All rights reserved.
Description : Hello World in C, Ansi-style
=================... | ---
+++
@@ -12,6 +12,8 @@
#include <stdlib.h>
int main(void) {
+ setvbuf(stdout, NULL, _IONBF, 0); // Disable buffering in accordance to http://homepages.tesco.net/J.deBoynePollard/FGA/capture-console-win32.html
+
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
return EXIT_SUCCESS;
} | Disable buffering to overcome apparent Eclipse bug
| mit | jmstacey/thsh | ae193c0aadeaa9be7e65afa87268436ee582fdb3 |
//-----------------------------------------------------------------------------
//
// Copyright © 2016 Project Golan
//
// See "LICENSE" for more information.
//
//-----------------------------------------------------------------------------
//
// Assertions.
//
//-------------------------------------------------------... | //-----------------------------------------------------------------------------
//
// Copyright © 2016 Project Golan
//
// See "LICENSE" for more information.
//
//-----------------------------------------------------------------------------
//
// Assertions.
//
//-------------------------------------------------------... | ---
+++
@@ -20,7 +20,7 @@
#else
#define Lth_assert(expression) \
if(!(expression)) \
- printf("[lithos3] Assertion failed in %s (%s:%i): %s\n", \
+ fprintf(stderr, "[lithos3] Assertion failed in %s (%s:%i): %s\n", \
__func__, __FILE__, __LINE__, #expression); \
else \
((void)0) | assert: Fix Lth_Assert not using stderr
| mit | Project-Golan/LithOS3 | f30001b81814882577a9ab1e34f64b4d240ca99a |
#ifndef NME_BYTE_ARRAY_H
#define NME_BYTE_ARRAY_H
#include <nme/Object.h>
#include <nme/QuickVec.h>
#include "Utils.h"
#include <hx/CFFI.h>
namespace nme
{
// If you put this structure on the stack, then you do not have to worry about GC.
// If you store this in a heap structure, then you will need to use GC roots ... | #ifndef NME_BYTE_ARRAY_H
#define NME_BYTE_ARRAY_H
#include <nme/Object.h>
#include <nme/QuickVec.h>
#include "Utils.h"
namespace nme
{
// If you put this structure on the stack, then you do not have to worry about GC.
// If you store this in a heap structure, then you will need to use GC roots for mValue...
struct ... | ---
+++
@@ -4,6 +4,7 @@
#include <nme/Object.h>
#include <nme/QuickVec.h>
#include "Utils.h"
+#include <hx/CFFI.h>
namespace nme
{
@@ -16,7 +17,7 @@
ByteArray(int inSize);
ByteArray(const ByteArray &inRHS);
ByteArray();
- ByteArray(struct _value *Value);
+ ByteArray(value Value);
ByteArray(... | Use correct cffi type for 'value'
| mit | thomasuster/NME,haxenme/nme,haxenme/nme,haxenme/nme,haxenme/nme,madrazo/nme,thomasuster/NME,thomasuster/NME,madrazo/nme,thomasuster/NME,thomasuster/NME,madrazo/nme,thomasuster/NME,madrazo/nme,madrazo/nme,haxenme/nme,madrazo/nme | f34ee1e4aa493b3192226c77f6c7041efc47c6df |
/*
* Copyright (C) 2013 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_shell_commands
* @{
*
* @file
* @brief Shell commands for the PS module
*... | /*
* Copyright (C) 2013 INRIA.
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup sys_shell_commands
* @{
*
* @file
* @brief Shell commands for the PS module
*... | ---
+++
@@ -18,6 +18,7 @@
* @}
*/
+#ifdef MODULE_PS
#include "ps.h"
int _ps_handler(int argc, char **argv)
@@ -29,3 +30,4 @@
return 0;
}
+#endif | Fix ps depedency when ps not included
| lgpl-2.1 | ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT,ximus/RIOT | 0e759ce768538ef7c0740771c069d36833feca46 |
// Copyright 2014-2016 the project authors as listed in the AUTHORS file.
// All rights reserved. Use of this source code is governed by the
// license that can be found in the LICENSE file.
#ifndef _DEVICE
#define _DEVICE
#include "MessageQueue.h"
#include "DeviceMessageHandler.h"
#ifdef __arm__
#define INTERRUPT_... | // Copyright 2014-2016 the project authors as listed in the AUTHORS file.
// All rights reserved. Use of this source code is governed by the
// license that can be found in the LICENSE file.
#ifndef _DEVICE
#define _DEVICE
#include "MessageQueue.h"
#include "DeviceMessageHandler.h"
typedef struct MessageHandlerList... | ---
+++
@@ -8,6 +8,13 @@
#include "MessageQueue.h"
#include "DeviceMessageHandler.h"
+#ifdef __arm__
+
+#define INTERRUPT_SAFE
+#else
+#include <Arduino.h>
+#define INTERRUPT_SAFE ICACHE_RAM_ATTR
+#endif
typedef struct MessageHandlerListEntry {
DeviceMessageHandler* handler; | Add back missing platform defines
| mit | mhdawson/arduino-esp8266,mhdawson/arduino-esp8266 | f1e39690cf85b947ed6ccb1c12315b79f83708bb |
#ifndef FIX_TYPES_H
#define FIX_TYPES_H
#include <sys/types.h>
/*
The system include file defines this in terms of bzero(), but ANSI says
we should use memset().
*/
#if defined(OSF1)
#undef FD_ZERO
#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
#endif
/*
Various non-POSIX conforming files which depend o... | #ifndef FIX_TYPES_H
#define FIX_TYPES_H
#include <sys/types.h>
/*
The system include file defines this in terms of bzero(), but ANSI says
we should use memset().
*/
#if defined(OSF1)
#undef FD_ZERO
#define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p)))
#endif
/*
Various non-POSIX conforming files which depend o... | ---
+++
@@ -19,8 +19,16 @@
typedef unsigned int u_int;
+#if defined(AIX32)
+typedef unsigned short ushort;
+#endif
+
#if defined(ULTRIX42) || defined(ULTRIX43)
typedef char * caddr_t;
#endif
+#if defined(AIX32)
+typedef unsigned long rlim_t;
#endif
+
+#endif | Add types "ushort" and "rlim_t" for AIX.
| apache-2.0 | bbockelm/condor-network-accounting,zhangzhehust/htcondor,djw8605/condor,neurodebian/htcondor,clalancette/condor-dcloud,djw8605/htcondor,mambelli/osg-bosco-marco,neurodebian/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,clalancette/condor-dcloud,bbockelm... | 3ed71339b1bb80eec219c142aca03a0cf0be0ffa |
#ifdef __aarch64__
# define STATIC_CHAIN_REG "x18"
#elif defined(__alpha__)
# define STATIC_CHAIN_REG "$1"
#elif defined(__arm__)
# define STATIC_CHAIN_REG "ip"
#elif defined(__sparc__)
# if defined(__arch64__) || defined(__sparcv9)
# define STATIC_CHAIN_REG "g5"
# else
# define STATIC_CHAIN_REG "g2"
# endif
#elif... | #ifdef __aarch64__
# define STATIC_CHAIN_REG "x18"
#elif defined(__alpha__)
# define STATIC_CHAIN_REG "r1"
#elif defined(__arm__)
# define STATIC_CHAIN_REG "ip"
#elif defined(__sparc__)
# if defined(__arch64__) || defined(__sparcv9)
# define STATIC_CHAIN_REG "g5"
# else
# define STATIC_CHAIN_REG "g2"
# endif
#elif... | ---
+++
@@ -1,7 +1,7 @@
#ifdef __aarch64__
# define STATIC_CHAIN_REG "x18"
#elif defined(__alpha__)
-# define STATIC_CHAIN_REG "r1"
+# define STATIC_CHAIN_REG "$1"
#elif defined(__arm__)
# define STATIC_CHAIN_REG "ip"
#elif defined(__sparc__) | testsuite: Fix alpha static chain register name
| mit | biosbits/libffi,Distrotech/libffi,Distrotech/libffi,joshtriplett/libffi,Pan7/libffi,Pan7/libffi,biosbits/libffi,s1341/libffi,bgarrels/libffi,joshtriplett/libffi,nmav/libffi,rth7680/libffi,joshtriplett/libffi,rth7680/libffi,plicease/libffi,Pan7/libffi,bgarrels/libffi,s1341/libffi,nmav/libffi,biosbits/libffi,joshtriplett... | ccdd7bb8566b2fd1da5c4b5c8eaa2db43a69e720 |
// RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Addre... | // RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Addre... | ---
+++
@@ -18,7 +18,11 @@
return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}}
}
-unsigned short* compound_literal() {
- return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar in... | Improve compound literal test case.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58447 91177308-0d34-0410-b5e6-96231b3b80d8
| apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-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-clang,apple/swift-clang,llvm-mirror/cl... | d4a07988c8ba6b214e8d93c3a4048357484ba771 |
#ifndef _MY_EDATA
#define _MY_EDATA
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#include <stdbool.h>
#endif
/** @brief struct that carries all information about experimental data */
typedef struct edata {
/** observed data */
double *am_my;
/** standard deviation of observed data ... | #ifndef _MY_EDATA
#define _MY_EDATA
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#endif
/** @brief struct that carries all information about experimental data */
typedef struct edata {
/** observed data */
double *am_my;
/** standard deviation of observed data */
double *am_ysi... | ---
+++
@@ -5,6 +5,7 @@
#define EXTERNC extern "C"
#else
#define EXTERNC
+#include <stdbool.h>
#endif
/** @brief struct that carries all information about experimental data */
@@ -22,7 +23,7 @@
/** boolean indicating whether experimental data was provided */
bool am_bexpdata;
- } ExpData;
+} Ex... | Fix type bool for C
| bsd-2-clause | AMICI-developer/AMICI,FFroehlich/AMICI,AMICI-developer/AMICI,AMICI-developer/AMICI,FFroehlich/AMICI,FFroehlich/AMICI,FFroehlich/AMICI,AMICI-developer/AMICI | 172dfb5cae6780455d338fd38a16c87dfe92073b |
#pragma once
#include "initiation/sipmessageprocessor.h"
#include "initiation/siptypes.h"
/* This class handles the authentication for this connection
* should we receive a challenge */
class SIPAuthentication : public SIPMessageProcessor
{
Q_OBJECT
public:
SIPAuthentication();
public slots:
// add credent... | #pragma once
#include "initiation/sipmessageprocessor.h"
#include "initiation/siptypes.h"
/* This class handles the authentication for this connection
* should we receive a challenge */
class SIPAuthentication : public SIPMessageProcessor
{
Q_OBJECT
public:
SIPAuthentication();
public slots:
// add credent... | ---
+++
@@ -29,8 +29,6 @@
void updateNonceCount(DigestChallenge& challenge, DigestResponse& response);
- // TODO: Test if these need to be separate
-
QList<DigestChallenge> wwwChallenges_;
QList<DigestChallenge> proxyChallenges_;
| cosmetic(Transport): Remove TODO. Tested common credentials, didn't work.
| isc | ultravideo/kvazzup,ultravideo/kvazzup | 235b1753f48c8a22cb79e3115b637f179c3e1e8b |
#ifndef TERRAIN_H
#define TERRAIN_H
#include <util/Math.h>
#include <util/Random.h>
#include <vector>
#include "Constants.h"
class Terrain {
public:
Terrain(
const float stepLength = constants::TERRAIN_STEP_LENGTH,
const float amplitude = constants::TERRAIN_HEIGHT_VARIATION_AMPLITUDE,
const float... | #ifndef TERRAIN_H
#define TERRAIN_H
#include <util/Math.h>
#include <util/Random.h>
#include <vector>
#include "Constants.h"
class Terrain {
public:
Terrain(
const float stepLength = constants::TERRAIN_STEP_LENGTH,
const float amplitude = constants::TERRAIN_HEIGHT_VARIATION_AMPLITUDE,
const float... | ---
+++
@@ -21,7 +21,7 @@
// Inlining these as performance examples
float stepLength() const { return _stepLength; }
float length() const { return float(_vertices.size()) * stepLength() - stepLength(); }
- const std::vector<glm::vec2>& Terrain::vertices() const { return _vertices; }
+ const std::vector<glm::vec... | Fix compilation bug on linux
| mit | GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker,GiGurra/drunken_walker | adf0978b3ac91823bf105e78aabb805aaa11e17a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.