Compare commits
	
		
			No commits in common. "4ed6693f57fcfb0ad15849d7d4861b7efaf8e11a" and "ca33adeeeee56262b95a6ff1339227bfc90e0a82" have entirely different histories.
		
	
	
		
			4ed6693f57
			...
			ca33adeeee
		
	
		
| @ -148,7 +148,7 @@ include_directories (${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}) | ||||
| 
 | ||||
| # Generate IRC replies--we need a custom target because of the multiple outputs | ||||
| add_custom_command (OUTPUT xD-replies.c xD.msg | ||||
| 	COMMAND env LC_ALL=C awk -f ${PROJECT_SOURCE_DIR}/xD-gen-replies.awk | ||||
| 	COMMAND ${PROJECT_SOURCE_DIR}/xD-gen-replies.sh | ||||
| 		> xD-replies.c < ${PROJECT_SOURCE_DIR}/xD-replies | ||||
| 	DEPENDS ${PROJECT_SOURCE_DIR}/xD-replies | ||||
| 	COMMENT "Generating files from the list of server numerics") | ||||
|  | ||||
							
								
								
									
										4
									
								
								xC.adoc
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								xC.adoc
									
									
									
									
									
								
							| @ -62,10 +62,10 @@ their respective function names: | ||||
| *M-a*: *goto-activity*:: | ||||
| 	Go to the first following buffer with unseen activity. | ||||
| *PageUp*: *display-backlog*:: | ||||
| 	Show the in-memory backlog for this buffer using *general.pager*, | ||||
| 	Show the in-memory backlog for this buffer in the backlog helper, | ||||
| 	which is almost certainly the *less*(1) program. | ||||
| *M-h*: *display-full-log*:: | ||||
| 	Show the log file for this buffer using *general.pager*. | ||||
| 	Show the log file for this buffer in the backlog helper. | ||||
| *M-H*: *toggle-unimportant*:: | ||||
| 	Hide all join, part and quit messages, as well as all channel mode changes | ||||
| 	that only relate to user channel modes.  Intended to reduce noise in | ||||
|  | ||||
							
								
								
									
										31
									
								
								xC.c
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								xC.c
									
									
									
									
									
								
							| @ -2879,7 +2879,7 @@ attr_printer_tputs (struct attr_printer *self, const char *attr) | ||||
| 		tputs (attr, 1, printer); | ||||
| 	else | ||||
| 		// We shouldn't really do this but we need it to output formatting
 | ||||
| 		// to the pager--it should be SGR-only
 | ||||
| 		// to the backlog helper--it should be SGR-only
 | ||||
| 		attr_printer_filtered_puts (self->stream, attr); | ||||
| } | ||||
| 
 | ||||
| @ -11361,7 +11361,7 @@ handle_command_set_modify | ||||
| 	return result; | ||||
| } | ||||
| 
 | ||||
| static bool | ||||
| static void | ||||
| handle_command_set_assign_item (struct app_context *ctx, | ||||
| 	char *key, struct config_item *new_, bool add, bool remove) | ||||
| { | ||||
| @ -11384,14 +11384,14 @@ handle_command_set_assign_item (struct app_context *ctx, | ||||
| 		log_global_error (ctx, | ||||
| 			"Failed to set option \"#s\": #s", key, e->message); | ||||
| 		error_free (e); | ||||
| 		return false; | ||||
| 	} | ||||
| 
 | ||||
| 	struct strv tmp = strv_make (); | ||||
| 	dump_matching_options (ctx->config.root, key, &tmp); | ||||
| 	log_global_status (ctx, "Option changed: #s", tmp.vector[0]); | ||||
| 	strv_free (&tmp); | ||||
| 	return true; | ||||
| 	else | ||||
| 	{ | ||||
| 		struct strv tmp = strv_make (); | ||||
| 		dump_matching_options (ctx->config.root, key, &tmp); | ||||
| 		log_global_status (ctx, "Option changed: #s", tmp.vector[0]); | ||||
| 		strv_free (&tmp); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
| static bool | ||||
| @ -11427,18 +11427,15 @@ handle_command_set_assign | ||||
| 		config_item_destroy (new_); | ||||
| 		return true; | ||||
| 	} | ||||
| 
 | ||||
| 	bool changed = false; | ||||
| 	for (size_t i = 0; i < all->len; i++) | ||||
| 	{ | ||||
| 		char *key = cstr_cut_until (all->vector[i], " "); | ||||
| 		if (handle_command_set_assign_item (ctx, key, new_, add, remove)) | ||||
| 			changed = true; | ||||
| 		handle_command_set_assign_item (ctx, key, new_, add, remove); | ||||
| 		free (key); | ||||
| 	} | ||||
| 	config_item_destroy (new_); | ||||
| 
 | ||||
| 	if (changed && get_config_boolean (ctx->config.root, "general.autosave")) | ||||
| 	if (get_config_boolean (ctx->config.root, "general.autosave")) | ||||
| 		save_configuration (ctx); | ||||
| 	return true; | ||||
| } | ||||
| @ -13169,7 +13166,7 @@ toggle_bracketed_paste (bool enable) | ||||
| static void | ||||
| suspend_terminal (struct app_context *ctx) | ||||
| { | ||||
| 	// Terminal can get suspended by both the pager and SIGTSTP handling
 | ||||
| 	// Terminal can get suspended by both backlog helper and SIGTSTP handling
 | ||||
| 	if (ctx->terminal_suspended++ > 0) | ||||
| 		return; | ||||
| 
 | ||||
| @ -14174,8 +14171,8 @@ setup_signal_handlers (void) | ||||
| 
 | ||||
| 	signal (SIGPIPE, SIG_IGN); | ||||
| 
 | ||||
| 	// So that we can write to the terminal while we're running a pager.
 | ||||
| 	// This is also inherited by the child so that it doesn't stop
 | ||||
| 	// So that we can write to the terminal while we're running a backlog
 | ||||
| 	// helper.  This is also inherited by the child so that it doesn't stop
 | ||||
| 	// when it calls tcsetpgrp().
 | ||||
| 	signal (SIGTTOU, SIG_IGN); | ||||
| 
 | ||||
|  | ||||
| @ -1,29 +0,0 @@ | ||||
| #!/usr/bin/awk -f | ||||
| BEGIN { | ||||
| 	# The message catalog is a by-product | ||||
| 	msg = "xD.msg" | ||||
| 	print "$quote \"" > msg; | ||||
| 	print "$set 1" > msg; | ||||
| } | ||||
| 
 | ||||
| /^[0-9]+ *IRC_(ERR|RPL)_[A-Z]+ *".*"$/ { | ||||
| 	match($0, /".*"/); | ||||
| 	ids[$1] = $2; | ||||
| 	texts[$2] = substr($0, RSTART, RLENGTH); | ||||
| 	print $1 " " texts[$2] > msg | ||||
| } | ||||
| 
 | ||||
| END { | ||||
| 	printf("enum\n{") | ||||
| 	for (i in ids) { | ||||
| 		if (seen_first) | ||||
| 			printf(",") | ||||
| 		seen_first = 1 | ||||
| 		printf("\n\t%s = %s", ids[i], i) | ||||
| 	} | ||||
| 	print "\n};\n" | ||||
| 	print "static const char *g_default_replies[] =\n{" | ||||
| 	for (i in ids) | ||||
| 		print "\t[" ids[i] "] = " texts[ids[i]] "," | ||||
| 	print "};" | ||||
| } | ||||
							
								
								
									
										28
									
								
								xD-gen-replies.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										28
									
								
								xD-gen-replies.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,28 @@ | ||||
| #!/bin/sh | ||||
| LC_ALL=C exec awk ' | ||||
| 	BEGIN { | ||||
| 		# The message catalog is a by-product | ||||
| 		msg = "xD.msg" | ||||
| 		print "$quote \"" > msg; | ||||
| 		print "$set 1" > msg; | ||||
| 	} | ||||
| 	/^[0-9]+ *IRC_(ERR|RPL)_[A-Z]+ *".*"$/ { | ||||
| 		match($0, /".*"/); | ||||
| 		ids[$1] = $2; | ||||
| 		texts[$2] = substr($0, RSTART, RLENGTH); | ||||
| 		print $1 " " texts[$2] > msg | ||||
| 	} | ||||
| 	END { | ||||
| 		printf("enum\n{") | ||||
| 		for (i in ids) { | ||||
| 			if (seen_first) | ||||
| 				printf(",") | ||||
| 			seen_first = 1 | ||||
| 			printf("\n\t%s = %s", ids[i], i) | ||||
| 		} | ||||
| 		print "\n};\n" | ||||
| 		print "static const char *g_default_replies[] =\n{" | ||||
| 		for (i in ids) | ||||
| 			print "\t[" ids[i] "] = " texts[ids[i]] "," | ||||
| 		print "};" | ||||
| 	}' | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user