Skip to content

Commit

Permalink
Running clang-format.
Browse files Browse the repository at this point in the history
  • Loading branch information
jholloc committed Feb 13, 2024
1 parent 07559b2 commit 8f9289a
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 57 deletions.
2 changes: 1 addition & 1 deletion source/authentication/udaClientSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# include <time.h>

# include "client/udaClientHostList.h"
# include "updateSelectParms.h"
# include "clientserver/errorLog.h"
# include "logging/logging.h"
# include "updateSelectParms.h"

using namespace uda::client_server;
using namespace uda::client;
Expand Down
5 changes: 3 additions & 2 deletions source/authentication/updateSelectParms.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
# include <winsock.h>
#endif

namespace uda::authentication {
namespace uda::authentication
{

void udaUpdateSelectParms(int fd, fd_set *rfds, struct timeval *tv);
void udaUpdateSelectParms(int fd, fd_set* rfds, struct timeval* tv);

}
5 changes: 3 additions & 2 deletions source/client/clientXDRStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
#include <rpc/rpc.h>
#include <utility>

namespace uda::client {
namespace uda::client
{

std::pair<XDR *, XDR *> clientCreateXDRStream();
std::pair<XDR*, XDR*> clientCreateXDRStream();

}
4 changes: 2 additions & 2 deletions source/client/closedown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

using namespace uda::client;

int uda::client::closedown(ClosedownType type, uda::client_server::SOCKETLIST* socket_list, XDR* client_input, XDR* client_output,
bool* reopen_logs)
int uda::client::closedown(ClosedownType type, uda::client_server::SOCKETLIST* socket_list, XDR* client_input,
XDR* client_output, bool* reopen_logs)
{
int rc = 0;

Expand Down
9 changes: 5 additions & 4 deletions source/client/closedown.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
# define closedown closedownFat
#endif

namespace uda::client {
namespace uda::client
{

enum class ClosedownType {
CLOSE_SOCKETS = 0,
CLOSE_ALL = 1,
};

int closedown(ClosedownType type, uda::client_server::SOCKETLIST *socket_list, XDR *client_input, XDR *client_output,
bool *reopen_logs);
int closedown(ClosedownType type, uda::client_server::SOCKETLIST* socket_list, XDR* client_input, XDR* client_output,
bool* reopen_logs);

}
} // namespace uda::client
4 changes: 2 additions & 2 deletions source/client/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
#include "clientserver/manageSockets.h"
#include "logging/logging.h"

#include "authentication/updateSelectParms.h"
#include "getEnvironment.h"
#include "uda/client.h"
#include "authentication/updateSelectParms.h"

#if defined(SSLAUTHENTICATION) && !defined(FATCLIENT)
# include <authentication/udaClientSSL.h>
Expand All @@ -74,7 +74,7 @@ int uda::client::connectionOpen()
}

int uda::client::reconnect(ENVIRONMENT* environment, XDR** client_input, XDR** client_output, time_t* tv_server_start,
int* user_timeout)
int* user_timeout)
{
int err = 0;

Expand Down
15 changes: 8 additions & 7 deletions source/client/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@

#include "closedown.h"

namespace uda::client {
namespace uda::client
{

int connectionOpen();

int reconnect(uda::client_server::ENVIRONMENT *environment, XDR **client_input, XDR **client_output,
time_t *tv_server_start, int *user_timeout);
int reconnect(uda::client_server::ENVIRONMENT* environment, XDR** client_input, XDR** client_output,
time_t* tv_server_start, int* user_timeout);

int createConnection(XDR *client_input, XDR *client_output, time_t *tv_server_start, int user_timeout);
int createConnection(XDR* client_input, XDR* client_output, time_t* tv_server_start, int user_timeout);

void closeConnection(ClosedownType type);

int clientWriteout(void *iohandle, char *buf, int count);
int clientWriteout(void* iohandle, char* buf, int count);

int clientReadin(void *iohandle, char *buf, int count);
int clientReadin(void* iohandle, char* buf, int count);

}
} // namespace uda::client
4 changes: 2 additions & 2 deletions source/client/generateErrors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ using namespace uda::client;
//--------------------------------------------------------------------------------------------------------------
// Generate Error Data

int uda::client::idamErrorModel(int model, int param_n, float* params, int data_n, float* data, int* asymmetry, float* errhi,
float* errlo)
int uda::client::idamErrorModel(int model, int param_n, float* params, int data_n, float* data, int* asymmetry,
float* errhi, float* errlo)
{
*asymmetry = 0; // No Error Asymmetry for most models

Expand Down
11 changes: 6 additions & 5 deletions source/client/generateErrors.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#pragma once

namespace uda::client {
namespace uda::client
{

int idamErrorModel(int model, int param_n, float *params, int data_n, float *data, int *asymmetry, float *errhi,
float *errlo);
int idamErrorModel(int model, int param_n, float* params, int data_n, float* data, int* asymmetry, float* errhi,
float* errlo);

int idamSyntheticModel(int model, int param_n, float *params, int data_n, float *data);
int idamSyntheticModel(int model, int param_n, float* params, int data_n, float* data);

int generateIdamSyntheticData(int handle);

Expand All @@ -15,4 +16,4 @@ int generateIdamDataError(int handle);

int generateIdamDimDataError(int handle, int ndim);

}
} // namespace uda::client
11 changes: 6 additions & 5 deletions source/client/getEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
# define putIdamClientEnvironment putIdamClientEnvironmentFat
#endif

namespace uda::client {
namespace uda::client
{

void printIdamClientEnvironment(const uda::client_server::ENVIRONMENT *environment);
void printIdamClientEnvironment(const uda::client_server::ENVIRONMENT* environment);

uda::client_server::ENVIRONMENT *getIdamClientEnvironment();
uda::client_server::ENVIRONMENT* getIdamClientEnvironment();

void putIdamClientEnvironment(const uda::client_server::ENVIRONMENT *environment);
void putIdamClientEnvironment(const uda::client_server::ENVIRONMENT* environment);

bool udaGetEnvHost();

Expand All @@ -24,4 +25,4 @@ void udaSetEnvHost(bool env_host);

void udaSetEnvPort(bool env_port);

}
} // namespace uda::client
3 changes: 2 additions & 1 deletion source/client/makeClientRequestBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ int makeRequestData(const char* data_object, const char* data_source, REQUEST_DA
return 0;
}

int uda::client::makeClientRequestBlock(const char** signals, const char** sources, int count, REQUEST_BLOCK* request_block)
int uda::client::makeClientRequestBlock(const char** signals, const char** sources, int count,
REQUEST_BLOCK* request_block)
{
request_block->num_requests = (int)count;
request_block->requests = (REQUEST_DATA*)malloc(count * sizeof(REQUEST_DATA));
Expand Down
11 changes: 6 additions & 5 deletions source/client/makeClientRequestBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

#include "clientserver/udaStructs.h"

namespace uda::client {
namespace uda::client
{

int makeClientRequestBlock(const char **signals, const char **sources, int count,
uda::client_server::REQUEST_BLOCK *request_block);
int makeClientRequestBlock(const char** signals, const char** sources, int count,
uda::client_server::REQUEST_BLOCK* request_block);

void freeClientRequestBlock(uda::client_server::REQUEST_BLOCK *request_block);
void freeClientRequestBlock(uda::client_server::REQUEST_BLOCK* request_block);

}
} // namespace uda::client
5 changes: 3 additions & 2 deletions source/client/startup.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

#include "udaClient.h"

namespace uda::client {
namespace uda::client
{

int udaStartup(int reset, CLIENT_FLAGS *client_flags, bool *reopen_logs);
int udaStartup(int reset, CLIENT_FLAGS* client_flags, bool* reopen_logs);

}
23 changes: 12 additions & 11 deletions source/client/udaClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include "clientserver/udaStructs.h"
#include "structures/genStructs.h"

namespace uda::client {
namespace uda::client
{

typedef struct ClientFlags {
int get_dimdble; // (Server Side) Return Dimensional Data in Double Precision
Expand All @@ -27,27 +28,27 @@ typedef struct ClientFlags {
int alt_rank;
} CLIENT_FLAGS;

uda::client_server::DATA_BLOCK *getDataBlock(int handle);
uda::client_server::DATA_BLOCK* getDataBlock(int handle);

void udaPutThreadServerBlock(uda::client_server::SERVER_BLOCK *str);
void udaPutThreadServerBlock(uda::client_server::SERVER_BLOCK* str);

void udaPutThreadClientBlock(uda::client_server::CLIENT_BLOCK *str);
void udaPutThreadClientBlock(uda::client_server::CLIENT_BLOCK* str);

uda::client_server::SERVER_BLOCK udaGetThreadServerBlock();

uda::client_server::CLIENT_BLOCK udaGetThreadClientBlock();

CLIENT_FLAGS *udaClientFlags();
CLIENT_FLAGS* udaClientFlags();

unsigned int *udaPrivateFlags();
unsigned int* udaPrivateFlags();

int idamClient(uda::client_server::REQUEST_BLOCK *request_block, int *indices);
int idamClient(uda::client_server::REQUEST_BLOCK* request_block, int* indices);

void updateClientBlock(uda::client_server::CLIENT_BLOCK *str, const CLIENT_FLAGS *client_flags,
void updateClientBlock(uda::client_server::CLIENT_BLOCK* str, const CLIENT_FLAGS* client_flags,
unsigned int private_flags);

void setUserDefinedTypeList(USERDEFINEDTYPELIST *userdefinedtypelist);
void setUserDefinedTypeList(USERDEFINEDTYPELIST* userdefinedtypelist);

void setLogMallocList(LOGMALLOCLIST *logmalloclist_in);
void setLogMallocList(LOGMALLOCLIST* logmalloclist_in);

}
} // namespace uda::client
9 changes: 5 additions & 4 deletions source/client/udaClientHostList.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
#include "clientserver/socketStructs.h"
#include <string>

namespace uda::client {
namespace uda::client
{

void udaClientFreeHostList();

const uda::client_server::HostData *udaClientFindHostByAlias(const char *alias);
const uda::client_server::HostData* udaClientFindHostByAlias(const char* alias);

const uda::client_server::HostData *udaClientFindHostByName(const char *name);
const uda::client_server::HostData* udaClientFindHostByName(const char* name);

void udaClientInitHostList();

}
} // namespace uda::client
5 changes: 3 additions & 2 deletions source/clientserver/userid.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#pragma once

namespace uda::client_server {
namespace uda::client_server
{

void userid(char *uid);
void userid(char* uid);

}

0 comments on commit 8f9289a

Please sign in to comment.