[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/livecodeali/livecode/develop/engine/src/deploy_file.cpp [Back]  [Original]

/* Copyright (C) 2003-2015 LiveCode Ltd.

This file is part of LiveCode.

LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.

LiveCode 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 General Public License
for more details.

You should have received a copy of the GNU General Public License
along with LiveCode.  If not see .  */

#include "prefix.h"

#include "globdefs.h"
#include "objdefs.h"
#include "parsedef.h"
#include "filedefs.h"


#include "handler.h"
#include "scriptpt.h"
#include "variable.h"
#include "statemnt.h"
#include "globals.h"

#include "ide.h"
#include "deploy.h"
#include "mode.h"
#include "license.h"

#include "capsule.h"

#include "mcio.h"

#ifdef _WINDOWS_DESKTOP
#include 
#elif defined(_MAC_DESKTOP) || defined(_LINUX_DESKTOP)
#include 
#endif

////////////////////////////////////////////////////////////////////////////////

void MCDeployByteSwap32(bool p_to_network, uint32_t& x)
{
#ifdef __BIG_ENDIAN__
	if (p_to_network)
		return;
#else
	if (!p_to_network)
		return;
#endif
	
	x = ((x >> 24) & 0xff) | ((x >> 8) & 0xff00) | ((x & 0xff00)  8) & 0xff);
			*(uint16_t *)p = x;
			
		}
		else if (*f == 'l')
		{
			if (s < 4)
				break;
			n = 4;
			
			uint32_t x;
			x = *(uint32_t *)p;
			x = ((x >> 24) & 0xff) | ((x >> 8) & 0xff00) | ((x & 0xff00)  56) & 0xff) | ((x >> 40) & 0xff00) | ((x >> 24) & 0xff0000) | ((x >> 8) & 0xff000000) |
				((x & 0xff000000) 

Web Proxy Viewer  |  New URL  |  Original Page