mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										10
									
								
								utf8.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								utf8.c
									
									
									
									
									
								
							@@ -161,14 +161,14 @@ utf8_from_data(const struct utf8_data *ud, utf8_char *uc)
 | 
			
		||||
		m.data[1] = (offset >> 8) & 0xff;
 | 
			
		||||
		m.data[2] = (offset >> 16);
 | 
			
		||||
	}
 | 
			
		||||
	*uc = m.uc;
 | 
			
		||||
	*uc = htonl(m.uc);
 | 
			
		||||
	return (UTF8_DONE);
 | 
			
		||||
 | 
			
		||||
fail:
 | 
			
		||||
	if (ud->width == 1)
 | 
			
		||||
		*uc = utf8_space1.uc;
 | 
			
		||||
		*uc = htonl(utf8_space1.uc);
 | 
			
		||||
	else
 | 
			
		||||
		*uc = utf8_space2.uc;
 | 
			
		||||
		*uc = htonl(utf8_space2.uc);
 | 
			
		||||
	return (UTF8_ERROR);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -176,7 +176,7 @@ fail:
 | 
			
		||||
void
 | 
			
		||||
utf8_to_data(utf8_char uc, struct utf8_data *ud)
 | 
			
		||||
{
 | 
			
		||||
	union utf8_map		 m = { .uc = uc };
 | 
			
		||||
	union utf8_map		 m = { .uc = ntohl(uc) };
 | 
			
		||||
	struct utf8_item	*ui;
 | 
			
		||||
	u_int			 offset;
 | 
			
		||||
 | 
			
		||||
@@ -209,7 +209,7 @@ utf8_build_one(char c, u_int width)
 | 
			
		||||
 | 
			
		||||
	if (width == 2)
 | 
			
		||||
		m.flags |= UTF8_FLAG_WIDTH2;
 | 
			
		||||
	return (m.uc);
 | 
			
		||||
	return (htonl(m.uc));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Set a single character. */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user