// ============================================================================
// declarations
// ============================================================================
{
int moreflags = 0;
// was already there.
if ((flags & O_CREAT) && !(flags & O_EXCL) && (mode & wxS_IWUSR) != 0)
moreflags = O_EXCL;
// the file was actually created and needs fixing
if (fd != -1 && (flags & O_CREAT) != 0 && (mode & wxS_IWUSR) != 0)
_wchmod(pathname, mode);
fd = _wopen(pathname, flags & ~(O_EXCL | O_CREAT));
// the opening of an existing file, so try again without.
else if (fd == -1 && moreflags != 0)
{
fd = _wopen(pathname, flags & ~O_CREAT);
// ============================================================================
// declarations
// ============================================================================
{
int moreflags = 0;
int fd = _wopen(pathname, flags | moreflags, mode);
// the file was actually created and needs fixing
if (fd != -1 && (flags & O_CREAT) != 0 && (mode & wxS_IWUSR) != 0)
_wchmod(pathname, mode);
fd = _wopen(pathname, flags & ~(O_EXCL | O_CREAT));
// the opening of an existing file, so try again without.
else if (fd == -1 && moreflags != 0)
{
// ============================================================================
// declarations
// ============================================================================
{
int moreflags = 0;
// was already there.
if ((flags & O_CREAT) && !(flags & O_EXCL) && (mode & wxS_IWUSR) != 0)
moreflags = O_EXCL;
// the file was actually created and needs fixing
if (fd != -1 && (flags & O_CREAT) != 0 && (mode & wxS_IWUSR) != 0)
_wchmod(pathname, mode);
fd = _wopen(pathname, flags & ~(O_EXCL | O_CREAT));
// the opening of an existing file, so try again without.
else if (fd == -1 && moreflags != 0)
{
fd = _wopen(pathname, flags & ~O_CREAT);
// ============================================================================
// declarations
// ============================================================================
{
int moreflags = 0;
// was already there.
if ((flags & O_CREAT) && !(flags & O_EXCL) && (mode & wxS_IWUSR) != 0)
moreflags = O_EXCL;
// the file was actually created and needs fixing
if (fd != -1 && (flags & O_CREAT) != 0 && (mode & wxS_IWUSR) != 0)
_wchmod(pathname, mode);
fd = _wopen(pathname, flags & ~(O_EXCL | O_CREAT));
// the opening of an existing file, so try again without.
else if (fd == -1 && moreflags != 0)
{
fd = _wopen(pathname, flags & ~O_CREAT);
#define read_db(f, buf, len) (fread((buf), 1, (len), (f)->fp))
#define read_buffer(buf, f) ((read_db((f), (buf), sizeof(buf)) == sizeof(buf)) ? 0 : -1)
{
ModeLocks *ml = ci->Require<ModeLocks>("modelocks");
for (unsigned i = 0; i < (sizeof(mlock_infos) / sizeof(mlock_info)); ++i)
if (lock & mlock_infos[i].m)
{
ChannelMode *cm = ModeManager::FindChannelModeByChar(mlock_infos[i].c);
{
if (limit && mlock_infos[i].c == 'l')
ml->SetMLock(cm, status, stringify(*limit));
else if (key && mlock_infos[i].c == 'k')
static const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char Pad64 = '=';
Chris Neale June 6 2008
- Added ability to deal with NNI!=1
if(connect(sockfd, (struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) {
struct ID_struct ID;
unsigned int baseNameLength=strlen(argv[3]);
//char IDsetupFileName[80];
unsigned int protocol_version=PROTOCOL_VERSION;
int old_replica_number=-1;
int new_replica_number=-1;
int addfile,sbf;
if(argv[3][0]=='*' && argv[3][1]=='*'){
ID.title[0]=ID.title[1]='*';
sendTCS(sockfd,(float)tcs);
public:
inline operator uint8() const { int32 v = (int32)(data * 127.0f) + 128; if (v > 255) v = 255; else if (v < 0) v = 0; return v; }
inline operator int8() const { int32 v = (int32)(data * 127.0f); if (v > 127) v = 127; else if (v < -127) v = -127; return v; }
inline operator int16() const { int32 v = (int32)(data * 32767.0f); if (v > 32767) v = 32767; else if (v < -32767) v = -32767; return v; }
{ \
register const src_type##_sample *s = (const src_type##_sample *) src; \
register dst_type *d = (dst_type *) dst; \
register int32 c = count >> 4; \
if (!c) goto fin1; \
do { \
d[0] = s[0]; d[1] = s[1]; \
d[2] = s[2]; d[3] = s[3]; \
d[4] = s[4]; d[5] = s[5]; \
d[6] = s[6]; d[7] = s[7]; \
d[8] = s[8]; d[9] = s[9]; \
//------------------------------------------------------------------------------
static char baseType[] = "Stopwatch virtual base class";
{
if (name==0) name = "Stopwatch";
markTime();
running = true;
char *d = sw_name;
while ((*d++ = *s++) && ((d-sw_name)<STOPWATCH_MAX_NAME));
// Null terminate if necessary
if (d == sw_name+STOPWATCH_MAX_NAME) sw_name[STOPWATCH_MAX_NAME-1]='\0';
static char genericType[] = "Generic wall clock (ftime())";
{
sw_type = genericType;
* Licence (BSD):
* ==============
{
private static final char[] CA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
private static final int[] IA = new int[256];
static {
Arrays.fill(IA, -1);
for (int i = 0, iS = CA.length; i < iS; i++)
IA[CA[i]] = i;
IA['='] = 0;
}
// Check special case
int sLen = sArr != null ? sArr.length : 0;
if (sLen == 0)
// Encode the int into four chars
dArr[d++] = CA[(i >>> 18) & 0x3f];
#define ANYTHING_ON_SUB \
((GFX.r2130 & 0x30) != 0x30 && \
{
register uint32 PixelOdd = 1;
register uint32 PixelEven = 2;
#ifdef GFX_MULTI_FORMAT
if (GFX.BuildPixel == NULL)
for (uint8 bitshift = 0; bitshift < 4; bitshift++)
{
for (register int i = 0; i < 16; i++)
{
register uint32 h = 0;
register uint32 l = 0;
#define ON_SUB(N) \
((GFX.r2130 & 0x30) != 0x30 && \
#define ANYTHING_ON_SUB \
((GFX.r2130 & 0x30) != 0x30 && \
#define FIX_INTERLACE(SCREEN, DO_DEPTH, DEPTH) \
if (IPPU.DoubleHeightPixels && ((PPU.BGMode != 5 && PPU.BGMode != 6) || !IPPU.Interlace)) \
for (uint32 y = GFX.StartY; y <= GFX.EndY; y++) \
{ \
{
register uint32 PixelOdd = 1;
register uint32 PixelEven = 2;
#ifdef GFX_MULTI_FORMAT
if (GFX.BuildPixel == NULL)
for (uint8 bitshift = 0; bitshift < 4; bitshift++)
{
public class Base64Utils {
private static final char[] CA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
private static final int[] IA = new int[256];
Arrays.fill(IA, -1);
for (int i = 0, iS = CA.length; i < iS; i++)
IA[CA[i]] = i;
IA['='] = 0;
}
// Check special case
int sLen = sArr != null ? sArr.length : 0;
if (sLen == 0)
// Encode the int into four chars
dArr[d++] = CA[(i >>> 18) & 0x3f];
dArr[d++] = CA[(i >>> 12) & 0x3f];
dArr[d++] = CA[(i >>> 6) & 0x3f];
* Licence (BSD):
* ==============
public static final RFC2045_CODE_TABLE RFC2045 = new RFC2045_CODE_TABLE();
public static final FS_CODE_TABLE FS = new FS_CODE_TABLE();
private static class CodeTable {
char[] CA = {};
int[] IA = new int[256];
boolean PA = false;
int LB = 0;
public CodeTable(char[] CA) {
this.CA = CA;
Arrays.fill(IA, -1);
* Licence (BSD):
* ==============
{
private static final char[] CA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
private static final int[] IA = new int[256];
static {
Arrays.fill(IA, -1);
for (int i = 0, iS = CA.length; i < iS; i++)
IA[CA[i]] = i;
IA['='] = 0;
}
// Copy next three bytes into lower 24 bits of int, paying attension to sign.
int i = (sArr[s++] & 0xff) << 16 | (sArr[s++] & 0xff) << 8 | (sArr[s++] & 0xff);
// Encode the int into four chars
dArr[d++] = CA[(i >>> 18) & 0x3f];
* Licence (BSD):
* ==============
{
private static final char[] CA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
private static final int[] IA = new int[256];
static {
Arrays.fill(IA, -1);
for (int i = 0, iS = CA.length; i < iS; i++)
IA[CA[i]] = i;
IA['='] = 0;
}
// Check special case
int sLen = sArr != null ? sArr.length : 0;
if (sLen == 0)
// Encode the int into four chars
dArr[d++] = CA[(i >>> 18) & 0x3f];
const void* SK_RESTRICT src, size_t n) {
SkASSERT(n > 0 && n <= 15);
uint8_t* d = (uint8_t*)dst;
switch (n) {
case 15: *d++ = *s++;
case 14: *d++ = *s++;
case 13: *d++ = *s++;
case 12: *d++ = *s++;
case 11: *d++ = *s++;
case 10: *d++ = *s++;
case 9: *d++ = *s++;
case 8: *d++ = *s++;
case 7: *d++ = *s++;
case 6: *d++ = *s++;
case 5: *d++ = *s++;
case 4: *d++ = *s++;
case 3: *d++ = *s++;
int count, U8CPU alpha) {
SkASSERT(alpha <= 255);
if (count <= 0) {
return;
uint32_t src_scale = SkAlpha255To256(alpha);
uint32_t dst_scale = 256 - src_scale;
if (count >= 4) {
SkASSERT(((size_t)dst & 0x03) == 0);
while (((size_t)dst & 0x0F) != 0) {
*dst = SkAlphaMulQ(*src, src_scale) + SkAlphaMulQ(*dst, dst_scale);
__m128i dst_scale_wide = _mm_set1_epi16(dst_scale << 8);
while (count >= 4) {
// Load 4 pixels each of src and dest.