diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-09-06 14:35:04 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2024-09-06 14:35:04 -0300 |
| commit | 007b8c7a01eaa97d796561a19c7e9af1ec474495 (patch) | |
| tree | d21133c450f4579b19a61f15fbf840e3fd82d097 | |
| parent | fd0e1f530d06340f99334b07d74e5133ce073787 (diff) | |
| download | lua-007b8c7a01eaa97d796561a19c7e9af1ec474495.tar.gz lua-007b8c7a01eaa97d796561a19c7e9af1ec474495.tar.bz2 lua-007b8c7a01eaa97d796561a19c7e9af1ec474495.zip | |
Details
Identation + comments
| -rw-r--r-- | lcode.c | 4 | ||||
| -rw-r--r-- | lopcodes.c | 4 | ||||
| -rw-r--r-- | lutf8lib.c | 32 |
3 files changed, 20 insertions, 20 deletions
| @@ -1837,8 +1837,8 @@ static int finaltarget (Instruction *code, int i) { | |||
| 1837 | Instruction pc = code[i]; | 1837 | Instruction pc = code[i]; |
| 1838 | if (GET_OPCODE(pc) != OP_JMP) | 1838 | if (GET_OPCODE(pc) != OP_JMP) |
| 1839 | break; | 1839 | break; |
| 1840 | else | 1840 | else |
| 1841 | i += GETARG_sJ(pc) + 1; | 1841 | i += GETARG_sJ(pc) + 1; |
| 1842 | } | 1842 | } |
| 1843 | return i; | 1843 | return i; |
| 1844 | } | 1844 | } |
| @@ -68,8 +68,8 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = { | |||
| 68 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHL */ | 68 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHL */ |
| 69 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHR */ | 69 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_SHR */ |
| 70 | ,opmode(1, 0, 0, 0, 0, iABC) /* OP_MMBIN */ | 70 | ,opmode(1, 0, 0, 0, 0, iABC) /* OP_MMBIN */ |
| 71 | ,opmode(1, 0, 0, 0, 0, iABC) /* OP_MMBINI*/ | 71 | ,opmode(1, 0, 0, 0, 0, iABC) /* OP_MMBINI */ |
| 72 | ,opmode(1, 0, 0, 0, 0, iABC) /* OP_MMBINK*/ | 72 | ,opmode(1, 0, 0, 0, 0, iABC) /* OP_MMBINK */ |
| 73 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_UNM */ | 73 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_UNM */ |
| 74 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BNOT */ | 74 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_BNOT */ |
| 75 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_NOT */ | 75 | ,opmode(0, 0, 0, 0, 1, iABC) /* OP_NOT */ |
| @@ -192,22 +192,22 @@ static int byteoffset (lua_State *L) { | |||
| 192 | if (iscontp(s + posi)) | 192 | if (iscontp(s + posi)) |
| 193 | return luaL_error(L, "initial position is a continuation byte"); | 193 | return luaL_error(L, "initial position is a continuation byte"); |
| 194 | if (n < 0) { | 194 | if (n < 0) { |
| 195 | while (n < 0 && posi > 0) { /* move back */ | 195 | while (n < 0 && posi > 0) { /* move back */ |
| 196 | do { /* find beginning of previous character */ | 196 | do { /* find beginning of previous character */ |
| 197 | posi--; | 197 | posi--; |
| 198 | } while (posi > 0 && iscontp(s + posi)); | 198 | } while (posi > 0 && iscontp(s + posi)); |
| 199 | n++; | 199 | n++; |
| 200 | } | 200 | } |
| 201 | } | 201 | } |
| 202 | else { | 202 | else { |
| 203 | n--; /* do not move for 1st character */ | 203 | n--; /* do not move for 1st character */ |
| 204 | while (n > 0 && posi < (lua_Integer)len) { | 204 | while (n > 0 && posi < (lua_Integer)len) { |
| 205 | do { /* find beginning of next character */ | 205 | do { /* find beginning of next character */ |
| 206 | posi++; | 206 | posi++; |
| 207 | } while (iscontp(s + posi)); /* (cannot pass final '\0') */ | 207 | } while (iscontp(s + posi)); /* (cannot pass final '\0') */ |
| 208 | n--; | 208 | n--; |
| 209 | } | 209 | } |
| 210 | } | 210 | } |
| 211 | } | 211 | } |
| 212 | if (n != 0) { /* did not find given character? */ | 212 | if (n != 0) { /* did not find given character? */ |
| 213 | luaL_pushfail(L); | 213 | luaL_pushfail(L); |
