forked from auracaster/openocd
- Fixes '[<>]' whitespace
- Replace ')\([<>]\)(' with ') \1 ('.
- Replace ')\([<>]\)\(\w\)' with ') \1 \2'.
- Replace '\(\w\)\([<>]\)(' with '\1 \2 ('.
- Replace '\(\w\)\([<>]\)\(\w\)' with '\1 \2 \3'.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2375 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -42,7 +42,7 @@ static inline void buf_set_u32(uint8_t* buffer, unsigned int first, unsigned int
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
for (i = first; i<first + num; i++)
|
||||
for (i = first; i < first + num; i++)
|
||||
{
|
||||
if (((value >> (i-first))&1) == 1)
|
||||
buffer[i/8] |= 1 << (i%8);
|
||||
@@ -61,7 +61,7 @@ static inline uint32_t buf_get_u32(const uint8_t* buffer, unsigned int first, un
|
||||
uint32_t result = 0;
|
||||
unsigned int i;
|
||||
|
||||
for (i = first; i<first + num; i++)
|
||||
for (i = first; i < first + num; i++)
|
||||
{
|
||||
if (((buffer[i/8]>>(i%8))&1) == 1)
|
||||
result |= 1 << (i-first);
|
||||
|
||||
@@ -492,7 +492,7 @@ int command_run_line(command_context_t *context, char *line)
|
||||
int reslen;
|
||||
|
||||
result = Jim_GetString(Jim_GetResult(interp), &reslen);
|
||||
if (reslen>0)
|
||||
if (reslen > 0)
|
||||
{
|
||||
int i;
|
||||
char buff[256 + 1];
|
||||
|
||||
@@ -84,7 +84,7 @@ static inline int fileio_open_local(fileio_t *fileio)
|
||||
|
||||
result2 = fseek(fileio->file, 0, SEEK_SET);
|
||||
|
||||
if ((fileio->size<0)||(result<0)||(result2<0))
|
||||
if ((fileio->size < 0)||(result < 0)||(result2 < 0))
|
||||
{
|
||||
fileio_close(fileio);
|
||||
return ERROR_FILEIO_OPERATION_FAILED;
|
||||
|
||||
@@ -503,8 +503,8 @@ int Jim_StringToDouble(const char *str, double *doublePtr)
|
||||
static jim_wide JimPowWide(jim_wide b, jim_wide e)
|
||||
{
|
||||
jim_wide i, res = 1;
|
||||
if ((b == 0 && e != 0) || (e<0)) return 0;
|
||||
for (i = 0; i<e; i++) {res *= b;}
|
||||
if ((b == 0 && e != 0) || (e < 0)) return 0;
|
||||
for (i = 0; i < e; i++) {res *= b;}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -6953,8 +6953,8 @@ int Jim_EvalExpression(Jim_Interp *interp, Jim_Obj *exprObjPtr,
|
||||
case JIM_EXPROP_ADD: wC = wA + wB; break;
|
||||
case JIM_EXPROP_SUB: wC = wA-wB; break;
|
||||
case JIM_EXPROP_MUL: wC = wA*wB; break;
|
||||
case JIM_EXPROP_LT: wC = wA<wB; break;
|
||||
case JIM_EXPROP_GT: wC = wA>wB; break;
|
||||
case JIM_EXPROP_LT: wC = wA < wB; break;
|
||||
case JIM_EXPROP_GT: wC = wA > wB; break;
|
||||
case JIM_EXPROP_LTE: wC = wA <= wB; break;
|
||||
case JIM_EXPROP_GTE: wC = wA >= wB; break;
|
||||
case JIM_EXPROP_LSHIFT: wC = wA << wB; break;
|
||||
@@ -7058,8 +7058,8 @@ trydouble:
|
||||
case JIM_EXPROP_ADD: dC = dA + dB; break;
|
||||
case JIM_EXPROP_SUB: dC = dA-dB; break;
|
||||
case JIM_EXPROP_MUL: dC = dA*dB; break;
|
||||
case JIM_EXPROP_LT: dC = dA<dB; break;
|
||||
case JIM_EXPROP_GT: dC = dA>dB; break;
|
||||
case JIM_EXPROP_LT: dC = dA < dB; break;
|
||||
case JIM_EXPROP_GT: dC = dA > dB; break;
|
||||
case JIM_EXPROP_LTE: dC = dA <= dB; break;
|
||||
case JIM_EXPROP_GTE: dC = dA >= dB; break;
|
||||
case JIM_EXPROP_NUMEQ: dC = dA == dB; break;
|
||||
@@ -8197,7 +8197,7 @@ static char *JimFindBestPackage(Jim_Interp *interp, char **prefixes,
|
||||
strncmp(fileName + fileNameLen-4, ".dll", 4) == 0 ||
|
||||
strncmp(fileName + fileNameLen-3, ".so", 3) == 0))
|
||||
{
|
||||
char ver[6]; /* xx.yy<nulterm> */
|
||||
char ver[6]; /* xx.yy < nulterm> */
|
||||
char *p = strrchr(fileName, '.');
|
||||
int verLen, fileVer;
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@ char *alloc_printf(const char *format, ...)
|
||||
void keep_alive()
|
||||
{
|
||||
current_time = timeval_ms();
|
||||
if (current_time-last_time>1000)
|
||||
if (current_time-last_time > 1000)
|
||||
{
|
||||
extern int gdb_actual_connections;
|
||||
|
||||
@@ -400,7 +400,7 @@ void keep_alive()
|
||||
"trouble with GDB connections.",
|
||||
current_time-last_time);
|
||||
}
|
||||
if (current_time-last_time>500)
|
||||
if (current_time-last_time > 500)
|
||||
{
|
||||
/* this will keep the GDB connection alive */
|
||||
LOG_USER_N("%s", "");
|
||||
@@ -429,10 +429,10 @@ void alive_sleep(int ms)
|
||||
{
|
||||
int i;
|
||||
int napTime = 10;
|
||||
for (i = 0; i<ms; i += napTime)
|
||||
for (i = 0; i < ms; i += napTime)
|
||||
{
|
||||
int sleep_a_bit = ms-i;
|
||||
if (sleep_a_bit>napTime)
|
||||
if (sleep_a_bit > napTime)
|
||||
{
|
||||
sleep_a_bit = napTime;
|
||||
}
|
||||
@@ -445,7 +445,7 @@ void busy_sleep(int ms)
|
||||
{
|
||||
long long then;
|
||||
then = timeval_ms();
|
||||
while ((timeval_ms()-then)<ms)
|
||||
while ((timeval_ms()-then) < ms)
|
||||
{
|
||||
/* busy wait */
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
/* MIN,MAX macros */
|
||||
#ifndef MIN
|
||||
#define MIN(a,b) (((a)<(b))?(a):(b))
|
||||
#define MIN(a,b) (((a) < (b))?(a):(b))
|
||||
#endif
|
||||
#ifndef MAX
|
||||
#define MAX(a,b) (((a)>(b))?(a):(b))
|
||||
#define MAX(a,b) (((a) > (b))?(a):(b))
|
||||
#endif
|
||||
|
||||
/* for systems that do not support ENOTSUP
|
||||
|
||||
Reference in New Issue
Block a user