Refactor the innermost loop of the xdraws function
Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Signed-off-by: Christoph Lohmann <20h@r-36.net>
This commit is contained in:
		
							parent
							
								
									27b28f1dc2
								
							
						
					
					
						commit
						c2fd2754eb
					
				
							
								
								
									
										10
									
								
								st.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								st.c
									
									
									
									
									
								
							| @ -3245,12 +3245,11 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||||||
| 			bytelen -= u8cblen; | 			bytelen -= u8cblen; | ||||||
| 
 | 
 | ||||||
| 			doesexist = XftCharExists(xw.dpy, font->match, unicodep); | 			doesexist = XftCharExists(xw.dpy, font->match, unicodep); | ||||||
| 			if(oneatatime || !doesexist || bytelen <= 0) { |  | ||||||
| 				if(oneatatime || bytelen <= 0) { |  | ||||||
| 			if(doesexist) { | 			if(doesexist) { | ||||||
| 					u8fl++; | 					u8fl++; | ||||||
| 					u8fblen += u8cblen; | 					u8fblen += u8cblen; | ||||||
| 					} | 					if(!oneatatime && bytelen > 0) | ||||||
|  | 							continue; | ||||||
| 			} | 			} | ||||||
| 
 | 
 | ||||||
| 			if(u8fl > 0) { | 			if(u8fl > 0) { | ||||||
| @ -3260,14 +3259,9 @@ xdraws(char *s, Glyph base, int x, int y, int charlen, int bytelen) { | |||||||
| 						(FcChar8 *)u8fs, | 						(FcChar8 *)u8fs, | ||||||
| 						u8fblen); | 						u8fblen); | ||||||
| 				xp += xw.cw * u8fl; | 				xp += xw.cw * u8fl; | ||||||
| 
 |  | ||||||
| 			} | 			} | ||||||
| 			break; | 			break; | ||||||
| 		} | 		} | ||||||
| 
 |  | ||||||
| 			u8fl++; |  | ||||||
| 			u8fblen += u8cblen; |  | ||||||
| 		} |  | ||||||
| 		if(doesexist) { | 		if(doesexist) { | ||||||
| 			if(oneatatime) | 			if(oneatatime) | ||||||
| 				continue; | 				continue; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Silvan Jegen
						Silvan Jegen