/[LeafOK_CVS]/lbbs/src/io.c
ViewVC logotype

Diff of /lbbs/src/io.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.70 by sysadm, Sun Nov 23 01:47:47 2025 UTC Revision 1.71 by sysadm, Sun Nov 23 06:43:51 2025 UTC
# Line 1120  int io_buf_conv(iconv_t cd, char *p_buf, Line 1120  int io_buf_conv(iconv_t cd, char *p_buf,
1120                                  if (in_bytes == 0)                                  if (in_bytes == 0)
1121                                  {                                  {
1122                                          in_bytes = (size_t)(*p_buf_len - *p_buf_offset);                                          in_bytes = (size_t)(*p_buf_len - *p_buf_offset);
1123    #ifdef _DEBUG
1124                                            log_error("Reset in_bytes from 0 to %d\n", in_bytes);
1125    #endif
1126                                  }                                  }
1127    
1128                                  *out_buf = *in_buf;  #ifdef _DEBUG
1129                                  in_buf++;                                  log_error("iconv(in_bytes=%d, out_bytes=%d) error: EILSEQ, in_buf[0]=%d\n",
1130                                  out_buf++;                                                    in_bytes, out_bytes, in_buf[0]);
1131                                  in_bytes--;  #endif
1132                                  out_bytes--;                                  skip_current = 1;
   
                                 (*p_buf_offset)++;  
                                 (*p_conv_len)++;  
   
                                 continue;  
1133                          }                          }
1134                          else // something strange                          else // something strange
1135                          {                          {
# Line 1139  int io_buf_conv(iconv_t cd, char *p_buf, Line 1137  int io_buf_conv(iconv_t cd, char *p_buf,
1137                                  log_error("iconv(in_bytes=%d, out_bytes=%d) error: %d, in_buf[0]=%d\n",                                  log_error("iconv(in_bytes=%d, out_bytes=%d) error: %d, in_buf[0]=%d\n",
1138                                                    in_bytes, out_bytes, errno, in_buf[0]);                                                    in_bytes, out_bytes, errno, in_buf[0]);
1139  #endif  #endif
   
1140                                  *p_buf_offset = (int)(in_buf - p_buf);                                  *p_buf_offset = (int)(in_buf - p_buf);
1141                                  *p_conv_len = (int)(conv_size - out_bytes);                                  *p_conv_len = (int)(conv_size - out_bytes);
1142                                  skip_current = 1;                                  skip_current = 1;
   
                                 continue;  
1143                          }                          }
1144                  }                  }
1145                  else                  else
1146                  {                  {
1147                          *p_buf_len = 0;                          *p_buf_offset = (int)(in_buf - p_buf);
                         *p_buf_offset = 0;  
1148                          *p_conv_len = (int)(conv_size - out_bytes);                          *p_conv_len = (int)(conv_size - out_bytes);
   
                         break;  
1149                  }                  }
1150          }          }
1151    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1