Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

dirstate.cpp: move revhash_string to right before main

Is only used by main anyway.
Nothing changed, just moved that function.

Changeset bba6a4b72614

Parent 8f033331c7ce

by Adrian Buehlmann

Changes to one file · Browse files at bba6a4b72614 Showing diff from parent 8f033331c7ce Diff from another changeset...

 
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
 
362
363
364
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
365
366
367
 
202
203
204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
205
206
207
 
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
@@ -202,21 +202,6 @@
 }     -static char *revhash_string(const char revhash[HASH_LENGTH]) -{ - unsigned ix; - static char rev_string[HASH_LENGTH * 2 + 1]; - static char *hexval = "0123456789abcdef"; - for (ix = 0; ix < HASH_LENGTH; ++ix) - { - rev_string[ix * 2] = hexval[(revhash[ix] >> 4) & 0xf]; - rev_string[ix * 2 + 1] = hexval[revhash[ix] & 0xf]; - } - rev_string[sizeof(rev_string)] = 0; - return rev_string; -} - -  char mapdirstate(const direntry* entry, const struct _stat* stat)  {   switch (entry->state) @@ -362,6 +347,21 @@
 }     +static char *revhash_string(const char revhash[HASH_LENGTH]) +{ + unsigned ix; + static char rev_string[HASH_LENGTH * 2 + 1]; + static char *hexval = "0123456789abcdef"; + for (ix = 0; ix < HASH_LENGTH; ++ix) + { + rev_string[ix * 2] = hexval[(revhash[ix] >> 4) & 0xf]; + rev_string[ix * 2 + 1] = hexval[revhash[ix] & 0xf]; + } + rev_string[sizeof(rev_string)] = 0; + return rev_string; +} + +  #if 0  int main(int argc, char *argv[])  {