1 diff -urNp -x '*.orig' slrn-1.0.3.org/macros/INSTFILES slrn-1.0.3/macros/INSTFILES
2 --- slrn-1.0.3.org/macros/INSTFILES 2016-10-24 00:34:16.000000000 +0200
3 +++ slrn-1.0.3/macros/INSTFILES 2021-10-03 22:48:59.187724986 +0200
4 @@ -15,3 +15,4 @@ varset.sl
9 diff -urNp -x '*.orig' slrn-1.0.3.org/macros/uname.sl slrn-1.0.3/macros/uname.sl
10 --- slrn-1.0.3.org/macros/uname.sl 1970-01-01 01:00:00.000000000 +0100
11 +++ slrn-1.0.3/macros/uname.sl 2021-10-03 22:48:59.187724986 +0200
13 +% example of customizing User-Agent header
15 +set_string_variable("system_type", uname().sysname + " " + uname().release
16 + + "/" + uname().machine);
17 diff -urNp -x '*.orig' slrn-1.0.3.org/src/misc.h slrn-1.0.3/src/misc.h
18 --- slrn-1.0.3.org/src/misc.h 2016-10-24 00:34:16.000000000 +0200
19 +++ slrn-1.0.3/src/misc.h 2021-10-03 22:48:59.187724986 +0200
20 @@ -83,6 +83,8 @@ typedef struct
22 char *posting_host; /* FQDN or NULL */
29 diff -urNp -x '*.orig' slrn-1.0.3.org/src/post.c slrn-1.0.3/src/post.c
30 --- slrn-1.0.3.org/src/post.c 2016-10-24 00:34:16.000000000 +0200
31 +++ slrn-1.0.3/src/post.c 2021-10-03 22:48:59.187724986 +0200
32 @@ -662,9 +662,16 @@ static int prepare_header (VFILE *vp, un
33 int newsgroups_found=0, subject_found=0, followupto_found=0;
34 Slrn_Mime_Error_Obj *err=NULL;
35 Slrn_Mime_Error_Obj *mime_err;
36 - char *tmp, *system_os_name;
37 + char *tmp, *system_os_name, *User_Agent;
39 + if (Slrn_User_Info.system_type != NULL)
40 + system_os_name = Slrn_User_Info.system_type;
42 system_os_name = slrn_get_os_name ();
43 + if (Slrn_User_Info.user_agent != NULL)
44 + User_Agent = Slrn_User_Info.user_agent;
46 + User_Agent = "slrn";
48 #if SLRN_HAS_STRICT_FROM
49 if (NULL != (tmp = slrn_make_from_header ()))
50 @@ -821,7 +828,7 @@ static int prepare_header (VFILE *vp, un
52 if ((NULL == (tmp = slrn_gen_date_header ()))
53 || (NULL == slrn_append_to_header (a, tmp, 1))
54 - || (NULL == (tmp = slrn_strdup_printf("User-Agent: slrn/%s (%s)", Slrn_Version_String, system_os_name)))
55 + || (NULL == (tmp = slrn_strdup_printf("User-Agent: %s/%s (%s)", User_Agent, Slrn_Version_String, system_os_name)))
56 || (NULL == slrn_append_to_header (a, tmp, 1))
57 || (NULL == slrn_append_to_header (a, NULL,0))) /* separator */
59 diff -urNp -x '*.orig' slrn-1.0.3.org/src/startup.c slrn-1.0.3/src/startup.c
60 --- slrn-1.0.3.org/src/startup.c 2016-10-24 00:34:16.000000000 +0200
61 +++ slrn-1.0.3/src/startup.c 2021-10-03 22:48:59.191058315 +0200
62 @@ -766,6 +766,8 @@ Slrn_Str_Var_Type Slrn_Str_Variables []
63 {"followup_custom_headers", &Slrn_Followup_Custom_Headers, NULL},
64 {"reply_custom_headers", &Slrn_Reply_Custom_Headers, NULL},
65 {"supersedes_custom_headers", &Slrn_Supersedes_Custom_Headers, NULL},
66 + {"user_agent", &Slrn_User_Info.user_agent},
67 + {"system_type", &Slrn_User_Info.system_type},
68 #if SLRN_HAS_GROUPLENS
69 {"grouplens_pseudoname", &Slrn_GroupLens_Pseudoname, NULL},
70 {"grouplens_host", &Slrn_GroupLens_Host, NULL},