Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Add missing sendFile function declaration | #define PORT 50000
#define TIMEOUT 10;
int waitforack(int sock);
int sendack(int sock);
int senderr(int sock, int ecode);
int sendfin(int sock);
int getsockfd();
int releasesockfd(int sock); | #define PORT 6012
#define TIMEOUT 10;
int waitforack(int sock);
int sendConnect(int sock);
int sendack(int sock);
int senderr(int sock, int ecode);
int sendFile(int sock, char * file);
int sendfin(int sock);
int getsockfd();
int releasesockfd(int sock); |
Allow data to contain also lowercase hex characters. | /* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hex-dec.h"
void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size)
{
unsigned int i;
for (i = 0; i < hexstr_size; i++) {
unsigned int value = dec & 0x0f;
if (value < 10)
hexstr[hexstr... | /* Copyright (c) 2005-2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "hex-dec.h"
void dec2hex(unsigned char *hexstr, uintmax_t dec, unsigned int hexstr_size)
{
unsigned int i;
for (i = 0; i < hexstr_size; i++) {
unsigned int value = dec & 0x0f;
if (value < 10)
hexstr[hexstr... |
Fix indexed mode instructions failing to add negative offset because value would not be correctly sign extended | #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... | #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... |
Add posix-styled functions for using neosmart_event_t objects | #pragma once
#include <pthread.h>
#include <stdint.h>
namespace neosmart
{
struct neosmart_event_t_;
typedef neosmart_event_t_ * neosmart_event_t;
neosmart_event_t CreateEvent(bool manualReset = false, bool initialState = false);
int DestroyEvent(neosmart_event_t event);
int WaitForEvent(neosmart_event_t event... | #pragma once
#include <pthread.h>
#include <stdint.h>
namespace neosmart
{
//Type declarations
struct neosmart_event_t_;
typedef neosmart_event_t_ * neosmart_event_t;
//WIN32-style pevent functions
neosmart_event_t CreateEvent(bool manualReset = false, bool initialState = false);
int DestroyEvent(neosma... |
Define OPENSSL_DES_LIBDES_COMPATIBILITY so that Heimdal will build with OpenSSL 0.9.7 when it is imported. (This currently has no effect.) | /* $FreeBSD$ */
#ifndef __crypto_headers_h__
#define __crypto_headers_h__
#include <openssl/des.h>
#include <openssl/rc4.h>
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
#endif /* __crypto_headers_h__ */
| /* $FreeBSD$ */
#ifndef __crypto_headers_h__
#define __crypto_headers_h__
#define OPENSSL_DES_LIBDES_COMPATIBILITY
#include <openssl/des.h>
#include <openssl/rc4.h>
#include <openssl/md4.h>
#include <openssl/md5.h>
#include <openssl/sha.h>
#endif /* __crypto_headers_h__ */
|
Quit after reading a q | #include <unistd.h>
int main() {
char c;
while (read(STDIN_FILENO, &c, 1) == 1);
return 0;
}
| #include <unistd.h>
int main() {
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c!= 'q');
return 0;
}
|
Change result data type to long long | #include <stdio.h>
int MaxPairwiseProduct(int* numbers, int sizeofArray) {
int result = 0;
for (int i = 0; i < sizeofArray; ++i) {
for (int j = i + 1; j < sizeofArray; ++j) {
if (numbers[i] * numbers[j] > result) {
result = numbers[i] * numbers[j];
}
}
}
return result;
}
int main(... | #include <stdio.h>
long long MaxPairwiseProduct(int* numbers, int sizeofArray) {
long long result = 0;
for (int i = 0; i < sizeofArray; ++i) {
for (int j = i + 1; j < sizeofArray; ++j) {
if (((long long)numbers[i]) * numbers[j] > result) {
result = ((long long)numbers[i]) * numbers[j];
}
... |
Use SDK's enum value instead of server's string constant in documentation | //
// STPPaymentIntentSourceActionAuthorizeWithURL.h
// Stripe
//
// Created by Daniel Jackson on 11/7/18.
// Copyright © 2018 Stripe, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "STPAPIResponseDecodable.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `STPPaymentIntentSourceAction` details when t... | //
// STPPaymentIntentSourceActionAuthorizeWithURL.h
// Stripe
//
// Created by Daniel Jackson on 11/7/18.
// Copyright © 2018 Stripe, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "STPAPIResponseDecodable.h"
NS_ASSUME_NONNULL_BEGIN
/**
The `STPPaymentIntentSourceAction` details when t... |
Increase x86 AC_THREAD_STACK_MIN to 4K from 256 bytes just incase | /*
* copyright 2015 wink saville
*
* licensed under the apache license, version 2.0 (the "license");
* you may not use this file except in compliance with the license.
* you may obtain a copy of the license at
*
* http://www.apache.org/licenses/license-2.0
*
* unless required by applicable law or agreed to... | /*
* copyright 2015 wink saville
*
* licensed under the apache license, version 2.0 (the "license");
* you may not use this file except in compliance with the license.
* you may obtain a copy of the license at
*
* http://www.apache.org/licenses/license-2.0
*
* unless required by applicable law or agreed to... |
Include ircprotocol.h in the IrcCore module header | #include "irc.h"
#include "irccommand.h"
#include "ircconnection.h"
#include "ircglobal.h"
#include "ircmessage.h"
#include "ircfilter.h"
#include "ircnetwork.h"
| #include "irc.h"
#include "irccommand.h"
#include "ircconnection.h"
#include "ircglobal.h"
#include "ircmessage.h"
#include "ircfilter.h"
#include "ircnetwork.h"
#include "ircprotocol.h"
|
Add test for enum types | // RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
// RUN: grep 'define signext i8 @f0()' %t &&
// RUN: grep 'define signext i16 @f1()' %t &&
// RUN: grep 'define i32 @f2()' %t &&
// RUN: grep 'define float @f3()' %t &&
// RUN: grep 'define double @f4()' %t &&
// RUN: grep 'define x86_fp80 @f5()' %t &&... | // RUN: clang -triple x86_64-unknown-unknown -emit-llvm -o %t %s &&
// RUN: grep 'define signext i8 @f0()' %t &&
// RUN: grep 'define signext i16 @f1()' %t &&
// RUN: grep 'define i32 @f2()' %t &&
// RUN: grep 'define float @f3()' %t &&
// RUN: grep 'define double @f4()' %t &&
// RUN: grep 'define x86_fp80 @f5()' %t &&... |
Add protected virtual destructor to TabbedPaneListener. | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
#define VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
#pragma once
namespace views {
... | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
#define VIEWS_CONTROLS_TABBED_PANE_TABBED_PANE_LISTENER_H_
#pragma once
namespace views {
... |
Fix compile warning when CONFIG_PROC_FS=n | /*********************************************************************
*
* Filename: irlan_filter.h
* Version:
* Description:
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Fri Jan 29 15:24:08 1999
* Modified at: Sun Feb 7 23:35:31... | /*********************************************************************
*
* Filename: irlan_filter.h
* Version:
* Description:
* Status: Experimental.
* Author: Dag Brattli <dagb@cs.uit.no>
* Created at: Fri Jan 29 15:24:08 1999
* Modified at: Sun Feb 7 23:35:31... |
Allow passing nullptr as only const char* argument. | // This file is part of MicroRestD <http://github.com/ufal/microrestd/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If... | // This file is part of MicroRestD <http://github.com/ufal/microrestd/>.
//
// Copyright 2015 Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If... |
Modify : enable dismiss method | //
// LYPopView.h
// LYPOPVIEW
//
// CREATED BY LUO YU ON 19/12/2016.
// COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <UIKit/UIKit.h>
@interface LYPopView : UIView {
CGFloat padding;
CGFloat cornerRadius;
CGFloat maxHeight;
__weak UIView *vCont;
}
@property (nonatomic, strong) NSString *title... | //
// LYPopView.h
// LYPOPVIEW
//
// CREATED BY LUO YU ON 19/12/2016.
// COPYRIGHT © 2016 LUO YU. ALL RIGHTS RESERVED.
//
#import <UIKit/UIKit.h>
@interface LYPopView : UIView {
CGFloat padding;
CGFloat cornerRadius;
CGFloat maxHeight;
__weak UIView *vCont;
}
@property (nonatomic, strong) NSString *title... |
Expire cached TLS session tickets using tlsext_tick_lifetime_hint | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once... | /*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#pragma once... |
Tweak regex not to accidentally match a trailing \r. | // RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s
// Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't
// cause any sign extensions.
// CHECK: [[P:%.*]] = add i64 %param, -8
// CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*]]
// CHECK-NEXT: {{%.*}} ... | // RUN: %clang_cc1 -triple x86_64-pc-win32 -emit-llvm -O2 -o - %s | FileCheck %s
// Under Windows 64, int and long are 32-bits. Make sure pointer math doesn't
// cause any sign extensions.
// CHECK: [[P:%.*]] = add i64 %param, -8
// CHECK-NEXT: [[Q:%.*]] = inttoptr i64 [[P]] to [[R:%.*\*]]
// CHECK-NEXT: {{%.*}... |
Add deletion of m_server from TCPServer in destructor |
#ifndef QML_SOCKETS_TCP_SERVER
#define QML_SOCKETS_TCP_SERVER
#include <QtNetwork>
#include "tcp.h"
class TCPServer : public QObject
{
Q_OBJECT
Q_PROPERTY(uint port MEMBER m_port NOTIFY portChanged)
signals:
void portChanged();
void clientRead(TCPSocket* client, const QString &messag... |
#ifndef QML_SOCKETS_TCP_SERVER
#define QML_SOCKETS_TCP_SERVER
#include <QtNetwork>
#include "tcp.h"
class TCPServer : public QObject
{
Q_OBJECT
Q_PROPERTY(uint port MEMBER m_port NOTIFY portChanged)
signals:
void portChanged();
void clientRead(TCPSocket* client, const QString &messag... |
Switch display fragment shader to highp | /*
* Copyright (c) 2015 Ivan Valiulin
*
* This file is part of viaVR.
*
* viaVR is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 2.1 of the License, or (at your option) any later... | /*
* Copyright (c) 2015 Ivan Valiulin
*
* This file is part of viaVR.
*
* viaVR is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 2.1 of the License, or (at your option) any later... |
Add @param description for AppleDoc. | //
// MGSFragariaPrefsViewController.h
// Fragaria
//
// Created by Jonathan on 22/10/2012.
//
//
#import <Cocoa/Cocoa.h>
/**
* MGSFragariaPrefsViewController provides a base class for other Fragaria
* preferences controllers. It is not implemented directly anywhere.
* @see MGSFragariaFontsAndColorsPrefsView... | //
// MGSFragariaPrefsViewController.h
// Fragaria
//
// Created by Jonathan on 22/10/2012.
//
//
#import <Cocoa/Cocoa.h>
/**
* MGSFragariaPrefsViewController provides a base class for other Fragaria
* preferences controllers. It is not implemented directly anywhere.
* @see MGSFragariaFontsAndColoursPrefsVie... |
Use a TEST() macro to run common_{setup,teardown} | #include "common.h"
static void args_empty(void **state) {
args *args = *state;
assert_null(args->opts);
assert_null(args->operands);
}
static void add_option_passed_null(void **state) {
args *args = *state;
assert_int_equal(
ARGPARSE_PASSED_NULL,
args_add_option(args, NU... | #include "common.h"
static void args_empty(void **state) {
args *args = *state;
assert_null(args->opts);
assert_null(args->operands);
}
static void add_option_passed_null(void **state) {
args *args = *state;
assert_int_equal(
ARGPARSE_PASSED_NULL,
args_add_option(args, NU... |
Add assert on rtems_task_variable_add error. | /* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS.
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <rtems/error.h>
#include <rtems/system.h>
#include <rtems/rtems/tasks... | /* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS.
Copyright 2010 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. */
#include <assert.h>
#include <rtems/error.h>
#include <rtems/system.h>
#inclu... |
Add empty shell for return value of a command. | /*
For more information, please see: http://software.sci.utah.edu
The MIT License
Copyright (c) 2011 Scientific Computing and Imaging Institute,
University of Utah.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the... | |
Include <stddef.h> for size_t and NULL definitions | #ifndef __TYPES_H__
#define __TYPES_H__
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef signed long long int64_t;
typedef unsigned long uint64_t;
typed... | #ifndef __TYPES_H__
#define __TYPES_H__
#include <stddef.h>
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed long int32_t;
typedef unsigned long uint32_t;
typedef signed long long int64_t;
typedef unsigned lo... |
Solve Simple Sum in c | #include <stdio.h>
int main() {
int a, b;
scanf("%d", &a);
scanf("%d", &b);
printf("SOMA = %d\n", a + b);
return 0;
}
| |
Add a requires for the arm-registered-target needed by this test as well. | // REQUIRES: x86-registered-target
// RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s
// RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s
// RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o -... | // REQUIRES: x86-registered-target
// RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s
// RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s
// RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o -... |
Create extract documenting the idiom for reading the cursor position and for determining the screen size |
/* Use the ESC [6n escape sequence to query the horizontal cursor position
* and return it. On error -1 is returned, on success the position of the
* cursor is stored at *rows and *cols and 0 is returned. */
int getCursorPosition(int ifd, int ofd, int *rows, int *cols) {
char buf[32];
unsigned int i = 0;
... | |
Fix up missing newlines at eof | // Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Foundation/Foundation.h>
#import <Cordova/CDVPlugin.h>
@class GCDAsyncSocket;
@interface ChromeSocketsTcp : CDVPlugin
- (NSUInteger)regist... | // Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Foundation/Foundation.h>
#import <Cordova/CDVPlugin.h>
@class GCDAsyncSocket;
@interface ChromeSocketsTcp : CDVPlugin
- (NSUInteger)regist... |
Add exsymtab test for inline functions | /*
* Define an inline function in one context, use in a different context.
*/
/* uncomment to enable diagnostic output */
// #define DIAG(...) diag(__VA_ARGS__)
#include "test_setup.h"
char def_code[] =
"inline int fib(int n)\n"
"{\n"
" if (n <= 2)\n"
" return 1;\n"
" else\n"
" return fib(n-1) ... | |
Replace UIKit import with Foundation import | //
// SignificantSpices.h
// SignificantSpices
//
// Created by Jan Nash on 8/7/17.
// Copyright © 2017 resmio. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for SignificantSpices.
FOUNDATION_EXPORT double SignificantSpicesVersionNumber;
//! Project version string for SignificantSpic... | //
// SignificantSpices.h
// SignificantSpices
//
// Created by Jan Nash on 8/7/17.
// Copyright © 2017 resmio. All rights reserved.
//
#import <Foundation/Foundation.h>
//! Project version number for SignificantSpices.
FOUNDATION_EXPORT double SignificantSpicesVersionNumber;
//! Project version string for Signi... |
Disable STACK resizing for non Visual C\C++ compilers | /*
* Copyright 2019 Andrey Terekhov, Victor Y. Fadeev
*
* 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 applicabl... | /*
* Copyright 2019 Andrey Terekhov, Victor Y. Fadeev
*
* 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 applicabl... |
Add a simple test for pipe inode numbers reported by fstat(2). | /*-
* Copyright (c) 2011 Giovanni Trematerra <giovanni.trematerra@gmail.com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copy... | |
Fix booting from NFS root | /*
* Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
*
* This program is distributed in the hope it will b... | /*
* Copyright (C) 2005 MIPS Technologies, Inc. All rights reserved.
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Public License (Version 2) as
* published by the Free Software Foundation.
*
* This program is distributed in the hope it will b... |
Add license, to help the GPLV3 zealots. | #include <kdemacros.h>
KDE_EXPORT QByteArray lzfuDecompress (const QByteArray &rtfcomp);
| /*
Copyright (C) Brad Hards <bradh@frogmouth.net> 2007
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 License, or
(at your option) any later version.... |
Add interface for the category |
@interface NSData (ImageMIMEDetection)
@end
|
@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
|
Fix typo in initializer property name. | // SDLSoftButton.h
//
#import "SDLRPCMessage.h"
#import "SDLNotificationConstants.h"
#import "SDLRequestHandler.h"
@class SDLImage;
@class SDLSoftButtonType;
@class SDLSystemAction;
@interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> {
}
- (instancetype)init;
- (instancetype)initWithHandler:(SDLRPCNotifi... | // SDLSoftButton.h
//
#import "SDLRPCMessage.h"
#import "SDLNotificationConstants.h"
#import "SDLRequestHandler.h"
@class SDLImage;
@class SDLSoftButtonType;
@class SDLSystemAction;
@interface SDLSoftButton : SDLRPCStruct <SDLRequestHandler> {
}
- (instancetype)init;
- (instancetype)initWithHandler:(SDLRPCNotifi... |
Update with new lefty, fixing many bugs and supporting new features | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... | /* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (... |
CREATE ns_prefix/box/ didn't work right when namespace prefix existed. | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mai... | /* Copyright (C) 2002 Timo Sirainen */
#include "common.h"
#include "mail-namespace.h"
#include "commands.h"
bool cmd_create(struct client_command_context *cmd)
{
struct mail_namespace *ns;
const char *mailbox, *full_mailbox;
bool directory;
size_t len;
/* <mailbox> */
if (!client_read_string_args(cmd, 1, &mai... |
Add RKRequestConnectionTimeoutError to throw when our connection timeout has been exceeded. | //
// Errors.h
// RestKit
//
// Created by Blake Watters on 3/25/10.
// Copyright 2010 Two Toasters
//
// 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... | //
// Errors.h
// RestKit
//
// Created by Blake Watters on 3/25/10.
// Copyright 2010 Two Toasters
//
// 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... |
Adjust check for release mode. | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// llvm.sqrt has undefined behavior on negative inputs, so it is
// inappropriate to translate C/C++ sqrt to this.
float sqrtf(float x);
float foo(float X) {
// CHECK: foo
// CHECK: call float @sqrtf(float %tmp) readnone
// Check that this is marked readonly wh... | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// llvm.sqrt has undefined behavior on negative inputs, so it is
// inappropriate to translate C/C++ sqrt to this.
float sqrtf(float x);
float foo(float X) {
// CHECK: foo
// CHECK: call float @sqrtf(float %
// Check that this is marked readonly when errno is i... |
Change R and B components | #ifndef __libfixmath_color_h__
#define __libfixmath_color_h__
#include "fix16.h"
typedef union {
struct {
unsigned int r:5;
unsigned int g:5;
unsigned int b:5;
unsigned int :1;
} __packed;
uint8_t comp[3];
uint16_t raw;
} ... | #ifndef __libfixmath_color_h__
#define __libfixmath_color_h__
#include "fix16.h"
typedef union {
struct {
unsigned int :1;
unsigned int b:5;
unsigned int g:5;
unsigned int r:5;
} __packed;
uint8_t comp[3];
uint16_t raw;
} ... |
Copy Poisson Disk Sampling header file to library folder | #ifndef POISSON_DISK_SAMPLING_H
#define POISSON_DISK_SAMPLING_H
#include <vector>
class PoissonDiskSampling
{
public:
PoissonDiskSampling() = default;
PoissonDiskSampling(int pointWidth, int pointHeight, double pointMinDist, double pointCount);
~PoissonDiskSampling() = default;
PoissonDiskSampling(const Poisson... | |
Add function to obtain encoder angular rate | #pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constants::two_pi<T>();
}
... | #pragma once
#include <boost/math/constants/constants.hpp>
#include "encoder.h"
#include "encoderfoaw.h"
namespace angle {
template <typename T>
T wrap(T angle) {
angle = std::fmod(angle, boost::math::constants::two_pi<T>());
if (angle >= boost::math::constants::pi<T>()) {
angle -= boost::math::constan... |
Fix a warning on a test. | // RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s
int opaque();
// CHECK: define [[INT:i.*]] @test0() {
// CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind {
int test0(void) {
return opaque();
}
// <rdar://problem/80874... | // RUN: %clang_cc1 -fexceptions -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck -check-prefix NOEXC %s
int opaque();
// CHECK: define [[INT:i.*]] @test0() {
// CHECK-NOEXC: define [[INT:i.*]] @test0() nounwind {
int test0(void) {
return opaque();
}
// <rdar://problem/80874... |
Correct for windows compilation (exports) | #ifndef MED_DATA_READER_WRITER_H
#define MED_DATA_READER_WRITER_H
#include <dtkCore/dtkSmartPointer.h>
#include <dtkCore/dtkAbstractDataReader.h>
#include <dtkCore/dtkAbstractDataWriter.h>
#include <dtkCore/dtkAbstractData.h>
struct medDataReaderWriter {
typedef dtkSmartPointer<dtkAbstractDataReader> Reader;
... | #ifndef MED_DATA_READER_WRITER_H
#define MED_DATA_READER_WRITER_H
#include <dtkCore/dtkSmartPointer.h>
#include <dtkCore/dtkAbstractDataReader.h>
#include <dtkCore/dtkAbstractDataWriter.h>
#include <dtkCore/dtkAbstractData.h>
#include "medCoreExport.h"
struct MEDCORE_EXPORT medDataReaderWriter {
typedef dtkSmar... |
Put disassembly into simple core | /*
* ZXSpectrum
*
* Uses Z80 step core built in EDL
* Rest is C for now
*/
#include <stdio.h>
#include <stdint.h>
void STEP(void);
void RESET(void);
void INTERRUPT(uint8_t);
extern uint8_t CYCLES;
void CPU_RESET()
{
RESET();
}
int CPU_STEP(int intClocks,int doDebug)
{
if (intClocks)
{
INTERRUPT(0xFF);
... | /*
* ZXSpectrum
*
* Uses Z80 step core built in EDL
* Rest is C for now
*/
#include <stdio.h>
#include <stdint.h>
void STEP(void);
void RESET(void);
void INTERRUPT(uint8_t);
extern uint16_t PC;
extern uint8_t CYCLES;
int Disassemble(unsigned int address,int registers);
void CPU_RESET()
{
RESET();
}
int CPU... |
Add back default constructor for Agent. | #ifndef AGENT_CPP_H
#define AGENT_CPP_H
#include <vector>
#include "directive.h"
// forward declaration
namespace Url
{
class Url;
}
namespace Rep
{
class Agent
{
public:
/* The type for the delay. */
typedef float delay_t;
/**
* Construct an agent.
*/
... | #ifndef AGENT_CPP_H
#define AGENT_CPP_H
#include <vector>
#include "directive.h"
// forward declaration
namespace Url
{
class Url;
}
namespace Rep
{
class Agent
{
public:
/* The type for the delay. */
typedef float delay_t;
/**
* Default constructor
*/
... |
Use watcher::NodeIdentifier in place of boost::asio::address | #ifndef WATCHER_GLOBAL_FUNCTIONS
#define WATCHER_GLOBAL_FUNCTIONS
#include <boost/asio/ip/address.hpp>
#include <boost/serialization/split_free.hpp>
BOOST_SERIALIZATION_SPLIT_FREE(boost::asio::ip::address);
namespace boost
{
namespace serialization
{
template<class Archive>
void save(Ar... | #ifndef WATCHER_GLOBAL_FUNCTIONS
#define WATCHER_GLOBAL_FUNCTIONS
#include <boost/serialization/split_free.hpp>
#include "watcherTypes.h"
BOOST_SERIALIZATION_SPLIT_FREE(boost::asio::ip::address);
namespace boost
{
namespace serialization
{
template<class Archive>
void save(Archive & ar,... |
Remove unused headers and add cassert to PCH. | // stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <stdio.h>
#include <tchar.h>
// TODO: reference additional headers your program requires here
| // stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
#include <cassert>
|
Update Doxygen documentation with conventions | /***************************************************************************//**
* \file boundaryCondition.h
* \author Krishnan, A. (anush@bu.edu)
* \brief Definition of the class \c boundaryCondition
*/
#pragma once
#include <string>
#include <sstream>
#include "types.h"
#include "parameterDB.h"
/**
* \class bounda... | /***************************************************************************//**
* \file boundaryCondition.h
* \author Anush Krishnan (anush@bu.edu)
* \brief Definition of the class \c boundaryCondition.
*/
#pragma once
#include <string>
#include <sstream>
#include "types.h"
#include "parameterDB.h"
/**
* \cl... |
Support for libevent emulation with libev | #ifndef EVENT2_EVENT_H
#define EVENT2_EVENT_H
#define SJ_LIBEVENT_EMULATION 1
#include <event.h>
#include <evutil.h>
#include "qt4compat.h"
typedef int evutil_socket_t;
typedef void(*event_callback_fn)(evutil_socket_t, short, void*);
Q_DECL_HIDDEN inline struct event* event_new(struct event_base* base, evutil_socke... | #ifndef EVENT2_EVENT_H
#define EVENT2_EVENT_H
#define SJ_LIBEVENT_EMULATION 1
#include <event.h>
#ifndef EV_H_
// libevent emulation by libev
# include <evutil.h>
#endif
#include "qt4compat.h"
typedef int evutil_socket_t;
typedef void(*event_callback_fn)(evutil_socket_t, short, void*);
Q_DECL_HIDDEN inline struct e... |
Define the pointer hash struct before the string one, to improve compatibility with ICC. Patch contributed by Bjørn Wennberg. | //===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... | //===-- llvm/ADT/HashExtras.h - Useful functions for STL hash ---*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===--------... |
Fix report macros in if else statements | /* see LICENSE file for copyright and license details */
/* report errors or warnings */
extern char *argv0;
extern int debug;
extern int interactive_mode;
#define reportprint(E, M, ...) { \
if (debug) ... | /* see LICENSE file for copyright and license details */
/* report errors or warnings */
extern char *argv0;
extern int debug;
extern int interactive_mode;
#define reportprint(E, M, ...) do { \
if (debug) ... |
Bump version to 1.12, matching blender 2.83 release cycle | /*
* Copyright 2011-2016 Blender Foundation
*
* 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 ag... | /*
* Copyright 2011-2016 Blender Foundation
*
* 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 ag... |
Enforce that no deprecated boost filesystem methods can be re-introduced | // Copyright (c) 2017-2020 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_FS_H
#define BITCOIN_FS_H
#include <stdio.h>
#include <string>... | // Copyright (c) 2017-2020 The Bitcoin Core developers
// Copyright (c) 2020 The PIVX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_FS_H
#define BITCOIN_FS_H
#include <stdio.h>
#include <string>... |
Create dedicated realloc check macro | #ifndef ARRAY_H
#define ARRAY_H
#include <stdlib.h>
#define ARRAY_DECLARE(TYPE) \
typedef struct { \
TYPE *elems; \
size_t allocated, \
nextfree; \
} Array##TYPE
#define ARRAY_INIT(A, TYPE, SIZE) \
(A)->elems = (TYPE*)malloc(SIZE * sizeof(TYPE)); \
(A)->allocated = SIZE... | #ifndef ARRAY_H
#define ARRAY_H
#include <stdlib.h>
#define ARRAY_DECLARE(TYPE) \
typedef struct { \
TYPE *elems; \
size_t allocated, \
nextfree; \
} Array##TYPE
#define ARRAY_INIT(A, TYPE, SIZE) \
(A)->elems = (TYPE*)malloc(SIZE * sizeof(TYPE)); \
(A)->allocated = SIZE... |
Use std::string straight instead of vector<char> in format(). | #pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) ... | #pragma once
#include "Types.h"
#include <opencv2/core/types.hpp>
#include <json11.hpp>
#include <algorithm>
#include <iterator>
#include <cstdio>
namespace yarrar {
template<typename Container, typename Value>
bool contains(const Container& c, const Value& v)
{
return std::find(std::begin(c), std::end(c), v) ... |
Enable Cassandra merge operator to be called with a single merge operand | // Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#include "rocksdb/merge_operator.h"
#include... | // Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
// This source code is licensed under both the GPLv2 (found in the
// COPYING file in the root directory) and Apache 2.0 License
// (found in the LICENSE.Apache file in the root directory).
#pragma once
#include "rocksdb/merge_operator.h"
#include... |
Use vga_default_device() when determining whether an fb is primary | /*
* Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
*/
#include <linux/fb.h>
#include <linux/pci.h>
#include <linux/module.h>
int fb... | /*
* Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
* for more details.
*
*/
#include <linux/fb.h>
#include <linux/pci.h>
#include <linux/module.h>
#includ... |
Remove pass by reference in bswap functions | /*
*
* Copyright 2017 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | /*
*
* Copyright 2017 Asylo authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
Add a never emit signal on properties. | #ifndef QCDEVICE_H
#define QCDEVICE_H
/* QuickCross Project
* License: APACHE-2.0
* Author: Ben Lau
* Project Site: https://github.com/benlau/quickcross
*
*/
#include <QObject>
class QCDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(QString os READ os)
Q_PROPERTY(bool isAndroid READ isAndroid)
Q_P... | #ifndef QCDEVICE_H
#define QCDEVICE_H
/* QuickCross Project
* License: APACHE-2.0
* Author: Ben Lau
* Project Site: https://github.com/benlau/quickcross
*
*/
#include <QObject>
class QCDevice : public QObject
{
Q_OBJECT
Q_PROPERTY(QString os READ os)
Q_PROPERTY(bool isAndroid READ isAndroid NOTIFY n... |
Allow choice of D2D on compiler command line. | // Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities on Windows.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
extern bool IsNT();
extern void Platform_Initi... | // Scintilla source code edit control
/** @file PlatWin.h
** Implementation of platform facilities on Windows.
**/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
extern bool IsNT();
extern void Platform_Initi... |
Add error checking to opening of csv in small tool | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Expects 5 arguments not including argv[0]
int main(int argc, char *argv[])
{
if (argc != 6) {
puts("Must enter 5 arguments: two categories and filename for the rest.");
return 1;
}
printf("Received %i categories", (argc - 2) / 2);
FILE *in... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Expects 5 arguments not including argv[0]
int main(int argc, char *argv[])
{
if (argc != 6) {
puts("Must enter 5 arguments: two categories and filename for the rest.");
return 1;
}
printf("Received %i categories", (argc - 2) / 2);
FILE *in... |
Add the MP_API_COMPATIBLE for Mac builds so that MPI libraries build correctly. | /* Defines common to all versions of NSS */
#define NSPR20 1
| /* Defines common to all versions of NSS */
#define NSPR20 1
#define MP_API_COMPATIBLE 1
|
Allow config.h or AM_CPPFLAGS to provide libc feature macros | /* Author: Mo McRoberts <mo.mcroberts@bbc.co.uk>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* 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.... | /* Author: Mo McRoberts <mo.mcroberts@bbc.co.uk>
*
* Copyright 2015 BBC
*/
/*
* Copyright 2013 Mo McRoberts.
*
* 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.... |
Add BASE_EXPORT macros to base ... again. | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_MAC_LAUNCHD_H_
#define BASE_MAC_LAUNCHD_H_
#pragma once
#include <launch.h>
#include <sys/types.h>
#include <string>
namespace base {
... | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef BASE_MAC_LAUNCHD_H_
#define BASE_MAC_LAUNCHD_H_
#pragma once
#include <launch.h>
#include <sys/types.h>
#include <string>
#include "base/ba... |
Clarify what systems need std::align definition | /* FiberTaskingLib - A tasking library that uses fibers for efficient task switching
*
* This library was created as a proof of concept of the ideas presented by
* Christian Gyrling in his 2015 GDC Talk 'Parallelizing the Naughty Dog Engine Using Fibers'
*
* http://gdcvault.com/play/1022186/Parallelizing-the-Naugh... | /* FiberTaskingLib - A tasking library that uses fibers for efficient task switching
*
* This library was created as a proof of concept of the ideas presented by
* Christian Gyrling in his 2015 GDC Talk 'Parallelizing the Naughty Dog Engine Using Fibers'
*
* http://gdcvault.com/play/1022186/Parallelizing-the-Naugh... |
Fix VkTextUtils to include SkTypes before ifdef | /*
* 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 VkTestUtils_DEFINED
#define VkTestUtils_DEFINED
#ifdef SK_VULKAN
#include "vk/GrVkDefines.h"
namespace sk_gpu_test {
bool LoadVkLibraryAndGetProcAddrFuncs(PFN_v... | /*
* 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 VkTestUtils_DEFINED
#define VkTestUtils_DEFINED
#include "SkTypes.h"
#ifdef SK_VULKAN
#include "vk/GrVkDefines.h"
namespace sk_gpu_test {
bool LoadVkLibraryAnd... |
Add XML namespace to math element | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "amath.h"
#define BUF_SIZE 1024
int main(int argc, char *argv[])
{
char buffer[BUF_SIZE];
char *content = "";
while (fgets(buffer, BUF_SIZE, stdin))
asprintf(&content, "%s%s", content, buffer);
char *result = amath_to_mathml(content);
printf... | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "amath.h"
#define BUF_SIZE 1024
int main(int argc, char *argv[])
{
char buffer[BUF_SIZE];
char *content = "";
while (fgets(buffer, BUF_SIZE, stdin))
asprintf(&content, "%s%s", content, buffer);
char *result = amath_to_mathml(content);
printf... |
Add a new shared object. | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <dlfcn.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <signal.h>
static void *dl;
ssize_t (*orig_recv)(int, void *, size_t, int);
... | |
Update build and keep a static version file | /*
* Spdylay - SPDY Library
*
* Copyright (c) 2012 Tatsuhiro Tsujikawa
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights... | |
Fix subtle use after return. | //===--- DocumentStore.h - File contents container --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | //===--- DocumentStore.h - File contents container --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
Remove build warning realted MQ in android JNI. | /* ****************************************************************
*
* Copyright 2016 Samsung Electronics 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
*
... | /* ****************************************************************
*
* Copyright 2016 Samsung Electronics 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
*
... |
Use an optimized 7 segment table | #define L(u,v)c=a[1];for(;*c;)printf("%c%c%c%c",y&u?124:32,y&v?95:32,(y="|O6VYNnX~^"[*c++-48]+1)&u*2?124:32,c[1]?32:10);
main(int y,int**a){char*L(0,1)L(8,2)L(32,4)} | #define L(u)c=a[1];for(;*c;)printf("%c%c%c%c",y&u/4?124:32,y&u?95:32,(y="v#\\l-jz$~n"[*c++-48]+1)&u/2?124:32,c[1]?32:10);
main(int y,int**a){char*L(1)L(8)L(64)} |
Change of types used for RcuX/Z coordinate. | #ifndef ALIHLTPHOSVALIDCELLDATASTRUCT_H
#define ALIHLTPHOSVALIDCELLDATASTRUCT_H
/***************************************************************************
* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
* *
* Auth... | #ifndef ALIHLTPHOSVALIDCELLDATASTRUCT_H
#define ALIHLTPHOSVALIDCELLDATASTRUCT_H
/***************************************************************************
* Copyright(c) 2007, ALICE Experiment at CERN, All rights reserved. *
* *
* Auth... |
Update doxygen groups and overview description | #ifndef __DALI_ADAPTOR_DOC_H__
#define __DALI_ADAPTOR_DOC_H__
/**
* @defgroup dali_adaptor DALi Adaptor
*
* @brief This module is a platform adaptation layer. It initializes and sets up DALi appropriately.
* The module provides many platform-related services with its internal module,
* platform abstraction. Sever... | #ifndef __DALI_ADAPTOR_DOC_H__
#define __DALI_ADAPTOR_DOC_H__
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apac... |
Add a kerberos portability header | /*
* Copyright 2016-present Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or a... | |
Remove further references to QWebEngine | #ifndef WINDOW_H
#define WINDOW_H
#include <QWidget>
#include <QMainWindow>
#include <QDir>
#include <QLineEdit>
#include <QListWidget>
#include <QComboBox>
#include <QtSql>
#include <map>
class QLabel;
class QPushButton;
class SearchBox: public QLineEdit
{
Q_OBJECT
public:
using QLineEdit::QLineEdit;
priv... | #ifndef WINDOW_H
#define WINDOW_H
#include <QWidget>
#include <QMainWindow>
#include <QDir>
#include <QLineEdit>
#include <QListWidget>
#include <QComboBox>
#include <QtSql>
#include <map>
class QLabel;
class QPushButton;
class SearchBox: public QLineEdit
{
Q_OBJECT
public:
using QLineEdit::QLineEdit;
priv... |
Create a shim layer for platform-independent UARTs. | /// \file syscalls-chario.c
/// \brief Sockpuppet API System Call functions for character IO
/// \defgroup SAPI Sockpuppet
//! \addtogroup SAPI
//! @{
///
//
// Copyright(C) 2011-2014 Robert Sexton
//
// Change History.
// API Version 0203. Add a return code to StreamPutChar for back-pressure.
// Re-organize the cod... | |
Add designated initializer macro to field validation | @import Foundation;
@import CoreGraphics;
@interface FORMFieldValidation : NSObject
@property (nonatomic, getter = isRequired) BOOL required;
@property (nonatomic) NSUInteger minimumLength;
@property (nonatomic) NSInteger maximumLength;
@property (nonatomic) NSString *format;
@property (nonatomic) CGFloat minimumValu... | @import Foundation;
@import CoreGraphics;
@interface FORMFieldValidation : NSObject
@property (nonatomic, getter = isRequired) BOOL required;
@property (nonatomic) NSUInteger minimumLength;
@property (nonatomic) NSInteger maximumLength;
@property (nonatomic) NSString *format;
@property (nonatomic) CGFloat minimumValu... |
Fix END_STATE_TABLE define causing bool -> ptr conversion error | #pragma once
#include "FSMState.h"
#define END_STATE_TABLE {nullptr, 0, false} //!< Append this to the end of your state tables; the init function will recognize it and stop searching the table for states.
namespace ADBLib
{
class FSMTransition
{
public:
FSMState* currentState; //!< The current state.
int inp... | #pragma once
#include "FSMState.h"
#define END_STATE_TABLE {nullptr, 0, nullptr} //!< Append this to the end of your state tables; the init function will recognize it and stop searching the table for states.
namespace ADBLib
{
struct FSMTransition
{
FSMState* currentState; //!< The current state.
int input; ... |
Add a test for svn r155263. | // RUN: touch %t.o
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE ... | // RUN: touch %t.o
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s
// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.8 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE ... |
Add status.h among the included headers. | #include "communication/server_stream.h"
#include "communication/stream.h"
#include "communication/stream_backend_interface.h"
#include "communication/stream_tcp.h"
#include "communication/stream_tcp_client.h"
#include "communication/stream_tcp_server.h"
#include "toolbar/print_variables.h"
#include "toolbar/sfgui.h"
| #include "communication/server_stream.h"
#include "communication/status.h"
#include "communication/stream.h"
#include "communication/stream_backend_interface.h"
#include "communication/stream_tcp.h"
#include "communication/stream_tcp_client.h"
#include "communication/stream_tcp_server.h"
#include "toolbar/print_variabl... |
Allow fpsetmask(3) and friends to be used from a C++ program on the Alpha. | /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
extern fp_rnd fpgetroun... | /* $NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _IEEEFP_H_
#define _IEEEFP_H_
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
#ifdef __i386__
#include <machine/floatingpoint.h>
#else /* !__i386__ */
__BEGIN_DECLS
extern fp_rn... |
Add integer sequence TMP utilities | #pragma once
namespace rc {
namespace detail {
//! We don't want to require C++14 so we make our own version of this.
template<typename T, T ...Ints> struct IntSequence;
//! If T == std::size_t
template<std::size_t ...Ints>
using IndexSequence = IntSequence<std::size_t, Ints...>;
template<typename Sequence, std::si... | |
Correct comment in filter internal API. | #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.... | #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... |
Add check for null pointer in deleteList() | /**
*/
#include "linkedlist.h"
/**
* Create a new empty linked list.
*/
LinkedList* createList(void)
{
LinkedList *list = (LinkedList *) malloc(sizeof(LinkedList));
/*
* If no error in allocating, initialise list contents.
*/
if (list)
list->head = NULL;
return list;
}
/**
* ... | /**
*/
#include "linkedlist.h"
/**
* Create a new empty linked list.
*/
LinkedList* createList(void)
{
LinkedList *list = (LinkedList *) malloc(sizeof(LinkedList));
/*
* If no error in allocating, initialise list contents.
*/
if (list)
list->head = NULL;
return list;
}
/**
* ... |
Make ftoa a template function | /*******************************************************************************
* Copyright 2016 IBM Corp.
*
* 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/li... | /*******************************************************************************
* Copyright 2016 IBM Corp.
*
* 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/li... |
Remove unused variables and definitions | /*******************************************************************************
* Copyright (C) 2010, Linaro Limited.
*
* This file is part of PowerDebug.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompan... | /*******************************************************************************
* Copyright (C) 2010, Linaro Limited.
*
* This file is part of PowerDebug.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompan... |
Add the AutoFillDialog header, needed by the cross-platform implementations to implement the autofill dialog. | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_H_
#define CHROME_BROWSER_AUTOFILL_AUTOFILL_DIALOG_H_
#include <vector>
#include "chrome/browser/aut... | |
Add function declarations, usages and TODOs | #include "riot_arduino_uno.h"
#include "utils.h"
riot_arduino_uno_sinks* riot_arduino_uno_sinks_create() {
riot_arduino_uno_sinks *sinks = xmalloc(sizeof(riot_arduino_uno_sinks));
return sinks;
}
riot_arduino_uno_sources* riot_arduino_uno_sources_create() {
riot_arduino_uno_sources *sources = xmalloc(sizeof(rio... | #include "riot_arduino_uno.h"
#include "utils.h"
#include<stdbool.h>
riot_arduino_uno_sinks* riot_arduino_uno_sinks_create() {
riot_arduino_uno_sinks *sinks = xmalloc(sizeof(riot_arduino_uno_sinks));
return sinks;
}
riot_arduino_uno_sources* riot_arduino_uno_sources_create() {
riot_arduino_uno_sources *sources ... |
Improve test case. Thanks Eli | // RUN: %clang_cc1 -emit-llvm -o - -O0 -triple x86_64-apple-darwin10 %s | FileCheck %s
// Ensure that we don't emit available_externally functions at -O0.
int x;
inline void f0(int y) { x = y; }
// CHECK: define void @test()
// CHECK: declare void @f0(i32)
void test() {
f0(17);
}
inline int __attribute__((always_... | // RUN: %clang_cc1 -emit-llvm -o - -O0 -triple x86_64-apple-darwin10 %s | FileCheck %s
// Ensure that we don't emit available_externally functions at -O0.
int x;
inline void f0(int y) { x = y; }
// CHECK: define void @test()
// CHECK: declare void @f0(i32)
void test() {
f0(17);
}
inline int __attribute__((always_... |
Mark errno_global as a private symbol. | /*
* Copyright 2013 Mo McRoberts.
*
* 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 agr... | /*
* Copyright 2013 Mo McRoberts.
*
* 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 agr... |
Use linearAlloc instead of malloc | /* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "util/memory.h"
void* anonymousMemoryMap(size_t size) {
retur... | /* Copyright (c) 2013-2014 Jeffrey Pfau
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "util/memory.h"
#include <3ds.h>
void* anonymousMemoryMap(siz... |
Change floating point exception type to match the i386 one. | /* $FreeBSD$ */
/* From: NetBSD: ieeefp.h,v 1.2 1997/04/06 08:47:28 cgd Exp */
/*
* Written by J.T. Conklin, Apr 28, 1995
* Public domain.
*/
#ifndef _ALPHA_IEEEFP_H_
#define _ALPHA_IEEEFP_H_
typedef int fp_except;
#define FP_X_INV (1LL << 1) /* invalid operation exception */
#define FP_X_DZ (1LL << 2) /* divid... | /* $FreeBSD$ */
/* From: NetBSD: ieeefp.h,v 1.2 1997/04/06 08:47:28 cgd Exp */
/*
* Written by J.T. Conklin, Apr 28, 1995
* Public domain.
*/
#ifndef _ALPHA_IEEEFP_H_
#define _ALPHA_IEEEFP_H_
typedef int fp_except_t;
#define FP_X_INV (1LL << 1) /* invalid operation exception */
#define FP_X_DZ (1LL << 2) /* div... |
Add timeout handling with mainloop support | /*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2014 Intel Corporation. All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
... | |
Build fix eth for stm32 f7 | /**
* @file
*
* @date 17.03.2017
* @author Anton Bondarev
*/
#ifndef STM32F7CUBE_ETH_H_
#define STM32F7CUBE_ETH_H_
#include <stm32f7xx_hal_conf.h>
#include <stm32f7xx.h>
#include <stm32f7xx_hal.h>
#include <stm32f7xx_hal_eth.h>
#define PHY_ADDRESS 0x00
#endif /* STM32F7CUBE_ETH_H_ */
| /**
* @file
*
* @date 17.03.2017
* @author Anton Bondarev
*/
#ifndef STM32F7CUBE_ETH_H_
#define STM32F7CUBE_ETH_H_
#include <stm32f7xx_hal.h>
#define PHY_ADDRESS 0x00
#endif /* STM32F7CUBE_ETH_H_ */
|
Remove forgotten broken line of code lel | #include <openssl/conf.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include "shared.h"
int un_base64
(char *in, char **out, int **len)
{
BIO *bio, *b64;
}
bool saltystring_is_salty (
| #include <openssl/conf.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include "shared.h"
int un_base64
(char *in, char **out, int **len)
{
BIO *bio, *b64;
}
|
Add another test for pretty printing if-then-else | int f(int d)
{
int i = 0, j, k, l;
if (d%2==0)
if (d%3==0)
i+=2;
else
i+=3;
if (d%2==0)
{
if (d%3==0)
i+=7;
}
else
i+=11;
l = d;
if (d%2==0)
while (l--)
if (1)
i+=13;
else
... | |
Add UIView+Render header to toolkit include. | //
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
#import "AFDefines.h"
#import "AFLogHelper.h"
#import "AFFileHelper.h"
#import "AFPlatformHelper.h"
#import "AFReachability.h"
#import "AFKVO.h"
#import "AFArray.h"
#import "AFMutableArray.h"
#import "NSBundle+Universal.h"
#import "UITable... | //
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
#import "AFDefines.h"
#import "AFLogHelper.h"
#import "AFFileHelper.h"
#import "AFPlatformHelper.h"
#import "AFReachability.h"
#import "AFKVO.h"
#import "AFArray.h"
#import "AFMutableArray.h"
#import "NSBundle+Universal.h"
#import "UITable... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.