48+ results for 'while (*d++ = *s++); repo:danrmiller/Open-Transactions' (0 ms)

Not the results you expected?

Args.hpp (https://github.com/XCSoar/XCSoar.git) C++ Header · 228 lines

116 d++;

117 }

118 } while (*s++);

119

120 if (name == nullptr)

MIDLWrapper.cpp (https://gitlab.com/brian0218/rk3188_r-box_android4.2.2_sdk) C++ · 86 lines

59 wchar_t* d = newPath;

60 wchar_t* s = envp[pathIndex];

61 while (s < afterLeadingSemiColon)

62 *d++ = *s++;

63

64 // Copy everything after the vcbin path...

65 s = trailingSemiColon;

66 while (*d++ = *s++);

67

68 envp[pathIndex] = newPath;

serial_handler.c (https://github.com/schneider42/uberbus.git) C · 112 lines

17 void serial_putsenc(char * s)

18 {

19 while(*s){

20 if(*s == SERIAL_ESCAPE)

21 uart1_putc(SERIAL_ESCAPE);

22 uart1_putc(*s++);

23 }

24 }

30 if(*d == SERIAL_ESCAPE)

31 uart1_putc(SERIAL_ESCAPE);

32 uart1_putc(*d++);

33 }

34 }

Args.hpp (https://github.com/mobotics/XCSoar.git) C++ Header · 182 lines

114 d++;

115 }

116 } while (*s++);

117

118 if (name == NULL)

PortableStrlcpy.c (https://github.com/cdcarter/io.git) C · 61 lines

45 do

46 {

47 if ((*d++ = *s++) == 0)

48 break;

49 } while (--n != 0);

55 if (len != 0)

56 *d = '\0'; /* NUL-terminate dest */

57 while (*s++);

58 }

59

memstr.c (https://github.com/tpruvot/android_device_motorola_jordan.git) C · 80 lines

6 const char *s = (const char*)src;

7

8 while (n-- > 0)

9 *d++ = *s++;

10

16 unsigned char *d = (unsigned char*)dest;

17

18 while (n-- > 0)

19 *d++ = (unsigned char)fill;

20

52 char *dest = d;

53

54 while (*d++ = *s++);

55

56 return dest;

misc.c (https://github.com/chrissicool/l4openbsd.git) C · 155 lines

82 t++, skip = 7;

83 if (t) {

84 while (s < t)

85 *d++ = *s++;

86 s += skip;

87 while (*d++ = *s++);

88 }

89 return 0;

string.c (https://github.com/nickbjohnson4224/rhombus.git) C · 164 lines

106 /* Copy as many bytes as will fit */

107 if (n != 0) {

108 while (--n != 0) {

109 if ((*d++ = *s++) == '\0') {

119 }

120

121 while (*s++);

122 }

123

142

143 /* Find the end of dst and adjust bytes left but don't go past end */

144 while (n-- != 0 && *d != '\0') {

145 d++;

146 }

152 return (dlen + strlen(s));

153 }

154 while (*s != '\0') {

155 if (n != 1) {

156 *d++ = *s;

serial.c (https://github.com/schneider42/ubd.git) C · 190 lines

33 void serial_putsenc(char * s)

34 {

35 while(*s){

36 if(*s == SERIAL_ESCAPE)

37 serial_putc(SERIAL_ESCAPE);

38 serial_putc(*s++);

39 }

40 }

46 if(*d == SERIAL_ESCAPE)

47 serial_putc(SERIAL_ESCAPE);

48 serial_putc(*d++);

49 }

50 }

strl.hpp (https://github.com/nicoya/OpenEmu.git) C++ Header · 48 lines

11

12 if(n) {

13 while(--n && (*d++ = *s++)); //copy as many bytes as possible, or until null terminator reached

14 }

15

16 if(!n) {

17 if(length) *d = 0;

18 while(*s++); //traverse rest of s, so that s - src == strlen(src)

19 }

20

28 size_t n = length;

29

30 while(n-- && *d) d++; //find end of dest

31 size_t dlength = d - dest;

32 n = length - dlength; //subtract length of dest from maximum string length

strlcpy.c (https://gitlab.com/buktemirlnk/xorg-xserver) C · 55 lines

39 if (n != 0 && --n != 0) {

40 do {

41 if ((*d++ = *s++) == 0)

42 break;

43 } while (--n != 0);

48 if (siz != 0)

49 *d = '\0'; /* NUL-terminate dst */

50 while (*s++);

51 }

52

libc.c (https://github.com/dls/house.git) C · 135 lines

63 char *d = dest;

64 do {

65 if ((*d++ = *src++) == 0) {

66 while (--n != 0)

68 break;

69 }

70 } while (--n != 0);

71 }

72 return dest;

90 if (*s == c)

91 rtnval = (char*) s;

92 } while (*s++);

93 return (rtnval);

94 }

99 int e = 0;

100 int c;

101 while ((c = *s++) != '\0' && isdigit(c)) {

102 a = a*10.0 + (c - '0');

103 }

strlcpy.c (https://github.com/insidegui/flux.git) C · 52 lines

33 /* Copy as many bytes as will fit */

34 if (n != 0) {

35 while (--n != 0) {

36 if ((*d++ = *s++) == '\0') {

46 }

47

48 while (*s++);

49 }

50

string.c (https://github.com/alibaba/AliOS-Things.git) C · 131 lines

29 while (n && (*dest++ = *src++))

30 n--;

31 while (n--) {

32 *dest++ = '\0';

33 }

56 ; /* FIXME(junlin) should be panic? */

57 }

58 while (n-- && !(ret = (*s1 - *s2++)) && *s1++)

59 ;

60 return ret;

85 ret = (int8_t *)s;

86 }

87 } while (*s++);

88 return ret;

89 }

string.c (https://gitlab.com/koreader/mupdf-old) C · 398 lines

21 if (n != 0 && --n != 0) {

22 do {

23 if ((*d++ = *s++) == 0)

24 break;

25 } while (--n != 0);

30 if (siz != 0)

31 *d = '\0'; /* NUL-terminate dst */

32 while (*s++)

33 ;

34 }

46

47 /* Find the end of dst and adjust bytes left but don't go past end */

48 while (*d != '\0' && n-- != 0)

49 d++;

50 dlen = d - dst;

strlcpy.c (https://bitbucket.org/BlairJamieson/roody.git) C · 82 lines

29 if (n != 0 && --n != 0) {

30 do {

31 if ((*d++ = *s++) == 0)

32 break;

33 } while (--n != 0);

38 if (size != 0)

39 *d = '\0'; /* NUL-terminate dst */

40 while (*s++);

41 }

42

61

62 /* Find the end of dst and adjust bytes left but don't go past end */

63 while (n-- != 0 && *d != '\0')

64 d++;

65 dlen = d - dst;

ufuncs.c (https://gitlab.com/tormod/udw-firmware) C · 104 lines

27 {

28 char p,q;

29 while ((p = *s1++) == (q = *s2++) && p && --n);

30 return p-q;

31 }

41 {

42 char *o = d;

43 while ((*d++ = *s++));

44 return d-o-1;

45 }

48 {

49 char *o = s;

50 while (*s++);

51 return s-o;

52 }

strutils.c (https://github.com/lucamassarelli/yarasafe.git) C · 252 lines

105 do

106 {

107 if ((*d++ = *s++) == 0)

108 break;

109

110 } while (--n != 0);

111 }

112

118 *d = '\0'; // NULL-terminate dst

119

120 while (*s++);

121 }

122

zstr.c (https://github.com/jhallen/joes-sandbox.git) C · 127 lines

69 {

70 char *os = s;

71 while (*s)

72 ++s;

73 return s - os;

77 {

78 char *od = d;

79 while (*d++ = *s++);

80 return od;

81 }

86 while (*d)

87 ++d;

88 while (*d++ = *s++);

89 return od;

90 }

string.c (https://github.com/RfidResearchGroup/proxmark3.git) C · 349 lines

30 char *lasts = (char *)s + (len - 1);

31 char *lastd = d + (len - 1);

32 while (len--)

33 *lastd-- = *lasts--;

34 }

200 return (tok);

201 }

202 } while (sc != 0);

203 }

204 /* NOTREACHED */

231 if (*s == (char)c)

232 ret = s;

233 } while (*s++);

234 return (char *)ret;

235 }

Mify.cpp (https://github.com/ultimatepp/mirror.git) C++ · 214 lines

26 f32x4 *t = b;

27 f32x4 *d = div;

28 while(s < e) {

29 f32x4 px = 0;

30 for(int n = nx; n--;)

38 f32x4 px = 0;

39 f32x4 dv = 0;

40 while(s < e2) {

41 px += LoadRGBAF(s++);

42 dv += v1;

54 RGBA *t = ~ib + ty * tsz.cx;

55 RGBA *e = t + tsz.cx;

56 while(t < e)

57 StoreRGBAF(t++, *s++ / *d++);

58 };

string.c (https://github.com/alibaba/genie-bt-mesh-stack.git) C · 205 lines

37 return (char*) s;

38 }

39 } while (*s++);

40 return (0);

41 }

45 u8 *st2 = (u8 *) m2;

46

47 while(len--){

48 if(*st1 != *st2){

49 return (*st1 - *st2);

83 char *lasts = src + (len - 1);

84 char *lastd = dest + (len - 1);

85 while (len--)

86 *(char *) lastd-- = *(char *) lasts--;

87 }

strl.hpp (https://github.com/libretro/bsnes-libretro-cplusplus98.git) C++ Header · 52 lines

13

14 if(n) {

15 while(--n && (*d++ = *s++)); //copy as many bytes as possible, or until null terminator reached

16 }

17

18 if(!n) {

19 if(length) *d = 0;

20 while(*s++); //traverse rest of s, so that s - src == strlen(src)

21 }

22

30 unsigned n = length;

31

32 while(n-- && *d) d++; //find end of dest

33 unsigned dlength = d - dest;

34 n = length - dlength; //subtract length of dest from maximum string length

zstr.c (https://github.com/jhallen/joes-sandbox.git) C · 85 lines

28 {

29 char *os=s;

30 while(*s) ++s;

31 return s-os;

32 }

36 {

37 char *od=d;

38 while(*d++= *s++);

39 return od;

40 }

46 while(*d) ++d;

47 while(*d++= *s++);

48 return od;

49 }

58 char *l, *r;

59 {

60 while(*l && *l==*r) ++l, ++r;

61 if(*l>*r) return 1;

62 if(*l<*r) return -1;

tstring.c (https://github.com/Ai-Thinker-Open/Telink_SIG_Mesh.git) C · 251 lines

37 return (char*) s;

38 }

39 } while (*s++);

40 return (0);

41 }

46 unsigned char *s2 = (unsigned char *) m2;

47

48 while (n--) {

49 if (*s1 != *s2) {

50 return *s1 - *s2;

85 char *lasts = src + (len - 1);

86 char *lastd = dest + (len - 1);

87 while (len--)

88 *(char *) lastd-- = *(char *) lasts--;

89 }

lib_wcslcpy.c (https://bitbucket.org/hg42/nuttx.git) C · 93 lines

70 do

71 {

72 if ((*d++ = *s++) == 0)

73 {

74 break;

75 }

76 }

77 while (--n != 0);

78 }

79

86 *d = '\0'; /* NUL-terminate dst */

87 }

88 while (*s++);

89 }

90

ia64-dis.c (https://github.com/userlandkernel/baseband-research.git) C · 177 lines

37 #define PARAMS(x) x SECTION(SEC_KDEBUG)

38 #define ATTRIBUTE_UNUSED

39 #define abort() do { } while (0)

40

41 #define BFD_HOST_64_BIT u64_t

130 char* d = dest;

131 const char* s = src;

132 do { *d++ = *s; } while (*s++);

133 return dest;

134 };

142 d++;

143 /* copy until end of s, including the \0 */

144 while ( (*d++ = *s++) );

145 return dest;

146 };

compat.c (https://gitlab.com/ekollof/Sysalerter-backend.git) C · 259 lines

127 if (n) {

128 --n;

129 while (n && *s)

130 *d++ = *s++, --n;

131 *d = 0;

132 }

133 while (*s++);

134

135 return s - src - 1;

162 }

163 src = s;

164 while (*s++);

165

166 return n + (s - src - 1);

patch-musl.patch (https://github.com/sdsddsd1/kiss-games.git) Patch · 62 lines

14 -

15 - if(n) {

16 - while(--n && (*d++ = *s++)); //copy as many bytes as possible, or until null terminator reached

17 - }

18 -

19 - if(!n) {

20 - if(length) *d = 0;

21 - while(*s++); //traverse rest of s, so that s - src == strlen(src)

22 - }

23 -

31 - size_t n = length;

32 -

33 - while(n-- && *d) d++; //find end of dest

34 - size_t dlength = d - dest;

35 - n = length - dlength; //subtract length of dest from maximum string length

strlcpy.h (https://github.com/monyxcoin/monyx-coin.git) C Header · 83 lines

32 /* Copy as many bytes as will fit */

33 if (n != 0) {

34 while (--n != 0) {

35 if ((*d++ = *s++) == '\0')

42 if (siz != 0)

43 *d = '\0'; /* NUL-terminate dst */

44 while (*s++);

45 }

46

62

63 /* Find the end of dst and adjust bytes left but don't go past end */

64 while (n-- != 0 && *d != '\0')

65 d++;

66 dlen = d - dst;

69 if (n == 0)

70 return (dlen + strlen(s));

71 while (*s != '\0') {

72 if (n != 1) {

73 *d++ = *s;

inspstring.cpp (https://github.com/thepaul/inspircd-deb.git) C++ · 138 lines

50 size_t n = siz, dlen;

51

52 while (n-- != 0 && *d != '\0')

53 d++;

54

59 return(dlen + strlen(s));

60

61 while (*s != '\0')

62 {

63 if (n != 1)

95 if (siz != 0)

96 *d = '\0'; /* NUL-terminate dst */

97 while (*s++);

98 }

99

strlcpy.c (https://github.com/elly/ithildin.git) C · 58 lines

43 if (n != 0 && --n != 0) {

44 do {

45 if ((*d++ = *s++) == 0)

46 break;

47 } while (--n != 0);

52 if (siz != 0)

53 *d = '\0'; /* NUL-terminate dst */

54 while (*s++);

55 }

56

strlcpy.c (https://github.com/snktagarwal/openafs.git) C · 54 lines

38 if (n != 0 && --n != 0) {

39 do {

40 if ((*d++ = *s++) == 0)

41 break;

42 } while (--n != 0);

47 if (siz != 0)

48 *d = '\0'; /* NUL-terminate dst */

49 while (*s++);

50 }

51

misc.c (https://github.com/struct/QueMod.git) C · 124 lines

109 {

110 do {

111 if ((*d++ = *s++) == 0)

112 break;

113 } while (--n != 0);

118 if (siz != 0)

119 *d = '\0'; /* NUL-terminate dst */

120 while (*s++);

121 }

122

strlcpy.c (https://github.com/chad/rubinius.git) C · 54 lines

35 if (n && --n) {

36 do {

37 if (!(*d++ = *s++))

38 break;

39 } while (--n);

45 *d = '\0'; /* NUL-terminate dst */

46

47 while (*s++);

48 }

49

memstr.c (https://bitbucket.org/dimichxp/2ndboot) C · 69 lines

5 const char *s = (const char*)src;

6

7 while (n-- > 0) {

8 *d++ = *s++;

9 }

14 unsigned char *d = (unsigned char*)dest;

15

16 while (n-- > 0) {

17 *d++ = (unsigned char)fill;

18 }

44 char *dest = d;

45

46 while (*d++ = *s++);

47 return dest;

48 }

debug.h (https://bitbucket.org/mischief/oskit) C Header · 66 lines

48 extern oskit_addr_t phys_mem_va; \

49 short *d = (short*)(phys_mem_va+0xb8000+80*2*13+40*2); \

50 while (*s) { (*d++) = 0x3000 | (*s++); } \

51 *d = ' '; \

52 })

lcd_console.c (https://gitlab.com/my-imx6/u-boot-2015.04) C · 270 lines

213 }

214

215 while (*s)

216 lcd_putc(*s++);

expandpath.c (https://github.com/NCAR/lrose-core.git) C · 124 lines

63

64 /* Expand inline environment variables */

65 while (*d++ = *s) {

66 if (*s == '\\') {

67 if (*(d - 1) = *++s) {

117 d = buf;

118 if (*s) {

119 while (*d++ = *s++);

120 *(d - 1) = '/';

121 }

122 s = nm;

123 while (*d++ = *s++);

124 }

125

bsdstring.c (https://github.com/Stephen-Gose-Game-Studio/server.git) C · 130 lines

48 if (n != 0 && --n != 0) {

49 do {

50 if ((*d++ = *s++) == 0)

51 break;

52 } while (--n != 0);

57 if (siz != 0)

58 *d = '\0'; /* NUL-terminate dst */

59 while (*s++);

60 }

61

91

92 /* Find the end of dst and adjust bytes left but don't go past end */

93 while (*d != '\0' && n-- != 0)

94 d++;

95 dlen = d - dst;

debug.h (https://github.com/l4ka/hazelnut.git) C Header · 69 lines

52 extern vm_offset_t phys_mem_va; \

53 short *d = (short*)(phys_mem_va+0xb8000+80*2*13+40*2); \

54 while (*s) { (*d++) = 0x3000 | (*s++); } \

55 *d = ' '; \

56 })

sub.c (https://bitbucket.org/AndreasBWagner/plan9front) C · 421 lines

9 uchar *d = dst;

10

11 while(n > 0){

12 *d++ = v;

13 n--;

22

23 if(d < s){

24 while(n-- > 0)

25 *d++ = *s++;

26 } else if(d > s){

27 s += n;

28 d += n;

29 while(n-- > 0)

30 *--d = *--s;

31 }

wrtfmt.c (https://github.com/neurodebian/pkg-xppaut.git) C · 255 lines

205 {

206 if(cursor && mv_cur()) return(mv_cur());

207 while(a--) (*putn)(*s++);

208 return(1);

209 }

222 int wrt_A(p,len) char *p; ftnlen len;

223 {

224 while(len-- > 0) (*putn)(*p++);

225 return(0);

226 }

227 int wrt_AW(p,w,len) char * p; ftnlen len;int w;

228 {

229 while(w>len)

230 { w--;

231 (*putn)(' ');

string.c (https://sdcc.svn.sourceforge.net/svnroot/sdcc) C · 35 lines

6 char *d = dest;

7 const char *s = source;

8 while (*d++ = *s++);

9 return dest;

10 }

14 char *d = dest;

15 const char *s = source;

16 while (count--)

17 *d++ = *s++;

18

24 char ret = 0;

25

26 while (!(ret = *s1 - *s2) && *s2)

27 ++s1, ++s2;

28

strcopy.c (https://repo.or.cz/AROS-Contrib.git) C · 12 lines

6 STRPTR StrCopy(STRPTR s, STRPTR d)

7 {

8 while (*d++ = *s++);

9

10 return (--d);

strcat.c (https://github.com/noname22/NeoDICE.git) C · 28 lines

23 while (*d)

24 ++d;

25 while (*d++ = *s++);

26 return(base);

27 }

strlcpy.c (https://github.com/arthurbryant/c-test.git) C · 36 lines

10 if(n > 0)

11 {

12 while(--n != 0)

13 {

14 if((*d++ = *s++) == '\0')

19 {

20 *d = '\0';

21 while(*s++);

22 }

23 return s-src-1;

stpcpy.c (https://github.com/noname22/NeoDICE.git) C · 25 lines

19 const char *s;

20 {

21 while (*d++ = *s++);

22 return(d-1);

23 }