commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 1
4.87k
| subject
stringlengths 15
778
| message
stringlengths 15
8.75k
| lang
stringclasses 266
values | license
stringclasses 13
values | repos
stringlengths 5
127k
|
|---|---|---|---|---|---|---|---|---|---|
5b329fd1aa5a6a1ff4ae1d9b6c83e33342392c31
|
src/objective-c/GRPCClient/GRPCCall+Interceptor.h
|
src/objective-c/GRPCClient/GRPCCall+Interceptor.h
|
/*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#import "GRPCCall.h"
@protocol GRPCInterceptorFactory;
@interface GRPCCall2 (Interceptor)
+ (void)registerGlobalInterceptor:(id<GRPCInterceptorFactory>)interceptorFactory;
+ (id<GRPCInterceptorFactory>)globalInterceptorFactory;
@end
|
/*
*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
// The global interceptor feature is experimental and might be modified or removed at any time.
#import "GRPCCall.h"
@protocol GRPCInterceptorFactory;
@interface GRPCCall2 (Interceptor)
+ (void)registerGlobalInterceptor:(id<GRPCInterceptorFactory>)interceptorFactory;
+ (id<GRPCInterceptorFactory>)globalInterceptorFactory;
@end
|
Add experimental notice to global interceptor
|
Add experimental notice to global interceptor
|
C
|
apache-2.0
|
pszemus/grpc,muxi/grpc,donnadionne/grpc,firebase/grpc,ctiller/grpc,jtattermusch/grpc,donnadionne/grpc,ctiller/grpc,pszemus/grpc,vjpai/grpc,jboeuf/grpc,grpc/grpc,vjpai/grpc,ctiller/grpc,jtattermusch/grpc,ejona86/grpc,jboeuf/grpc,donnadionne/grpc,grpc/grpc,muxi/grpc,firebase/grpc,vjpai/grpc,nicolasnoble/grpc,grpc/grpc,donnadionne/grpc,firebase/grpc,pszemus/grpc,jboeuf/grpc,muxi/grpc,ejona86/grpc,stanley-cheung/grpc,muxi/grpc,grpc/grpc,pszemus/grpc,jtattermusch/grpc,stanley-cheung/grpc,ejona86/grpc,stanley-cheung/grpc,donnadionne/grpc,jboeuf/grpc,pszemus/grpc,ctiller/grpc,ctiller/grpc,jtattermusch/grpc,nicolasnoble/grpc,nicolasnoble/grpc,stanley-cheung/grpc,stanley-cheung/grpc,nicolasnoble/grpc,ctiller/grpc,muxi/grpc,ctiller/grpc,muxi/grpc,jboeuf/grpc,stanley-cheung/grpc,muxi/grpc,vjpai/grpc,vjpai/grpc,donnadionne/grpc,ejona86/grpc,grpc/grpc,firebase/grpc,firebase/grpc,grpc/grpc,jboeuf/grpc,muxi/grpc,vjpai/grpc,nicolasnoble/grpc,jtattermusch/grpc,nicolasnoble/grpc,donnadionne/grpc,grpc/grpc,ejona86/grpc,ejona86/grpc,vjpai/grpc,ctiller/grpc,muxi/grpc,grpc/grpc,firebase/grpc,jboeuf/grpc,stanley-cheung/grpc,jtattermusch/grpc,stanley-cheung/grpc,jboeuf/grpc,jtattermusch/grpc,jboeuf/grpc,jboeuf/grpc,jtattermusch/grpc,muxi/grpc,grpc/grpc,ejona86/grpc,vjpai/grpc,pszemus/grpc,jboeuf/grpc,donnadionne/grpc,pszemus/grpc,grpc/grpc,stanley-cheung/grpc,firebase/grpc,donnadionne/grpc,donnadionne/grpc,ctiller/grpc,pszemus/grpc,nicolasnoble/grpc,firebase/grpc,vjpai/grpc,muxi/grpc,jtattermusch/grpc,ctiller/grpc,jboeuf/grpc,jtattermusch/grpc,ejona86/grpc,pszemus/grpc,firebase/grpc,firebase/grpc,jtattermusch/grpc,vjpai/grpc,ejona86/grpc,nicolasnoble/grpc,nicolasnoble/grpc,firebase/grpc,pszemus/grpc,nicolasnoble/grpc,grpc/grpc,firebase/grpc,stanley-cheung/grpc,grpc/grpc,ejona86/grpc,ctiller/grpc,stanley-cheung/grpc,donnadionne/grpc,stanley-cheung/grpc,ejona86/grpc,vjpai/grpc,ctiller/grpc,donnadionne/grpc,vjpai/grpc,nicolasnoble/grpc,ejona86/grpc,nicolasnoble/grpc,muxi/grpc,pszemus/grpc,jtattermusch/grpc,pszemus/grpc
|
bbaf4584286657582a92d5bb4038a5a06654ebb1
|
fetch-pack.h
|
fetch-pack.h
|
#ifndef FETCH_PACK_H
#define FETCH_PACK_H
struct fetch_pack_args
{
const char *uploadpack;
int quiet;
int keep_pack;
int unpacklimit;
int use_thin_pack;
int fetch_all;
int verbose;
int depth;
int no_progress;
};
void setup_fetch_pack(struct fetch_pack_args *args);
struct ref *fetch_pack(const char *dest, int nr_heads, char **heads, char **pack_lockfile);
#endif
|
#ifndef FETCH_PACK_H
#define FETCH_PACK_H
struct fetch_pack_args
{
const char *uploadpack;
int unpacklimit;
int depth;
unsigned quiet:1,
keep_pack:1,
use_thin_pack:1,
fetch_all:1,
verbose:1,
no_progress:1;
};
void setup_fetch_pack(struct fetch_pack_args *args);
struct ref *fetch_pack(const char *dest, int nr_heads, char **heads, char **pack_lockfile);
#endif
|
Use 'unsigned:1' when we mean boolean options
|
Use 'unsigned:1' when we mean boolean options
These options are all strictly boolean (true/false). Its easier to
document this implicitly by making their storage type a single bit.
There is no compelling memory space reduction reason for this change,
it just makes the structure definition slightly more readable.
Signed-off-by: Shawn O. Pearce <f01032651c12a22b2103346ba96b3b6b231f9d3c@spearce.org>
|
C
|
mit
|
destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git,destenson/git
|
a91f0523158431e59051d1fd7977426026a2c5a6
|
src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
|
src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
|
#ifndef QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#define QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#include "abstractformeditortool.h"
namespace QmlDesigner {
class QMLDESIGNERCORE_EXPORT AbstractCustomTool : public QmlDesigner::AbstractFormEditorTool
{
public:
AbstractCustomTool();
void selectedItemsChanged(const QList<FormEditorItem *> &itemList) QTC_OVERRIDE;
virtual int wantHandleItem(const ModelNode &modelNode) const QTC_OVERRIDE = 0;
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
|
#ifndef QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#define QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
#include "abstractformeditortool.h"
namespace QmlDesigner {
class QMLDESIGNERCORE_EXPORT AbstractCustomTool : public QmlDesigner::AbstractFormEditorTool
{
public:
AbstractCustomTool();
void selectedItemsChanged(const QList<FormEditorItem *> &itemList) QTC_OVERRIDE;
virtual QString name() const = 0;
virtual int wantHandleItem(const ModelNode &modelNode) const QTC_OVERRIDE = 0;
};
} // namespace QmlDesigner
#endif // QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
|
Add name method to custom tools
|
QmlDesigner.FormEditor: Add name method to custom tools
Change-Id: Icabf454fc49444a5a88c1f5eb84847967f09078e
Reviewed-by: Thomas Hartmann <588ee739c05aab7547907becfd1420d2b7316069@digia.com>
(cherry picked from commit bcb11829bab091c0e2c8ea4de42cc03aa5359f0c)
Reviewed-by: Marco Bubke <5254e489b34ec8bbce36789100e3fc0f41fa62ef@digia.com>
|
C
|
lgpl-2.1
|
colede/qtcreator,darksylinc/qt-creator,danimo/qt-creator,farseerri/git_code,danimo/qt-creator,amyvmiwei/qt-creator,xianian/qt-creator,danimo/qt-creator,maui-packages/qt-creator,farseerri/git_code,amyvmiwei/qt-creator,richardmg/qtcreator,darksylinc/qt-creator,duythanhphan/qt-creator,xianian/qt-creator,omniacreator/qtcreator,martyone/sailfish-qtcreator,amyvmiwei/qt-creator,xianian/qt-creator,xianian/qt-creator,duythanhphan/qt-creator,martyone/sailfish-qtcreator,danimo/qt-creator,darksylinc/qt-creator,AltarBeastiful/qt-creator,duythanhphan/qt-creator,danimo/qt-creator,kuba1/qtcreator,AltarBeastiful/qt-creator,danimo/qt-creator,darksylinc/qt-creator,Distrotech/qtcreator,Distrotech/qtcreator,maui-packages/qt-creator,xianian/qt-creator,malikcjm/qtcreator,maui-packages/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,farseerri/git_code,omniacreator/qtcreator,duythanhphan/qt-creator,darksylinc/qt-creator,Distrotech/qtcreator,kuba1/qtcreator,Distrotech/qtcreator,AltarBeastiful/qt-creator,malikcjm/qtcreator,omniacreator/qtcreator,Distrotech/qtcreator,omniacreator/qtcreator,AltarBeastiful/qt-creator,danimo/qt-creator,AltarBeastiful/qt-creator,maui-packages/qt-creator,richardmg/qtcreator,kuba1/qtcreator,kuba1/qtcreator,darksylinc/qt-creator,richardmg/qtcreator,amyvmiwei/qt-creator,farseerri/git_code,kuba1/qtcreator,malikcjm/qtcreator,martyone/sailfish-qtcreator,colede/qtcreator,amyvmiwei/qt-creator,kuba1/qtcreator,maui-packages/qt-creator,malikcjm/qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,omniacreator/qtcreator,colede/qtcreator,Distrotech/qtcreator,farseerri/git_code,richardmg/qtcreator,xianian/qt-creator,malikcjm/qtcreator,colede/qtcreator,farseerri/git_code,malikcjm/qtcreator,martyone/sailfish-qtcreator,maui-packages/qt-creator,omniacreator/qtcreator,malikcjm/qtcreator,colede/qtcreator,AltarBeastiful/qt-creator,AltarBeastiful/qt-creator,AltarBeastiful/qt-creator,darksylinc/qt-creator,farseerri/git_code,colede/qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,danimo/qt-creator,farseerri/git_code,richardmg/qtcreator,martyone/sailfish-qtcreator,duythanhphan/qt-creator,richardmg/qtcreator,kuba1/qtcreator,amyvmiwei/qt-creator,duythanhphan/qt-creator,danimo/qt-creator,maui-packages/qt-creator,duythanhphan/qt-creator,darksylinc/qt-creator,omniacreator/qtcreator,Distrotech/qtcreator,amyvmiwei/qt-creator,kuba1/qtcreator,kuba1/qtcreator,amyvmiwei/qt-creator,richardmg/qtcreator,martyone/sailfish-qtcreator,colede/qtcreator
|
91555cbe336706d381af22561180b751923b1330
|
cursor.all.h
|
cursor.all.h
|
// File created: 2011-09-02 23:36:23
#ifndef MUSHSPACE_CURSOR_H
#define MUSHSPACE_CURSOR_H
#include "space.all.h"
#define mushcursor MUSHSPACE_NAME(mushcursor)
// What kind of an area is the cursor in?
typedef enum MushCursorMode {
MushCursorMode_static,
MushCursorMode_dynamic,
MushCursorMode_bak,
} MushCursorMode;
#if MUSHSPACE_93
#define MUSHCURSOR_MODE(x) MushCursorMode_static
#else
#define MUSHCURSOR_MODE(x) ((x)->mode)
#endif
typedef struct mushcursor {
#if !MUSHSPACE_93
MushCursorMode mode;
#endif
mushspace *space;
mushcoords pos;
} mushcursor;
#define mushcursor_sizeof MUSHSPACE_CAT(mushcursor,_sizeof)
#define mushcursor_init MUSHSPACE_CAT(mushcursor,_init)
extern const size_t mushcursor_sizeof;
mushcursor* mushcursor_init(mushspace*, mushcoords, mushcoords, void*);
#endif
|
// File created: 2011-09-02 23:36:23
#ifndef MUSHSPACE_CURSOR_H
#define MUSHSPACE_CURSOR_H
#include "space.all.h"
#define mushcursor MUSHSPACE_NAME(mushcursor)
// What kind of an area is the cursor in?
typedef enum MushCursorMode {
MushCursorMode_static,
MushCursorMode_dynamic,
MushCursorMode_bak,
} MushCursorMode;
#if MUSHSPACE_93
#define MUSHCURSOR_MODE(x) MushCursorMode_static
#else
#define MUSHCURSOR_MODE(x) ((x)->mode)
#endif
typedef struct mushcursor {
#if !MUSHSPACE_93
MushCursorMode mode;
#endif
mushspace *space;
mushcoords pos;
#if !MUSHSPACE_93
size_t box_idx;
#endif
} mushcursor;
#define mushcursor_sizeof MUSHSPACE_CAT(mushcursor,_sizeof)
#define mushcursor_init MUSHSPACE_CAT(mushcursor,_init)
extern const size_t mushcursor_sizeof;
mushcursor* mushcursor_init(mushspace*, mushcoords, mushcoords, void*);
#endif
|
Add mushcursor.box_idx, for Funge-98 only
|
Add mushcursor.box_idx, for Funge-98 only
|
C
|
mit
|
Deewiant/mushspace,Deewiant/mushspace,Deewiant/mushspace
|
3df7e69b8f231c7514732bb8d55eb6ead1de0b3b
|
scripts/testScreens/testReport/deleteInspectionLocation.c
|
scripts/testScreens/testReport/deleteInspectionLocation.c
|
testScreens: testReport: DeleteInspectionLocation
If [ tagTestSubjectLocation::_LtestSubjectLocation = "" ]
Halt Script
End If
If [ tagTestSubjectLocation::inUse = "t" ]
Show Custom Dialog [ Title: "!"; Message: "Deleting this set of test items is allowed after you delete all discoveries made during testing."; Buttons: “OK” ]
Exit Script [ ]
End If
Set Variable [ $delete; Value:tagTestSubjectLocation::_LtestSubjectLocation ]
Set Variable [ $location; Value:tagTestSubjectLocation::kfocus ]
Go to Field [ ]
Refresh Window
Show Custom Dialog [ Title: "!"; Message: "Delete " & tagTestSubject::tag & "'s " & "test number " & tagTestSubjectLocation::reportNumber & " of " & tagTestSubjectLocation::focusName & "?"; Buttons: “Cancel”, “Delete” ]
If [ Get ( LastMessageChoice ) = 2 ]
Delete Record/Request
[ No dialog ]
End If
Go to Layout [ original layout ]
Set Variable [ $delete ]
Refresh Window
January 7, 平成26 14:16:54 Imagination Quality Management.fp7 - DeleteInspectionLocation -1-
|
testScreens: testReport: deleteInspectionLocation
If [ tagTestSubjectLocation::_LtestSubjectLocation = "" ]
Halt Script
End If
If [ tagTestSubjectLocation::inUse = "t" ]
Show Custom Dialog [ Message: "Delete all test results made in this test section before deleting it. To do this, click its green test button. Click on each test item. Delete the results you find."; Buttons: “OK” ]
Exit Script [ ]
End If
Set Variable [ $delete; Value:tagTestSubjectLocation::_LtestSubjectLocation ]
Set Variable [ $location; Value:tagTestSubjectLocation::kfocus ]
Go to Field [ ]
Refresh Window
Show Custom Dialog [ Message: "Delete test section " & tagTestSubjectLocation::focusName & " for " & tagTestSubject::tag & "'s test #" & tagTestSubjectLocation::reportNumber & "?"; Buttons: “Cancel”, “Delete” ]
If [ Get ( LastMessageChoice ) = 2 ]
Delete Record/Request
[ No dialog ]
End If
Go to Layout [ original layout ]
Set Variable [ $delete ]
Refresh Window
July 11, 平成27 11:08:18 Library.fp7 - deleteInspectionLocation -1-
|
Change language to improve quality and update to new vocabulary.
|
Change language to improve quality and update to new vocabulary.
Instead of ‘discovery’ now using ‘test result’ and instead of ‘focus’
now use ‘test section.’
|
C
|
apache-2.0
|
HelpGiveThanks/Library,HelpGiveThanks/Library
|
0e6bcc34c6601b2ed2336d54e49bf23c12e30c60
|
Settings/Controls/Dialog.h
|
Settings/Controls/Dialog.h
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <Windows.h>
#include <unordered_map>
class Control;
class Dialog {
public:
Dialog();
Dialog(HWND parent, LPCWSTR dlgTemplate);
void AddControl(Control *control);
HWND DialogHandle();
HWND ParentHandle();
void Show();
protected:
HWND _dlgHwnd;
HWND _parent;
/// <summary>Maps control IDs to their respective instances.</summary>
std::unordered_map<int, Control *> _controlMap;
static INT_PTR CALLBACK StaticDialogProc(HWND hwndDlg, UINT uMsg,
WPARAM wParam, LPARAM lParam);
virtual INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg,
WPARAM wParam, LPARAM lParam);
};
|
// Copyright (c) 2015, Matthew Malensek.
// Distributed under the BSD 2-Clause License (see LICENSE.txt for details)
#pragma once
#include <Windows.h>
#include <unordered_map>
class Control;
class Dialog {
public:
Dialog();
Dialog(HWND parent, LPCWSTR dlgTemplate);
void AddControl(Control *control);
HWND DialogHandle();
HWND ParentHandle();
void Show();
protected:
HWND _dlgHwnd;
HWND _parent;
LPCWSTR _template;
/// <summary>Maps control IDs to their respective instances.</summary>
std::unordered_map<int, Control *> _controlMap;
static INT_PTR CALLBACK StaticDialogProc(HWND hwndDlg, UINT uMsg,
WPARAM wParam, LPARAM lParam);
virtual INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT uMsg,
WPARAM wParam, LPARAM lParam);
};
|
Maintain the template string as an instance variable
|
Maintain the template string as an instance variable
|
C
|
bsd-2-clause
|
malensek/3RVX,malensek/3RVX,malensek/3RVX
|
f938f81e36fa1fffb1732058a23570abd2e9ee0e
|
bin/varnishd/mgt.h
|
bin/varnishd/mgt.h
|
/*
* $Id$
*/
#include "common.h"
#include "miniobj.h"
extern struct evbase *mgt_evb;
/* mgt_child.c */
void mgt_run(int dflag);
void mgt_start_child(void);
void mgt_stop_child(void);
extern pid_t mgt_pid, child_pid;
/* mgt_cli.c */
void mgt_cli_init(void);
void mgt_cli_setup(int fdi, int fdo, int verbose);
int mgt_cli_askchild(int *status, char **resp, const char *fmt, ...);
void mgt_cli_start_child(int fdi, int fdo);
void mgt_cli_stop_child(void);
/* mgt_vcc.c */
void mgt_vcc_init(void);
int mgt_vcc_default(const char *bflag, const char *fflag);
int mgt_push_vcls_and_start(int *status, char **p);
/* tcp.c */
int open_tcp(const char *port);
#include "stevedore.h"
extern struct stevedore sma_stevedore;
extern struct stevedore smf_stevedore;
#include "hash_slinger.h"
extern struct hash_slinger hsl_slinger;
extern struct hash_slinger hcl_slinger;
|
/*
* $Id$
*/
#include "common.h"
#include "miniobj.h"
extern struct evbase *mgt_evb;
/* mgt_child.c */
void mgt_run(int dflag);
extern pid_t mgt_pid, child_pid;
/* mgt_cli.c */
void mgt_cli_init(void);
void mgt_cli_setup(int fdi, int fdo, int verbose);
int mgt_cli_askchild(int *status, char **resp, const char *fmt, ...);
void mgt_cli_start_child(int fdi, int fdo);
void mgt_cli_stop_child(void);
/* mgt_vcc.c */
void mgt_vcc_init(void);
int mgt_vcc_default(const char *bflag, const char *fflag);
int mgt_push_vcls_and_start(int *status, char **p);
/* tcp.c */
int open_tcp(const char *port);
#include "stevedore.h"
extern struct stevedore sma_stevedore;
extern struct stevedore smf_stevedore;
#include "hash_slinger.h"
extern struct hash_slinger hsl_slinger;
extern struct hash_slinger hcl_slinger;
|
Remove prototypes for no longer existing functions
|
Remove prototypes for no longer existing functions
git-svn-id: 7d4b18ab7d176792635d6a7a77dd8cbbea8e8daa@659 d4fa192b-c00b-0410-8231-f00ffab90ce4
|
C
|
bsd-2-clause
|
ssm/pkg-varnish,wikimedia/operations-debs-varnish,ssm/pkg-varnish,CartoDB/Varnish-Cache,CartoDB/Varnish-Cache,wikimedia/operations-debs-varnish,wikimedia/operations-debs-varnish,ssm/pkg-varnish,wikimedia/operations-debs-varnish,ssm/pkg-varnish,CartoDB/Varnish-Cache,wikimedia/operations-debs-varnish,ssm/pkg-varnish
|
925cd389862fe45b44921e1a8693fb8b927a9ed6
|
experiment.c
|
experiment.c
|
#include "stdio.h"
#include "stdlib.h"
#define TRIALS 4
#define MATRIX_SIZE 1024
int main(int argc, char* argv[])
{
short A[MATRIX_SIZE][MATRIX_SIZE],
B[MATRIX_SIZE][MATRIX_SIZE],
C[MATRIX_SIZE][MATRIX_SIZE];
// Initalize array A and B with '1's
for (int i = 0; i < MATRIX_SIZE; ++i)
for (int k = 0; k < MATRIX_SIZE; ++k)
A[i][k] = B[i][k] = 1;
// Iterate through the block sizes
for (int block_size = 4; block_size <= 256; block_size *= 2)
{
// Run TRIALS number of trials for each block size
for (int trial = 0; trial < TRIALS; ++trial)
{
printf("size: %d\n", block_size);
}
}
return 0;
}
|
#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 k = 0; k < MATRIX_SIZE; ++k)
A[i][k] = B[i][k] = 1;
// Iterate through the block sizes
for (int block_size = 4; block_size <= 256; block_size *= 2)
{
// Run TRIALS number of trials for each block size
for (int trial = 0; trial < TRIALS; ++trial)
{
printf("size: %d\n", block_size);
}
}
return 0;
}
|
Move the arrays out of the stack into global mem
|
Move the arrays out of the stack into global mem
|
C
|
mit
|
EvanPurkhiser/CS-Matrix-Multiplication
|
a5fc5eba4dfcc284e6adcd7fdcd5b43182230d2b
|
arch/x86/include/asm/bug.h
|
arch/x86/include/asm/bug.h
|
#ifndef _ASM_X86_BUG_H
#define _ASM_X86_BUG_H
#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
#ifdef CONFIG_X86_32
# define __BUG_C0 "2:\t.long 1b, %c0\n"
#else
# define __BUG_C0 "2:\t.long 1b - 2b, %c0 - 2b\n"
#endif
#define BUG() \
do { \
asm volatile("1:\tud2\n" \
".pushsection __bug_table,\"a\"\n" \
__BUG_C0 \
"\t.word %c1, 0\n" \
"\t.org 2b+%c2\n" \
".popsection" \
: : "i" (__FILE__), "i" (__LINE__), \
"i" (sizeof(struct bug_entry))); \
for (;;) ; \
} while (0)
#else
#define BUG() \
do { \
asm volatile("ud2"); \
for (;;) ; \
} while (0)
#endif
#endif /* !CONFIG_BUG */
#include <asm-generic/bug.h>
#endif /* _ASM_X86_BUG_H */
|
#ifndef _ASM_X86_BUG_H
#define _ASM_X86_BUG_H
#ifdef CONFIG_BUG
#define HAVE_ARCH_BUG
#ifdef CONFIG_DEBUG_BUGVERBOSE
#ifdef CONFIG_X86_32
# define __BUG_C0 "2:\t.long 1b, %c0\n"
#else
# define __BUG_C0 "2:\t.long 1b - 2b, %c0 - 2b\n"
#endif
#define BUG() \
do { \
asm volatile("1:\tud2\n" \
".pushsection __bug_table,\"a\"\n" \
__BUG_C0 \
"\t.word %c1, 0\n" \
"\t.org 2b+%c2\n" \
".popsection" \
: : "i" (__FILE__), "i" (__LINE__), \
"i" (sizeof(struct bug_entry))); \
unreachable(); \
} while (0)
#else
#define BUG() \
do { \
asm volatile("ud2"); \
unreachable(); \
} while (0)
#endif
#endif /* !CONFIG_BUG */
#include <asm-generic/bug.h>
#endif /* _ASM_X86_BUG_H */
|
Convert BUG() to use unreachable()
|
x86: Convert BUG() to use unreachable()
Use the new unreachable() macro instead of for(;;);. When
allyesconfig is built with a GCC-4.5 snapshot on i686 the size of the
text segment is reduced by 3987 bytes (from 6827019 to 6823032).
Signed-off-by: David Daney <0662de36cfb0706ed279bff52abef14720945acc@caviumnetworks.com>
Acked-by: "H. Peter Anvin" <8a453bad9912ffe59bc0f0b8abe03df9be19379e@zytor.com>
CC: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
CC: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@redhat.com>
CC: 500d1ad82b2a9e532e251e94d31de3f8a5cf4174@kernel.org
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
|
62cf809f47a2767f343ddc649f8e8b0d725c7823
|
inc/user.h
|
inc/user.h
|
#ifndef USER_H
#define USER_H
#include <stdint.h>
#include <QString>
#include <QByteArray>
#include <QVector>
#include "../inc/pwentry.h"
class User
{
public:
enum AuthenticateFlag {
Authenticate = 0x0000,
Encrypt = 0x0001,
Decrypt = 0x0002
};
User();
User(QString username,
QString password);
User(QString username,
QByteArray auth_salt,
QByteArray key_salt,
QByteArray iv,
QByteArray auth_hash,
QVector<PwEntry> password_entries);
QString username;
QByteArray auth_salt;
QByteArray key_salt;
QByteArray iv;
QByteArray auth_hash;
QVector<PwEntry> password_entries;
bool isDecrypted;
int Authenticate(QString password, AuthenticateFlag auth_mode);
int AddPwEntry(PwEntry password_entry);
private:
void EncryptAllPwEntries(QString password);
void DecryptAllPwEntries(QString password);
};
#endif // USER_H
|
#ifndef USER_H
#define USER_H
#include <stdint.h>
#include <QString>
#include <QByteArray>
#include <QVector>
#include "../inc/pwentry.h"
class User
{
public:
enum AuthenticateFlag {
Auth = 0x0000,
Encrypt = 0x0001,
Decrypt = 0x0002
};
User();
User(QString username,
QString password);
User(QString username,
QByteArray auth_salt,
QByteArray key_salt,
QByteArray iv,
QByteArray auth_hash,
QVector<PwEntry> password_entries);
QString username;
QByteArray auth_salt;
QByteArray key_salt;
QByteArray iv;
QByteArray auth_hash;
QVector<PwEntry> password_entries;
bool isDecrypted;
int Authenticate(QString password, User::AuthenticateFlag auth_mode);
int AddPwEntry(PwEntry password_entry);
private:
void EncryptAllPwEntries(QString password);
void DecryptAllPwEntries(QString password);
};
#endif // USER_H
|
Resolve naming conflict between Authenticate method name and enum name.
|
Resolve naming conflict between Authenticate method name and enum name.
|
C
|
mit
|
vapter/karabiner,vapter/karabiner,vapter/karabiner
|
2f7b8e781b35070f8f79b4816354ffd81df9048b
|
lib/stdarg.h
|
lib/stdarg.h
|
#ifndef __STDARG_H
#define __STDARG_H
#include "sys/types.h"
typedef void *va_list;
#define va_start(l, arg) l = (void *)&arg
#define va_arg(l, type) (*(type *)(l += __WORDSIZE / 8))
#define va_end(l)
#endif
|
#ifndef __STDARG_H
#define __STDARG_H
#include "sys/types.h"
typedef void *va_list;
#define va_start(l, arg) l = (void *)&arg
/*
* va_arg assumes arguments are promoted to
* machine-word size when pushed onto the stack
*/
#define va_arg(l, type) (*(type *)(l += sizeof *l))
#define va_end(l)
#endif
|
Move by machine word size
|
Move by machine word size
|
C
|
mit
|
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
|
31679d8270f599c1a0927e5bcfd6f865d28167c1
|
spectrum.h
|
spectrum.h
|
#ifndef COMPTONSPECTRUM
#define COMPTONSPECTRUM
#include "TH1F.h"
class spectrum
{
public:
spectrum(double initialEnergy, double resolution);
void setNumberOfEvents(const int events);
virtual TH1F* getHisto();
virtual void generateEvents();
protected:
double fInitialEnergy;
double fResolution;
int fEvents;
std::vector<double> fSimEvents;
};
#endif //COMPTONSPECTRUM
|
#ifndef COMPTONSPECTRUM
#define COMPTONSPECTRUM
#include "TH1F.h"
class spectrum
{
public:
spectrum(double initialEnergy = 0, double resolution = 0);
void setNumberOfEvents(const int events);
virtual TH1F* getHisto();
virtual void generateEvents();
protected:
double fInitialEnergy = 0;
double fResolution = 0;
int fEvents = 0;
std::vector<double> fSimEvents;
};
#endif //COMPTONSPECTRUM
|
Add default values of variables
|
Add default values of variables
|
C
|
mit
|
wictus/comptonPlots
|
accf8e0bfee00fd2f5a97f728f0e8b57c6e9931d
|
inc/cleri/children.h
|
inc/cleri/children.h
|
/*
* children.h - linked list for keeping node results
*
* author : Jeroen van der Heijden
* email : jeroen@transceptor.technology
* copyright : 2016, Transceptor Technology
*
* changes
* - initial version, 08-03-2016
* - refactoring, 17-06-2017
*/
#ifndef CLERI_CHILDREN_H_
#define CLERI_CHILDREN_H_
#include <cleri/node.h>
/* typedefs */
typedef struct cleri_node_s cleri_node_t;
typedef struct cleri_children_s cleri_children_t;
/* private functions */
cleri_children_t * cleri__children_new(void);
void cleri__children_free(cleri_children_t * children);
int cleri__children_add(cleri_children_t * children, cleri_node_t * node);
/* structs */
struct cleri_children_s
{
cleri_node_t * node;
struct cleri_children_s * next;
};
#endif /* CLERI_CHILDREN_H_ */
|
/*
* children.h - linked list for keeping node results
*
* author : Jeroen van der Heijden
* email : jeroen@transceptor.technology
* copyright : 2016, Transceptor Technology
*
* changes
* - initial version, 08-03-2016
* - refactoring, 17-06-2017
*/
#ifndef CLERI_CHILDREN_H_
#define CLERI_CHILDREN_H_
#include <cleri/node.h>
/* typedefs */
typedef struct cleri_node_s cleri_node_t;
typedef struct cleri_children_s cleri_children_t;
/* private functions */
cleri_children_t * cleri__children_new(void);
void cleri__children_free(cleri_children_t * children);
int cleri__children_add(cleri_children_t * children, cleri_node_t * node);
/* structs */
struct cleri_children_s
{
cleri_node_t * node;
cleri_children_t * next;
};
#endif /* CLERI_CHILDREN_H_ */
|
Update gitignore and use typedef instead of struct
|
Update gitignore and use typedef instead of struct
|
C
|
mit
|
transceptor-technology/libcleri,transceptor-technology/libcleri
|
1739d1ce0131a272dfd976df21fdbe21c822cc2e
|
os/scoped_handle.h
|
os/scoped_handle.h
|
// LAF OS Library
// Copyright (C) 2019 Igara Studio S.A.
// Copyright (C) 2012-2013 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_SCOPED_HANDLE_H_INCLUDED
#define OS_SCOPED_HANDLE_H_INCLUDED
#pragma once
namespace os {
template<typename T>
class ScopedHandle {
public:
ScopedHandle(T* handle) : m_handle(handle) { }
ScopedHandle(ScopedHandle&& that) {
m_handle = that.m_handle;
that.m_handle = nullptr;
}
~ScopedHandle() {
if (m_handle)
m_handle->dispose();
}
T* operator->() { return m_handle; }
operator T*() { return m_handle; }
private:
T* m_handle;
// Cannot copy
ScopedHandle(const ScopedHandle&);
ScopedHandle& operator=(const ScopedHandle&);
};
} // namespace os
#endif
|
// LAF OS Library
// Copyright (C) 2019-2020 Igara Studio S.A.
// Copyright (C) 2012-2013 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef OS_SCOPED_HANDLE_H_INCLUDED
#define OS_SCOPED_HANDLE_H_INCLUDED
#pragma once
namespace os {
template<typename T>
class ScopedHandle {
public:
ScopedHandle(T* handle) : m_handle(handle) { }
ScopedHandle(ScopedHandle&& that) {
m_handle = that.m_handle;
that.m_handle = nullptr;
}
~ScopedHandle() {
if (m_handle)
m_handle->dispose();
}
T* operator->() { return m_handle; }
operator T*() { return m_handle; }
const T* operator->() const { return m_handle; }
operator const T*() const { return m_handle; }
private:
T* m_handle;
// Cannot copy
ScopedHandle(const ScopedHandle&);
ScopedHandle& operator=(const ScopedHandle&);
};
} // namespace os
#endif
|
Add operators for ScopedHandle when it is const
|
Add operators for ScopedHandle when it is const
|
C
|
mit
|
aseprite/laf,aseprite/laf
|
4e2b8800768573270f13a537c76d4e5f0cdad3cf
|
Sources/CardinalDebugToolkit.h
|
Sources/CardinalDebugToolkit.h
|
//
// CardinalDebugToolkit.h
// CardinalDebugToolkit
//
// Created by Robin Kunde on 11/3/17.
// Copyright © 2017 Cardinal Solutions. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for CardinalDebugToolkit.
FOUNDATION_EXPORT double CardinalDebugToolkitVersionNumber;
//! Project version string for CardinalDebugToolkit.
FOUNDATION_EXPORT const unsigned char CardinalDebugToolkitVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <CardinalDebugToolkit/PublicHeader.h>
#import <CardinalDebugToolkit/NSUserDefaultsHelper.h>
|
//
// CardinalDebugToolkit.h
// CardinalDebugToolkit
//
// Created by Robin Kunde on 11/3/17.
// Copyright © 2017 Cardinal Solutions. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for CardinalDebugToolkit.
FOUNDATION_EXPORT double CardinalDebugToolkitVersionNumber;
//! Project version string for CardinalDebugToolkit.
FOUNDATION_EXPORT const unsigned char CardinalDebugToolkitVersionString[];
#import "NSUserDefaultsHelper.h"
|
Fix import statement in library briding header
|
Fix import statement in library briding header
|
C
|
mit
|
CardinalNow/CardinalDebugToolkit,CardinalNow/CardinalDebugToolkit,CardinalNow/CardinalDebugToolkit
|
c9c37b34d95a1436933698beca4cebcceb42a510
|
mainwindow.h
|
mainwindow.h
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <qwt_picker.h>
#include <qwt_plot_picker.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_enableSizeButton_clicked();
private:
Ui::MainWindow *ui;
double **xnPlus, **xnMinus, **ynPlus, **ynMinus;
QwtPlotPicker *picker;
private:
void initArrays();
void initTauComboBox();
void initQwtPlot();
void initQwtPlotPicker();
double func1(double xn, double yn);
double func2(double xn);
void buildTrajectory(int idTraj);
};
#endif // MAINWINDOW_H
|
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <qwt_picker.h>
#include <qwt_plot_picker.h>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_enableSizeButton_clicked();
private:
Ui::MainWindow *ui;
double **xnPlus, **xnMinus, **ynPlus, **ynMinus;
double x0, y0;
QwtPlotPicker *picker;
private:
void initArrays();
void initTauComboBox();
void initQwtPlot();
void initQwtPlotPicker();
double func1(double xn, double yn);
double func2(double xn);
void buildTrajectory(int idTraj);
};
#endif // MAINWINDOW_H
|
Add x0, y0 fields in class.
|
Add x0, y0 fields in class.
|
C
|
mit
|
ivanshchitov/solving-system-ode
|
9faa3ae19da724a23538a218a691bf73c24b81d2
|
BKMoneyKit/BKCardExpiryField.h
|
BKMoneyKit/BKCardExpiryField.h
|
//
// BKCardExpiryField.h
// BKMoneyKit
//
// Created by Byungkook Jang on 2014. 7. 6..
// Copyright (c) 2014년 Byungkook Jang. All rights reserved.
//
#import "BKForwardingTextField.h"
@interface BKCardExpiryField : BKForwardingTextField
/**
* Date components that user typed. Undetermined components would be zero.
*/
@property (nonatomic, strong) NSDateComponents *dateComponents;
@end
|
//
// BKCardExpiryField.h
// BKMoneyKit
//
// Created by Byungkook Jang on 2014. 7. 6..
// Copyright (c) 2014년 Byungkook Jang. All rights reserved.
//
#import "BKForwardingTextField.h"
@interface BKCardExpiryField : BKForwardingTextField
/**
* Date components that user typed. Undetermined components would be zero.
*/
@property (nonatomic, strong) NSDateComponents *dateComponents;
+ (NSInteger)currentYear;
@end
|
Add accept to current year getter
|
Add accept to current year getter
|
C
|
mit
|
bkook/BKMoneyKit,brightsider/BKMoneyKit
|
f1d1c9cbfdbb8740e2dfb3f0af5645be978fbfbd
|
omx/gstomx.h
|
omx/gstomx.h
|
/*
* Copyright (C) 2007-2008 Nokia Corporation.
*
* Author: Felipe Contreras <felipe.contreras@nokia.com>
*
* 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
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef GSTOMX_H
#define GSTOMX_H
#include <gst/gst.h>
G_BEGIN_DECLS
#define DEFAULT_LIBRARY_NAME "libomxil.so.0"
GST_DEBUG_CATEGORY_EXTERN (gstomx_debug);
#define GST_CAT_DEFAULT gstomx_debug
G_END_DECLS
#endif /* GSTOMX_H */
|
/*
* Copyright (C) 2007-2008 Nokia Corporation.
*
* Author: Felipe Contreras <felipe.contreras@nokia.com>
*
* 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
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef GSTOMX_H
#define GSTOMX_H
#include <gst/gst.h>
G_BEGIN_DECLS
#define DEFAULT_LIBRARY_NAME "libomxil-bellagio.so.0"
GST_DEBUG_CATEGORY_EXTERN (gstomx_debug);
#define GST_CAT_DEFAULT gstomx_debug
G_END_DECLS
#endif /* GSTOMX_H */
|
Update library name to new bellagio library.
|
Update library name to new bellagio library.
|
C
|
lgpl-2.1
|
mrchapp/gst-openmax-devel,felipec/gst-openmax,prajnashi/gst-openmax,matsu/gst-openmax,mrchapp/gst-openmax,mrchapp/gst-openmax,matsu/gst-openmax,mrchapp/gst-openmax,PPCDroid/external-gst-openmax,freedesktop-unofficial-mirror/gstreamer__attic__gst-openmax,mrchapp/gst-openmax-devel,PPCDroid/external-gst-openmax,freedesktop-unofficial-mirror/gstreamer__attic__gst-openmax,prajnashi/gst-openmax,felipec/gst-openmax,mrchapp/gst-openmax-devel
|
04b90bc00fc6ce8bc6c559e56220ceb77cdbccf6
|
test/Analysis/array-struct.c
|
test/Analysis/array-struct.c
|
// RUN: clang -checker-simple -verify %s
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
q = &d;
q->data = 3;
d.data_array[9] = 17;
}
void f2() {
char *p = "/usr/local";
char (*q)[4];
q = &"abc";
}
void f3() {
STYPE s;
}
void f4() {
int a[] = { 1, 2, 3};
int b[3] = { 1, 2 };
}
|
// RUN: clang -checker-simple -verify %s
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
q = &d;
q->data = 3;
d.data_array[9] = 17;
}
void f2() {
char *p = "/usr/local";
char (*q)[4];
q = &"abc";
}
void f3() {
STYPE s;
}
void f4() {
int a[] = { 1, 2, 3};
int b[3] = { 1, 2 };
}
void f5() {
struct s data;
g1(&data);
}
|
Add function side-effect test cast.
|
Add function side-effect test cast.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58565 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
d9ff38b9506f42f468d03a48674ef0a227405351
|
net430/cpu.h
|
net430/cpu.h
|
#include "config.h"
#include <msp430.h>
void delayMs(uint16_t ms);
static void
cpu_init(void) {
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
/* Set proper CPU clock speed */
DCOCTL = 0;
#if CPU_FREQ == 1
BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;
#elif CPU_FREQ == 8
BCSCTL1 = CALBC1_8MHZ;
DCOCTL = CALDCO_8MHZ;
#elif CPU_FREQ == 12
BCSCTL1 = CALBC1_12MHZ
DCOCTL = CALDCO_12HZ;
#elif CPU_FREQ == 16
BCSCTL1 = CALBC1_16MHZ;
DCOCTL = CALDCO_16MHZ;
#else
#error "Unsupported CPU frequency"
#endif
}
/* Spends 3 * n cycles */
__inline__ static void delay_cycles(register unsigned int n) {
__asm__ __volatile__ (
"1: \n"
" dec %[n] \n"
" jne 1b \n"
: [n] "+r"(n));
}
|
#include "config.h"
#include <msp430.h>
#include <stdint.h>
void delayMs(uint16_t ms);
static void
cpu_init(void) {
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
/* Set proper CPU clock speed */
DCOCTL = 0;
#if CPU_FREQ == 1
BCSCTL1 = CALBC1_1MHZ;
DCOCTL = CALDCO_1MHZ;
#elif CPU_FREQ == 8
BCSCTL1 = CALBC1_8MHZ;
DCOCTL = CALDCO_8MHZ;
#elif CPU_FREQ == 12
BCSCTL1 = CALBC1_12MHZ
DCOCTL = CALDCO_12HZ;
#elif CPU_FREQ == 16
BCSCTL1 = CALBC1_16MHZ;
DCOCTL = CALDCO_16MHZ;
#else
#error "Unsupported CPU frequency"
#endif
}
/* Spends 3 * n cycles */
__inline__ static void delay_cycles(register unsigned int n) {
__asm__ __volatile__ (
"1: \n"
" dec %[n] \n"
" jne 1b \n"
: [n] "+r"(n));
}
|
Include stdint to get uint16_t
|
Include stdint to get uint16_t
|
C
|
mit
|
xpgdk/net430,xpgdk/net430,xpgdk/net430
|
ea0ce2b6d9c1463be6038146063f016b489b54e4
|
plugin/devil/gvplugin_devil.c
|
plugin/devil/gvplugin_devil.c
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#include "gvplugin.h"
extern gvplugin_installed_t gvdevice_devil_types;
static gvplugin_api_t apis[] = {
{API_device, &gvdevice_devil_types},
{(api_t)0, 0},
};
gvplugin_library_t gvplugin_devil_LTX_library = { "devil", apis };
|
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#include "gvplugin.h"
extern gvplugin_installed_t gvdevice_devil_types[];
static gvplugin_api_t apis[] = {
{API_device, gvdevice_devil_types},
{(api_t)0, 0},
};
gvplugin_library_t gvplugin_devil_LTX_library = { "devil", apis };
|
Apply patch for C standards compliance: "All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined." (That's from ISO/IEC 9899:TC2 final committee draft, section 6.2.7.)
|
Apply patch for C standards compliance:
"All declarations that
refer to the same object or function shall have compatible type;
otherwise, the behavior is undefined." (That's from ISO/IEC 9899:TC2
final committee draft, section 6.2.7.)
This doesn't trigger issues with most C implementations, but there
is one implementation in development (GCC LTO branch) which does
flag this issue.
Patch from: Chris Demetriou <cgd@google.com>
|
C
|
epl-1.0
|
kbrock/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,jho1965us/graphviz,kbrock/graphviz,tkelman/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,MjAbuz/graphviz,kbrock/graphviz,kbrock/graphviz,pixelglow/graphviz,tkelman/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,pixelglow/graphviz,ellson/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,pixelglow/graphviz,tkelman/graphviz,jho1965us/graphviz,pixelglow/graphviz,MjAbuz/graphviz,pixelglow/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/graphviz,kbrock/graphviz,ellson/graphviz,tkelman/graphviz,BMJHayward/graphviz,ellson/graphviz,MjAbuz/graphviz,tkelman/graphviz,ellson/graphviz,pixelglow/graphviz,pixelglow/graphviz,pixelglow/graphviz,tkelman/graphviz,ellson/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,pixelglow/graphviz,jho1965us/graphviz,kbrock/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,kbrock/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,kbrock/graphviz,tkelman/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,ellson/graphviz,tkelman/graphviz,BMJHayward/graphviz,ellson/graphviz
|
6eb5be81ca17bc64de0b856fde8f5a9a90757489
|
test/CodeGen/enum.c
|
test/CodeGen/enum.c
|
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | grep 'ret i32 6'
// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | grep 'ret i32 7'
static enum { foo, bar = 1U } z;
int main (void)
{
int r = 0;
if (bar - 2 < 0)
r += 4;
if (foo - 1 < 0)
r += 2;
if (z - 1 < 0)
r++;
return r;
}
|
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -O3 -emit-llvm -o - | grep 'ret i32 6'
// RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ %s -O3 -emit-llvm -o - | grep 'ret i32 7'
// This test case illustrates a peculiarity of the promotion of
// enumeration types in C and C++. In particular, the enumeration type
// "z" below promotes to an unsigned int in C but int in C++.
static enum { foo, bar = 1U } z;
int main (void)
{
int r = 0;
if (bar - 2 < 0)
r += 4;
if (foo - 1 < 0)
r += 2;
if (z - 1 < 0)
r++;
return r;
}
|
Comment a wacky test case
|
Comment a wacky test case
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@123758 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
|
bc000f3f8183954b8d013eeeed4af2e9d839735a
|
tests/homebrew-acceptance-test.c
|
tests/homebrew-acceptance-test.c
|
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* 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 law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <internal.h> /* getenv, sytem, snprintf */
int main(int argc, char *argv[])
{
#ifndef WIN32
char *srcdir = getenv("srcdir");
char command[FILENAME_MAX];
int status;
snprintf(command, FILENAME_MAX, "%s/tools/cbc version 2>&1", srcdir);
status = system(command);
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
snprintf(command, FILENAME_MAX, "%s/tools/cbc help 2>&1", srcdir);
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
#endif
return 0;
}
|
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* 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 law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <internal.h> /* getenv, sytem, snprintf */
int main(void)
{
#ifndef WIN32
char *srcdir = getenv("srcdir");
char command[FILENAME_MAX];
int status;
snprintf(command, FILENAME_MAX, "%s/tools/cbc version 2>&1", srcdir);
status = system(command);
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
snprintf(command, FILENAME_MAX, "%s/tools/cbc help 2>&1", srcdir);
if (status == -1 || WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
return 1;
}
#endif
return 0;
}
|
Fix compile error with -Werror
|
Fix compile error with -Werror
Change-Id: Ifac2f0b1c06534bc85bad5fe2b2594c4eb208dda
Reviewed-on: http://review.couchbase.org/27387
Tested-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
|
C
|
apache-2.0
|
PureSwift/libcouchbase,kojiromike/libcouchbase,mnunberg/libcouchbase,avsej/libcouchbase,maxim-ky/libcouchbase,avsej/libcouchbase,couchbase/libcouchbase,uvenum/libcouchbase,couchbase/libcouchbase,mody/libcouchbase,senthilkumaranb/libcouchbase,mnunberg/libcouchbase,kojiromike/libcouchbase,maxim-ky/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,mody/libcouchbase,uvenum/libcouchbase,senthilkumaranb/libcouchbase,couchbase/libcouchbase,senthilkumaranb/libcouchbase,trondn/libcouchbase,mnunberg/libcouchbase,trondn/libcouchbase,avsej/libcouchbase,maxim-ky/libcouchbase,mnunberg/libcouchbase,kojiromike/libcouchbase,PureSwift/libcouchbase,uvenum/libcouchbase,trondn/libcouchbase,couchbase/libcouchbase,signmotion/libcouchbase,uvenum/libcouchbase,avsej/libcouchbase,mnunberg/libcouchbase,senthilkumaranb/libcouchbase,trondn/libcouchbase,signmotion/libcouchbase,couchbase/libcouchbase,PureSwift/libcouchbase,PureSwift/libcouchbase,avsej/libcouchbase,mody/libcouchbase,mody/libcouchbase,kojiromike/libcouchbase,trondn/libcouchbase,signmotion/libcouchbase,avsej/libcouchbase,couchbase/libcouchbase,uvenum/libcouchbase,signmotion/libcouchbase,maxim-ky/libcouchbase
|
be4d546b9b4e23bb379282cb65e76944c80d1371
|
src/amx_profiler/profile_writer.h
|
src/amx_profiler/profile_writer.h
|
// AMX profiler for SA-MP server: http://sa-mp.com
//
// Copyright (C) 2011-2012 Sergey Zolotarev
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef AMX_PROFILER_PROFILE_WRITER_H
#define AMX_PROFILER_PROFILE_WRITER_H
#include <memory>
#include <ostream>
#include <vector>
#include "function_info.h"
namespace amx_profiler {
class FunctionInfo;
class ProfileWriter {
public:
virtual void Write(const std::string &script_name, std::ostream &stream,
const std::vector<FunctionInfoPtr> &stats) = 0;
};
} // namespace amx_profiler
#endif // !AMX_PROFILER_PROFILE_WRITER_H
|
// AMX profiler for SA-MP server: http://sa-mp.com
//
// Copyright (C) 2011-2012 Sergey Zolotarev
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef AMX_PROFILER_PROFILE_WRITER_H
#define AMX_PROFILER_PROFILE_WRITER_H
#include <memory>
#include <ostream>
#include <vector>
#include "function_info.h"
namespace amx_profiler {
class ProfileWriter {
public:
virtual void Write(const std::string &script_name, std::ostream &stream,
const std::vector<FunctionInfoPtr> &stats) = 0;
};
} // namespace amx_profiler
#endif // !AMX_PROFILER_PROFILE_WRITER_H
|
Remove useless forward declaration of FunctionInfo
|
Remove useless forward declaration of FunctionInfo
|
C
|
bsd-2-clause
|
Zeex/samp-plugin-profiler,Zeex/samp-plugin-profiler
|
b98f39c0e86e42242d93c7ca7d8e1ff55f5839fa
|
src/main.h
|
src/main.h
|
#pragma once
#include <unistd.h>
#include <iostream>
#include <list>
#include <map>
#include <mutex>
#include <unordered_map>
#include <queue>
#include <sstream>
#include <set>
#include <thread>
#include <tuple>
#include <vector>
|
#pragma once
#include <unistd.h>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <mutex>
#include <unordered_map>
#include <queue>
#include <sstream>
#include <set>
#include <thread>
#include <tuple>
#include <vector>
|
Include fstream for file reading and such.
|
Include fstream for file reading and such.
|
C
|
mit
|
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
|
cd1344fe322cd9d95b2c0f011d6766677cfcb29b
|
include/linux/gfs2_ioctl.h
|
include/linux/gfs2_ioctl.h
|
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU General Public License v.2.
*/
#ifndef __GFS2_IOCTL_DOT_H__
#define __GFS2_IOCTL_DOT_H__
#define _GFS2C_(x) (('G' << 16) | ('2' << 8) | (x))
/* Ioctls implemented */
#define GFS2_IOCTL_IDENTIFY _GFS2C_(1)
#define GFS2_IOCTL_SUPER _GFS2C_(2)
#define GFS2_IOCTL_SETFLAGS _GFS2C_(3)
#define GFS2_IOCTL_GETFLAGS _GFS2C_(4)
struct gfs2_ioctl {
unsigned int gi_argc;
const char **gi_argv;
char __user *gi_data;
unsigned int gi_size;
uint64_t gi_offset;
};
#endif /* ___GFS2_IOCTL_DOT_H__ */
|
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU General Public License v.2.
*/
#ifndef __GFS2_IOCTL_DOT_H__
#define __GFS2_IOCTL_DOT_H__
#define _GFS2C_(x) (('G' << 16) | ('2' << 8) | (x))
/* Ioctls implemented */
#define GFS2_IOCTL_SETFLAGS _GFS2C_(3)
#define GFS2_IOCTL_GETFLAGS _GFS2C_(4)
#endif /* ___GFS2_IOCTL_DOT_H__ */
|
Remove unused ioctls and unused structure
|
[GFS2] Remove unused ioctls and unused structure
Signed-off-by: David Teigland <cf7ba74ea50525d3d47fcd7a6d69b51121a9f873@redhat.com>
Signed-off-by: Steven Whitehouse <9801c4ef11586b619a1c43ac9377eea2aee672dd@redhat.com>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,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
|
0b8792c05c59b3eb9dad6eb054618d8e9f7cacc7
|
lib/cmsis_rtos_v1/cmsis_kernel.c
|
lib/cmsis_rtos_v1/cmsis_kernel.c
|
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel_structs.h>
#include <cmsis_os.h>
#include <ksched.h>
extern const k_tid_t _main_thread;
/**
* @brief Get the RTOS kernel system timer counter
*/
uint32_t osKernelSysTick(void)
{
return k_cycle_get_32();
}
/**
* @brief Initialize the RTOS Kernel for creating objects.
*/
osStatus osKernelInitialize(void)
{
return osOK;
}
/**
* @brief Start the RTOS Kernel.
*/
osStatus osKernelStart(void)
{
return osOK;
}
/**
* @brief Check if the RTOS kernel is already started.
*/
int32_t osKernelRunning(void)
{
return _has_thread_started(_main_thread);
}
|
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <kernel_structs.h>
#include <cmsis_os.h>
#include <ksched.h>
extern const k_tid_t _main_thread;
/**
* @brief Get the RTOS kernel system timer counter
*/
uint32_t osKernelSysTick(void)
{
return k_cycle_get_32();
}
/**
* @brief Initialize the RTOS Kernel for creating objects.
*/
osStatus osKernelInitialize(void)
{
return osOK;
}
/**
* @brief Start the RTOS Kernel.
*/
osStatus osKernelStart(void)
{
if (_is_in_isr()) {
return osErrorISR;
}
return osOK;
}
/**
* @brief Check if the RTOS kernel is already started.
*/
int32_t osKernelRunning(void)
{
return _has_thread_started(_main_thread);
}
|
Check if osKernelStart() is called from ISR
|
lib/cmsis_rtos_v1: Check if osKernelStart() is called from ISR
Check if osKernelStart() is called from ISR and return error code
appropriately.
Signed-off-by: Spoorthi K <c4ff46ff4cba9c2c6c6c9d55497ae534451b4309@intel.com>
|
C
|
apache-2.0
|
explora26/zephyr,explora26/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,punitvara/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,GiulianoFranchetto/zephyr,galak/zephyr,punitvara/zephyr,punitvara/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,punitvara/zephyr,nashif/zephyr,ldts/zephyr,Vudentz/zephyr,galak/zephyr,kraj/zephyr,galak/zephyr,punitvara/zephyr,Vudentz/zephyr,nashif/zephyr,explora26/zephyr,kraj/zephyr,Vudentz/zephyr,ldts/zephyr,nashif/zephyr,ldts/zephyr,kraj/zephyr,ldts/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,explora26/zephyr,Vudentz/zephyr,ldts/zephyr,finikorg/zephyr,explora26/zephyr,finikorg/zephyr,kraj/zephyr,kraj/zephyr,galak/zephyr
|
f00035de368a5a8ed8bcb7c9eec06bedf1c5dfe3
|
include/utils.h
|
include/utils.h
|
#ifndef UTILS_H
#define UTILS_H
#include <curses.h>
#include <stdint.h>
void color_str(WINDOW *, uint32_t, uint32_t, int16_t, int16_t, const char *);
void init_seed_srand(void);
#endif /* UTILS_H */
|
#ifndef UTILS_H
#define UTILS_H
#include <curses.h>
#include <stdint.h>
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
void color_str(WINDOW *, uint32_t, uint32_t, int16_t, int16_t, const char *);
void init_seed_srand(void);
#endif /* UTILS_H */
|
Add MIN and MAX macros.
|
Add MIN and MAX macros.
|
C
|
mit
|
svagionitis/gridNcurses,svagionitis/gridNcurses,svagionitis/gridNcurses
|
2af846e7114e98c2883061ffbd0e43adc24033d3
|
stmhal/boards/stm32f4xx_prefix.c
|
stmhal/boards/stm32f4xx_prefix.c
|
// stm32f4xx_prefix.c becomes the initial portion of the generated pins file.
#include <stdio.h>
#include "py/obj.h"
#include "pin.h"
#include MICROPY_HAL_H
#define AF(af_idx, af_fn, af_unit, af_type, af_ptr) \
{ \
{ &pin_af_type }, \
.name = MP_QSTR_AF ## af_idx ## _ ## af_fn ## af_unit, \
.idx = (af_idx), \
.fn = AF_FN_ ## af_fn, \
.unit = (af_unit), \
.type = AF_PIN_TYPE_ ## af_fn ## _ ## af_type, \
.af_fn = (af_ptr) \
}
#define PIN(p_port, p_pin, p_af, p_adc_num, p_adc_channel) \
{ \
{ &pin_type }, \
.name = MP_QSTR_ ## p_port ## p_pin, \
.port = PORT_ ## p_port, \
.pin = (p_pin), \
.num_af = (sizeof(p_af) / sizeof(pin_obj_t)), \
.pin_mask = (1 << ((p_pin) & 0x0f)), \
.gpio = GPIO ## p_port, \
.af = p_af, \
.adc_num = p_adc_num, \
.adc_channel = p_adc_channel, \
}
|
// stm32f4xx_prefix.c becomes the initial portion of the generated pins file.
#include <stdio.h>
#include "py/obj.h"
#include "pin.h"
#include MICROPY_HAL_H
#define AF(af_idx, af_fn, af_unit, af_type, af_ptr) \
{ \
{ &pin_af_type }, \
.name = MP_QSTR_AF ## af_idx ## _ ## af_fn ## af_unit, \
.idx = (af_idx), \
.fn = AF_FN_ ## af_fn, \
.unit = (af_unit), \
.type = AF_PIN_TYPE_ ## af_fn ## _ ## af_type, \
.af_fn = (af_ptr) \
}
#define PIN(p_port, p_pin, p_af, p_adc_num, p_adc_channel) \
{ \
{ &pin_type }, \
.name = MP_QSTR_ ## p_port ## p_pin, \
.port = PORT_ ## p_port, \
.pin = (p_pin), \
.num_af = (sizeof(p_af) / sizeof(pin_af_obj_t)), \
.pin_mask = (1 << ((p_pin) & 0x0f)), \
.gpio = GPIO ## p_port, \
.af = p_af, \
.adc_num = p_adc_num, \
.adc_channel = p_adc_channel, \
}
|
Fix alt function number calculation
|
stmhal/boards/stm32fxx_prefix.c: Fix alt function number calculation
This prevented pin_find_af* functions from being able to find some
of the alternate functions in the pin struct
|
C
|
mit
|
blmorris/micropython,matthewelse/micropython,pramasoul/micropython,feilongfl/micropython,ceramos/micropython,turbinenreiter/micropython,martinribelotta/micropython,MrSurly/micropython-esp32,stonegithubs/micropython,hiway/micropython,noahchense/micropython,rubencabrera/micropython,dmazzella/micropython,ahotam/micropython,tuc-osg/micropython,hiway/micropython,martinribelotta/micropython,dmazzella/micropython,skybird6672/micropython,drrk/micropython,ruffy91/micropython,dhylands/micropython,HenrikSolver/micropython,HenrikSolver/micropython,redbear/micropython,xyb/micropython,swegener/micropython,henriknelson/micropython,mpalomer/micropython,vitiral/micropython,rubencabrera/micropython,Peetz0r/micropython-esp32,cloudformdesign/micropython,toolmacher/micropython,danicampora/micropython,cloudformdesign/micropython,pozetroninc/micropython,tuc-osg/micropython,swegener/micropython,selste/micropython,noahchense/micropython,henriknelson/micropython,dhylands/micropython,dhylands/micropython,alex-march/micropython,mianos/micropython,danicampora/micropython,ahotam/micropython,cwyark/micropython,tuc-osg/micropython,tdautc19841202/micropython,toolmacher/micropython,TDAbboud/micropython,ruffy91/micropython,noahwilliamsson/micropython,trezor/micropython,pramasoul/micropython,supergis/micropython,emfcamp/micropython,SHA2017-badge/micropython-esp32,ruffy91/micropython,cloudformdesign/micropython,ceramos/micropython,infinnovation/micropython,torwag/micropython,dmazzella/micropython,ChuckM/micropython,galenhz/micropython,mianos/micropython,mianos/micropython,orionrobots/micropython,ernesto-g/micropython,cnoviello/micropython,rubencabrera/micropython,heisewangluo/micropython,xyb/micropython,PappaPeppar/micropython,alex-march/micropython,noahwilliamsson/micropython,kerneltask/micropython,matthewelse/micropython,dxxb/micropython,blazewicz/micropython,mianos/micropython,mgyenik/micropython,SHA2017-badge/micropython-esp32,adamkh/micropython,ChuckM/micropython,omtinez/micropython,AriZuu/micropython,firstval/micropython,blmorris/micropython,firstval/micropython,emfcamp/micropython,swegener/micropython,jlillest/micropython,chrisdearman/micropython,Peetz0r/micropython-esp32,ganshun666/micropython,puuu/micropython,ceramos/micropython,EcmaXp/micropython,oopy/micropython,lbattraw/micropython,tralamazza/micropython,stonegithubs/micropython,ericsnowcurrently/micropython,EcmaXp/micropython,ahotam/micropython,henriknelson/micropython,noahwilliamsson/micropython,drrk/micropython,alex-robbins/micropython,bvernoux/micropython,tralamazza/micropython,turbinenreiter/micropython,ericsnowcurrently/micropython,hiway/micropython,jmarcelino/pycom-micropython,tralamazza/micropython,misterdanb/micropython,lowRISC/micropython,feilongfl/micropython,SHA2017-badge/micropython-esp32,hiway/micropython,kostyll/micropython,dmazzella/micropython,alex-march/micropython,drrk/micropython,praemdonck/micropython,kostyll/micropython,MrSurly/micropython,ryannathans/micropython,AriZuu/micropython,bvernoux/micropython,adafruit/micropython,henriknelson/micropython,alex-robbins/micropython,supergis/micropython,bvernoux/micropython,blazewicz/micropython,henriknelson/micropython,selste/micropython,vriera/micropython,mgyenik/micropython,vitiral/micropython,dinau/micropython,dinau/micropython,lbattraw/micropython,blmorris/micropython,PappaPeppar/micropython,adafruit/micropython,praemdonck/micropython,kostyll/micropython,martinribelotta/micropython,omtinez/micropython,pfalcon/micropython,redbear/micropython,lowRISC/micropython,orionrobots/micropython,supergis/micropython,rubencabrera/micropython,heisewangluo/micropython,orionrobots/micropython,jmarcelino/pycom-micropython,mpalomer/micropython,lowRISC/micropython,emfcamp/micropython,TDAbboud/micropython,ganshun666/micropython,HenrikSolver/micropython,mgyenik/micropython,ganshun666/micropython,kerneltask/micropython,tobbad/micropython,hiway/micropython,ChuckM/micropython,oopy/micropython,tdautc19841202/micropython,alex-robbins/micropython,praemdonck/micropython,adamkh/micropython,firstval/micropython,infinnovation/micropython,EcmaXp/micropython,ruffy91/micropython,pozetroninc/micropython,adafruit/micropython,mpalomer/micropython,galenhz/micropython,ganshun666/micropython,micropython/micropython-esp32,Peetz0r/micropython-esp32,adamkh/micropython,martinribelotta/micropython,jlillest/micropython,pozetroninc/micropython,puuu/micropython,ahotam/micropython,ryannathans/micropython,pfalcon/micropython,firstval/micropython,pozetroninc/micropython,chrisdearman/micropython,jmarcelino/pycom-micropython,bvernoux/micropython,drrk/micropython,chrisdearman/micropython,drrk/micropython,tuc-osg/micropython,xyb/micropython,pfalcon/micropython,xhat/micropython,puuu/micropython,adamkh/micropython,infinnovation/micropython,AriZuu/micropython,omtinez/micropython,tobbad/micropython,xhat/micropython,oopy/micropython,xuxiaoxin/micropython,hosaka/micropython,pozetroninc/micropython,puuu/micropython,MrSurly/micropython-esp32,heisewangluo/micropython,stonegithubs/micropython,martinribelotta/micropython,deshipu/micropython,dxxb/micropython,kerneltask/micropython,toolmacher/micropython,ryannathans/micropython,swegener/micropython,cwyark/micropython,danicampora/micropython,tobbad/micropython,deshipu/micropython,danicampora/micropython,kostyll/micropython,skybird6672/micropython,selste/micropython,adafruit/circuitpython,ernesto-g/micropython,cnoviello/micropython,SHA2017-badge/micropython-esp32,TDAbboud/micropython,alex-robbins/micropython,mgyenik/micropython,AriZuu/micropython,ericsnowcurrently/micropython,misterdanb/micropython,dxxb/micropython,Peetz0r/micropython-esp32,galenhz/micropython,emfcamp/micropython,hosaka/micropython,kerneltask/micropython,noahchense/micropython,chrisdearman/micropython,cwyark/micropython,MrSurly/micropython,kerneltask/micropython,lbattraw/micropython,hosaka/micropython,cnoviello/micropython,HenrikSolver/micropython,ganshun666/micropython,adafruit/circuitpython,TDAbboud/micropython,trezor/micropython,misterdanb/micropython,matthewelse/micropython,redbear/micropython,noahchense/micropython,adamkh/micropython,lbattraw/micropython,omtinez/micropython,hosaka/micropython,utopiaprince/micropython,mianos/micropython,alex-march/micropython,EcmaXp/micropython,xuxiaoxin/micropython,vriera/micropython,torwag/micropython,supergis/micropython,matthewelse/micropython,PappaPeppar/micropython,vitiral/micropython,mhoffma/micropython,pramasoul/micropython,hosaka/micropython,vriera/micropython,jlillest/micropython,Peetz0r/micropython-esp32,jmarcelino/pycom-micropython,cnoviello/micropython,ceramos/micropython,xuxiaoxin/micropython,ceramos/micropython,MrSurly/micropython-esp32,firstval/micropython,vriera/micropython,neilh10/micropython,toolmacher/micropython,puuu/micropython,utopiaprince/micropython,dinau/micropython,adafruit/circuitpython,jmarcelino/pycom-micropython,skybird6672/micropython,ernesto-g/micropython,xuxiaoxin/micropython,deshipu/micropython,HenrikSolver/micropython,MrSurly/micropython-esp32,praemdonck/micropython,micropython/micropython-esp32,oopy/micropython,cwyark/micropython,dhylands/micropython,skybird6672/micropython,turbinenreiter/micropython,noahchense/micropython,pramasoul/micropython,blazewicz/micropython,ChuckM/micropython,trezor/micropython,torwag/micropython,neilh10/micropython,xyb/micropython,turbinenreiter/micropython,dxxb/micropython,adafruit/circuitpython,noahwilliamsson/micropython,trezor/micropython,noahwilliamsson/micropython,supergis/micropython,jlillest/micropython,Timmenem/micropython,misterdanb/micropython,toolmacher/micropython,MrSurly/micropython-esp32,redbear/micropython,blazewicz/micropython,heisewangluo/micropython,emfcamp/micropython,ryannathans/micropython,vitiral/micropython,danicampora/micropython,ernesto-g/micropython,utopiaprince/micropython,xhat/micropython,matthewelse/micropython,tuc-osg/micropython,galenhz/micropython,ruffy91/micropython,cloudformdesign/micropython,selste/micropython,micropython/micropython-esp32,xuxiaoxin/micropython,xhat/micropython,EcmaXp/micropython,ryannathans/micropython,deshipu/micropython,utopiaprince/micropython,xhat/micropython,mhoffma/micropython,lbattraw/micropython,feilongfl/micropython,micropython/micropython-esp32,MrSurly/micropython,deshipu/micropython,vitiral/micropython,MrSurly/micropython,adafruit/micropython,omtinez/micropython,TDAbboud/micropython,dxxb/micropython,cnoviello/micropython,selste/micropython,mhoffma/micropython,alex-march/micropython,skybird6672/micropython,xyb/micropython,mhoffma/micropython,kostyll/micropython,heisewangluo/micropython,blmorris/micropython,dinau/micropython,dhylands/micropython,praemdonck/micropython,cwyark/micropython,trezor/micropython,Timmenem/micropython,cloudformdesign/micropython,ahotam/micropython,neilh10/micropython,mgyenik/micropython,Timmenem/micropython,neilh10/micropython,ericsnowcurrently/micropython,Timmenem/micropython,dinau/micropython,pramasoul/micropython,stonegithubs/micropython,mpalomer/micropython,galenhz/micropython,ericsnowcurrently/micropython,orionrobots/micropython,SHA2017-badge/micropython-esp32,lowRISC/micropython,lowRISC/micropython,utopiaprince/micropython,mhoffma/micropython,tdautc19841202/micropython,PappaPeppar/micropython,tralamazza/micropython,MrSurly/micropython,ernesto-g/micropython,blmorris/micropython,infinnovation/micropython,stonegithubs/micropython,orionrobots/micropython,adafruit/micropython,vriera/micropython,chrisdearman/micropython,feilongfl/micropython,turbinenreiter/micropython,PappaPeppar/micropython,tdautc19841202/micropython,AriZuu/micropython,bvernoux/micropython,rubencabrera/micropython,feilongfl/micropython,ChuckM/micropython,tdautc19841202/micropython,blazewicz/micropython,pfalcon/micropython,misterdanb/micropython,tobbad/micropython,swegener/micropython,alex-robbins/micropython,Timmenem/micropython,neilh10/micropython,tobbad/micropython,redbear/micropython,torwag/micropython,infinnovation/micropython,mpalomer/micropython,jlillest/micropython,matthewelse/micropython,adafruit/circuitpython,pfalcon/micropython,adafruit/circuitpython,micropython/micropython-esp32,oopy/micropython,torwag/micropython
|
45481b53b756642f2194ceef38d3c14f1f53d6a9
|
src/run_time_error.h
|
src/run_time_error.h
|
#ifndef SETI_EXCEPTION_H
#define SETI_EXCEPTION_H
#include <exception>
#include <string>
#include <boost/format.hpp>
namespace setti {
namespace internal {
/**
* @brief Class to represent an run time error
*
* This class encapsulates run time error, and it is
* used to represent errors as symbol not found,
* command not found and out of range
*/
class RunTimeError : public std::exception {
public:
enum class ErrorCode: uint8_t{
NULL_ACCESS,
SYMBOL_NOT_FOUND,
CMD_NOT_FOUND,
OUT_OF_RANGE,
KEY_NOT_FOUND,
INCOMPATIBLE_TYPE
};
RunTimeError();
RunTimeError(ErrorCode code, const boost::format& msg)
: code_(code), msg_(msg) {}
virtual ~RunTimeError() noexcept = default;
/**
* @return the error description and the context as a text string.
*/
virtual const char* what() const noexcept {
msg_.str().c_str();
}
ErrorCode code_;
const boost::format& msg_;
};
}
}
#endif // SETI_EXCEPTION_H
|
#ifndef SETI_EXCEPTION_H
#define SETI_EXCEPTION_H
#include <exception>
#include <string>
#include <boost/format.hpp>
namespace setti {
namespace internal {
/**
* @brief Class to represent an run time error
*
* This class encapsulates run time error, and it is
* used to represent errors as symbol not found,
* command not found and out of range
*/
class RunTimeError : public std::exception {
public:
enum class ErrorCode: uint8_t{
NULL_ACCESS,
SYMBOL_NOT_FOUND,
CMD_NOT_FOUND,
OUT_OF_RANGE,
KEY_NOT_FOUND,
INCOMPATIBLE_TYPE
};
RunTimeError();
RunTimeError(ErrorCode code, const boost::format& msg)
: code_(code), msg_(boost::str(msg)) {}
virtual ~RunTimeError() noexcept = default;
/**
* @return the error description and the context as a text string.
*/
virtual const char* what() const noexcept {
msg_.c_str();
}
ErrorCode code_;
std::string msg_;
};
}
}
#endif // SETI_EXCEPTION_H
|
Fix run time error message
|
Fix run time error message
|
C
|
apache-2.0
|
alexst07/shell-plus-plus,alexst07/shell-plus-plus,alexst07/setti,alexst07/seti,alexst07/shell-plus-plus
|
d689f7a5313a7fd501c2572c493fe6d91a88cba4
|
src/gpu/effects/GrProxyMove.h
|
src/gpu/effects/GrProxyMove.h
|
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrProxyMove_DEFINED
#define GrProxyMove_DEFINED
// In a few places below we rely on braced initialization order being defined by the C++ spec (left
// to right). We use operator-> on a sk_sp and then in a later argument std::move() the sk_sp. GCC
// 4.9.0 and earlier has a bug where the left to right order evaluation isn't implemented correctly.
#if defined(__GNUC__) && !defined(__clang__)
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# if (GCC_VERSION > 40900)
# define GCC_EVAL_ORDER_BUG 0
# else
# define GCC_EVAL_ORDER_BUG 1
# endif
# undef GCC_VERSION
#else
# define GCC_EVAL_ORDER_BUG 0
#endif
#if GCC_EVAL_ORDER_BUG
# define GR_PROXY_MOVE(X) (X)
#else
# define GR_PROXY_MOVE(X) (std::move(X))
#endif
#undef GCC_EVAL_ORDER_BUG
#endif
|
/*
* Copyright 2013 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrProxyMove_DEFINED
#define GrProxyMove_DEFINED
// In a few places below we rely on braced initialization order being defined by the C++ spec (left
// to right). We use operator-> on a sk_sp and then in a later argument std::move() the sk_sp. GCC
// 4.9.0 and earlier has a bug where the left to right order evaluation isn't implemented correctly.
//
// Clang has the same bug when targeting Windows (http://crbug.com/687259).
// TODO(hans): Remove work-around once Clang is fixed.
#if defined(__GNUC__) && !defined(__clang__)
# define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
# if (GCC_VERSION > 40900)
# define GCC_EVAL_ORDER_BUG 0
# else
# define GCC_EVAL_ORDER_BUG 1
# endif
# undef GCC_VERSION
#elif defined(_MSC_VER) && defined(__clang__)
# define GCC_EVAL_ORDER_BUG 1
#else
# define GCC_EVAL_ORDER_BUG 0
#endif
#if GCC_EVAL_ORDER_BUG
# define GR_PROXY_MOVE(X) (X)
#else
# define GR_PROXY_MOVE(X) (std::move(X))
#endif
#undef GCC_EVAL_ORDER_BUG
#endif
|
Work around Win/Clang eval order bug
|
GR_PROXY_MOVE: Work around Win/Clang eval order bug
BUG=chromium:687259
Change-Id: I145dac240a3c4f89cf1b6bf6ff54ba73cd110ebf
Reviewed-on: https://skia-review.googlesource.com/7831
Reviewed-by: Hans Wennborg <a07172e79c6f961ccb614746feeee38b5e9a6399@google.com>
Reviewed-by: Brian Salomon <61fabaaf0876044aeedfd8e351e485c028d69e7b@google.com>
Commit-Queue: Robert Phillips <95e8ac5504948c7bf91b22c16a8dbb7ae7c66bfd@google.com>
|
C
|
bsd-3-clause
|
HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,google/skia,google/skia,HalCanary/skia-hc,rubenvb/skia,google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,rubenvb/skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia
|
48469ae6496b244da1215b5a0d9941ed1bb6ee71
|
headers/graphics.h
|
headers/graphics.h
|
typedef struct {
long double r;
long double b;
long double g;
long double a;
} cgColor;
unsigned int framebuffer_h;
unsigned int framebuffer_v;
cgColor ** framebuffer;
void init_framebuffer(unsigned int h, unsigned int v);
|
typedef struct {
long double r;
long double g;
long double b;
long double a;
} cgColor;
unsigned int framebuffer_h;
unsigned int framebuffer_v;
cgColor ** framebuffer;
void init_framebuffer(unsigned int h, unsigned int v);
|
Fix mistype in color structure
|
Fix mistype in color structure
|
C
|
mit
|
hleon12/RayTracing-Engine,hleonps/Prisma-RayTracer,hleon12/RayTracing-Engine,hleonps/Prisma-RayTracer
|
b0a445b9ced67a104890053624bcfeb11b804df2
|
TPCocoaGPG/TPGPGOutputChunk.h
|
TPCocoaGPG/TPGPGOutputChunk.h
|
//
// TPGPGOutputChunk.h
// TPCocoaGPG
//
// Created by Thomas Pelletier on 10/23/14.
// Copyright (c) 2014 Thomas Pelletier. See LICENSE.
//
#import <Foundation/Foundation.h>
@interface TPGPGOutputChunk : NSObject {
NSString* _key;
NSString* _text;
}
+ (TPGPGOutputChunk*)makeWithKey:(NSString*)key andText:(NSString*)text;
@property (nonatomic, assign) NSString* key;
@property (nonatomic, assign) NSString* text;
@end
|
//
// TPGPGOutputChunk.h
// TPCocoaGPG
//
// Created by Thomas Pelletier on 10/23/14.
// Copyright (c) 2014 Thomas Pelletier. See LICENSE.
//
#import <Foundation/Foundation.h>
/**
Internal representation of GPG's parsed standard error.
*/
@interface TPGPGOutputChunk : NSObject {
NSString* _key;
NSString* _text;
}
/**
Allocate and initialize a new chunk.
@param key Output key
@param text Associated text
@return The new chunk
*/
+ (TPGPGOutputChunk*)makeWithKey:(NSString*)key andText:(NSString*)text;
@property (nonatomic, assign) NSString* key;
@property (nonatomic, assign) NSString* text;
@end
|
Add some doc for output chunk
|
Add some doc for output chunk
|
C
|
mit
|
pelletier/TPCocoaGPG
|
b85b36e461985e3732e346d850e69f9e28135044
|
include/types.h
|
include/types.h
|
#ifndef TYPES_H
#define TYPES_H
// Explicitly-sized versions of integer types
typedef __signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
// size_t is used for memory object sizes.
typedef uint32_t size_t;
#endif /* TYPES_H */
|
#ifndef TYPES_H
#define TYPES_H
// Explicitly-sized versions of integer types
typedef __signed char int8_t;
typedef unsigned char uint8_t;
typedef short int16_t;
typedef unsigned short uint16_t;
typedef int int32_t;
typedef unsigned int uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
typedef uint8_t bool;
#define true 1;
#define false 0;
// size_t is used for memory object sizes.
typedef uint32_t size_t;
#endif /* TYPES_H */
|
Define bool type together with true/false
|
Define bool type together with true/false
|
C
|
mit
|
dutra/x86_kernel,dutra/x86_kernel
|
faf0b8c401c31419a11cd8bbc640340f2c6d52da
|
lib/Target/X86/X86InstrBuilder.h
|
lib/Target/X86/X86InstrBuilder.h
|
//===-- X86InstrBuilder.h - Functions to aid building x86 insts -*- C++ -*-===//
//
// This file exposes functions that may be used with BuildMI from the
// MachineInstrBuilder.h file to handle X86'isms in a clean way.
//
// The BuildMem function may be used with the BuildMI function to add entire
// memory references in a single, typed, function call. X86 memory references
// can be very complex expressions (described in the README), so wrapping them
// up behind an easier to use interface makes sense. Descriptions of the
// functions are included below.
//
//===----------------------------------------------------------------------===//
#ifndef X86INSTRBUILDER_H
#define X86INSTRBUILDER_H
#include "llvm/CodeGen/MachineInstrBuilder.h"
/// addDirectMem - This function is used to add a direct memory reference to the
/// current instruction. Because memory references are always represented with
/// four values, this adds: Reg, [1, NoReg, 0] to the instruction
///
inline const MachineInstrBuilder &addDirectMem(const MachineInstrBuilder &MIB,
unsigned Reg) {
return MIB.addReg(Reg).addZImm(1).addMReg(0).addSImm(0);
}
#endif
|
//===-- X86InstrBuilder.h - Functions to aid building x86 insts -*- C++ -*-===//
//
// This file exposes functions that may be used with BuildMI from the
// MachineInstrBuilder.h file to handle X86'isms in a clean way.
//
// The BuildMem function may be used with the BuildMI function to add entire
// memory references in a single, typed, function call. X86 memory references
// can be very complex expressions (described in the README), so wrapping them
// up behind an easier to use interface makes sense. Descriptions of the
// functions are included below.
//
//===----------------------------------------------------------------------===//
#ifndef X86INSTRBUILDER_H
#define X86INSTRBUILDER_H
#include "llvm/CodeGen/MachineInstrBuilder.h"
/// addDirectMem - This function is used to add a direct memory reference to the
/// current instruction. Because memory references are always represented with
/// four values, this adds: Reg, [1, NoReg, 0] to the instruction
///
inline const MachineInstrBuilder &addDirectMem(const MachineInstrBuilder &MIB,
unsigned Reg) {
return MIB.addReg(Reg).addZImm(1).addMReg(0).addSImm(0);
}
/// addRegOffset -
///
///
inline const MachineInstrBuilder &addRegOffset(const MachineInstrBuilder &MIB,
unsigned Reg, unsigned Offset) {
return MIB.addReg(Reg).addZImm(1).addMReg(0).addSImm(Offset);
}
#endif
|
Add a simple way to add memory locations of format
|
Add a simple way to add memory locations of format [reg+offset]
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@4825 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap
|
0f3348ab04b96d4798b19afc04323c55204fbebd
|
include/varcache.h
|
include/varcache.h
|
#define VAR_ENCODING_LEN 16
#define VAR_DATESTYLE_LEN 16
#define VAR_TIMEZONE_LEN 36
#define VAR_STDSTR_LEN 4
typedef struct VarCache VarCache;
struct VarCache {
char client_encoding[VAR_ENCODING_LEN];
char datestyle[VAR_DATESTYLE_LEN];
char timezone[VAR_TIMEZONE_LEN];
char std_strings[VAR_STDSTR_LEN];
};
bool varcache_set(VarCache *cache, const char *key, const char *value) /* _MUSTCHECK */;
bool varcache_apply(PgSocket *server, PgSocket *client, bool *changes_p) _MUSTCHECK;
void varcache_fill_unset(VarCache *src, PgSocket *dst);
void varcache_clean(VarCache *cache);
void varcache_add_params(PktBuf *pkt, VarCache *vars);
|
#define VAR_ENCODING_LEN 16
#define VAR_DATESTYLE_LEN 32
#define VAR_TIMEZONE_LEN 36
#define VAR_STDSTR_LEN 4
typedef struct VarCache VarCache;
struct VarCache {
char client_encoding[VAR_ENCODING_LEN];
char datestyle[VAR_DATESTYLE_LEN];
char timezone[VAR_TIMEZONE_LEN];
char std_strings[VAR_STDSTR_LEN];
};
bool varcache_set(VarCache *cache, const char *key, const char *value) /* _MUSTCHECK */;
bool varcache_apply(PgSocket *server, PgSocket *client, bool *changes_p) _MUSTCHECK;
void varcache_fill_unset(VarCache *src, PgSocket *dst);
void varcache_clean(VarCache *cache);
void varcache_add_params(PktBuf *pkt, VarCache *vars);
|
Increase room for DateStyle storage.
|
Increase room for DateStyle storage.
If value is larger than buffer, it stays empty and libpq will drop connection.
|
C
|
isc
|
kvap/pgbouncer,kvap/pgbouncer,wurenny/pgbouncer-x2,dbaxa/pgbouncer,digoal/pgbouncer-x2,jaiminpan/pgbouncer,dbaxa/pgbouncer,wurenny/pgbouncer-x2,kvap/pgbouncer,wurenny/pgbouncer-x2,jaiminpan/pgbouncer,digoal/pgbouncer-x2,digoal/pgbouncer-x2,wurenny/pgbouncer-x2,jaiminpan/pgbouncer,dbaxa/pgbouncer,dbaxa/pgbouncer,jaiminpan/pgbouncer,digoal/pgbouncer-x2,kvap/pgbouncer
|
cea64f7221398e71fcbcc60e0572a7bc7594a1c2
|
main.c
|
main.c
|
#include "tour.h"
#define NCITIES 5
int main() {
tour t = create_tour(NCITIES);
int i;
for (i = 0; i < NCITIES; i++)
{
printf("%d\n", t[i]);
}
printf("Hello!");
return 0;
}
|
#include "tour.h"
#define NCITIES 5
#define STARTPOINT 2
int main() {
tour t = create_tour(NCITIES);
populate_tour(t, NCITIES);
start_point(t, STARTPOINT);
swap_cities(t, 3, 4);
int i;
for (i = 0; i < NCITIES; i++)
{
printf("%d\n", t[i]);
}
printf("Hello!\n");
return 0;
}
|
Test all functions from tour.h.
|
Test all functions from tour.h.
|
C
|
apache-2.0
|
frila/caixeiro
|
0143ac1ab6d2a5e9194ba73a3c61b0514f66ea50
|
tiledb/sm/c_api/tiledb_version.h
|
tiledb/sm/c_api/tiledb_version.h
|
/*
* @file version.h
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017-2020 TileDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#define TILEDB_VERSION_MAJOR 1
#define TILEDB_VERSION_MINOR 7
#define TILEDB_VERSION_PATCH 0
|
/*
* @file version.h
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017-2020 TileDB, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#define TILEDB_VERSION_MAJOR 1
#define TILEDB_VERSION_MINOR 8
#define TILEDB_VERSION_PATCH 0
|
Update tiledb version to 1.8.0 for dev
|
Update tiledb version to 1.8.0 for dev
|
C
|
mit
|
TileDB-Inc/TileDB,TileDB-Inc/TileDB,TileDB-Inc/TileDB,TileDB-Inc/TileDB
|
4d157e3b8762ecb49b191cc33762bb1d7e71a8f3
|
user/robot/umain.c
|
user/robot/umain.c
|
#include <joyos.h>
#include "platform.h"
#include "navigation.h"
extern volatile uint8_t robot_id;
int usetup (void) {
robot_id = 7;
platform_init();
nav_init();
return 0;
}
int umain (void) {
printf("Hello, world!\n");
nav_start();
printf("Nav started, setting coords\n");
moveToPoint(10, 0, 150);
//turnToHeading(45);
printf("Coords set\n");
return 0;
}
|
#include <joyos.h>
#include "platform.h"
#include "navigation.h"
extern volatile uint8_t robot_id;
int usetup(void) {
robot_id = 7;
platform_init();
nav_init();
return 0;
}
int umain(void) {
printf("Hello, world!\n");
nav_start();
printf("Nav started, setting coords\n");
moveToPoint(10, 0, 150);
printf("Coords set\n");
//while (1) {
// copy_objects();
// moveToPoint(objects[2].x, objects[2].y, 200);
// waitForMovementComplete();
//}
return 0;
}
|
Add VPS target seeking code.
|
Add VPS target seeking code.
|
C
|
mit
|
mboyd/6.270,mboyd/6.270
|
906fc80d89f2487c7f3588cf4495ba368f8d3bf4
|
game.h
|
game.h
|
#ifndef GAME_H
#define GAME_H
#include <stdint.h>
#define SPACING 5
#define FONT "cairo:monospace"
#define FONT_SIZE 12
#define TILE_SIZE (FONT_SIZE * 4)
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
#define GRID_SIZE (GRID_WIDTH * GRID_HEIGHT)
#define BOARD_WIDTH (SPACING + TILE_SIZE * GRID_WIDTH + SPACING * (GRID_WIDTH - 1) + SPACING)
#define BOARD_HEIGHT (SPACING + TILE_SIZE * GRID_HEIGHT + SPACING * (GRID_HEIGHT - 1) + SPACING)
#define BOARD_OFFSET_Y SPACING + TILE_SIZE + SPACING
#define SCREEN_WIDTH SPACING + BOARD_WIDTH + SPACING
#define SCREEN_HEIGHT BOARD_OFFSET_Y + BOARD_HEIGHT + SPACING
extern int SCREEN_PITCH;
typedef struct
{
int up;
int down;
int left;
int right;
int start;
} key_state_t;
void game_calculate_pitch(void);
void game_init(uint16_t *frame_buf);
void game_deinit(void);
void game_reset(void);
void game_update(float delta, key_state_t *new_ks);
void game_render(void);
#endif // GAME_H
|
#ifndef GAME_H
#define GAME_H
#include <stdint.h>
#define FONT "cairo:monospace"
#define FONT_SIZE 20
#define SPACING (FONT_SIZE * 0.4)
#define TILE_SIZE (FONT_SIZE * 4)
#define GRID_WIDTH 4
#define GRID_HEIGHT 4
#define GRID_SIZE (GRID_WIDTH * GRID_HEIGHT)
#define BOARD_WIDTH (SPACING + TILE_SIZE * GRID_WIDTH + SPACING * (GRID_WIDTH - 1) + SPACING)
#define BOARD_HEIGHT (SPACING + TILE_SIZE * GRID_HEIGHT + SPACING * (GRID_HEIGHT - 1) + SPACING)
#define BOARD_OFFSET_Y SPACING + TILE_SIZE + SPACING
#define SCREEN_WIDTH SPACING + BOARD_WIDTH + SPACING
#define SCREEN_HEIGHT BOARD_OFFSET_Y + BOARD_HEIGHT + SPACING
extern int SCREEN_PITCH;
typedef struct
{
int up;
int down;
int left;
int right;
int start;
} key_state_t;
void game_calculate_pitch(void);
void game_init(uint16_t *frame_buf);
void game_deinit(void);
void game_reset(void);
void game_update(float delta, key_state_t *new_ks);
void game_render(void);
#endif // GAME_H
|
Make spacing depend on font size
|
Make spacing depend on font size
|
C
|
unlicense
|
libretro/libretro-2048,libretro/libretro-2048,libretro/libretro-2048,libretro/libretro-2048
|
85546d7ec827b7b0ff822cc86644c1b081142e53
|
arch/mips/include/asm/clock.h
|
arch/mips/include/asm/clock.h
|
#ifndef __ASM_MIPS_CLOCK_H
#define __ASM_MIPS_CLOCK_H
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/seq_file.h>
#include <linux/clk.h>
struct clk;
struct clk_ops {
void (*init) (struct clk *clk);
void (*enable) (struct clk *clk);
void (*disable) (struct clk *clk);
void (*recalc) (struct clk *clk);
int (*set_rate) (struct clk *clk, unsigned long rate, int algo_id);
long (*round_rate) (struct clk *clk, unsigned long rate);
};
struct clk {
struct list_head node;
const char *name;
int id;
struct module *owner;
struct clk *parent;
struct clk_ops *ops;
struct kref kref;
unsigned long rate;
unsigned long flags;
};
#define CLK_ALWAYS_ENABLED (1 << 0)
#define CLK_RATE_PROPAGATES (1 << 1)
/* Should be defined by processor-specific code */
void arch_init_clk_ops(struct clk_ops **, int type);
int clk_init(void);
int __clk_enable(struct clk *);
void __clk_disable(struct clk *);
void clk_recalc_rate(struct clk *);
int clk_register(struct clk *);
void clk_unregister(struct clk *);
#endif /* __ASM_MIPS_CLOCK_H */
|
#ifndef __ASM_MIPS_CLOCK_H
#define __ASM_MIPS_CLOCK_H
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/seq_file.h>
#include <linux/clk.h>
struct clk;
struct clk_ops {
void (*init) (struct clk *clk);
void (*enable) (struct clk *clk);
void (*disable) (struct clk *clk);
void (*recalc) (struct clk *clk);
int (*set_rate) (struct clk *clk, unsigned long rate, int algo_id);
long (*round_rate) (struct clk *clk, unsigned long rate);
};
struct clk {
struct list_head node;
const char *name;
int id;
struct module *owner;
struct clk *parent;
struct clk_ops *ops;
struct kref kref;
unsigned long rate;
unsigned long flags;
};
#define CLK_ALWAYS_ENABLED (1 << 0)
#define CLK_RATE_PROPAGATES (1 << 1)
int clk_init(void);
int __clk_enable(struct clk *);
void __clk_disable(struct clk *);
void clk_recalc_rate(struct clk *);
int clk_register(struct clk *);
void clk_unregister(struct clk *);
#endif /* __ASM_MIPS_CLOCK_H */
|
Remove declaration of obsolete arch_init_clk_ops()
|
MIPS: Remove declaration of obsolete arch_init_clk_ops()
Signed-off-by: Maarten ter Huurne <e186a7d2c4e55136cd884424bcfb439491001dc6@treewalker.org>
Cc: Apelete Seketeli <5513108e721878f07bfb2a30cd534488c7df106c@seketeli.net>
Cc: 562397917b9a8bf316569a848858b12fb417723f@linux-mips.org
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7671/
Signed-off-by: Ralf Baechle <92f48d309cda194c8eda36aa8f9ae28c488fa208@linux-mips.org>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
a3c96c925229909535e81c7596e03b66af328a4d
|
pic16bit/qstrdefsport.h
|
pic16bit/qstrdefsport.h
|
// qstrs specific to this port
Q(pyb)
Q(millis)
Q(elapsed_millis)
Q(delay)
Q(LED)
Q(on)
Q(off)
Q(toggle)
Q(Switch)
Q(value)
Q(readall)
Q(readline)
Q(FileIO)
|
// qstrs specific to this port
Q(pyb)
Q(millis)
Q(elapsed_millis)
Q(delay)
Q(LED)
Q(on)
Q(off)
Q(toggle)
Q(Switch)
Q(value)
Q(readall)
Q(readinto)
Q(readline)
Q(readlines)
Q(FileIO)
|
Add readinto and readlines to qstrs.
|
pic16bit: Add readinto and readlines to qstrs.
|
C
|
mit
|
ericsnowcurrently/micropython,pfalcon/micropython,PappaPeppar/micropython,lbattraw/micropython,torwag/micropython,jlillest/micropython,ceramos/micropython,mpalomer/micropython,slzatz/micropython,kostyll/micropython,turbinenreiter/micropython,chrisdearman/micropython,alex-march/micropython,cloudformdesign/micropython,suda/micropython,cwyark/micropython,jlillest/micropython,hiway/micropython,AriZuu/micropython,matthewelse/micropython,puuu/micropython,MrSurly/micropython,kostyll/micropython,stonegithubs/micropython,ceramos/micropython,pozetroninc/micropython,cnoviello/micropython,oopy/micropython,PappaPeppar/micropython,blazewicz/micropython,alex-march/micropython,neilh10/micropython,alex-march/micropython,firstval/micropython,TDAbboud/micropython,dmazzella/micropython,xhat/micropython,deshipu/micropython,dinau/micropython,hosaka/micropython,puuu/micropython,blazewicz/micropython,SHA2017-badge/micropython-esp32,PappaPeppar/micropython,Timmenem/micropython,noahwilliamsson/micropython,cloudformdesign/micropython,dmazzella/micropython,tdautc19841202/micropython,adamkh/micropython,emfcamp/micropython,MrSurly/micropython-esp32,selste/micropython,xhat/micropython,emfcamp/micropython,toolmacher/micropython,heisewangluo/micropython,neilh10/micropython,tuc-osg/micropython,ernesto-g/micropython,drrk/micropython,swegener/micropython,blmorris/micropython,selste/micropython,ahotam/micropython,noahwilliamsson/micropython,deshipu/micropython,lowRISC/micropython,danicampora/micropython,ryannathans/micropython,trezor/micropython,adafruit/micropython,xuxiaoxin/micropython,omtinez/micropython,mianos/micropython,HenrikSolver/micropython,tdautc19841202/micropython,MrSurly/micropython,micropython/micropython-esp32,trezor/micropython,adafruit/circuitpython,cloudformdesign/micropython,xuxiaoxin/micropython,AriZuu/micropython,cwyark/micropython,ganshun666/micropython,praemdonck/micropython,pozetroninc/micropython,dhylands/micropython,EcmaXp/micropython,noahchense/micropython,pozetroninc/micropython,vriera/micropython,ahotam/micropython,pramasoul/micropython,danicampora/micropython,EcmaXp/micropython,ChuckM/micropython,adafruit/circuitpython,cnoviello/micropython,ganshun666/micropython,oopy/micropython,orionrobots/micropython,infinnovation/micropython,pfalcon/micropython,feilongfl/micropython,ahotam/micropython,martinribelotta/micropython,micropython/micropython-esp32,supergis/micropython,mgyenik/micropython,misterdanb/micropython,jmarcelino/pycom-micropython,feilongfl/micropython,dxxb/micropython,kostyll/micropython,ChuckM/micropython,turbinenreiter/micropython,turbinenreiter/micropython,dinau/micropython,ruffy91/micropython,suda/micropython,noahchense/micropython,adamkh/micropython,tdautc19841202/micropython,pramasoul/micropython,ganshun666/micropython,lowRISC/micropython,bvernoux/micropython,AriZuu/micropython,selste/micropython,xuxiaoxin/micropython,tdautc19841202/micropython,skybird6672/micropython,ryannathans/micropython,misterdanb/micropython,ernesto-g/micropython,orionrobots/micropython,TDAbboud/micropython,mhoffma/micropython,misterdanb/micropython,martinribelotta/micropython,swegener/micropython,slzatz/micropython,tobbad/micropython,stonegithubs/micropython,kostyll/micropython,heisewangluo/micropython,dhylands/micropython,chrisdearman/micropython,utopiaprince/micropython,firstval/micropython,noahwilliamsson/micropython,praemdonck/micropython,ruffy91/micropython,HenrikSolver/micropython,Timmenem/micropython,trezor/micropython,Timmenem/micropython,redbear/micropython,orionrobots/micropython,lbattraw/micropython,adamkh/micropython,blazewicz/micropython,mianos/micropython,toolmacher/micropython,skybird6672/micropython,bvernoux/micropython,alex-robbins/micropython,alex-robbins/micropython,praemdonck/micropython,jimkmc/micropython,mpalomer/micropython,xhat/micropython,SHA2017-badge/micropython-esp32,TDAbboud/micropython,rubencabrera/micropython,jimkmc/micropython,noahchense/micropython,tuc-osg/micropython,ganshun666/micropython,xhat/micropython,lowRISC/micropython,micropython/micropython-esp32,blazewicz/micropython,EcmaXp/micropython,omtinez/micropython,redbear/micropython,pramasoul/micropython,mhoffma/micropython,noahchense/micropython,rubencabrera/micropython,ChuckM/micropython,emfcamp/micropython,oopy/micropython,mgyenik/micropython,cwyark/micropython,omtinez/micropython,turbinenreiter/micropython,MrSurly/micropython,xyb/micropython,slzatz/micropython,tralamazza/micropython,micropython/micropython-esp32,drrk/micropython,lbattraw/micropython,puuu/micropython,praemdonck/micropython,torwag/micropython,cnoviello/micropython,bvernoux/micropython,ericsnowcurrently/micropython,firstval/micropython,TDAbboud/micropython,selste/micropython,vitiral/micropython,MrSurly/micropython-esp32,pramasoul/micropython,ChuckM/micropython,ganshun666/micropython,lowRISC/micropython,martinribelotta/micropython,swegener/micropython,tralamazza/micropython,kostyll/micropython,tobbad/micropython,toolmacher/micropython,AriZuu/micropython,jmarcelino/pycom-micropython,neilh10/micropython,blmorris/micropython,ernesto-g/micropython,dxxb/micropython,dinau/micropython,omtinez/micropython,vitiral/micropython,cwyark/micropython,galenhz/micropython,henriknelson/micropython,TDAbboud/micropython,mpalomer/micropython,adafruit/circuitpython,EcmaXp/micropython,jlillest/micropython,jimkmc/micropython,pfalcon/micropython,dmazzella/micropython,firstval/micropython,adafruit/micropython,xyb/micropython,xyb/micropython,swegener/micropython,torwag/micropython,MrSurly/micropython,puuu/micropython,galenhz/micropython,hiway/micropython,danicampora/micropython,dinau/micropython,matthewelse/micropython,jimkmc/micropython,SHA2017-badge/micropython-esp32,misterdanb/micropython,hiway/micropython,dmazzella/micropython,bvernoux/micropython,Peetz0r/micropython-esp32,henriknelson/micropython,vitiral/micropython,pozetroninc/micropython,MrSurly/micropython-esp32,Peetz0r/micropython-esp32,torwag/micropython,MrSurly/micropython-esp32,ceramos/micropython,redbear/micropython,blazewicz/micropython,ahotam/micropython,infinnovation/micropython,utopiaprince/micropython,puuu/micropython,rubencabrera/micropython,adamkh/micropython,mhoffma/micropython,toolmacher/micropython,redbear/micropython,dinau/micropython,pramasoul/micropython,chrisdearman/micropython,mhoffma/micropython,alex-march/micropython,matthewelse/micropython,deshipu/micropython,utopiaprince/micropython,oopy/micropython,hiway/micropython,redbear/micropython,hiway/micropython,lowRISC/micropython,kerneltask/micropython,deshipu/micropython,rubencabrera/micropython,dhylands/micropython,ruffy91/micropython,henriknelson/micropython,ceramos/micropython,ernesto-g/micropython,blmorris/micropython,tobbad/micropython,SHA2017-badge/micropython-esp32,neilh10/micropython,noahwilliamsson/micropython,utopiaprince/micropython,infinnovation/micropython,jlillest/micropython,cloudformdesign/micropython,jlillest/micropython,dxxb/micropython,dhylands/micropython,slzatz/micropython,mianos/micropython,drrk/micropython,suda/micropython,blmorris/micropython,mpalomer/micropython,martinribelotta/micropython,hosaka/micropython,neilh10/micropython,adafruit/micropython,HenrikSolver/micropython,galenhz/micropython,lbattraw/micropython,pfalcon/micropython,Peetz0r/micropython-esp32,jmarcelino/pycom-micropython,misterdanb/micropython,trezor/micropython,ahotam/micropython,vitiral/micropython,slzatz/micropython,tobbad/micropython,SHA2017-badge/micropython-esp32,ericsnowcurrently/micropython,orionrobots/micropython,galenhz/micropython,selste/micropython,kerneltask/micropython,adafruit/micropython,pozetroninc/micropython,hosaka/micropython,turbinenreiter/micropython,alex-robbins/micropython,PappaPeppar/micropython,Timmenem/micropython,jmarcelino/pycom-micropython,swegener/micropython,firstval/micropython,supergis/micropython,omtinez/micropython,danicampora/micropython,skybird6672/micropython,EcmaXp/micropython,mianos/micropython,ceramos/micropython,alex-robbins/micropython,supergis/micropython,feilongfl/micropython,adafruit/circuitpython,tralamazza/micropython,ericsnowcurrently/micropython,cnoviello/micropython,cnoviello/micropython,matthewelse/micropython,vriera/micropython,cloudformdesign/micropython,MrSurly/micropython,AriZuu/micropython,Peetz0r/micropython-esp32,torwag/micropython,skybird6672/micropython,vriera/micropython,orionrobots/micropython,tobbad/micropython,chrisdearman/micropython,praemdonck/micropython,MrSurly/micropython-esp32,lbattraw/micropython,bvernoux/micropython,pfalcon/micropython,mianos/micropython,drrk/micropython,chrisdearman/micropython,ericsnowcurrently/micropython,noahwilliamsson/micropython,alex-march/micropython,tuc-osg/micropython,infinnovation/micropython,feilongfl/micropython,heisewangluo/micropython,HenrikSolver/micropython,mgyenik/micropython,jmarcelino/pycom-micropython,tdautc19841202/micropython,mhoffma/micropython,stonegithubs/micropython,suda/micropython,ruffy91/micropython,PappaPeppar/micropython,tuc-osg/micropython,xhat/micropython,mgyenik/micropython,trezor/micropython,feilongfl/micropython,xyb/micropython,ryannathans/micropython,xuxiaoxin/micropython,heisewangluo/micropython,kerneltask/micropython,xuxiaoxin/micropython,mgyenik/micropython,noahchense/micropython,jimkmc/micropython,adafruit/micropython,hosaka/micropython,xyb/micropython,emfcamp/micropython,ChuckM/micropython,Peetz0r/micropython-esp32,skybird6672/micropython,mpalomer/micropython,matthewelse/micropython,oopy/micropython,alex-robbins/micropython,kerneltask/micropython,ruffy91/micropython,HenrikSolver/micropython,blmorris/micropython,supergis/micropython,toolmacher/micropython,matthewelse/micropython,adamkh/micropython,vitiral/micropython,adafruit/circuitpython,emfcamp/micropython,micropython/micropython-esp32,galenhz/micropython,infinnovation/micropython,stonegithubs/micropython,dxxb/micropython,vriera/micropython,drrk/micropython,dxxb/micropython,adafruit/circuitpython,tralamazza/micropython,ernesto-g/micropython,hosaka/micropython,dhylands/micropython,ryannathans/micropython,henriknelson/micropython,danicampora/micropython,henriknelson/micropython,deshipu/micropython,martinribelotta/micropython,vriera/micropython,ryannathans/micropython,cwyark/micropython,supergis/micropython,stonegithubs/micropython,tuc-osg/micropython,kerneltask/micropython,suda/micropython,heisewangluo/micropython,utopiaprince/micropython,rubencabrera/micropython,Timmenem/micropython
|
e647bbbc7692766c7c0226335f46a3f1ecd25ea4
|
tensorflow/lite/ios/TensorFlowLiteC.h
|
tensorflow/lite/ios/TensorFlowLiteC.h
|
/* Copyright 2022 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 agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_IOS_TENSORFLOWLITEC_H_
#define TENSORFLOW_LITE_IOS_TENSORFLOWLITEC_H_
#include "tensorflow/lite/builtin_ops.h"
#include "tensorflow/lite/c/c_api.h"
#include "tensorflow/lite/c/c_api_experimental.h"
#include "tensorflow/lite/c/c_api_types.h"
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/delegates/xnnpack/xnnpack_delegate.h"
#endif // TENSORFLOW_LITE_IOS_TENSORFLOWLITEC_H_
|
/* Copyright 2022 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 agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_IOS_TENSORFLOWLITEC_H_
#define TENSORFLOW_LITE_IOS_TENSORFLOWLITEC_H_
#include "tensorflow/lite/builtin_ops.h"
#include "tensorflow/lite/c/c_api.h"
#include "tensorflow/lite/c/c_api_experimental.h"
#include "tensorflow/lite/c/c_api_types.h"
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/core/c/c_api.h"
#include "tensorflow/lite/delegates/xnnpack/xnnpack_delegate.h"
#endif // TENSORFLOW_LITE_IOS_TENSORFLOWLITEC_H_
|
Fix iOS nightly release breakage.
|
Fix iOS nightly release breakage.
Error: c_api_experimental.h: unknown type name 'TfLiteInterpreter', 'TfLiteModel', 'TfLiteInterpreterOptions' ...
PiperOrigin-RevId: 477562262
|
C
|
apache-2.0
|
paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,karllessard/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,karllessard/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow
|
e2496a13ddc1c1c422098fbe0ef0f636767da6e2
|
polygonOptimizer.h
|
polygonOptimizer.h
|
#ifndef POLYGON_OPTIMIZER_H
#define POLYGON_OPTIMIZER_H
void optimizePolygon(ClipperLib::Polygon& poly)
{
Point p0 = poly[poly.size()-1];
for(unsigned int i=0;i<poly.size();i++)
{
Point p1 = poly[i];
if (shorterThen(p0 - p1, 10))
{
poly.erase(poly.begin() + i);
i --;
}else{
p0 = p1;
}
}
}
void optimizePolygons(Polygons& polys)
{
for(unsigned int n=0;n<polys.size();n++)
{
optimizePolygon(polys[n]);
}
}
#endif//POLYGON_OPTIMIZER_H
|
#ifndef POLYGON_OPTIMIZER_H
#define POLYGON_OPTIMIZER_H
void optimizePolygon(ClipperLib::Polygon& poly)
{
Point p0 = poly[poly.size()-1];
for(unsigned int i=0;i<poly.size();i++)
{
Point p1 = poly[i];
if (shorterThen(p0 - p1, 10))
{
poly.erase(poly.begin() + i);
i --;
}else{
p0 = p1;
}
}
}
void optimizePolygons(Polygons& polys)
{
for(unsigned int n=0;n<polys.size();n++)
{
optimizePolygon(polys[n]);
if (polys[n].size() < 3)
{
polys.erase(polys.begin() + n);
n--;
}
}
}
#endif//POLYGON_OPTIMIZER_H
|
Remove empty polygons after optimizing.
|
Remove empty polygons after optimizing.
|
C
|
agpl-3.0
|
patrick3coffee/CuraTinyG,pratikshashroff/pcura,mspark93/CuraEngine,jacobdai/CuraEngine-1,ROBO3D/CuraEngine,foosel/CuraEngine,totalretribution/CuraEngine,electrocbd/CuraEngine,totalretribution/CuraEngine,uus169/CuraEngine,Jwis921/PersonalCuraEngine,uus169/CuraEngine,robotustra/curax,foosel/CuraEngine,markwal/CuraEngine,fxtentacle/CuraEngine,fxtentacle/CuraEngine,alex1818/CuraEngine,derekhe/CuraEngine,phonyphonecall/CuraEngine,electrocbd/CuraEngine,alephobjects/CuraEngine,daid/CuraCutEngine,derekhe/CuraEngine,totalretribution/CuraEngine,be3d/CuraEngine,alephobjects/CuraEngine,Ultimaker/CuraEngine,electrocbd/CuraEngine,ROBO3D/CuraEngine,pratikshashroff/pcura,jacobdai/CuraEngine-1,Intrinsically-Sublime/CuraEngine,robotustra/curax,jacobdai/CuraEngine-1,be3d/CuraEngine,patrick3coffee/CuraTinyG,phonyphonecall/CuraEngine,markwal/CuraEngine,robotustra/curax,Skeen/CuraJS-Engine,uus169/CuraEngine,ROBO3D/CuraEngine,Intrinsically-Sublime/CuraEngine,markwal/CuraEngine,alex1818/CuraEngine,phonyphonecall/CuraEngine,mspark93/CuraEngine,patrick3coffee/CuraTinyG,Skeen/CuraJS-Engine,alex1818/CuraEngine,Ultimaker/CuraEngine,fxtentacle/CuraEngine,derekhe/CuraEngine,Intrinsically-Sublime/CuraEngine,daid/CuraCutEngine,Jwis921/PersonalCuraEngine,foosel/CuraEngine,Skeen/CuraJS-Engine,pratikshashroff/pcura,mspark93/CuraEngine,Jwis921/PersonalCuraEngine,be3d/CuraEngine,alephobjects/CuraEngine
|
3cf557a7440a77e72b4b43689a9a5071c2080aa1
|
atomic.h
|
atomic.h
|
#ifndef ATOMIC_H
#define ATOMIC_H
#include "fibrili.h"
#define atomic_fence() fibrili_fence()
#define atomic_lock(lock) fibrili_lock(lock)
#define atomic_unlock(lock) fibrili_unlock(lock)
#endif /* end of include guard: ATOMIC_H */
|
#ifndef ATOMIC_H
#define ATOMIC_H
#include "fibrili.h"
#define atomic_fence() fibrili_fence()
#define atomic_lock(lock) fibrili_lock(lock)
#define atomic_unlock(lock) fibrili_unlock(lock)
#define atomic_load(val) __atomic_load_n(&(val), __ATOMIC_ACQUIRE)
#define atomic_fadd(val, n) __atomic_fetch_add(&(val), n, __ATOMIC_ACQ_REL)
static inline void atomic_barrier(int nprocs)
{
static volatile int _count;
static volatile int _sense;
static volatile __thread int _local_sense;
int sense = !_local_sense;
if (atomic_fadd(_count, 1) == nprocs - 1) {
_count = 0;
_sense = sense;
}
while (_sense != sense);
_local_sense = sense;
atomic_fence();
}
#endif /* end of include guard: ATOMIC_H */
|
Add barrier, fadd, and load.
|
Add barrier, fadd, and load.
|
C
|
mit
|
chaoran/fibril,chaoran/fibril,chaoran/fibril
|
a7aae9bd5cbe82218bc61cdd00860272732e3dec
|
Classes/CoreFactoryGentleman/CoreFactoryGentleman.h
|
Classes/CoreFactoryGentleman/CoreFactoryGentleman.h
|
#import <CoreData/CoreData.h>
#import <FactoryGentleman/FactoryGentleman.h>
#import "CFGFactoryDefiner.h"
#import "CFGObjectBuilder.h"
|
#import <CoreData/CoreData.h>
#import <FactoryGentleman/FactoryGentleman.h>
#import "CFGCoreFactoryGentleman.h"
#import "CFGFactoryDefiner.h"
#import "CFGObjectBuilder.h"
|
Add functionality to bootstrap header
|
Add functionality to bootstrap header
|
C
|
mit
|
FactoryGentleman/CoreFactoryGentleman,soundcloud/CoreFactoryGentleman
|
b6155d3162f6da3dc8f0f1a5daa8decc73904763
|
libc/sysdeps/linux/or32/bits/kernel_types.h
|
libc/sysdeps/linux/or32/bits/kernel_types.h
|
/* taken from linux/include/asm-or32/posix_types.h */
/*
* Using the same guard as posix_types.h from linux headers
* enssures the uclibc (this) version is beeing used.
*/
#if ! defined _OR32_POSIX_TYPES_H
#define _OR32_POSIX_TYPES_H
/*
* This file is generally used by user-level software, so you need to
* be a little careful about namespace pollution etc. Also, we cannot
* assume GCC is being used.
*/
typedef unsigned int __kernel_ino_t;
typedef unsigned int __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef long __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
typedef unsigned int __kernel_old_uid_t;
typedef unsigned int __kernel_old_gid_t;
typedef unsigned int __kernel_old_dev_t;
/* this is workaround for uclibc */
typedef unsigned int __kernel_dev_t;
#ifdef __GNUC__
typedef long long __kernel_loff_t;
#endif
typedef struct {
int val[2];
} __kernel_fsid_t;
#endif /* _OR32_POSIX_TYPES_H */
|
#include <asm/posix_types.h>
|
Use generic posix_types from Linux kernel
|
Use generic posix_types from Linux kernel
The kernel headers asm/posix_types.h and asm-generic/posix_types.h are
made to be included directly into libc, and doing so saves us the effort
of having to keep these files in sync.
|
C
|
lgpl-2.1
|
skristiansson/uClibc-or1k,skristiansson/uClibc-or1k,skristiansson/uClibc-or1k,skristiansson/uClibc-or1k
|
42afa0c5d2e3cfac5535d218027c05eb742b1383
|
csrc/woff2/port.h
|
csrc/woff2/port.h
|
// Copyright 2013 Google Inc. 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 agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Helper function for bit twiddling
#ifndef WOFF2_PORT_H_
#define WOFF2_PORT_H_
namespace woff2 {
typedef unsigned int uint32;
inline int Log2Floor(uint32 n) {
#if defined(__GNUC__)
return n == 0 ? -1 : 31 ^ __builtin_clz(n);
#else
if (n == 0)
return -1;
int log = 0;
uint32 value = n;
for (int i = 4; i >= 0; --i) {
int shift = (1 << i);
uint32 x = value >> shift;
if (x != 0) {
value = x;
log += shift;
}
}
assert(value == 1);
return log;
#endif
}
} // namespace woff2
#endif // WOFF2_PORT_H_
|
// Copyright 2013 Google Inc. 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 agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Helper function for bit twiddling
#ifndef WOFF2_PORT_H_
#define WOFF2_PORT_H_
#include <assert.h>
namespace woff2 {
typedef unsigned int uint32;
inline int Log2Floor(uint32 n) {
#if defined(__GNUC__)
return n == 0 ? -1 : 31 ^ __builtin_clz(n);
#else
if (n == 0)
return -1;
int log = 0;
uint32 value = n;
for (int i = 4; i >= 0; --i) {
int shift = (1 << i);
uint32 x = value >> shift;
if (x != 0) {
value = x;
log += shift;
}
}
assert(value == 1);
return log;
#endif
}
} // namespace woff2
#endif // WOFF2_PORT_H_
|
Include assert.h explicitly to fix windows build
|
Include assert.h explicitly to fix windows build
Fixes the error: C3861: 'assert': identifier not found
|
C
|
mit
|
nfroidure/ttf2woff2,nfroidure/ttf2woff2,nfroidure/ttf2woff2,nfroidure/ttf2woff2
|
32dc512baba57ac6c23de8f6bac7112e34ef0590
|
runtime/include/comm/chpl-comm-task-decls.h
|
runtime/include/comm/chpl-comm-task-decls.h
|
// This is the last-resort version of this file. It will be used only
// if the comm layer implementation does not supply one.
#ifndef _chpl_comm_task_decls_h
#define _chpl_comm_task_decls_h
// Define the type of a n.b. communications handle.
typedef void* chpl_comm_nb_handle_t;
typedef struct {
} chpl_comm_taskPrvData_t;
#undef HAS_CHPL_CACHE_FNS
#endif
|
// This is the last-resort version of this file. It will be used only
// if the comm layer implementation does not supply one.
#ifndef _chpl_comm_task_decls_h
#define _chpl_comm_task_decls_h
// Define the type of a n.b. communications handle.
typedef void* chpl_comm_nb_handle_t;
typedef struct {
int dummy; // structs must be nonempty
} chpl_comm_taskPrvData_t;
#undef HAS_CHPL_CACHE_FNS
#endif
|
Make an empty struct nonempty.
|
Make an empty struct nonempty.
In r23405 we added a component of the task private data to hold comm
layer information. This is chpl_comm_taskPrvData_t, a struct typt. For
comm=none we don't need any comm layer info, so we made the struct type
empty. Unfortunately empty struct types aren't legal C (c99 standard,
6.2.5 (20)). The gcc compiler lets this pass, but the PGI and Cray
compilers bark at it. To fix this, add a dummy element to the struct
for the comm=none case. (I tried making it a 0-length array, but the
PGI compiler barked at that, too.)
git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@23411 3a8e244f-b0f2-452b-bcba-4c88e055c3ca
|
C
|
apache-2.0
|
sungeunchoi/chapel,CoryMcCartan/chapel,hildeth/chapel,hildeth/chapel,CoryMcCartan/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,hildeth/chapel,hildeth/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,chizarlicious/chapel,hildeth/chapel,chizarlicious/chapel,CoryMcCartan/chapel,chizarlicious/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,sungeunchoi/chapel,CoryMcCartan/chapel,sungeunchoi/chapel,chizarlicious/chapel,chizarlicious/chapel,chizarlicious/chapel,sungeunchoi/chapel,hildeth/chapel,CoryMcCartan/chapel,sungeunchoi/chapel
|
c804b5c55d42fcdc645dd81014d6bef253bd9f39
|
iobuf/iobuf_init.c
|
iobuf/iobuf_init.c
|
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include "iobuf.h"
unsigned iobuf_bufsize = 8192;
int iobuf_init(iobuf* io, int fd, unsigned bufsize, char* buffer, unsigned flags)
{
memset(io, 0, sizeof *io);
if (!bufsize) bufsize = iobuf_bufsize;
if (!buffer) {
if ((buffer = mmap(0, bufsize, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, 0, 0)) != 0)
flags |= IOBUF_NEEDSMUNMAP;
else {
if ((buffer = malloc(bufsize)) == 0) return 0;
flags |= IOBUF_NEEDSFREE;
}
}
io->fd = fd;
io->buffer = buffer;
io->bufsize = bufsize;
io->flags = flags;
return 1;
}
|
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include "iobuf.h"
unsigned iobuf_bufsize = 8192;
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
#endif
int iobuf_init(iobuf* io, int fd, unsigned bufsize, char* buffer, unsigned flags)
{
memset(io, 0, sizeof *io);
if (!bufsize) bufsize = iobuf_bufsize;
if (!buffer) {
if ((buffer = mmap(0, bufsize, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, 0, 0)) != 0)
flags |= IOBUF_NEEDSMUNMAP;
else {
if ((buffer = malloc(bufsize)) == 0) return 0;
flags |= IOBUF_NEEDSFREE;
}
}
io->fd = fd;
io->buffer = buffer;
io->bufsize = bufsize;
io->flags = flags;
return 1;
}
|
Use MAP_ANON if MAP_ANONYMOUS is not defined.
|
Use MAP_ANON if MAP_ANONYMOUS is not defined.
|
C
|
lgpl-2.1
|
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
|
f4189d1b617bffab365be9fa433a67852382d5e5
|
examples/sensors/ds18b20/bsp430_config.h
|
examples/sensors/ds18b20/bsp430_config.h
|
/* Use a crystal if one is installed. Much more accurate timing
* results. */
#define BSP430_PLATFORM_BOOT_CONFIGURE_LFXT1 1
/* Application does output: support spin-for-jumper */
#ifndef configBSP430_PLATFORM_SPIN_FOR_JUMPER
#define configBSP430_PLATFORM_SPIN_FOR_JUMPER 1
#endif /* configBSP430_PLATFORM_SPIN_FOR_JUMPER */
#define configBSP430_CONSOLE 1
#define configBSP430_UPTIME 1
/* Specify placement on P1.7 */
#define APP_DS18B20_PORT_HAL BSP430_HAL_PORT1
#define APP_DS18B20_BIT BIT7
/* Request the corresponding HAL */
#define configBSP430_HAL_PORT1 1
/* Get platform defaults */
#include <bsp430/platform/bsp430_config.h>
|
/* Use a crystal if one is installed. Much more accurate timing
* results. */
#define BSP430_PLATFORM_BOOT_CONFIGURE_LFXT1 1
/* Application does output: support spin-for-jumper */
#ifndef configBSP430_PLATFORM_SPIN_FOR_JUMPER
#define configBSP430_PLATFORM_SPIN_FOR_JUMPER 1
#endif /* configBSP430_PLATFORM_SPIN_FOR_JUMPER */
#define configBSP430_CONSOLE 1
#define configBSP430_UPTIME 1
#if BSP430_PLATFORM_SURF - 0
/* SuRF has a DS1825 on P3.7, but the software is the same */
#define APP_DS18B20_PORT_HAL BSP430_HAL_PORT3
#define APP_DS18B20_BIT BIT7
#define configBSP430_HAL_PORT3 1
#else /* BSP430_PLATFORM_SURF */
/* External hookup DS18B20 to on P1.7 */
#define APP_DS18B20_PORT_HAL BSP430_HAL_PORT1
#define APP_DS18B20_BIT BIT7
/* Request the corresponding HAL */
#define configBSP430_HAL_PORT1 1
#endif /* BSP430_PLATFORM_SURF */
/* Get platform defaults */
#include <bsp430/platform/bsp430_config.h>
|
Support SuRF on-board DS1825 in ds18b20 demo
|
Support SuRF on-board DS1825 in ds18b20 demo
|
C
|
bsd-3-clause
|
pabigot/bsp430,pabigot/bsp430,pabigot/bsp430,pabigot/bsp430
|
014e6504992271d144324e1fe8600c18ba84ebe7
|
nrf5/boards/pca10001/nrf51_hal_conf.h
|
nrf5/boards/pca10001/nrf51_hal_conf.h
|
#ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
|
#ifndef NRF51_HAL_CONF_H__
#define NRF51_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
// #define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#endif // NRF51_HAL_CONF_H__
|
Disable SPI hal from pca10001 board.
|
nrf5/boards: Disable SPI hal from pca10001 board.
|
C
|
mit
|
adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,tralamazza/micropython,adafruit/micropython,adafruit/circuitpython,tralamazza/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,tralamazza/micropython,adafruit/micropython,tralamazza/micropython
|
92ef198213e7e5881877be5d79516046cc1e59b5
|
example1/Example1.h
|
example1/Example1.h
|
/*
* Copyright (C) Sometrik oy 2015
*
*/
#include <FWContextBase.h>
#include <AndroidPlatform.h>
class Example1 : public FWContextBase {
public:
Example1(AndroidPlatform * _platform) : FWContextBase(_platform), platform(_platform) { }
bool Init();
void onDraw();
void onShutdown();
private:
AndroidPlatform * platform;
};
|
/*
* Copyright (C) Sometrik oy 2015
*
*/
#include <FWContextBase.h>
#include <FWPlatformBase.h>
class Example1 : public FWContextBase {
public:
Example1(FWPlatformBase * _platform) : FWContextBase(_platform), platform(_platform) { }
bool Init();
void onDraw();
void onShutdown();
private:
FWPlatformBase * platform;
};
|
Change AndroidPlatform variables to FWPlatformBase, switch include
|
Change AndroidPlatform variables to FWPlatformBase, switch include
|
C
|
mit
|
Sometrik/framework,Sometrik/framework,Sometrik/framework
|
b3e4a879a534add27e8435b11628d4d79d706434
|
libc/sysdeps/linux/m68k/ptrace.c
|
libc/sysdeps/linux/m68k/ptrace.c
|
#include <errno.h>
#include <asm/ptrace.h>
#include <sys/syscall.h>
int
ptrace(int request, int pid, int addr, int data)
{
long ret;
long res;
if (request > 0 && request < 4) (long *)data = &ret;
__asm__ volatile ("movel %1,%/d0\n\t"
"movel %2,%/d1\n\t"
"movel %3,%/d2\n\t"
"movel %4,%/d3\n\t"
"movel %5,%/d4\n\t"
"trap #0\n\t"
"movel %/d0,%0"
:"=g" (res)
:"i" (__NR_ptrace), "g" (request), "g" (pid),
"g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4");
if (res >= 0) {
if (request > 0 && request < 4) {
__set_errno(0);
return (ret);
}
return (int) res;
}
__set_errno(-res);
return -1;
}
|
#include <errno.h>
#include <asm/ptrace.h>
#include <sys/syscall.h>
int
ptrace(int request, int pid, int addr, int data)
{
long ret;
long res;
if (request > 0 && request < 4) data = (int)&ret;
__asm__ volatile ("movel %1,%/d0\n\t"
"movel %2,%/d1\n\t"
"movel %3,%/d2\n\t"
"movel %4,%/d3\n\t"
"movel %5,%/d4\n\t"
"trap #0\n\t"
"movel %/d0,%0"
:"=g" (res)
:"i" (__NR_ptrace), "g" (request), "g" (pid),
"g" (addr), "g" (data) : "%d0", "%d1", "%d2", "%d3", "%d4");
if (res >= 0) {
if (request > 0 && request < 4) {
__set_errno(0);
return (ret);
}
return (int) res;
}
__set_errno(-res);
return -1;
}
|
Patch from Bernardo Innocenti: Remove use of cast-as-l-value extension, removed in GCC 3.5.
|
Patch from Bernardo Innocenti:
Remove use of cast-as-l-value extension, removed in GCC 3.5.
|
C
|
lgpl-2.1
|
kraj/uClibc,ysat0/uClibc,majek/uclibc-vx32,atgreen/uClibc-moxie,ffainelli/uClibc,skristiansson/uClibc-or1k,ddcc/klee-uclibc-0.9.33.2,groundwater/uClibc,skristiansson/uClibc-or1k,wbx-github/uclibc-ng,ChickenRunjyd/klee-uclibc,hjl-tools/uClibc,OpenInkpot-archive/iplinux-uclibc,ysat0/uClibc,czankel/xtensa-uclibc,kraj/uClibc,ChickenRunjyd/klee-uclibc,brgl/uclibc-ng,klee/klee-uclibc,hjl-tools/uClibc,hwoarang/uClibc,wbx-github/uclibc-ng,czankel/xtensa-uclibc,ChickenRunjyd/klee-uclibc,skristiansson/uClibc-or1k,ndmsystems/uClibc,foss-xtensa/uClibc,foss-xtensa/uClibc,hjl-tools/uClibc,brgl/uclibc-ng,waweber/uclibc-clang,hwoarang/uClibc,foss-xtensa/uClibc,groundwater/uClibc,ndmsystems/uClibc,hjl-tools/uClibc,ysat0/uClibc,hwoarang/uClibc,hwoarang/uClibc,brgl/uclibc-ng,gittup/uClibc,kraj/uclibc-ng,OpenInkpot-archive/iplinux-uclibc,ndmsystems/uClibc,majek/uclibc-vx32,OpenInkpot-archive/iplinux-uclibc,mephi42/uClibc,ffainelli/uClibc,ndmsystems/uClibc,waweber/uclibc-clang,wbx-github/uclibc-ng,wbx-github/uclibc-ng,klee/klee-uclibc,gittup/uClibc,ddcc/klee-uclibc-0.9.33.2,OpenInkpot-archive/iplinux-uclibc,kraj/uclibc-ng,foss-for-synopsys-dwc-arc-processors/uClibc,klee/klee-uclibc,czankel/xtensa-uclibc,foss-for-synopsys-dwc-arc-processors/uClibc,m-labs/uclibc-lm32,gittup/uClibc,skristiansson/uClibc-or1k,groundwater/uClibc,kraj/uClibc,m-labs/uclibc-lm32,kraj/uClibc,groundwater/uClibc,groundwater/uClibc,kraj/uclibc-ng,mephi42/uClibc,klee/klee-uclibc,atgreen/uClibc-moxie,brgl/uclibc-ng,mephi42/uClibc,waweber/uclibc-clang,ysat0/uClibc,foss-xtensa/uClibc,ffainelli/uClibc,kraj/uclibc-ng,atgreen/uClibc-moxie,ddcc/klee-uclibc-0.9.33.2,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,waweber/uclibc-clang,czankel/xtensa-uclibc,m-labs/uclibc-lm32,ChickenRunjyd/klee-uclibc,majek/uclibc-vx32,foss-for-synopsys-dwc-arc-processors/uClibc,ffainelli/uClibc,hjl-tools/uClibc,atgreen/uClibc-moxie,gittup/uClibc,majek/uclibc-vx32,m-labs/uclibc-lm32,ddcc/klee-uclibc-0.9.33.2,mephi42/uClibc
|
91bbb7ce560f5915715b750baa858501f505d988
|
cmd/smyrna/gui/topviewsettings.c
|
cmd/smyrna/gui/topviewsettings.c
|
#include "topviewsettings.h"
#include "gui.h"
void on_settingsOKBtn_clicked (GtkWidget *widget,gpointer user_data)
{
}
void on_settingsCancelBtn_clicked (GtkWidget *widget,gpointer user_data)
{
}
int load_settings_from_graph(Agraph_t *g)
{
return 1;
}
int update_graph_from_settings(Agraph_t *g)
{
return 1;
}
int show_settings_form()
{
gtk_widget_hide(glade_xml_get_widget(xml, "dlgSettings"));
gtk_widget_show(glade_xml_get_widget(xml, "dlgSettings"));
gtk_window_set_keep_above ((GtkWindow*)glade_xml_get_widget(xml, "dlgSettings"),1);
}
|
/* vim:set shiftwidth=4 ts=8: */
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
* *
* Copyright (c) 1994-2004 AT&T Corp. *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Corp. *
* *
* Information and Software Systems Research *
* AT&T Research, Florham Park NJ *
**********************************************************/
#include "topviewsettings.h"
#include "gui.h"
void on_settingsOKBtn_clicked(GtkWidget * widget, gpointer user_data)
{
}
void on_settingsCancelBtn_clicked(GtkWidget * widget, gpointer user_data)
{
}
int load_settings_from_graph(Agraph_t * g)
{
return 1;
}
int update_graph_from_settings(Agraph_t * g)
{
return 1;
}
int show_settings_form()
{
gtk_widget_hide(glade_xml_get_widget(xml, "dlgSettings"));
gtk_widget_show(glade_xml_get_widget(xml, "dlgSettings"));
gtk_window_set_keep_above((GtkWindow *)
glade_xml_get_widget(xml, "dlgSettings"), 1);
}
|
Clean up smyrna files: remove unnecessary globals modify libraries not to rely on code in cmd/smyrna remove static declarations from .h files remove unnecessary libraries mark unused code and clean up warnings
|
Clean up smyrna files:
remove unnecessary globals
modify libraries not to rely on code in cmd/smyrna
remove static declarations from .h files
remove unnecessary libraries
mark unused code and clean up warnings
|
C
|
epl-1.0
|
tkelman/graphviz,jho1965us/graphviz,pixelglow/graphviz,BMJHayward/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,BMJHayward/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,ellson/graphviz,jho1965us/graphviz,kbrock/graphviz,tkelman/graphviz,BMJHayward/graphviz,MjAbuz/graphviz,pixelglow/graphviz,tkelman/graphviz,jho1965us/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,pixelglow/graphviz,jho1965us/graphviz,BMJHayward/graphviz,tkelman/graphviz,ellson/graphviz,jho1965us/graphviz,jho1965us/graphviz,ellson/graphviz,jho1965us/graphviz,pixelglow/graphviz,kbrock/graphviz,ellson/graphviz,jho1965us/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,pixelglow/graphviz,kbrock/graphviz,kbrock/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,ellson/graphviz,pixelglow/graphviz,ellson/graphviz,jho1965us/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,pixelglow/graphviz,pixelglow/graphviz,ellson/graphviz,tkelman/graphviz,kbrock/graphviz,BMJHayward/graphviz,kbrock/graphviz,BMJHayward/graphviz,tkelman/graphviz,MjAbuz/graphviz,MjAbuz/graphviz,ellson/graphviz,kbrock/graphviz,MjAbuz/graphviz,tkelman/graphviz,tkelman/graphviz,MjAbuz/graphviz,tkelman/graphviz,kbrock/graphviz,MjAbuz/graphviz,BMJHayward/graphviz,tkelman/graphviz,pixelglow/graphviz,BMJHayward/graphviz
|
c1a36603d5e603828cdae9068987cc58e625fc3b
|
arduino/OpenROV/Settings.h
|
arduino/OpenROV/Settings.h
|
#ifndef __SETTINGS_H_
#define __SETTINGS_H_
#include <Arduino.h>
#include "Device.h"
// This section is for devices and their configuration
//Kit:
#define HAS_STD_LIGHTS (1)
#define LIGHTS_PIN 5
#define HAS_STD_CAPE (1)
#define HAS_STD_2X1_THRUSTERS (1)
#define HAS_STD_PILOT (1)
#define HAS_STD_CAMERAMOUNT (1)
#define CAMERAMOUNT_PIN 3
#define CAPE_VOLTAGE_PIN 0
#define CAPE_CURRENT_PIN 3
//After Market:
#define HAS_STD_CALIBRATIONLASERS (0)
#define CALIBRATIONLASERS_PIN 6
#define HAS_POLOLU_MINIMUV (1)
#define HAS_MS5803_14BA (0)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define MIDPOINT 1500
#define LOGGING (1)
class Settings : public Device {
public:
static int smoothingIncriment; //How aggressive the throttle changes
static int deadZone_min;
static int deadZone_max;
static int capability_bitarray;
Settings():Device(){};
void device_setup();
void device_loop(Command cmd);
};
#endif
|
#ifndef __SETTINGS_H_
#define __SETTINGS_H_
#include <Arduino.h>
#include "Device.h"
// This section is for devices and their configuration
//Kit:
#define HAS_STD_LIGHTS (1)
#define LIGHTS_PIN 5
#define HAS_STD_CAPE (1)
#define HAS_STD_2X1_THRUSTERS (1)
#define HAS_STD_PILOT (1)
#define HAS_STD_CAMERAMOUNT (1)
#define CAMERAMOUNT_PIN 3
#define CAPE_VOLTAGE_PIN 0
#define CAPE_CURRENT_PIN 3
//After Market:
#define HAS_STD_CALIBRATIONLASERS (0)
#define CALIBRATIONLASERS_PIN 6
#define HAS_POLOLU_MINIMUV (0)
#define HAS_MS5803_14BA (0)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define MIDPOINT 1500
#define LOGGING (1)
class Settings : public Device {
public:
static int smoothingIncriment; //How aggressive the throttle changes
static int deadZone_min;
static int deadZone_max;
static int capability_bitarray;
Settings():Device(){};
void device_setup();
void device_loop(Command cmd);
};
#endif
|
Reset default settings to stock kit configuration
|
Reset default settings to stock kit configuration
|
C
|
mit
|
codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software,codewithpassion/openrov-software
|
63b7048e85bb947d1ef2cdd2f6a1fd6c436509c9
|
src/grid.c
|
src/grid.c
|
#include <string.h>
#include "window.h"
#include "grid.h"
#include "utils.h"
extern window_settings_t win_set;
void print_grid(WINDOW *win)
{
getmaxyx(win, win_set.maxGridHeight, win_set.maxGridWidth);
// If the grid is larger than the maximum height
// or width, then set it to max height or width
if (g.y_grid > win_set.maxGridHeight)
g.y_grid = win_set.maxGridHeight;
if (g.x_grid > win_set.maxGridWidth)
g.x_grid = win_set.maxGridWidth;
int32_t y_grid_step = win_set.maxGridHeight / g.y_grid;
int32_t x_grid_step = win_set.maxGridWidth / g.x_grid;
int32_t y_max_height = y_grid_step * g.y_grid;
int32_t x_max_height = x_grid_step * g.x_grid;
for(int32_t y=0;y<=y_max_height;y+=y_grid_step)
for(int32_t x=0;x<=x_max_height;x+=x_grid_step)
color_str(win, y, x, 0, 0, "O");
wnoutrefresh(win);
}
|
#include <string.h>
#include "window.h"
#include "grid.h"
#include "utils.h"
extern window_settings_t win_set;
void print_grid(WINDOW *win)
{
getmaxyx(win, win_set.maxGridHeight, win_set.maxGridWidth);
// If the grid is larger than the maximum height
// or width, then set it to max height or width
if (g.y_grid > win_set.maxGridHeight)
g.y_grid = win_set.maxGridHeight;
if (g.x_grid > win_set.maxGridWidth)
g.x_grid = win_set.maxGridWidth;
int32_t y_grid_step = win_set.maxGridHeight / g.y_grid;
int32_t x_grid_step = win_set.maxGridWidth / g.x_grid;
int32_t y_max_height = y_grid_step * g.y_grid;
int32_t x_max_height = x_grid_step * g.x_grid;
for(int32_t y=0;y<=y_max_height;y+=y_grid_step)
for(int32_t x=0;x<=x_max_height;x+=x_grid_step)
color_str(win, y, x, 0, 0, "+");
wnoutrefresh(win);
}
|
Change print symbol from O to +.
|
Change print symbol from O to +.
|
C
|
mit
|
svagionitis/gridNcurses,svagionitis/gridNcurses,svagionitis/gridNcurses
|
6f2ab9593f143abb6b517ad89da37fe9d3c5d209
|
c_solutions_1-10/Euler_4.c
|
c_solutions_1-10/Euler_4.c
|
#include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char *forward = calloc(sizeof(char), sizeof(char) * MAX);
char *backward = calloc(sizeof(char), sizeof(char) * MAX);
size_t int_len;
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=100; y < 1000; y++) {
int_len = snprintf(forward, MAX, "%d", x * y);
for (int i=0, str_len=int_len-1; i < int_len; i++, str_len--)
backward[i] = forward[str_len];
if (strcmp(forward, backward) == 0 && atoi(backward) > high)
high = atoi(backward);
}
}
free(forward);
free(backward);
float stop = timeit();
printf("Answer: %d\n", high);
printf("Time: %.8f\n", stop - start);
return 0;
}
|
#include "euler_util.h"
#include <string.h>
#define MAX 7
int main(int argc, char *argv[])
{
float start = timeit();
char product[MAX] = { '\0' };
int high = 0;
for (int x=100; x < 1000; x++) {
for (int y=x; y < 1000; y++) {
int canidate = x * y;
size_t int_len = snprintf(product, MAX, "%d", canidate);
int head = 0, tail = int_len - 1;
for (;head < tail && product[head] == product[tail]; head++, tail--)
;
if (head > tail && canidate > high)
high = canidate;
}
}
float stop = timeit();
printf("Answer: %d\n", high);
printf("Time: %.8f\n", stop - start);
return 0;
}
|
Improve loop (avg. from ~0.15 to ~0.07)
|
Improve loop (avg. from ~0.15 to ~0.07)
|
C
|
mit
|
tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler,tijko/Project-Euler
|
fae7949017389ee7c127883fdfcd3672f98e2fc3
|
event/timeout_queue.h
|
event/timeout_queue.h
|
#ifndef TIMEOUT_QUEUE_H
#define TIMEOUT_QUEUE_H
#include <map>
class TimeoutQueue {
typedef std::map<NanoTime, CallbackQueue> timeout_map_t;
LogHandle log_;
timeout_map_t timeout_queue_;
public:
TimeoutQueue(void)
: log_("/event/timeout/queue"),
timeout_queue_()
{ }
~TimeoutQueue()
{ }
bool empty(void) const
{
timeout_map_t::const_iterator it;
/*
* Since we allow elements within each CallbackQueue to be
* cancelled, we must scan them.
*
* XXX
* We really shouldn't allow this, even if it means we have
* to specialize CallbackQueue for this purpose or add
* virtual methods to it. As it is, we can return true
* for empty and for ready at the same time. And in those
* cases we have to call perform to garbage collect the
* unused CallbackQueues. We'll, quite conveniently,
* never make that call. Yikes.
*/
for (it = timeout_queue_.begin(); it != timeout_queue_.end(); ++it) {
if (it->second.empty())
continue;
return (false);
}
return (true);
}
Action *append(uintmax_t, SimpleCallback *);
uintmax_t interval(void) const;
void perform(void);
bool ready(void) const;
};
#endif /* !TIMEOUT_QUEUE_H */
|
#ifndef TIMEOUT_QUEUE_H
#define TIMEOUT_QUEUE_H
#include <map>
#include <common/time/time.h>
class TimeoutQueue {
typedef std::map<NanoTime, CallbackQueue> timeout_map_t;
LogHandle log_;
timeout_map_t timeout_queue_;
public:
TimeoutQueue(void)
: log_("/event/timeout/queue"),
timeout_queue_()
{ }
~TimeoutQueue()
{ }
bool empty(void) const
{
timeout_map_t::const_iterator it;
/*
* Since we allow elements within each CallbackQueue to be
* cancelled, we must scan them.
*
* XXX
* We really shouldn't allow this, even if it means we have
* to specialize CallbackQueue for this purpose or add
* virtual methods to it. As it is, we can return true
* for empty and for ready at the same time. And in those
* cases we have to call perform to garbage collect the
* unused CallbackQueues. We'll, quite conveniently,
* never make that call. Yikes.
*/
for (it = timeout_queue_.begin(); it != timeout_queue_.end(); ++it) {
if (it->second.empty())
continue;
return (false);
}
return (true);
}
Action *append(uintmax_t, SimpleCallback *);
uintmax_t interval(void) const;
void perform(void);
bool ready(void) const;
};
#endif /* !TIMEOUT_QUEUE_H */
|
Use new NanoTime location header, oops.
|
Use new NanoTime location header, oops.
|
C
|
bsd-2-clause
|
wanproxy/wanproxy,wanproxy/wanproxy,wanproxy/wanproxy
|
5d02ce6786c9b7bd1f434826c4929b4233b5ae58
|
readline.h
|
readline.h
|
#ifndef READLINE_FALLBACK_H
#define READLINE_FALLBACK_H
#include <stdio.h>
#include <string.h>
char* readline(const char * prompt) {
char *result = malloc(1);
size_t n = 0;
printf("%s", prompt);
getline(&result, &n, stdin);
result[strlen(result)-1] = 0;
return result;
}
#endif /* READLINE_FALLBACK_H */
|
#ifndef READLINE_FALLBACK_H
#define READLINE_FALLBACK_H
#include <stdio.h>
#include <string.h>
char* readline(const char * prompt) {
char *result = malloc(1024);
printf("%s", prompt);
fgets(result, 1023, stdin);
result[strlen(result)-1] = 0;
return result;
}
#endif /* READLINE_FALLBACK_H */
|
Use fgets(3) instead of getline(3) because whilst getline(3) is POSIX, it is not in the C89 or later standards
|
Use fgets(3) instead of getline(3) because whilst getline(3) is POSIX, it is not in the C89 or later standards
|
C
|
isc
|
lucasad/base-conv
|
b7b27486d7066853dcf0fa325dd2d542167bb042
|
src/lib/fmt/fmt_escapecharxml.c
|
src/lib/fmt/fmt_escapecharxml.c
|
#include "fmt.h"
size_t fmt_escapecharxml(char* dest,uint32_t ch) {
char a[FMT_LONG], b[FMT_XLONG];
const char* s;
size_t i,j;
switch (ch) {
case '&': s="&"; goto string;
case '<': s="<"; goto string;
case '>': s=">"; goto string;
case '\'': s="'"; goto string;
case '"': s="""; goto string;
default:
a[i=fmt_ulong(a,ch)]=0;
b[0]='x';
b[j=fmt_xlong(b+1,ch)+1]=0;
s=a;
if (i>j) { s=b; i=j; }
if (dest) {
dest[0]='&';
dest[1]='#';
byte_copy(dest+2,i,s);
dest[i+2]=';';
}
return i+3;
}
string:
return fmt_str(dest,s);
}
#ifdef __GNUC__
size_t fmt_escapecharhtml(char* dest,uint32_t ch) __attribute__((__alias__("fmt_escapecharxml")));
#endif
|
#include "fmt.h"
size_t fmt_escapecharxml(char* dest,uint32_t ch) {
char a[FMT_LONG], b[FMT_XLONG];
const char* s;
size_t i,j;
switch (ch) {
case '&': s="&"; goto string;
case '<': s="<"; goto string;
case '>': s=">"; goto string;
case '\'': s="'"; goto string;
case '"': s="""; goto string;
default:
a[i=fmt_ulong(a,ch)]=0;
b[0]='x';
b[j=fmt_xlong(b+1,ch)+1]=0;
s=a;
if (i>j) { s=b; i=j; }
if (dest) {
dest[0]='&';
dest[1]='#';
byte_copy(dest+2,i,s);
dest[i+2]=';';
}
return i+3;
}
string:
return fmt_str(dest,s);
}
#if defined(__GNUC__) && !defined(__llvm__)
size_t fmt_escapecharhtml(char* dest,uint32_t ch) __attribute__((__alias__("fmt_escapecharxml")));
#endif
|
Choose only gcc to execute a specific portion of code
|
fmt: Choose only gcc to execute a specific portion of code
The specific portion of the code needs to be executed by a gcc
compiler, for that reason is used the __GNUC__ macro. It appears,
that the LLVM compiler, which uses the __llvm__ macro, uses as well
the __GNUC__ macro (possible for compatibility???).
This change check if the __llvm__ is check as well, and if it is
the code is not executed.
Issue: https://github.com/svagionitis/cross-platform-code/issues/1
|
C
|
mit
|
svagionitis/cross-platform-code,svagionitis/cross-platform-code
|
3c2384671496172cdacf53854592ff689cfbb044
|
src/swganh/scripting/python_shared_ptr.h
|
src/swganh/scripting/python_shared_ptr.h
|
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#pragma once
#include <memory>
namespace boost {
template<class T> const T* get_pointer(const std::shared_ptr<T>& ptr)
{
return ptr.get();
}
template<class T> T* get_pointer(std::shared_ptr<T>& ptr)
{
return ptr.get();
}
template<class T> const T* get_pointer(const std::unique_ptr<T>& ptr)
{
return ptr.get();
}
template<class T> T* get_pointer(std::unique_ptr<T>& ptr)
{
return ptr.get();
}
}
//#include <boost/python.hpp>
//namespace boost{ namespace python{
// template <class T>
// struct pointee< std::shared_ptr<T> >
// {
// typedef T type;
// };
//
//}}
|
// This file is part of SWGANH which is released under the MIT license.
// See file LICENSE or go to http://swganh.com/LICENSE
#pragma once
#include <memory>
//namespace boost {
// template<class T> const T* get_pointer(const std::shared_ptr<T>& ptr)
// {
// return ptr.get();
// }
//
// template<class T> T* get_pointer(std::shared_ptr<T>& ptr)
// {
// return ptr.get();
// }
//
// template<class T> const T* get_pointer(const std::unique_ptr<T>& ptr)
// {
// return ptr.get();
// }
//
// template<class T> T* get_pointer(std::unique_ptr<T>& ptr)
// {
// return ptr.get();
// }
//}
//#include <boost/python.hpp>
//namespace boost{ namespace python{
// template <class T>
// struct pointee< std::shared_ptr<T> >
// {
// typedef T type;
// };
//
//}}
|
Boost now supports std::unique_ptr/std::shared_ptr for python
|
Boost now supports std::unique_ptr/std::shared_ptr for python
|
C
|
mit
|
anhstudios/swganh,anhstudios/swganh,anhstudios/swganh
|
44bd63e4db6ac33a03b14da1a2b6e932f2947a35
|
kilo.c
|
kilo.c
|
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios raw = orig_termios;
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag &= ~(OPOST);
raw.c_cflag &= ~(CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enable_raw_mode();
char c;
while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') {
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
}
return 0;
}
|
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
struct termios orig_termios;
void disable_raw_mode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}
void enable_raw_mode() {
tcgetattr(STDIN_FILENO, &orig_termios);
atexit(disable_raw_mode);
struct termios raw = orig_termios;
raw.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
raw.c_oflag &= ~(OPOST);
raw.c_cflag &= ~(CS8);
raw.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG);
raw.c_cc[VMIN] = 0;
raw.c_cc[VTIME] = 1;
tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}
int main() {
enable_raw_mode();
while (1) {
char c = '\0';
read(STDIN_FILENO, &c, 1);
if (iscntrl(c)) {
printf("%d\r\n", c);
} else {
printf("%d ('%c')\r\n", c, c);
}
if (c == 'q') {
break;
}
}
return 0;
}
|
Add a timeout for read()
|
Add a timeout for read()
Set VMIN to 0 so read() returns as soon as there is any input to be
read.
Set VTIME to 1 so the wait time of read() is 100 milliseconds.
|
C
|
bsd-2-clause
|
oldsharp/kilo,oldsharp/kilo
|
c8f07441b641c3aa288ce6d8aa59eff4ab3332e6
|
main.c
|
main.c
|
/* The contents of this file is in the public domain. */
#include <ipify.h>
#include <string.h>
#include <sys/socket.h>
int main(int argc, char *argv[])
{
int family = AF_UNSPEC;
char addr[256];
int i, sd;
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-h")) {
printf("ipify [-46h]\n");
return 0;
}
if (!strcmp(argv[i], "-4")) {
family = AF_INET;
continue;
}
if (!strcmp(argv[i], "-6")) {
family = AF_INET6;
continue;
}
printf("Invalid option: '%s'\n", argv[i]);
return 1;
}
sd = ipify_connect1(family);
if (sd < 0)
return 1;
if (!ipify_query(sd, addr, sizeof(addr)))
printf("%s\n", addr);
return ipify_disconnect(sd);
}
|
/* The contents of this file is in the public domain. */
#include <ipify.h>
#include <string.h>
#include <sys/socket.h>
int main(int argc, char *argv[])
{
int family = AF_UNSPEC;
char addr[256];
char *host;
int i, sd;
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-h")) {
printf("ipify [-46h] [HOST]\n");
return 0;
}
if (!strcmp(argv[i], "-4")) {
family = AF_INET;
continue;
}
if (!strcmp(argv[i], "-6")) {
family = AF_INET6;
continue;
}
break;
}
if (i < argc)
host = argv[i++];
else
host = "api.ipify.org";
sd = ipify_connect2(host, family);
if (sd < 0)
return 1;
if (!ipify_query(sd, addr, sizeof(addr)))
printf("%s\n", addr);
return ipify_disconnect(sd);
}
|
Use new API and expose optional host argument
|
Use new API and expose optional host argument
Signed-off-by: Joachim Wiberg <583c295fd7602c168ad814279bbc3894ba65f5d6@gmail.com>
|
C
|
isc
|
troglobit/lipify
|
aea67ce8c8998f99adb9d1d8d70295da6122a13a
|
libcpu/platform.h
|
libcpu/platform.h
|
#if defined(_WIN32)
# define __LITTLE_ENDIAN__ 1
# ifdef _M_IX86
# define __i386__ 1
# endif
# ifdef _M_X64
# define __x86_64__ 1
# endif
# if defined(_MSC_VER)
# define snprintf _snprintf
# define strtoull _strtoui64
# define __func__ __FUNCTION__
# endif /* defined(_MSC_VER) */
#endif /* defined(_WIN32) */
#if HAVE_DECLSPEC_DLLEXPORT
# ifdef LIBCPU_BUILD_CORE
# define API_FUNC __declspec(dllexport)
# else
# define API_FUNC __declspec(dllimport)
# endif
#else
# define API_FUNC /* nothing */
#endif
#if HAVE_ATTRIBUTE_PACKED
# define PACKED(x) x __attribute__((packed))
#elif HAVE_PRAGMA_PACK
# define PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
#else
# error Do not know how to pack structs on this platform
#endif
#if HAVE_ATTRIBUTE_ALIGNED
# define ALIGNED(x) __attribute__((aligned(x)))
#elif HAVE_DECLSPEC_ALIGN
# define ALIGNED(x) __declspec(align(x))
#else
# error Do not know how to specify alignment on this platform
#endif
|
#if defined(_WIN32)
# define __LITTLE_ENDIAN__ 1
# ifdef _M_IX86
# define __i386__ 1
# endif
# ifdef _M_X64
# define __x86_64__ 1
# endif
# if defined(_MSC_VER)
# define snprintf _snprintf
# define strtoull _strtoui64
# define __func__ __FUNCTION__
# endif /* defined(_MSC_VER) */
#endif /* defined(_WIN32) */
#if HAVE_DECLSPEC_DLLEXPORT
# ifdef LIBCPU_BUILD_CORE
# define API_FUNC __declspec(dllexport)
# else
# define API_FUNC __declspec(dllimport)
# endif
#else
# define API_FUNC /* nothing */
#endif
#if HAVE_ATTRIBUTE_PACKED
# define PACKED(x) x __attribute__((packed))
#elif HAVE_PRAGMA_PACK
# define PACKED(x) __pragma(pack(push, 1)) x __pragma(pack(pop))
#else
# error Do not know how to pack structs on this platform
#endif
#if HAVE_ATTRIBUTE_ALIGNED
# define ALIGNED(x) __attribute__((aligned(x)))
#elif HAVE_DECLSPEC_ALIGN
# define ALIGNED(x) __declspec(align(x))
#else
# error Do not know how to specify alignment on this platform
#endif
|
Remove a Windows line-ending that was accidentally included
|
Remove a Windows line-ending that was accidentally included
|
C
|
bsd-2-clause
|
monocasa/libcpu,ukatemi/libcpu,glguida/libcpu,curtiszimmerman/libcpu,ukatemi/libcpu,libcpu/libcpu,curtiszimmerman/libcpu,libcpu/libcpu,glguida/libcpu,monocasa/libcpu,ukatemi/libcpu,curtiszimmerman/libcpu,glguida/libcpu,monocasa/libcpu,libcpu/libcpu,glguida/libcpu,libcpu/libcpu,monocasa/libcpu,curtiszimmerman/libcpu,ukatemi/libcpu
|
0daebd485c02840729740949caa429efd5cf0153
|
ghighlighter/main-window.c
|
ghighlighter/main-window.c
|
#include <gtk/gtk.h>
GtkWidget *
main_window_create()
{
GtkWidget *window;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "ghighlighter");
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
return window;
}
|
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <glib.h>
static void
main_window_destroy(GtkAccelGroup *group, GObject *acceleratable,
guint keyval, GdkModifierType modifier, gpointer user_data)
{
gtk_widget_destroy(GTK_WIDGET(user_data));
}
void
main_window_bind_keys(GtkWidget *window)
{
GtkAccelGroup *group = gtk_accel_group_new();
GClosure *closure = g_cclosure_new(G_CALLBACK(main_window_destroy), window, NULL);
gtk_accel_group_connect(group, GDK_KEY_q, GDK_CONTROL_MASK, 0, closure);
gtk_window_add_accel_group(GTK_WINDOW(window), group);
}
GtkWidget *
main_window_create()
{
GtkWidget *window;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), "ghighlighter");
main_window_bind_keys(window);
g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
return window;
}
|
Destroy main window on Ctrl+q
|
Destroy main window on Ctrl+q
|
C
|
mit
|
chdorner/ghighlighter-c
|
65afcdfc0e43f45578d47e4ab68bb0a81cdfd14a
|
src/settings/types/Duration.h
|
src/settings/types/Duration.h
|
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#ifndef DURATION_H
#define DURATION_H
namespace cura
{
/*
* \brief Represents a duration in seconds.
*
* This is a facade. It behaves like a double, only it can't be negative.
*/
struct Duration
{
/*
* \brief Default constructor setting the duration to 0.
*/
Duration() : value(0) {};
/*
* \brief Casts a double to a Duration instance.
*/
Duration(double value) : value(std::max(value, 0.0)) {};
/*
* \brief Casts the Duration instance to a double.
*/
operator double() const
{
return value;
};
/*
* Some operators to do arithmetic with Durations.
*/
Duration operator +(const Duration& other) const
{
return Duration(value + other.value);
};
Duration operator -(const Duration& other) const
{
return Duration(value + other.value);
};
Duration& operator +=(const Duration& other)
{
value += other.value;
return *this;
}
Duration& operator -=(const Duration& other)
{
value -= other.value;
return *this;
}
/*
* \brief The actual duration, as a double.
*/
double value = 0;
};
}
#endif //DURATION_H
|
//Copyright (c) 2018 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#ifndef DURATION_H
#define DURATION_H
namespace cura
{
/*
* \brief Represents a duration in seconds.
*
* This is a facade. It behaves like a double, only it can't be negative.
*/
struct Duration
{
/*
* \brief Default constructor setting the duration to 0.
*/
constexpr Duration() : value(0) {};
/*
* \brief Casts a double to a Duration instance.
*/
constexpr Duration(double value) : value(value > 0.0 ? value : 0.0) {};
/*
* \brief Casts the Duration instance to a double.
*/
operator double() const
{
return value;
};
/*
* Some operators to do arithmetic with Durations.
*/
Duration operator +(const Duration& other) const
{
return Duration(value + other.value);
};
Duration operator -(const Duration& other) const
{
return Duration(value + other.value);
};
Duration& operator +=(const Duration& other)
{
value += other.value;
return *this;
}
Duration& operator -=(const Duration& other)
{
value -= other.value;
return *this;
}
/*
* \brief The actual duration, as a double.
*/
double value = 0;
};
constexpr Duration operator "" _s(const long double seconds)
{
return Duration(seconds);
}
}
#endif //DURATION_H
|
Add _s custom literal for durations
|
Add _s custom literal for durations
You can indicate that something takes 5 seconds by writing 5_s now. We can't make a literal saying '5s' because custom literals need to start with an underscore because C++ reserves the rest for use in future C++ versions.
Contributes to issue CURA-4410.
|
C
|
agpl-3.0
|
Ultimaker/CuraEngine,Ultimaker/CuraEngine
|
4ee4e4dcb07c5e45881179c6ec61df6381f76211
|
security/nss/macbuild/NSSCommon.h
|
security/nss/macbuild/NSSCommon.h
|
/* Defines common to all versions of NSS */
#define NSPR20 1
#define MP_API_COMPATIBLE 1
|
/* Defines common to all versions of NSS */
#define NSPR20 1
#define MP_API_COMPATIBLE 1
#define NSS_3_4_CODE 1 /* Remove this when we start building NSS 4.0 by default */
|
Define NSS_3_4 so that we get the right code and not Stan code that isn't quite ready.
|
Define NSS_3_4 so that we get the right code and not Stan code that isn't quite ready.
|
C
|
mpl-2.0
|
thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss,thespooler/nss
|
351be023e68a713aa3ffcfae7cca21935b1f913c
|
test/CodeGen/builtins-arm64.c
|
test/CodeGen/builtins-arm64.c
|
// 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.aarch64.rbit.i64(i64 %a)
unsigned long long rbit64(unsigned long long a) {
return __builtin_arm_rbit64(a);
}
|
// 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.aarch64.rbit.i64(i64 %a)
unsigned long long rbit64(unsigned long long a) {
return __builtin_arm_rbit64(a);
}
void hints() {
__builtin_arm_yield(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 1)
__builtin_arm_wfe(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 2)
__builtin_arm_wfi(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 3)
__builtin_arm_sev(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 4)
__builtin_arm_sevl(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 5)
}
|
Add test cases for AArch64 hints codegen
|
Add test cases for AArch64 hints codegen
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@212909 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
7fa8ea867659fc32093d3acb13c1c6a061b0b7f9
|
CatchFeedHelper/CTCFeedChecker.h
|
CatchFeedHelper/CTCFeedChecker.h
|
#import <Foundation/Foundation.h>
extern NSString *kCTCFeedCheckerErrorDomain;
typedef void (^CTCFeedCheckCompletionHandler)(NSArray *downloadedFeedFiles,
NSError *error);
typedef void (^CTCFeedCheckDownloadCompletionHandler)(NSError *error);
@protocol CTCFeedCheck
- (void)checkShowRSSFeed:(NSURL *)feedURL
downloadingToBookmark:(NSData *)downloadFolderBookmark
organizingByFolder:(BOOL)shouldOrganizeByFolder
skippingURLs:(NSArray *)previouslyDownloadedURLs
withReply:(CTCFeedCheckCompletionHandler)reply;
- (void)downloadFile:(NSDictionary *)fileURL
toBookmark:(NSData *)downloadFolderBookmark
organizingByFolder:(BOOL)shouldOrganizeByFolder
withReply:(CTCFeedCheckDownloadCompletionHandler)reply;
@end
@interface CTCFeedChecker : NSObject <CTCFeedCheck, NSXPCListenerDelegate>
+ (instancetype)sharedChecker;
@end
|
#import <Foundation/Foundation.h>
extern NSString *kCTCFeedCheckerErrorDomain;
typedef void (^CTCFeedCheckCompletionHandler)(NSArray *downloadedFeedFiles,
NSError *error);
typedef void (^CTCFeedCheckDownloadCompletionHandler)(NSError *error);
@protocol CTCFeedCheck
- (void)checkShowRSSFeed:(NSURL *)feedURL
downloadingToBookmark:(NSData *)downloadFolderBookmark
organizingByFolder:(BOOL)shouldOrganizeByFolder
skippingURLs:(NSArray *)previouslyDownloadedURLs
withReply:(CTCFeedCheckCompletionHandler)reply;
- (void)downloadFile:(NSDictionary *)file
toBookmark:(NSData *)downloadFolderBookmark
organizingByFolder:(BOOL)shouldOrganizeByFolder
withReply:(CTCFeedCheckDownloadCompletionHandler)reply;
@end
@interface CTCFeedChecker : NSObject <CTCFeedCheck, NSXPCListenerDelegate>
+ (instancetype)sharedChecker;
@end
|
Fix header out of sync
|
Fix header out of sync
|
C
|
mit
|
mipstian/catch
|
eff9830b09a84b24091c731e42701da7ee320c77
|
include/cling/Interpreter/RuntimeExceptions.h
|
include/cling/Interpreter/RuntimeExceptions.h
|
//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author: Vassil Vassilev <vasil.georgiev.vasilev@cern.ch>
//------------------------------------------------------------------------------
#ifndef CLING_RUNTIME_EXCEPTIONS_H
#define CLING_RUNTIME_EXCEPTIONS_H
namespace cling {
namespace runtime {
///\brief Exception that is thrown when a null pointer dereference is found
/// or a method taking non-null arguments is called with NULL argument.
///
class cling_null_deref_exception { };
} // end namespace runtime
} // end namespace cling
#endif // CLING_RUNTIME_EXCEPTIONS_H
|
//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author: Vassil Vassilev <vasil.georgiev.vasilev@cern.ch>
//------------------------------------------------------------------------------
#ifndef CLING_RUNTIME_EXCEPTIONS_H
#define CLING_RUNTIME_EXCEPTIONS_H
namespace clang {
class Sema;
}
namespace cling {
namespace runtime {
///\brief Exception that is thrown when a null pointer dereference is found
/// or a method taking non-null arguments is called with NULL argument.
///
class cling_null_deref_exception {
private:
unsigned m_Location;
clang::Sema* m_Sema;
public:
cling_null_deref_exception(void* Loc, clang::Sema* S);
~cling_null_deref_exception();
void what() throw();
};
} // end namespace runtime
} // end namespace cling
#endif // CLING_RUNTIME_EXCEPTIONS_H
|
Add missing header method declarations.
|
Add missing header method declarations.
|
C
|
lgpl-2.1
|
karies/cling,root-mirror/cling,root-mirror/cling,karies/cling,karies/cling,perovic/cling,karies/cling,perovic/cling,root-mirror/cling,root-mirror/cling,marsupial/cling,marsupial/cling,marsupial/cling,marsupial/cling,perovic/cling,root-mirror/cling,root-mirror/cling,marsupial/cling,karies/cling,marsupial/cling,perovic/cling,perovic/cling,karies/cling
|
e5b5dcb8aa7b85d5f873aa51120b4f685beeb145
|
FDTakeExample/FDTakeController.h
|
FDTakeExample/FDTakeController.h
|
//
// FDTakeController.h
// FDTakeExample
//
// Created by Will Entriken on 8/9/12.
// Copyright (c) 2012 William Entriken. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FDTakeController;
@protocol FDTakeDelegate <NSObject>
- (void)takeController:(FDTakeController *)controller gotPhoto:(UIImage *)photo withInfo:(NSDictionary *)info;
- (void)takeController:(FDTakeController *)controller gotVideo:(NSURL *)video withInfo:(NSDictionary *)info;
- (void)takeController:(FDTakeController *)controller didCancelAfterAttempting:(BOOL)madeAttempt;
@end
@interface FDTakeController : NSObject
- (void)takePhotoOrChooseFromLibrary;
- (void)takeVideoOrChooseFromLibrary;
- (void)takePhotoOrVideoOrChooseFromLibrary;
@property (strong, nonatomic) UIImagePickerController *imagePicker;
@property (weak, nonatomic) id <FDTakeDelegate> delegate;
@end
|
//
// FDTakeController.h
// FDTakeExample
//
// Created by Will Entriken on 8/9/12.
// Copyright (c) 2012 William Entriken. All rights reserved.
//
#import <Foundation/Foundation.h>
@class FDTakeController;
@protocol FDTakeDelegate <NSObject>
@optional
- (void)takeController:(FDTakeController *)controller didCancelAfterAttempting:(BOOL)madeAttempt;
- (void)takeController:(FDTakeController *)controller gotPhoto:(UIImage *)photo withInfo:(NSDictionary *)info;
- (void)takeController:(FDTakeController *)controller gotVideo:(NSURL *)video withInfo:(NSDictionary *)info;
@end
@interface FDTakeController : NSObject
+ (UIImage*)imageWithImage:(UIImage*)sourceImage scaledToSizeWithSameAspectRatio:(CGSize)targetSize;
- (void)takePhotoOrChooseFromLibrary;
- (void)takeVideoOrChooseFromLibrary;
- (void)takePhotoOrVideoOrChooseFromLibrary;
@property (strong, nonatomic) UIImagePickerController *imagePicker;
@property (weak, nonatomic) id <FDTakeDelegate> delegate;
@end
|
Make more usable for production
|
Make more usable for production
|
C
|
mit
|
fulldecent/FDTake,kobim/FDTake,fulldecent/FDTake,eumlab/FDTake,eumlab/FDTake,eumlab/FDTake,Lily418/FDTake,Lily418/FDTake,masd-duc/FDTake,Lily418/FDTake,LaserPatrick/FDTake,wyszo/FDTake,fulldecent/FDTake,LaserPatrick/FDTake
|
7c945ca65683fd17b029ab0748fe2359a8f71a4c
|
include/core/SkMilestone.h
|
include/core/SkMilestone.h
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 64
#endif
|
/*
* Copyright 2016 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SK_MILESTONE
#define SK_MILESTONE 65
#endif
|
Update Skia milestone to 65
|
Update Skia milestone to 65
NOTRY=TRUE
TBR=reed
Bug: skia:
Change-Id: I3dfe04202f48068bd04e7d64fa38913906af02ce
Reviewed-on: https://skia-review.googlesource.com/78201
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
|
C
|
bsd-3-clause
|
HalCanary/skia-hc,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,HalCanary/skia-hc,rubenvb/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,google/skia,rubenvb/skia,rubenvb/skia,rubenvb/skia,google/skia
|
5084aa505fc702cd78b274622c72d63969688d75
|
util/bounding_box.h
|
util/bounding_box.h
|
/*
* An axis-aligned bounding box in 3D space.
* Author: Dino Wernli
*/
#ifndef BOUNDING_BOX_H_
#define BOUNDING_BOX_H_
#include "util/numeric.h"
class Point3;
class BoundingBox {
public:
BoundingBox(const Point3& point);
virtual ~BoundingBox();
// Changes the bounding box to include point.
BoundingBox& Include(const Point3& point);
private:
Scalar xmin_, xmax_, ymin_, ymax_, zmin_, zmax_;
};
#endif /* BOUNDING_BOX_H_ */
|
/*
* An axis-aligned bounding box in 3D space.
* Author: Dino Wernli
*/
#ifndef BOUNDING_BOX_H_
#define BOUNDING_BOX_H_
#include "util/numeric.h"
class Point3;
class BoundingBox {
public:
BoundingBox(const Point3& point);
virtual ~BoundingBox();
// Changes the bounding box to include point.
BoundingBox& Include(const Point3& point);
private:
Scalar xmin_, xmax_, ymin_, ymax_, zmin_, zmax_;
};
template<class OStream>
OStream& operator<<(OStream& os, const BoundingBox& box) {
return os << "(box: "
"(" << box.xmin_ << ' ' << box.xmax_ << ") "
"(" << box.ymin_ << ' ' << box.ymax_ << ") "
"(" << box.zmin_ << ' ' << box.zmax_ << "))";
}
#endif /* BOUNDING_BOX_H_ */
|
Add support for dumping bounding boxes.
|
Add support for dumping bounding boxes.
|
C
|
mit
|
dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer,dinowernli/raytracer
|
dff6ed304ba6c58a273d234384ca12fd59f03b86
|
code/Modules/Render/Types/PrimitiveType.h
|
code/Modules/Render/Types/PrimitiveType.h
|
#pragma once
//------------------------------------------------------------------------------
/**
@class Oryol::Render::PrimitiveType
@brief primitive type enum (triangle strips, lists, etc...)
*/
#include "Core/Types.h"
namespace Oryol {
namespace Render {
class PrimitiveType {
public:
/// primitive type enum
enum Code {
Points, ///< point list
LineStrip, ///< line strip
LineLoop, ///< closed line loop
Lines, ///< line list
TriangleStrip, ///< triangle strip
TriangleFan, ///< triangle fan
Triangles, ///< triangle list
NumPrimitiveTypes, ///< number of primitive types
InvalidPrimitiveType, ///< invalid primitive type value
};
/// convert to string
static const char* ToString(Code c);
/// convert from string
static Code FromString(const char* str);
};
} // namespace Render
} // namespace Oryol
|
#pragma once
//------------------------------------------------------------------------------
/**
@class Oryol::Render::PrimitiveType
@brief primitive type enum (triangle strips, lists, etc...)
*/
#include "Core/Types.h"
namespace Oryol {
namespace Render {
class PrimitiveType {
public:
/// primitive type enum (don't change order, append to end!)
enum Code {
Points = 0, ///< point list
LineStrip, ///< line strip
LineLoop, ///< closed line loop
Lines, ///< line list
TriangleStrip, ///< triangle strip
TriangleFan, ///< triangle fan
Triangles, ///< triangle list
NumPrimitiveTypes, ///< number of primitive types
InvalidPrimitiveType, ///< invalid primitive type value
};
/// convert to string
static const char* ToString(Code c);
/// convert from string
static Code FromString(const char* str);
};
} // namespace Render
} // namespace Oryol
|
Make sure primitive type enum starts at 0
|
Make sure primitive type enum starts at 0
|
C
|
mit
|
tempbottle/oryol,ejkoy/oryol,tempbottle/oryol,ejkoy/oryol,mgerhardy/oryol,tempbottle/oryol,code-disaster/oryol,wangscript/oryol,mgerhardy/oryol,waywardmonkeys/oryol,xfxdev/oryol,mgerhardy/oryol,xfxdev/oryol,wangscript/oryol,bradparks/oryol,zhakui/oryol,waywardmonkeys/oryol,code-disaster/oryol,aonorin/oryol,mgerhardy/oryol,ejkoy/oryol,xfxdev/oryol,code-disaster/oryol,aonorin/oryol,bradparks/oryol,ejkoy/oryol,floooh/oryol,floooh/oryol,ejkoy/oryol,wangscript/oryol,bradparks/oryol,zhakui/oryol,bradparks/oryol,ejkoy/oryol,wangscript/oryol,xfxdev/oryol,zhakui/oryol,zhakui/oryol,aonorin/oryol,waywardmonkeys/oryol,code-disaster/oryol,aonorin/oryol,wangscript/oryol,waywardmonkeys/oryol,waywardmonkeys/oryol,bradparks/oryol,floooh/oryol,aonorin/oryol,code-disaster/oryol,mgerhardy/oryol,tempbottle/oryol,aonorin/oryol,tempbottle/oryol,floooh/oryol,xfxdev/oryol,wangscript/oryol,floooh/oryol,tempbottle/oryol,bradparks/oryol,bradparks/oryol,code-disaster/oryol,tempbottle/oryol,waywardmonkeys/oryol,wangscript/oryol,xfxdev/oryol,code-disaster/oryol,aonorin/oryol,ejkoy/oryol,xfxdev/oryol,floooh/oryol,zhakui/oryol,mgerhardy/oryol,zhakui/oryol,zhakui/oryol,mgerhardy/oryol,waywardmonkeys/oryol
|
3709f2b154a5db0500892c1d720280d54981135a
|
src/rtcmix/gen/floc.c
|
src/rtcmix/gen/floc.c
|
#include "../H/ugens.h"
#include <stdio.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
extern int sizeof_farray[];
extern int f_goto[];
/* Returns the address of function number genno, or NULL if the
function array doesn't exist.
NOTE: It's the responsiblity of instruments to deal with a
missing gen, either by using die() or supplying a default
and alerting the user with advise().
*/
float *floc(int genno)
{
int index = f_goto[genno];
if (sizeof_farray[index] == 0)
return NULL;
return farrays[index];
}
|
#include <stdio.h>
#include <ugens.h>
/* these 3 defined in makegen.c */
extern float *farrays[];
extern int sizeof_farray[];
extern int f_goto[];
/* Returns the address of function number genno, or NULL if the
function array doesn't exist.
NOTE: It's the responsiblity of instruments to deal with a
missing gen, either by using die() or supplying a default
and alerting the user with advise().
*/
float *floc(int genno)
{
int index;
if (genno < 0)
return NULL;
index = f_goto[genno];
if (sizeof_farray[index] == 0)
return NULL;
return farrays[index];
}
|
Make sure gen loc is in range.
|
Make sure gen loc is in range.
|
C
|
apache-2.0
|
RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix,RTcmix/RTcmix
|
38dc7e5f12c1fb18c292dcd2ade8f8de9102c79c
|
xs/APR/OS/APR__OS.h
|
xs/APR/OS/APR__OS.h
|
/* Copyright 2002-2004 The Apache Software 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 agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX)
{
#if APR_HAS_THREADS
return apr_os_thread_current();
#else
return 0;
#endif
}
|
/* Copyright 2002-2004 The Apache Software 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 agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
static MP_INLINE U32 mpxs_APR__OS_current_thread_id(pTHX)
{
#if APR_HAS_THREADS
return (U32)apr_os_thread_current();
#else
return 0;
#endif
}
|
Make a proper case to U32 to avoid a warning
|
Make a proper case to U32 to avoid a warning
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: b4be4a41b2a3352907de631eb6da1671a2f7b614@71435 13f79535-47bb-0310-9956-ffa450edef68
|
C
|
apache-2.0
|
Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl,Distrotech/mod_perl
|
7024cce5b4315f285d4bd44fff0e999cd6e040f0
|
Modules/tkappinit.c
|
Modules/tkappinit.c
|
/* appinit.c -- Tcl and Tk application initialization. */
#include <tcl.h>
#include <tk.h>
int
Tcl_AppInit (interp)
Tcl_Interp *interp;
{
Tk_Window main;
main = Tk_MainWindow(interp);
if (Tcl_Init (interp) == TCL_ERROR)
return TCL_ERROR;
if (Tk_Init (interp) == TCL_ERROR)
return TCL_ERROR;
#ifdef WITH_MOREBUTTONS
{
extern Tcl_CmdProc studButtonCmd;
extern Tcl_CmdProc triButtonCmd;
Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
(ClientData) main, NULL);
Tcl_CreateCommand(interp, "tributton", triButtonCmd,
(ClientData) main, NULL);
}
#endif
#ifdef WITH_XXX
#endif
return TCL_OK;
}
|
/* appinit.c -- Tcl and Tk application initialization. */
#include <tcl.h>
#include <tk.h>
int
Tcl_AppInit (interp)
Tcl_Interp *interp;
{
Tk_Window main;
main = Tk_MainWindow(interp);
if (Tcl_Init (interp) == TCL_ERROR)
return TCL_ERROR;
if (Tk_Init (interp) == TCL_ERROR)
return TCL_ERROR;
#ifdef WITH_MOREBUTTONS
{
extern Tcl_CmdProc studButtonCmd;
extern Tcl_CmdProc triButtonCmd;
Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
(ClientData) main, NULL);
Tcl_CreateCommand(interp, "tributton", triButtonCmd,
(ClientData) main, NULL);
}
#endif
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
{
extern void TkImaging_Init(Tcl_Interp *interp);
TkImaging_Init(interp);
}
#endif
#ifdef WITH_PIL_OLD /* 0.2b4 and earlier */
{
extern void TkImaging_Init(void);
TkImaging_Init();
}
#endif
#ifdef WITH_XXX
#endif
return TCL_OK;
}
|
Add sections for PIL (Fred Lundh).
|
Add sections for PIL (Fred Lundh).
|
C
|
mit
|
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
|
076eb56e244d6d1da4d8bf2c0a7a6e4cae282023
|
src/libsodium/sodium/core.c
|
src/libsodium/sodium/core.c
|
#include <stdbool.h>
#include "core.h"
#include "crypto_onetimeauth.h"
static bool initialized;
int
sodium_init(void)
{
if (initialized != 0) {
return 1;
}
initialized = 1;
if (crypto_onetimeauth_pick_best_implementation() == NULL) {
return -1;
}
return 0;
}
|
#include <stdbool.h>
#include "core.h"
#include "crypto_onetimeauth.h"
static bool initialized;
int
sodium_init(void)
{
if (initialized != 0) {
return 1;
}
if (crypto_onetimeauth_pick_best_implementation() == NULL) {
return -1;
}
initialized = 1;
return 0;
}
|
Set initialized=1 when everything has actually been initialized
|
Set initialized=1 when everything has actually been initialized
|
C
|
isc
|
mvduin/libsodium,pyparallel/libsodium,zhuqling/libsodium,GreatFruitOmsk/libsodium,paragonie-scott/libsodium,HappyYang/libsodium,eburkitt/libsodium,donpark/libsodium,eburkitt/libsodium,SpiderOak/libsodium,pyparallel/libsodium,akkakks/libsodium,pyparallel/libsodium,soumith/libsodium,rustyhorde/libsodium,rustyhorde/libsodium,kytvi2p/libsodium,JackWink/libsodium,akkakks/libsodium,GreatFruitOmsk/libsodium,tml/libsodium,netroby/libsodium,GreatFruitOmsk/libsodium,Payshare/libsodium,optedoblivion/android_external_libsodium,Payshares/libsodium,netroby/libsodium,JackWink/libsodium,CyanogenMod/android_external_dnscrypt_libsodium,mvduin/libsodium,HappyYang/libsodium,Payshare/libsodium,optedoblivion/android_external_libsodium,paragonie-scott/libsodium,tml/libsodium,netroby/libsodium,soumith/libsodium,Payshares/libsodium,SpiderOak/libsodium,pmienk/libsodium,kytvi2p/libsodium,tml/libsodium,rustyhorde/libsodium,pmienk/libsodium,Payshares/libsodium,donpark/libsodium,eburkitt/libsodium,akkakks/libsodium,rustyhorde/libsodium,kytvi2p/libsodium,SpiderOak/libsodium,CyanogenMod/android_external_dnscrypt_libsodium,zhuqling/libsodium,pmienk/libsodium,mvduin/libsodium,optedoblivion/android_external_libsodium,CyanogenMod/android_external_dnscrypt_libsodium,zhuqling/libsodium,SpiderOak/libsodium,paragonie-scott/libsodium,donpark/libsodium,akkakks/libsodium,soumith/libsodium,Payshare/libsodium,JackWink/libsodium,HappyYang/libsodium
|
bbbb905e897e8dd9e59c51d1dc3f34023314295e
|
chrome/nacl/nacl_broker_listener.h
|
chrome/nacl/nacl_broker_listener.h
|
// 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 CHROME_NACL_NACL_BROKER_LISTENER_H_
#define CHROME_NACL_NACL_BROKER_LISTENER_H_
#pragma once
#include "base/memory/scoped_ptr.h"
#include "base/process.h"
#include "chrome/common/nacl_types.h"
#include "ipc/ipc_channel.h"
// The BrokerThread class represents the thread that handles the messages from
// the browser process and starts NaCl loader processes.
class NaClBrokerListener : public IPC::Channel::Listener {
public:
NaClBrokerListener();
~NaClBrokerListener();
void Listen();
// IPC::Channel::Listener implementation.
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
private:
void OnLaunchLoaderThroughBroker(const std::wstring& loader_channel_id);
void OnShareBrowserHandle(int browser_handle);
void OnStopBroker();
base::ProcessHandle browser_handle_;
scoped_ptr<IPC::Channel> channel_;
DISALLOW_COPY_AND_ASSIGN(NaClBrokerListener);
};
#endif // CHROME_NACL_NACL_BROKER_LISTENER_H_
|
// 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 CHROME_NACL_NACL_BROKER_LISTENER_H_
#define CHROME_NACL_NACL_BROKER_LISTENER_H_
#pragma once
#include "base/memory/scoped_ptr.h"
#include "base/process.h"
#include "chrome/common/nacl_types.h"
#include "ipc/ipc_channel.h"
// The BrokerThread class represents the thread that handles the messages from
// the browser process and starts NaCl loader processes.
class NaClBrokerListener : public IPC::Channel::Listener {
public:
NaClBrokerListener();
~NaClBrokerListener();
void Listen();
// IPC::Channel::Listener implementation.
virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void OnChannelError() OVERRIDE;
private:
void OnLaunchLoaderThroughBroker(const std::wstring& loader_channel_id);
void OnStopBroker();
base::ProcessHandle browser_handle_;
scoped_ptr<IPC::Channel> channel_;
DISALLOW_COPY_AND_ASSIGN(NaClBrokerListener);
};
#endif // CHROME_NACL_NACL_BROKER_LISTENER_H_
|
Remove declaration of non-existent method
|
NaCl: Remove declaration of non-existent method
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9592039
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@125431 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
gavinp/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,ropik/chromium,ropik/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,gavinp/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,yitian134/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium
|
a426da990b999ba8a44aec739e412f7f8722df24
|
erts/emulator/test/scheduler_SUITE_data/scheduler_SUITE.c
|
erts/emulator/test/scheduler_SUITE_data/scheduler_SUITE.c
|
#include <unistd.h>
#include "erl_nif.h"
static int
load(ErlNifEnv* env, void** priv, ERL_NIF_TERM info)
{
ErlNifSysInfo sys_info;
enif_system_info(&sys_info, sizeof(ErlNifSysInfo));
if (!sys_info.smp_support || !sys_info.dirty_scheduler_support)
return 1;
return 0;
}
static ERL_NIF_TERM
dirty_sleeper(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
sleep(3);
#endif
return enif_make_atom(env, "ok");
}
static ErlNifFunc funcs[] = {
#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
{"dirty_sleeper", 0, dirty_sleeper, ERL_NIF_DIRTY_JOB_IO_BOUND}
#else
{"dirty_sleeper", 0, dirty_sleeper, 0}
#endif
};
ERL_NIF_INIT(scheduler_SUITE, funcs, &load, NULL, NULL, NULL);
|
#ifndef __WIN32__
#include <unistd.h>
#endif
#include "erl_nif.h"
static int
load(ErlNifEnv* env, void** priv, ERL_NIF_TERM info)
{
ErlNifSysInfo sys_info;
enif_system_info(&sys_info, sizeof(ErlNifSysInfo));
if (!sys_info.smp_support || !sys_info.dirty_scheduler_support)
return 1;
return 0;
}
static ERL_NIF_TERM
dirty_sleeper(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
#ifdef __WIN32__
Sleep(3000);
#else
sleep(3);
#endif
#endif
return enif_make_atom(env, "ok");
}
static ErlNifFunc funcs[] = {
#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT
{"dirty_sleeper", 0, dirty_sleeper, ERL_NIF_DIRTY_JOB_IO_BOUND}
#else
{"dirty_sleeper", 0, dirty_sleeper, 0}
#endif
};
ERL_NIF_INIT(scheduler_SUITE, funcs, &load, NULL, NULL, NULL);
|
Fix dirty scheduler tc on windows
|
Fix dirty scheduler tc on windows
|
C
|
apache-2.0
|
neeraj9/otp,legoscia/otp,dumbbell/otp,mikpe/otp,bjorng/otp,uabboli/otp,saleyn/otp,bugs-erlang-org/otp,matwey/otp,lemenkov/otp,aboroska/otp,fenollp/otp,mikpe/otp,potatosalad/otp,basho/otp,emile/otp,kvakvs/otp,neeraj9/otp,vladdu/otp,lemenkov/otp,bernardd/otp,jj1bdx/otp,fenollp/otp,mikpe/otp,aboroska/otp,erlang/otp,uabboli/otp,basho/otp,massemanet/otp,rlipscombe/otp,basho/otp,RaimoNiskanen/otp,emile/otp,bernardd/otp,vinoski/otp,mikpe/otp,isvilen/otp,kvakvs/otp,lightcyphers/otp,kvakvs/otp,ferd/otp,fenollp/otp,legoscia/otp,dgud/otp,RoadRunnr/otp,lightcyphers/otp,rlipscombe/otp,dgud/otp,rlipscombe/otp,lightcyphers/otp,RaimoNiskanen/otp,weisslj/otp,erlang/otp,jj1bdx/otp,bernardd/otp,dgud/otp,emacsmirror/erlang,neeraj9/otp,falkevik/otp,emile/otp,rlipscombe/otp,goertzenator/otp,lrascao/otp,massemanet/otp,cobusc/otp,bernardd/otp,weisslj/otp,massemanet/otp,isvilen/otp,legoscia/otp,massemanet/otp,lemenkov/otp,bjorng/otp,erlang/otp,uabboli/otp,bjorng/otp,falkevik/otp,electricimp/otp,lrascao/otp,bernardd/otp,emile/otp,release-project/otp,electricimp/otp,vinoski/otp,g-andrade/otp,bjorng/otp,goertzenator/otp,jj1bdx/otp,bsmr-erlang/otp,mikpe/otp,vladdu/otp,getong/otp,vinoski/otp,kvakvs/otp,goertzenator/otp,emacsmirror/erlang,neeraj9/otp,rlipscombe/otp,legoscia/otp,g-andrade/otp,RoadRunnr/otp,rlipscombe/otp,RaimoNiskanen/otp,matwey/otp,dgud/otp,basho/otp,basho/otp,g-andrade/otp,bernardd/otp,falkevik/otp,ahmedshafeeq/otp,potatosalad/otp,dgud/otp,bernardd/otp,lrascao/otp,lemenkov/otp,matwey/otp,lrascao/otp,goertzenator/otp,tuncer/otp,bugs-erlang-org/otp,legoscia/otp,emacsmirror/erlang,fenollp/otp,aboroska/otp,tuncer/otp,isvilen/otp,jj1bdx/otp,potatosalad/otp,RoadRunnr/otp,g-andrade/otp,emile/otp,bsmr-erlang/otp,neeraj9/otp,lrascao/otp,vladdu/otp,bugs-erlang-org/otp,isvilen/otp,vladdu/otp,ferd/otp,erlang/otp,RaimoNiskanen/otp,matwey/otp,rlipscombe/otp,falkevik/otp,release-project/otp,dumbbell/otp,neeraj9/otp,lightcyphers/otp,tuncer/otp,jj1bdx/otp,RoadRunnr/otp,getong/otp,erlang/otp,legoscia/otp,uabboli/otp,release-project/otp,matwey/otp,goertzenator/otp,weisslj/otp,cobusc/otp,lrascao/otp,saleyn/otp,emacsmirror/erlang,dumbbell/otp,bugs-erlang-org/otp,lrascao/otp,bsmr-erlang/otp,neeraj9/otp,aboroska/otp,cobusc/otp,bjorng/otp,lemenkov/otp,bsmr-erlang/otp,lightcyphers/otp,g-andrade/otp,jj1bdx/otp,kvakvs/otp,bsmr-erlang/otp,mikpe/otp,vinoski/otp,vladdu/otp,bugs-erlang-org/otp,tuncer/otp,jj1bdx/otp,getong/otp,cobusc/otp,erlang/otp,bjorng/otp,release-project/otp,isvilen/otp,ahmedshafeeq/otp,massemanet/otp,ferd/otp,vinoski/otp,tuncer/otp,electricimp/otp,weisslj/otp,ahmedshafeeq/otp,RoadRunnr/otp,cobusc/otp,vinoski/otp,g-andrade/otp,psyeugenic/otp,uabboli/otp,kvakvs/otp,bsmr-erlang/otp,fenollp/otp,dumbbell/otp,rlipscombe/otp,dumbbell/otp,aboroska/otp,psyeugenic/otp,aboroska/otp,fenollp/otp,saleyn/otp,ahmedshafeeq/otp,potatosalad/otp,goertzenator/otp,weisslj/otp,electricimp/otp,weisslj/otp,bjorng/otp,ahmedshafeeq/otp,vinoski/otp,dgud/otp,RoadRunnr/otp,mikpe/otp,emacsmirror/erlang,matwey/otp,isvilen/otp,tuncer/otp,ahmedshafeeq/otp,legoscia/otp,basho/otp,uabboli/otp,potatosalad/otp,electricimp/otp,cobusc/otp,electricimp/otp,vladdu/otp,bugs-erlang-org/otp,tuncer/otp,falkevik/otp,matwey/otp,ferd/otp,basho/otp,release-project/otp,ferd/otp,saleyn/otp,tuncer/otp,g-andrade/otp,weisslj/otp,lrascao/otp,lightcyphers/otp,matwey/otp,bernardd/otp,emile/otp,legoscia/otp,ferd/otp,lightcyphers/otp,cobusc/otp,RaimoNiskanen/otp,ahmedshafeeq/otp,saleyn/otp,massemanet/otp,fenollp/otp,kvakvs/otp,emile/otp,emile/otp,RoadRunnr/otp,potatosalad/otp,getong/otp,legoscia/otp,bugs-erlang-org/otp,massemanet/otp,emile/otp,bjorng/otp,vladdu/otp,dgud/otp,release-project/otp,ahmedshafeeq/otp,dumbbell/otp,psyeugenic/otp,electricimp/otp,uabboli/otp,getong/otp,erlang/otp,ferd/otp,psyeugenic/otp,RoadRunnr/otp,bugs-erlang-org/otp,isvilen/otp,jj1bdx/otp,kvakvs/otp,goertzenator/otp,saleyn/otp,ferd/otp,emacsmirror/erlang,vladdu/otp,falkevik/otp,kvakvs/otp,saleyn/otp,mikpe/otp,emacsmirror/erlang,ahmedshafeeq/otp,dgud/otp,lemenkov/otp,cobusc/otp,release-project/otp,RaimoNiskanen/otp,bsmr-erlang/otp,falkevik/otp,electricimp/otp,dgud/otp,potatosalad/otp,falkevik/otp,aboroska/otp,basho/otp,potatosalad/otp,mikpe/otp,aboroska/otp,emacsmirror/erlang,emacsmirror/erlang,psyeugenic/otp,lemenkov/otp,psyeugenic/otp,isvilen/otp,psyeugenic/otp,getong/otp,tuncer/otp,RoadRunnr/otp,vinoski/otp,vinoski/otp,dumbbell/otp,RaimoNiskanen/otp,jj1bdx/otp,jj1bdx/otp,goertzenator/otp,lrascao/otp,getong/otp,neeraj9/otp,bjorng/otp,aboroska/otp,g-andrade/otp,rlipscombe/otp,RaimoNiskanen/otp,dumbbell/otp,dumbbell/otp,erlang/otp,weisslj/otp,basho/otp,massemanet/otp,bsmr-erlang/otp,g-andrade/otp,vinoski/otp,ferd/otp,massemanet/otp,getong/otp,erlang/otp,erlang/otp,lightcyphers/otp,vladdu/otp,emacsmirror/erlang,uabboli/otp,bjorng/otp,bsmr-erlang/otp,mikpe/otp,release-project/otp,goertzenator/otp,isvilen/otp,potatosalad/otp,saleyn/otp,lemenkov/otp,fenollp/otp,uabboli/otp,getong/otp,falkevik/otp,psyeugenic/otp,isvilen/otp,dgud/otp,rlipscombe/otp,release-project/otp,saleyn/otp,matwey/otp,dumbbell/otp,RaimoNiskanen/otp,g-andrade/otp,weisslj/otp,electricimp/otp,potatosalad/otp,fenollp/otp,bernardd/otp,getong/otp
|
1bc8d2a0c5d005f2470aabf3df3f0bfc8f7c34a5
|
rosserial_mbed/src/ros_lib/MbedHardware.h
|
rosserial_mbed/src/ros_lib/MbedHardware.h
|
/*
* MbedHardware
*
* Created on: Aug 17, 2011
* Author: nucho
*/
#ifndef ROS_MBED_HARDWARE_H_
#define ROS_MBED_HARDWARE_H_
#include "mbed.h"
#include "MODSERIAL.h"
#define ROSSERIAL_BAUDRATE 57600
class MbedHardware {
public:
MbedHardware(MODSERIAL* io , long baud= ROSSERIAL_BAUDRATE)
:iostream(*io){
baud_ = baud;
t.start();
}
MbedHardware()
:iostream(USBTX, USBRX) {
baud_ = ROSSERIAL_BAUDRATE;
t.start();
}
MbedHardware(MbedHardware& h)
:iostream(h.iostream) {
this->baud_ = h.baud_;
t.start();
}
void setBaud(long baud){
this->baud_= baud;
}
int getBaud(){return baud_;}
void init(){
iostream.baud(baud_);
}
int read(){
if (iostream.readable()) {
return iostream.getc();
} else {
return -1;
}
};
void write(uint8_t* data, int length) {
for (int i=0; i<length; i++)
iostream.putc(data[i]);
}
unsigned long time(){return t.read_ms();}
protected:
MODSERIAL iostream;
long baud_;
Timer t;
};
#endif /* ROS_MBED_HARDWARE_H_ */
|
/*
* MbedHardware
*
* Created on: Aug 17, 2011
* Author: nucho
*/
#ifndef ROS_MBED_HARDWARE_H_
#define ROS_MBED_HARDWARE_H_
#include "mbed.h"
#include "MODSERIAL.h"
class MbedHardware {
public:
MbedHardware(PinName tx, PinName rx, long baud = 57600)
:iostream(tx, rx){
baud_ = baud;
t.start();
}
MbedHardware()
:iostream(USBTX, USBRX) {
baud_ = 57600;
t.start();
}
void setBaud(long baud){
this->baud_= baud;
}
int getBaud(){return baud_;}
void init(){
iostream.baud(baud_);
}
int read(){
if (iostream.readable()) {
return iostream.getc();
} else {
return -1;
}
};
void write(uint8_t* data, int length) {
for (int i=0; i<length; i++)
iostream.putc(data[i]);
}
unsigned long time(){return t.read_ms();}
protected:
MODSERIAL iostream;
long baud_;
Timer t;
};
#endif /* ROS_MBED_HARDWARE_H_ */
|
Fix unnderlying issue with Stream class being private
|
Fix unnderlying issue with Stream class being private
|
C
|
mit
|
GeodesicCarbon/protopaja-sick,GeodesicCarbon/protopaja-sick,GeodesicCarbon/protopaja-sick,GeodesicCarbon/protopaja-sick,GeodesicCarbon/protopaja-sick,GeodesicCarbon/protopaja-sick,GeodesicCarbon/protopaja-sick
|
879fdecdf38a2647c9a4793fbffedeaf150adfbd
|
src/utils/image_persister.h
|
src/utils/image_persister.h
|
#ifndef SRC_UTILS_IMAGE_PERSISTER_H_
#define SRC_UTILS_IMAGE_PERSISTER_H_
#include <string>
#include <vector>
#include <Magick++.h>
#include <Eigen/Core>
/**
* \brief Provides static functions to load and save images
*
*/
class ImagePersister
{
public:
template <class T>
static void saveRGBA32F(T *data, int width, int height, std::string filename)
{
Magick::InitializeMagick("");
Magick::Image image(width, height, "RGBA", Magick::StorageType::FloatPixel,
data);
image.write(filename);
}
static std::vector<Eigen::Vector4f> loadRGBA32F(std::string filename)
{
Magick::Image image(filename);
std::vector<Eigen::Vector4f> result(image.columns() * image.rows());
image.write(0, 0, image.columns(), image.rows(), "RGBA",
Magick::StorageType::FloatPixel, result.data());
return result;
}
};
#endif // SRC_UTILS_IMAGE_PERSISTER_H_
|
#ifndef SRC_UTILS_IMAGE_PERSISTER_H_
#define SRC_UTILS_IMAGE_PERSISTER_H_
#include <string>
#include <vector>
#include <Magick++.h>
#include <Eigen/Core>
/**
* \brief Provides static functions to load and save images
*
*/
class ImagePersister
{
public:
template <class T>
static void saveRGBA32F(T *data, int width, int height, std::string filename)
{
Magick::InitializeMagick("");
Magick::Image image(width, height, "RGBA", Magick::StorageType::FloatPixel,
data);
image.write(filename);
}
static void saveR32F(float *data, int width, int height, std::string filename)
{
Magick::InitializeMagick("");
Magick::Image image(width, height, "R", Magick::StorageType::FloatPixel,
data);
image.write(filename);
}
static std::vector<Eigen::Vector4f> loadRGBA32F(std::string filename)
{
Magick::Image image(filename);
std::vector<Eigen::Vector4f> result(image.columns() * image.rows());
image.write(0, 0, image.columns(), image.rows(), "RGBA",
Magick::StorageType::FloatPixel, result.data());
return result;
}
};
#endif // SRC_UTILS_IMAGE_PERSISTER_H_
|
Add method to save a single component float image.
|
Add method to save a single component float image.
|
C
|
mit
|
Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller,Christof/voly-labeller
|
8dc65c6cdce9d25b827eb893849dec36270aaa5c
|
drivers/scsi/qla4xxx/ql4_version.h
|
drivers/scsi/qla4xxx/ql4_version.h
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.03.00-k10"
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.03.00-k11"
|
Update driver version to 5.03.00-k11
|
[SCSI] qla4xxx: Update driver version to 5.03.00-k11
Signed-off-by: Adheer Chandravanshi <7890d7472d5d21859aa8c530110140678588acf6@qlogic.com>
Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
|
C
|
mit
|
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
|
f187f7b6f2ca4b719c88199e65a8ac298f5164fe
|
test/cases/__attribute__/ctor_dtor_warn.c
|
test/cases/__attribute__/ctor_dtor_warn.c
|
// RUN: %check %s
int x __attribute((constructor)); // CHECK: warning: constructor attribute on non-function
int main()
{
void f() __attribute((constructor)); // CHECK: warning: constructor attribute on non-global function
}
|
// RUN: %check %s
int x __attribute((constructor)); // CHECK: warning: constructor attribute on non-function
struct Q {
int x __attribute((constructor)); // CHECK: warning: constructor attribute on non-function
};
int main()
{
void f() __attribute((constructor)); // CHECK: warning: constructor attribute on non-global function
}
|
Check ctor/dtor attribute on members
|
Check ctor/dtor attribute on members
|
C
|
mit
|
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
|
acd3a4a5b459b405418b1651f59c38bca4fa0050
|
TDTHotChocolate/FoundationAdditions/NSString+TDTAdditions.h
|
TDTHotChocolate/FoundationAdditions/NSString+TDTAdditions.h
|
#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 the receiver
*/
- (NSString *)stringByTrimmingNonAlphaNumericCharacters;
/**
@return `nil` if the receiver is blank, otherwise returns the receiver.
*/
- (NSString *)stringByNillingBlanks;
/**
There is no platform agnostic format specifier for an `NSUInteger`. Ergo this.
*/
+ (NSString *)stringWithUnsignedInteger:(NSUInteger)uInteger;
@end
|
#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 the receiver
*/
- (NSString *)stringByTrimmingNonAlphaNumericCharacters;
/**
@return `nil` if the receiver is blank, otherwise returns the receiver.
*/
- (NSString *)stringByNillingBlanks;
/**
There is no platform agnostic format specifier for an `NSUInteger`. Ergo this.
*/
+ (NSString *)stringWithUnsignedInteger:(NSUInteger)uInteger;
@end
|
Fix initial case for header documentation sentences
|
Fix initial case for header documentation sentences
|
C
|
bsd-3-clause
|
talk-to/Chocolate,talk-to/Chocolate
|
a9fe5d311909b20ea275fb985a7b12eb794180e6
|
source/common/halfling_sys.h
|
source/common/halfling_sys.h
|
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef COMMON_HALFLING_SYS_H
#define COMMON_HALFLING_SYS_H
#include "common/typedefs.h"
// Only include the base windows libraries
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <comip.h>
// GDI+
#include <gdiplus.h>
// Un-define min and max from the windows headers
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#endif
|
/* The Halfling Project - A Graphics Engine and Projects
*
* The Halfling Project is the legal property of Adrian Astley
* Copyright Adrian Astley 2013
*/
#ifndef COMMON_HALFLING_SYS_H
#define COMMON_HALFLING_SYS_H
#include "common/typedefs.h"
// Only include the base windows libraries
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <comip.h>
// GDI+
#include <gdiplus.h>
// Un-define min and max from the windows headers
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#define AssertMsg(condition, message) \
do { \
if (!(condition)) { \
std::cerr << "Assertion `" #condition "` failed in " << __FILE__ \
<< " line " << __LINE__ << ": " << message << std::endl; \
std::exit(EXIT_FAILURE); \
} \
} while (false)
#endif
|
Create define for asserting with a message
|
COMMON: Create define for asserting with a message
|
C
|
apache-2.0
|
RichieSams/thehalflingproject,RichieSams/thehalflingproject,RichieSams/thehalflingproject
|
31f937755d32d1b6d6b2c30cecc6398f2aa00b3a
|
md5.h
|
md5.h
|
/* File: connection.h
*
* Description: See "md.h"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
extern bool md5_hash(const void *buff, size_t len, char *hexsum);
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
|
/* File: md5.h
*
* Description: See "md5.c"
*
* Comments: See "notice.txt" for copyright and license information.
*
*/
#ifndef __MD5_H__
#define __MD5_H__
#include "psqlodbc.h"
#include <stdlib.h>
#include <string.h>
#ifdef WIN32
#define MD5_ODBC
#define FRONTEND
#endif
#define MD5_PASSWD_LEN 35
/* From c.h */
#ifndef __BEOS__
#ifndef __cplusplus
#ifndef bool
typedef char bool;
#endif
#ifndef true
#define true ((bool) 1)
#endif
#ifndef false
#define false ((bool) 0)
#endif
#endif /* not C++ */
#endif /* __BEOS__ */
/* Also defined in include/c.h */
#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
#endif /* SIZEOF_UINT8 == 0 */
extern bool md5_hash(const void *buff, size_t len, char *hexsum);
extern bool EncryptMD5(const char *passwd, const char *salt,
size_t salt_len, char *buf);
#endif
|
Fix comment at top of file to match file name.
|
Fix comment at top of file to match file name.
|
C
|
lgpl-2.1
|
gavioto/psqlodbc,treasure-data/prestogres-odbc,Distrotech/psqlodbc,hlinnaka/psqlodbc,treasure-data/prestogres-odbc,treasure-data/prestogres-odbc,Distrotech/psqlodbc,hlinnaka/psqlodbc,Distrotech/psqlodbc,gavioto/psqlodbc,hlinnaka/psqlodbc,gavioto/psqlodbc
|
df008fe115c9c2ce79cf1a412f598101ee3788c4
|
tests/feature_tests/error_bool.c
|
tests/feature_tests/error_bool.c
|
int main() {
struct A {} a;
// error: '&&' operator requires scalar operands
a && a;
// error: '||' operator requires scalar operands
a || a;
// error: '!' operator requires scalar operand
!a;
}
|
int main() {
struct A {} a;
// error: '&&' operator requires scalar operands
a && a;
// error: '||' operator requires scalar operands
1 || a;
// error: '||' operator requires scalar operands
a || 1;
// error: '!' operator requires scalar operand
!a;
}
|
Improve tests for boolean operators
|
Improve tests for boolean operators
|
C
|
mit
|
ShivamSarodia/ShivyC,ShivamSarodia/ShivyC,ShivamSarodia/ShivyC
|
1534a6d6d9baddc9904cc160bb24cf716e1b5c94
|
tests/syscalls/sysconf_pagesize.c
|
tests/syscalls/sysconf_pagesize.c
|
/*
* Copyright (c) 2012 The Native Client 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 <stdio.h>
#if defined(__GLIBC__)
#include <unistd.h>
#else
/*
* TODO(bsy): remove when newlib toolchain catches up
* http://code.google.com/p/nativeclient/issues/detail?id=2714
*/
#include "native_client/src/trusted/service_runtime/include/sys/unistd.h"
#endif
int main(void) {
#if defined(__GLIBC__)
long rv = sysconf(_SC_PAGESIZE);
#else
long rv = sysconf(NACL_ABI__SC_PAGESIZE);
#endif
printf("%ld\n", rv);
return rv != (1<<16);
}
|
/*
* Copyright (c) 2012 The Native Client 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 <stdio.h>
#include <unistd.h>
int main(void) {
long rv = sysconf(_SC_PAGESIZE);
printf("%ld\n", rv);
return rv != (1<<16);
}
|
Clean up sysconf() test to address a TODO that depended on a toolchain roll
|
Clean up sysconf() test to address a TODO that depended on a toolchain roll
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3909
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2714
TEST=run_sysconf_pagesize_test
Review URL: https://codereview.chromium.org/655963003
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@13915 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
|
C
|
bsd-3-clause
|
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client
|
2ab77e34c2e175d90c79dde9b708e3c5beff64de
|
include/sys/dirent.h
|
include/sys/dirent.h
|
/*
* Copyright (c) 2007, 2008, 2009, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
*/
#ifndef DIRENT_H_
#define DIRENT_H_
#include <sys/cdefs.h>
#define NAME_MAX 512
struct dirent {
// long d_ino;
// off_t d_off;
// unsigned short d_reclen;
char d_name[NAME_MAX + 1];
};
typedef struct {
struct dirent dirent;
void *vh; // really a vfs_handle_t
} DIR;
__BEGIN_DECLS
DIR *opendir(const char *pathname);
struct dirent *readdir(DIR* dir);
int closedir(DIR *dir);
__END_DECLS
#endif
|
/*
* Copyright (c) 2007, 2008, 2009, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
*/
#ifndef DIRENT_H_
#define DIRENT_H_
#include <sys/cdefs.h>
// Depending on header include order, this may collide with the definition in
// newlib's <dirent.h> See open issue: https://code.systems.ethz.ch/T58#1169
#ifndef NAME_MAX
#define NAME_MAX 512
#endif
struct dirent {
// long d_ino;
// off_t d_off;
// unsigned short d_reclen;
char d_name[NAME_MAX + 1];
};
typedef struct {
struct dirent dirent;
void *vh; // really a vfs_handle_t
} DIR;
__BEGIN_DECLS
DIR *opendir(const char *pathname);
struct dirent *readdir(DIR* dir);
int closedir(DIR *dir);
__END_DECLS
#endif
|
Duplicate definition of NAME_MAX macro
|
Duplicate definition of NAME_MAX macro
I broke the build in rBFIaee0075101b1; this is just a temporary band-aid and
only masks the more general issue described in T58. If you have an idea for a
better fix, please let me know.
Signed-off-by: Zaheer Chothia <418c8e101762410c9c1204e516611673b0b87d3d@inf.ethz.ch>
|
C
|
mit
|
BarrelfishOS/barrelfish,BarrelfishOS/barrelfish,BarrelfishOS/barrelfish,8l/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,kishoredbn/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,8l/barrelfish,kishoredbn/barrelfish,8l/barrelfish,kishoredbn/barrelfish,BarrelfishOS/barrelfish,8l/barrelfish,8l/barrelfish,BarrelfishOS/barrelfish,8l/barrelfish,BarrelfishOS/barrelfish
|
e76435c6c60bf1247d6bb91fe8cf5e57a896da55
|
src/main/c/emulator/src/config.h
|
src/main/c/emulator/src/config.h
|
#ifndef CONFIG_H
#define CONFIG_H
//#define QEMU
#define SIM
#define OS_CALL 0xC0000000
#define DTB 0xC3000000
#endif
|
#ifndef CONFIG_H
#define CONFIG_H
//#define QEMU
#define SIM
#ifndef OS_CALL
#define OS_CALL 0xC0000000
#endif
#ifndef DTB
#define DTB 0xC3000000
#endif
#endif
|
Allow to set custom DTB/OS_CALL addresses
|
Allow to set custom DTB/OS_CALL addresses
Setting those from command line during compilation allows
to create a custom setup without the need of modifying the
sources.
|
C
|
mit
|
SpinalHDL/VexRiscv,SpinalHDL/VexRiscv,SpinalHDL/VexRiscv,SpinalHDL/VexRiscv,SpinalHDL/VexRiscv
|
5db8b0845e766877bebc23ad823c1681e2218624
|
vendor/brightray/browser/net_log.h
|
vendor/brightray/browser/net_log.h
|
// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_NET_LOG_H_
#define BROWSER_NET_LOG_H_
#include "base/files/scoped_file.h"
#include "net/log/net_log.h"
#include "net/log/file_net_log_observer.h"
namespace brightray {
class NetLog : public net::NetLog {
public:
NetLog();
~NetLog() override;
void StartLogging(net::URLRequestContext* url_request_context);
private:
base::ScopedFILE log_file_;
net::FileNetLogObserver write_to_file_observer_;
DISALLOW_COPY_AND_ASSIGN(NetLog);
};
} // namespace brightray
#endif // BROWSER_NET_LOG_H_
|
// Copyright (c) 2015 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef BROWSER_NET_LOG_H_
#define BROWSER_NET_LOG_H_
#include "base/files/scoped_file.h"
#include "net/log/net_log.h"
#include "net/log/file_net_log_observer.h"
#include "net/url_request/url_request_context.h"
namespace brightray {
class NetLog : public net::NetLog {
public:
NetLog();
~NetLog() override;
void StartLogging(net::URLRequestContext* url_request_context);
private:
base::ScopedFILE log_file_;
net::FileNetLogObserver write_to_file_observer_;
DISALLOW_COPY_AND_ASSIGN(NetLog);
};
} // namespace brightray
#endif // BROWSER_NET_LOG_H_
|
Add missing explicit include of net/url_request/url_request_context.h
|
Add missing explicit include of net/url_request/url_request_context.h
|
C
|
mit
|
brave/muon,brave/electron,brave/electron,brave/electron,brave/muon,brave/muon,brave/electron,brave/muon,brave/electron,brave/muon,brave/muon,brave/electron
|
711b144ed5c1bb22def8f0d7a46eb58a0bbc9bb6
|
test/tools/llvm-symbolizer/print_context.c
|
test/tools/llvm-symbolizer/print_context.c
|
// REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
//
// See PR31870 for more details on the XFAIL
// XFAIL: avr
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
// CHECK: inc
// CHECK: print_context.c:7
// CHECK: 5 : #include
// CHECK: 6 :
// CHECK: 7 >: int inc
// CHECK: 8 : return
// CHECK: 9 : }
|
// REQUIRES: x86_64-linux
// RUN: %host_cc -O0 -g %s -o %t 2>&1
// RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
#include <stdio.h>
int inc(int a) {
return a + 1;
}
int main() {
printf("%p\n", inc);
return 0;
}
// CHECK: inc
// CHECK: print_context.c:7
// CHECK: 5 : #include
// CHECK: 6 :
// CHECK: 7 >: int inc
// CHECK: 8 : return
// CHECK: 9 : }
|
Revert "[AVR] Mark a failing symbolizer test as XFAIL"
|
Revert "[AVR] Mark a failing symbolizer test as XFAIL"
This reverts commit 83a0e876349adb646ba858eb177b22b0b4bfc59a.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@309515 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm
|
6bf6d60fb44205bab201688d949e3937ee8dbd26
|
include/net/RestrictMacro.h
|
include/net/RestrictMacro.h
|
#ifndef RESTRICTMACRO_H_
#define RESTRICTMACRO_H_
#ifdef COBRA_RESTRICT
#define COBRA_RESTRICT_BREAK \
break; \
#define COBRA_RESTRICT_EXCEED_N_BREAK( EXP, NUM ) \
if (EXP > NUM) \
break; \
#define COBRA_RESTRICT_EXCEED_N_RETURN_FALSE( EXP, NUM ) \
if ( EXP > NUM ) \
return false; \
#else
#define COBRA_RESTRICT_BREAK
#define COBRA_RESTRICT_N_BREAK( EXP, NUM )
#define COBRA_RESTRICT_N_RETURN_FALSE( EXP, NUM )
#endif
#endif /*RESTRICTMACRO_H_*/
|
#ifndef RESTRICTMACRO_H_
#define RESTRICTMACRO_H_
#ifdef COBRA_RESTRICT
#define COBRA_RESTRICT_BREAK \
break; \
#define COBRA_RESTRICT_EXCEED_N_BREAK( EXP, NUM ) \
if (EXP > NUM) \
break; \
#define COBRA_RESTRICT_EXCEED_N_RETURN_FALSE( EXP, NUM ) \
if ( EXP > NUM ) \
return false; \
#else
#define COBRA_RESTRICT_BREAK
#define COBRA_RESTRICT_EXCEED_N_BREAK( EXP, NUM )
#define COBRA_RESTRICT_EXCEED_N_RETURN_FALSE( EXP, NUM )
#endif
#endif /*RESTRICTMACRO_H_*/
|
Fix compilation error of RestrictionMacro.h in sf1 if COBRA_RESTRICT is not defined.
|
Fix compilation error of RestrictionMacro.h in sf1 if COBRA_RESTRICT is not defined.
|
C
|
apache-2.0
|
izenecloud/izenelib,izenecloud/izenelib,pombredanne/izenelib,pombredanne/izenelib,izenecloud/izenelib,izenecloud/izenelib,pombredanne/izenelib,pombredanne/izenelib
|
9b1a95eb03798b3b6d969eca13fbbf6a9b0156b0
|
vk_default_loader.c
|
vk_default_loader.c
|
#include "vk_default_loader.h"
#include "vulkan/vulkan.h"
#if defined(_WIN32)
#elif defined(unix) || defined(__unix__) || defined(__unix)
#include <dlfcn.h>
static void* (*loadSym)(void* lib, const char* procname);
static void* loadSymWrap(VkInstance instance, const char* vkproc) {
return (*loadSym)(instance, vkproc);
}
#endif
void* getDefaultProcAddr() {
#if defined(_WIN32)
// TODO: WIN32 Vulkan loader
#elif defined(__APPLE__) && defined(__MACH__)
// TODO: Darwin Vulkan loader (via MoltenVK)
#elif defined(unix) || defined(__unix__) || defined(__unix)
void* libvulkan = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
if (libvulkan == NULL) {
return NULL;
}
loadSym = dlsym(libvulkan, "vkGetInstanceProcAddr");
if (loadSym == NULL) {
return NULL;
}
return &loadSymWrap;
#else
// Unknown operating system
#endif
}
|
#include "vk_default_loader.h"
#include "vulkan/vulkan.h"
#if defined(_WIN32)
#elif defined(unix) || defined(__unix__) || defined(__unix)
#include <dlfcn.h>
static void* (*symLoader)(void* lib, const char* procname);
static void* loaderWrap(VkInstance instance, const char* vkproc) {
return (*symLoader)(instance, vkproc);
}
#elif defined(__APPLE__) && defined(__MACH__)
// #include <GLFW/glfw3.h>
// static void* loaderWrap(VkInstance instance, const char* vkproc) {
// return glfwGetInstanceProcAddress(instance, vkproc);
// }
#endif
void* getDefaultProcAddr() {
#if defined(_WIN32)
// TODO: WIN32 Vulkan loader
return NULL;
#elif defined(__APPLE__) && defined(__MACH__)
// return &loaderWrap;
return NULL;
#elif defined(unix) || defined(__unix__) || defined(__unix)
void* libvulkan = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
if (libvulkan == NULL) {
return NULL;
}
symLoader = dlsym(libvulkan, "vkGetInstanceProcAddr");
if (symLoader == NULL) {
return NULL;
}
return &loaderWrap;
#else
// Unknown operating system
return NULL;
#endif
}
|
Fix no-return warning in loader, also change the internal variable names.
|
Fix no-return warning in loader, also change the internal variable names.
|
C
|
mit
|
vulkan-go/vulkan,vulkan-go/vulkan
|
21a451d7f90a7953e0eb64101188b136d076ad23
|
ouzel/RenderTarget.h
|
ouzel/RenderTarget.h
|
// Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#pragma once
#include <algorithm>
#include <memory>
#include "Types.h"
#include "Noncopyable.h"
#include "Size2.h"
namespace ouzel
{
namespace graphics
{
class Renderer;
class Texture;
class RenderTarget: public Noncopyable
{
friend Renderer;
public:
virtual ~RenderTarget();
virtual bool init(const Size2& newSize, bool useDepthBuffer);
TexturePtr getTexture() const { return texture; }
protected:
RenderTarget();
Size2 size;
bool depthBuffer = false;
TexturePtr texture;
};
} // namespace graphics
} // namespace ouzel
|
// Copyright (C) 2016 Elviss Strazdins
// This file is part of the Ouzel engine.
#pragma once
#include <algorithm>
#include <memory>
#include "Types.h"
#include "Noncopyable.h"
#include "Size2.h"
#include "Color.h"
namespace ouzel
{
namespace graphics
{
class Renderer;
class Texture;
class RenderTarget: public Noncopyable
{
friend Renderer;
public:
virtual ~RenderTarget();
virtual bool init(const Size2& newSize, bool useDepthBuffer);
virtual void setClearColor(Color color) { clearColor = color; }
virtual Color getClearColor() const { return clearColor; }
TexturePtr getTexture() const { return texture; }
protected:
RenderTarget();
Size2 size;
bool depthBuffer = false;
Color clearColor;
TexturePtr texture;
};
} // namespace graphics
} // namespace ouzel
|
Add clear color to render target
|
Add clear color to render target
|
C
|
unlicense
|
Hotspotmar/ouzel,elnormous/ouzel,elnormous/ouzel,elvman/ouzel,elvman/ouzel,elnormous/ouzel,Hotspotmar/ouzel,Hotspotmar/ouzel
|
4977c30315dca68e18a8605f235803380b2644dc
|
Source/SuggestionView/Source/SuggestionView/IMSuggestionView.h
|
Source/SuggestionView/Source/SuggestionView/IMSuggestionView.h
|
//
// ImojiSDKUI
//
// Created by Nima Khoshini
// Copyright (C) 2015 Imoji
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
#import <Foundation/Foundation.h>
@class IMCollectionView;
@class IMImojiSession;
@interface IMSuggestionView : UIView
@property(nonatomic, strong, readonly) IMCollectionView *collectionView;
/**
* @abstract Creates a collection view with the specified Imoji session
*/
+ (nonnull instancetype)imojiSuggestionViewWithSession:(nonnull IMImojiSession *)session;
@end
|
//
// ImojiSDKUI
//
// Created by Nima Khoshini
// Copyright (C) 2015 Imoji
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//
#import <Foundation/Foundation.h>
@class IMCollectionView;
@class IMImojiSession;
@interface IMSuggestionView : UIView
@property(nonatomic, strong, readonly, nonnull) IMCollectionView *collectionView;
/**
* @abstract Creates a collection view with the specified Imoji session
*/
+ (nonnull instancetype)imojiSuggestionViewWithSession:(nonnull IMImojiSession *)session;
@end
|
Fix warning with nonnull member for SuggetionView
|
Fix warning with nonnull member for SuggetionView
|
C
|
mit
|
imojiengineering/imoji-ios-sdk-ui,imojiengineering/imoji-ios-sdk-ui,alex-hoang/imoji-ios-sdk-ui,alex-hoang/imoji-ios-sdk-ui,kbot/imoji-ios-sdk-ui,imojiengineering/imoji-ios-sdk-ui,kbot/imoji-ios-sdk-ui,kbot/imoji-ios-sdk-ui,alex-hoang/imoji-ios-sdk-ui,imojiengineering/imoji-ios-sdk-ui,alex-hoang/imoji-ios-sdk-ui
|
25852400ccb5d7e35904cc3d270be741784ec22e
|
drivers/scsi/qla2xxx/qla_version.h
|
drivers/scsi/qla2xxx/qla_version.h
|
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2012 QLogic Corporation
*
* See LICENSE.qla2xxx for copyright and licensing details.
*/
/*
* Driver version
*/
#define QLA2XXX_VERSION "8.04.00.07-k"
#define QLA_DRIVER_MAJOR_VER 8
#define QLA_DRIVER_MINOR_VER 4
#define QLA_DRIVER_PATCH_VER 0
#define QLA_DRIVER_BETA_VER 0
|
/*
* QLogic Fibre Channel HBA Driver
* Copyright (c) 2003-2012 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
#define QLA_DRIVER_BETA_VER 0
|
Update the driver version to 8.04.00.08-k.
|
[SCSI] qla2xxx: Update the driver version to 8.04.00.08-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>
|
C
|
mit
|
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas
|
a96d949d521ea368bee3060dfe430fed5a631450
|
ProcessLauncher/ProcessNative.h
|
ProcessLauncher/ProcessNative.h
|
#pragma once
#include "ProcessPlatform.h"
namespace ugly
{
namespace process
{
class ProcessNative : public ProcessPlatform
{
public:
ProcessNative(const std::string& path, const std::string& arguments);
const std::string& GetFullCommandLine() const override { return commandLine; }
private:
const std::string& commandLine;
};
}
}
|
#pragma once
#include "ProcessPlatform.h"
namespace ugly
{
namespace process
{
class ProcessNative : public ProcessPlatform
{
public:
ProcessNative(const std::string& path, const std::string& arguments);
const std::string& GetFullCommandLine() const override { return commandLine; }
private:
std::string commandLine;
};
}
}
|
Fix memory corruption, trailing & in member variable type.
|
Fix memory corruption, trailing & in member variable type.
|
C
|
mit
|
Ilod/ugly,Ilod/ugly,Ilod/ugly
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.