Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing whitespace in .c , .cpp and .h files #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions EXTERN.h
Expand Up @@ -32,26 +32,26 @@
/* miniperl should not export anything */
# if defined(PERL_IS_MINIPERL) && !defined(UNDER_CE) && defined(_MSC_VER)
# define EXT extern
# define dEXT
# define dEXT
# define EXTCONST extern const
# define dEXTCONST const
# else
# if defined(PERLDLL) || defined(__SYMBIAN32__)
# define EXT extern __declspec(dllexport)
# define dEXT
# define dEXT
# define EXTCONST extern __declspec(dllexport) const
# define dEXTCONST const
# else
# define EXT extern __declspec(dllimport)
# define dEXT
# define dEXT
# define EXTCONST extern __declspec(dllimport) const
# define dEXTCONST const
# endif
# endif
# else
# if defined(__CYGWIN__) && defined(USEIMPORTLIB)
# define EXT extern __declspec(dllimport)
# define dEXT
# define dEXT
# define EXTCONST extern __declspec(dllimport) const
# define dEXTCONST const
# else
Expand Down
30 changes: 15 additions & 15 deletions NetWare/NWTInfo.c
Expand Up @@ -23,7 +23,7 @@
#include "nwtinfo.h"

#ifdef MPK_ON
#include <mpktypes.h>
#include <mpktypes.h>
#include <mpkapis.h>
#else
#include <nwsemaph.h>
Expand Down Expand Up @@ -129,7 +129,7 @@ void fnInitializeThreadInfo(void)
#else
g_tinfoSem = OpenLocalSemaphore(1);
#endif //MPK_ON


for (index = 0; index < NUM_ENTRIES; index++)
g_ThreadInfo[index] = NULL;
Expand Down Expand Up @@ -159,7 +159,7 @@ BOOL fnRegisterWithThreadTable(void)
#else
tinfo = fnAddThreadInfo(GetThreadID());
#endif //MPK_ON

if (!tinfo)
return FALSE;
else
Expand Down Expand Up @@ -219,7 +219,7 @@ ThreadInfo* fnAddThreadInfo(int tid)
//
tip = (ThreadInfo *) malloc(sizeof(ThreadInfo));
if (tip == NULL)
{
{
if (g_tinfoSem)
{
#ifdef MPK_ON
Expand Down Expand Up @@ -330,7 +330,7 @@ BOOL fnRemoveThreadInfo(int tid)

ThreadInfo* fnGetThreadInfo(int tid)
{
ThreadInfo* tip;
ThreadInfo* tip;
int index = INDEXOF(tid); // just take the bottom five bits

if (g_tinfoSem) {
Expand Down Expand Up @@ -373,10 +373,10 @@ ThreadInfo* fnGetThreadInfo(int tid)

BOOL fnInsertHashListAddrs(void *addrs, BOOL dontTouchHashList)
{
ThreadInfo* tip;
ThreadInfo* tip;
int index,tid;

if (g_tinfoSem)
if (g_tinfoSem)
{
#ifdef MPK_ON
kSemaphoreWait(g_tinfoSem);
Expand All @@ -391,7 +391,7 @@ BOOL fnInsertHashListAddrs(void *addrs, BOOL dontTouchHashList)
tid=index = GetThreadID();
#endif //MPK_ON

index = INDEXOF(index); // just take the bottom five bits
index = INDEXOF(index); // just take the bottom five bits

// see if this is already in the table at the index'th offset
//
Expand Down Expand Up @@ -427,10 +427,10 @@ BOOL fnInsertHashListAddrs(void *addrs, BOOL dontTouchHashList)

BOOL fnGetHashListAddrs(void **addrs, BOOL *dontTouchHashList)
{
ThreadInfo* tip;
int index,tid;
ThreadInfo* tip;
int index,tid;

if (g_tinfoSem)
if (g_tinfoSem)
{
#ifdef MPK_ON
kSemaphoreWait(g_tinfoSem);
Expand All @@ -445,7 +445,7 @@ BOOL fnGetHashListAddrs(void **addrs, BOOL *dontTouchHashList)
tid=index = GetThreadID();
#endif //MPK_ON

index = INDEXOF(index); // just take the bottom five bits
index = INDEXOF(index); // just take the bottom five bits

// see if this is already in the table at the index'th offset
//
Expand Down Expand Up @@ -542,7 +542,7 @@ ThreadContext* fnAddThreadCtx(long lTLSIndex, void *t)
//
tip = (ThreadContext *) malloc(sizeof(ThreadContext));
if (tip == NULL)
{
{
if (g_tCtxSem)
{
#ifdef MPK_ON
Expand Down Expand Up @@ -673,9 +673,9 @@ BOOL fnRemoveThreadCtx(long lTLSIndex)

void* fnGetThreadCtx(long lTLSIndex)
{
ThreadContext* tip;
ThreadContext* tip;

if (g_tCtxSem)
if (g_tCtxSem)
{
#ifdef MPK_ON
kSemaphoreWait(g_tCtxSem);
Expand Down
10 changes: 5 additions & 5 deletions NetWare/NWUtil.c
Expand Up @@ -411,7 +411,7 @@ void fnAppendArgument(PCOMMANDLINEPARSER pclp, char *new_arg)


// Lengthen the argument vector if there's not room for another.
// Testing for 'm_argc+2' rather than 'm_argc+1' in the test guarantees
// Testing for 'm_argc+2' rather than 'm_argc+1' in the test guarantees
// that there'll always be a NULL terminator at the end of argv.
if ((pclp->m_argc + 2) > pclp->m_argv_len)
{
Expand Down Expand Up @@ -480,7 +480,7 @@ void fnAppendArgument(PCOMMANDLINEPARSER pclp, char *new_arg)
// More so when the command was like, "perl ", that is the name "perl" followed
// by a few blank spaces, it used to give error in opening file:
// "unable to open the file" since the filename would have some junk characters.
//
//
// These issues are fixed through the code below.
for(i=pclp->m_argc; i<pclp->m_argv_len; i++)
strncpy(pclp->m_argv[i], "", (MAX_DN_BYTES * sizeof(char))); // MAX_DN_BYTES is the size of pclp->m_argv[].
Expand Down Expand Up @@ -544,7 +544,7 @@ char *fnSkipToken(char *s, char *r)
else if (ch==quote) // if close quote...
{
quote = 0; // ...leave quote mode
}
}
}
}

Expand Down Expand Up @@ -586,7 +586,7 @@ char *fnScanToken(char *x, char *r)
while (*s)
{
ch = *s; // invariant: ch != 0

// look to see if we've reached the end of the token
if (!quote) // but don't look for token break if we're inside quotes
{
Expand All @@ -599,7 +599,7 @@ char *fnScanToken(char *x, char *r)
if (ch=='&' && x[1]=='>')
break; // break on "&>" (redirect both stdout & stderr)
}

// process the next source character
if (ch=='\\' && (c=s[1]) && (c=='\\'||c=='>'||c=='<'||c==quote))
{
Expand Down
18 changes: 9 additions & 9 deletions NetWare/Nwmain.c
Expand Up @@ -120,8 +120,8 @@ int fnFpSetMode(FILE* fp, int mode, int *err);
void fnGetPerlScreenName(char *sPerlScreenName);

void fnGetPerlScreenName(char *sPerlScreenName);
void fnSetupNamespace(void);
char *getcwd(char [], int);
void fnSetupNamespace(void);
char *getcwd(char [], int);
void fnRunScript(ScriptData* psdata);
void nw_freeenviron();

Expand All @@ -140,7 +140,7 @@ void nw_freeenviron();

==============================================================================================*/

void main(int argc, char *argv[])
void main(int argc, char *argv[])
{
char sysCmdLine[MAX_COMMAND_SIZE] = {'\0'};
char cmdLineCopy[sizeof(PERL_COMMAND_NAME)+sizeof(sysCmdLine)+2] = {'\0'};
Expand Down Expand Up @@ -205,7 +205,7 @@ void main(int argc, char *argv[])
{
strcpy(cmdLineCopy, PERL_COMMAND_NAME);
strcat(cmdLineCopy, (char *)" "); // Space between the Perl Command and the input script name.
strcat(cmdLineCopy, sysCmdLine); // The command line parameters built into
strcat(cmdLineCopy, sysCmdLine); // The command line parameters built into

// Create a safe copy of the command line and pass it to the
// new thread for parsing. The new thread will be responsible
Expand Down Expand Up @@ -466,9 +466,9 @@ void fnSetupNamespace(void)
//LATER: call SetTargetNameSpace(NWOS2_NAME_SPACE)? Currently, if
// I make this call, then CPerlExe::Rename fails in certain cases,
// and it isn't clear why. Looks like a CLIB bug...
// SetTargetNameSpace(NWOS2_NAME_SPACE);
// SetTargetNameSpace(NWOS2_NAME_SPACE);

//Uncommented that above call, retaining the comment so that it will be easy
//Uncommented that above call, retaining the comment so that it will be easy
//to revert back if there is any problem - sgp - 10th May 2000

//Commented again, since Perl debugger had some problems because of
Expand All @@ -478,12 +478,12 @@ void fnSetupNamespace(void)
// if running on Moab, call UseAccurateCaseForPaths. This API
// does bad things on 4.11 so we call only for Moab.
PFGETFILESERVERMAJORVERSIONNUMBER pf_getfileservermajorversionnumber = NULL;
pf_getfileservermajorversionnumber = (PFGETFILESERVERMAJORVERSIONNUMBER)
pf_getfileservermajorversionnumber = (PFGETFILESERVERMAJORVERSIONNUMBER)
ImportSymbol(GetNLMHandle(), (char *)"GetFileServerMajorVersionNumber");
if (pf_getfileservermajorversionnumber && ((*pf_getfileservermajorversionnumber)() > 4))
{
PFUSEACCURATECASEFORPATHS pf_useaccuratecaseforpaths = NULL;
pf_useaccuratecaseforpaths = (PFUSEACCURATECASEFORPATHS)
pf_useaccuratecaseforpaths = (PFUSEACCURATECASEFORPATHS)
ImportSymbol(GetNLMHandle(), (char *)"UseAccurateCaseForPaths");
if (pf_useaccuratecaseforpaths)
(*pf_useaccuratecaseforpaths)(TRUE);
Expand Down Expand Up @@ -1354,7 +1354,7 @@ void fnGetPerlScreenName(char *sPerlScreenName)


// Global variable to hold the environ information.
// First time it is accessed, it will be created and initialized and
// First time it is accessed, it will be created and initialized and
// next time onwards, the pointer will be returned.

// Improvements - Dynamically read env everytime a request comes - Is this required?
Expand Down
4 changes: 2 additions & 2 deletions NetWare/deb.h
Expand Up @@ -37,8 +37,8 @@
#define IDB ConsolePrintf
#else
//release build, so disable DBGMESG and IDB
#define DBGMESG
#define IDB
#define DBGMESG
#define IDB
#endif //if defined(USE_D2)
#endif //if defined(DEBUGON) && !defined(USE_D2)

Expand Down
2 changes: 1 addition & 1 deletion NetWare/interface.h
Expand Up @@ -12,7 +12,7 @@
* DESCRIPTION : Perl parsing and running functions.
* Author : SGP
* Date Created : January 2001.
* Date Modified: July 2nd 2001.
* Date Modified: July 2nd 2001.
*/


Expand Down
12 changes: 6 additions & 6 deletions NetWare/nw5.c
Expand Up @@ -70,7 +70,7 @@ nw_abort(void)
}

int
nw_access(const char *path, int mode)
nw_access(const char *path, int mode)
{
return access(path, mode);
}
Expand Down Expand Up @@ -293,13 +293,13 @@ nw_vfprintf(FILE *fp, const char *format, va_list args)
int
nw_wait(int *status)
{
return 0;
return 0;
}

int
nw_waitpid(int pid, int *status, int flags)
{
return 0;
return 0;
}

int
Expand Down Expand Up @@ -572,7 +572,7 @@ nw_opendir(const char *filename)
char *buff = NULL;
int len = 0;
DIR *ret = NULL;

len = strlen(filename);
buff = malloc(len + 5);
if (buff) {
Expand Down Expand Up @@ -740,7 +740,7 @@ nw_vprintf(const char *format, va_list args)
int
nw_printf(const char *format, ...)
{

va_list marker;
va_start(marker, format); /* Initialize variable arguments. */

Expand Down Expand Up @@ -850,7 +850,7 @@ sys_intern_dup(pTHX_ struct interp_intern *src, struct interp_intern *dst)
void
Perl_init_os_extras(void)
{

}

void
Expand Down
6 changes: 3 additions & 3 deletions NetWare/nw5iop.h
Expand Up @@ -27,8 +27,8 @@
# define END_EXTERN_C }
# define EXTERN_C extern "C"
#else
# define START_EXTERN_C
# define END_EXTERN_C
# define START_EXTERN_C
# define END_EXTERN_C
# define EXTERN_C
#endif
#endif
Expand Down Expand Up @@ -57,7 +57,7 @@
*/
/********CHKSGP ****/
//making DLLExport as nothing
#define DllExport
#define DllExport
/*******************/

START_EXTERN_C
Expand Down
12 changes: 6 additions & 6 deletions NetWare/nw5sck.c
Expand Up @@ -74,7 +74,7 @@ nw_connect(SOCKET s, const struct sockaddr *addr, int addrlen)
}

void
nw_endhostent()
nw_endhostent()
{
endhostent();
}
Expand Down Expand Up @@ -104,13 +104,13 @@ nw_gethostent()
}

struct netent *
nw_getnetent(void)
nw_getnetent(void)
{
return ((struct netent *) getnetent());
}

struct protoent *
nw_getprotoent(void)
nw_getprotoent(void)
{
return ((struct protoent *) getprotoent());
}
Expand All @@ -134,13 +134,13 @@ nw_gethostbyaddr(const char *addr, int len, int type)
}

struct netent *
nw_getnetbyaddr(long net, int type)
nw_getnetbyaddr(long net, int type)
{
return(getnetbyaddr(net,type));
}

struct netent *
nw_getnetbyname(char *name)
nw_getnetbyname(char *name)
{
return (struct netent *)getnetbyname(name);
}
Expand Down Expand Up @@ -177,7 +177,7 @@ nw_getservbyport(int port, const char *proto)
}

struct servent *
nw_getservent(void)
nw_getservent(void)
{
return (struct servent *) getservent();
}
Expand Down