| 
				
				
					
						
					
				
				
				 | 
			
			 | 
			
			@ -8,6 +8,10 @@ | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			#define INK_SH_READ_BUFF 32768 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			#endif // INK_SH_READ_BUFF | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			#ifndef GIT_COMMIT_HASH | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			#define GIT_COMMIT_HASH "?" | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			#endif | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			int get_type_by_name(struct context* ctx, const char* name); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			static void print_string(struct context* ctx, const struct elem string) { | 
			
		
		
	
	
		
			
				| 
				
					
						
					
				
				
					
						
					
				
				
				 | 
			
			 | 
			
			@ -127,6 +131,16 @@ static void call_word(struct context* ctx) { | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    ink_push_fn(ctx, frame); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			} | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			static void print_releasever(struct context* ctx) { | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    const char * commit = GIT_COMMIT_HASH; | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    while (*commit) { | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			        ctx->putchar(ctx, *commit++); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    } | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    ctx->putchar(ctx, '\n'); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			} | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			
 | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			int main(int argc, char** argv) { | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    char read_buffer[INK_SH_READ_BUFF]; | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    struct context* ctx; | 
			
		
		
	
	
		
			
				| 
				
				
				
					
						
					
				
				 | 
			
			 | 
			
			@ -135,6 +149,7 @@ int main(int argc, char** argv) { | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    ink_add_native(ctx, "words?", list_words); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    ink_add_native(ctx, "words!", resolve_word); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    ink_add_native(ctx, "words.call", call_word); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    ink_add_native(ctx, "version", print_releasever); | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    end_argv = argv + argc; | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    size_t cnt; | 
			
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
			    int no_exit = 1; | 
			
		
		
	
	
		
			
				| 
				
					
						
					
				
				
				
				 | 
			
			 | 
			
			
 |