From nobody Tue Apr 18 19:53:55 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1F3l3pThz45bBl; Tue, 18 Apr 2023 19:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1F3l3MnQz43HT; Tue, 18 Apr 2023 19:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/OZWsA8k+Fcnbf8R06OhIjK/vXKgpmGiLd6LAPmqNI=; b=CM9wkwvYWUid9jzCO7TITO9hCrXYf3Sweeu9t+7vN2xVH09RVjAdFB5mraIC/lcNFiTZsw 5A2z7Jq+u6Gzn5rMTovwQ560jBoBRtanoA6Xl15aVfODi4KKWmyW6iv6/TwR6xAnD13Q/n sFyNfSnwY+CYP02Of+10eDgRIFQv4yQg3X4CIRk+ruFQJh5ZXrd/9ER7Pp8n5FGicXSoMP XxN0bVAtLLadQ2GC8u/muvcL03iCkGzg3C7g+3vg9f0P8gID6Tje+GscGKVsSBFu8Hcbu2 hgL+Ygrqdgd5tL8m06TlEss6k4W+2t7pmPIIhnqTu64P86ns+BXCDZDryHgM6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681847635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8/OZWsA8k+Fcnbf8R06OhIjK/vXKgpmGiLd6LAPmqNI=; b=gyJ0+QYmBYopkz8UYJW2VDOpq+hDiyW5+L5glJudCtNu6CfIIiRvKYsxK3Vwt/HeHCsd82 FKwI2FQ10TRvLBuYwq+YOuR6HK0+cD+CVqazocAINmmwjf9zIULntViAV8tFcxfdHbgdOJ zkXHZQ1Z5SfFToirO230YmkCG3EdoplMrd32nUTbYI1REaJTNL52PFNflmJ4KUJU7YhOSq 8c0CwQiDaOqYVjDToStdiimyFl7z5ok1tPxOwzrO9Tn1yk+2Jejho+KLnOkDbZA8jqRYs+ y/wLpzxtg6Rt2LTN1OxLvOVtrqps9AMcm7RrzW6+aMWoWt6lZnfM0YFvjaCoLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681847635; a=rsa-sha256; cv=none; b=oYgDTE8WTqRG8sZ0RwCmvbzrWRYoTuugdJdo5OkHSxVGOxVaFVjefg+vPsgWVKi88mJPSW ldaudvwyylwcL5dGwTkTGPYXinxpHfKM8KgwHJUs9QuiH+UJUH+yyQVOVbYsePA5uiAASu Mx0BZKQK6yEfHCy7kwliD0N4edm1VY0LY93+RTigvJRLA50hy9jfW38XgpPw2824mHcXO4 mUCOgeSHyHMkQu8/nYALkr7eEBxYy+Ae769FooUKsZP59mrOG90iDo0zzXb1t/7NhHLdgY V/Rg/DCECHWmNBAgJXUC6fU8kLS6c0LJ+AzWVTOFUlCzHEgAHMY5S5mP+PHQow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1F3l2RWtzQR8; Tue, 18 Apr 2023 19:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33IJrtOi061693; Tue, 18 Apr 2023 19:53:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IJrtOT061692; Tue, 18 Apr 2023 19:53:55 GMT (envelope-from git) Date: Tue, 18 Apr 2023 19:53:55 GMT Message-Id: <202304181953.33IJrtOT061692@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 87cc8c6be050 - main - ee: Drop P_() macro used for pre-C89 compatibility. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87cc8c6be050febeb2288465abcdc1c15bb30571 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=87cc8c6be050febeb2288465abcdc1c15bb30571 commit 87cc8c6be050febeb2288465abcdc1c15bb30571 Author: John Baldwin AuthorDate: 2023-04-18 19:52:44 +0000 Commit: John Baldwin CommitDate: 2023-04-18 19:52:44 +0000 ee: Drop P_() macro used for pre-C89 compatibility. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D39669 --- contrib/ee/ee.c | 182 +++++++++++++++++++++++++++----------------------------- 1 file changed, 88 insertions(+), 94 deletions(-) diff --git a/contrib/ee/ee.c b/contrib/ee/ee.c index 5706dba1a20f..3a422c922b2e 100644 --- a/contrib/ee/ee.c +++ b/contrib/ee/ee.c @@ -219,12 +219,6 @@ WINDOW *text_win; WINDOW *help_win; WINDOW *info_win; -#if defined(__STDC__) || defined(__cplusplus) -#define P_(s) s -#else -#define P_(s) () -#endif - /* | The following structure allows menu items to be flexibly declared. @@ -247,98 +241,98 @@ WINDOW *info_win; struct menu_entries { char *item_string; - int (*procedure)P_((struct menu_entries *)); + int (*procedure)(struct menu_entries *); struct menu_entries *ptr_argument; - int (*iprocedure)P_((int)); - void (*nprocedure)P_((void)); + int (*iprocedure)(int); + void (*nprocedure)(void); int argument; }; -int main P_((int argc, char *argv[])); -unsigned char *resiz_line P_((int factor, struct text *rline, int rpos)); -void insert P_((int character)); -void delete P_((int disp)); -void scanline P_((unsigned char *pos)); -int tabshift P_((int temp_int)); -int out_char P_((WINDOW *window, int character, int column)); -int len_char P_((int character, int column)); -void draw_line P_((int vertical, int horiz, unsigned char *ptr, int t_pos, int length)); -void insert_line P_((int disp)); -struct text *txtalloc P_((void)); -struct files *name_alloc P_((void)); -unsigned char *next_word P_((unsigned char *string)); -void prev_word P_((void)); -void control P_((void)); -void emacs_control P_((void)); -void bottom P_((void)); -void top P_((void)); -void nextline P_((void)); -void prevline P_((void)); -void left P_((int disp)); -void right P_((int disp)); -void find_pos P_((void)); -void up P_((void)); -void down P_((void)); -void function_key P_((void)); -void print_buffer P_((void)); -void command_prompt P_((void)); -void command P_((char *cmd_str1)); -int scan P_((char *line, int offset, int column)); -char *get_string P_((char *prompt, int advance)); -int compare P_((char *string1, char *string2, int sensitive)); -void goto_line P_((char *cmd_str)); -void midscreen P_((int line, unsigned char *pnt)); -void get_options P_((int numargs, char *arguments[])); -void check_fp P_((void)); -void get_file P_((char *file_name)); -void get_line P_((int length, unsigned char *in_string, int *append)); -void draw_screen P_((void)); -void finish P_((void)); -int quit P_((int noverify)); -void edit_abort P_((int arg)); -void delete_text P_((void)); -int write_file P_((char *file_name, int warn_if_exists)); -int search P_((int display_message)); -void search_prompt P_((void)); -void del_char P_((void)); -void undel_char P_((void)); -void del_word P_((void)); -void undel_word P_((void)); -void del_line P_((void)); -void undel_line P_((void)); -void adv_word P_((void)); -void move_rel P_((int direction, int lines)); -void eol P_((void)); -void bol P_((void)); -void adv_line P_((void)); -void sh_command P_((char *string)); -void set_up_term P_((void)); -void resize_check P_((void)); -int menu_op P_((struct menu_entries *)); -void paint_menu P_((struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size)); -void help P_((void)); -void paint_info_win P_((void)); -void no_info_window P_((void)); -void create_info_window P_((void)); -int file_op P_((int arg)); -void shell_op P_((void)); -void leave_op P_((void)); -void redraw P_((void)); -int Blank_Line P_((struct text *test_line)); -void Format P_((void)); -void ee_init P_((void)); -void dump_ee_conf P_((void)); -void echo_string P_((char *string)); -void spell_op P_((void)); -void ispell_op P_((void)); -int first_word_len P_((struct text *test_line)); -void Auto_Format P_((void)); -void modes_op P_((void)); -char *is_in_string P_((char *string, char *substring)); -char *resolve_name P_((char *name)); -int restrict_mode P_((void)); -int unique_test P_((char *string, char *list[])); -void strings_init P_((void)); +int main(int argc, char *argv[]); +unsigned char *resiz_line(int factor, struct text *rline, int rpos); +void insert(int character); +void delete(int disp); +void scanline(unsigned char *pos); +int tabshift(int temp_int); +int out_char(WINDOW *window, int character, int column); +int len_char(int character, int column); +void draw_line(int vertical, int horiz, unsigned char *ptr, int t_pos, int length); +void insert_line(int disp); +struct text *txtalloc(void); +struct files *name_alloc(void); +unsigned char *next_word(unsigned char *string); +void prev_word(void); +void control(void); +void emacs_control(void); +void bottom(void); +void top(void); +void nextline(void); +void prevline(void); +void left(int disp); +void right(int disp); +void find_pos(void); +void up(void); +void down(void); +void function_key(void); +void print_buffer(void); +void command_prompt(void); +void command(char *cmd_str1); +int scan(char *line, int offset, int column); +char *get_string(char *prompt, int advance); +int compare(char *string1, char *string2, int sensitive); +void goto_line(char *cmd_str); +void midscreen(int line, unsigned char *pnt); +void get_options(int numargs, char *arguments[]); +void check_fp(void); +void get_file(char *file_name); +void get_line(int length, unsigned char *in_string, int *append); +void draw_screen(void); +void finish(void); +int quit(int noverify); +void edit_abort(int arg); +void delete_text(void); +int write_file(char *file_name, int warn_if_exists); +int search(int display_message); +void search_prompt(void); +void del_char(void); +void undel_char(void); +void del_word(void); +void undel_word(void); +void del_line(void); +void undel_line(void); +void adv_word(void); +void move_rel(int direction, int lines); +void eol(void); +void bol(void); +void adv_line(void); +void sh_command(char *string); +void set_up_term(void); +void resize_check(void); +int menu_op(struct menu_entries *); +void paint_menu(struct menu_entries menu_list[], int max_width, int max_height, int list_size, int top_offset, WINDOW *menu_win, int off_start, int vert_size); +void help(void); +void paint_info_win(void); +void no_info_window(void); +void create_info_window(void); +int file_op(int arg); +void shell_op(void); +void leave_op(void); +void redraw(void); +int Blank_Line(struct text *test_line); +void Format(void); +void ee_init(void); +void dump_ee_conf(void); +void echo_string(char *string); +void spell_op(void); +void ispell_op(void); +int first_word_len(struct text *test_line); +void Auto_Format(void); +void modes_op(void); +char *is_in_string(char *string, char *substring); +char *resolve_name(char *name); +int restrict_mode(void); +int unique_test(char *string, char *list[]); +void strings_init(void); #undef P_ /*