🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
9 messages
9 total messages Started by rj Mon, 24 Feb 2014 08:03
[slrn] custom_os.patch still working?
#257092
Author: rj
Date: Mon, 24 Feb 2014 08:03
13 lines
1327 bytes
I've got

set custom_os "Ubuntu 12.04"

in my .slrnrc, and in my slrn-pre1.0.2-12/ folder in my homedir, I have

4 -rwxr-xr-x  1 rj rj   2912 Dec 26  2010 custom_os.patch*

but it isn't working.  Has the patch been made obsolete or am i not invoking it
correctly?

-- 
  Why you should never talk to cops:  <http://is.gd/iV74U>
Re: [slrn] custom_os.patch still working?
#257122
Author: Mike Yetto
Date: Sat, 01 Mar 2014 22:19
20 lines
1976 bytes
Bada bing rj <rj@panix.com.invalid> bada bang...
> I've got

> set custom_os "Ubuntu 12.04"

> in my .slrnrc, and in my slrn-pre1.0.2-12/ folder in my homedir, I have

> 4 -rwxr-xr-x  1 rj rj   2912 Dec 26  2010 custom_os.patch*

> but it isn't working.  Has the patch been made obsolete or am i not invoking it
> correctly?

If you ask three or four more times the answer won't change.

Mike "unless you finally catch andrew's eye" Yetto
-- 
"We have to remember that what we observe is not nature herself,
but nature exposed to our method of questioning."
 - Werner Heisenberg
Re: [slrn] custom_os.patch still working?
#257127
Author: Feranija
Date: Sun, 02 Mar 2014 11:00
16 lines
1684 bytes
On 2014-02-24, rj <rj@panix.com.invalid> wrote:
> I've got
>
> set custom_os "Ubuntu 12.04"
>
> in my .slrnrc, and in my slrn-pre1.0.2-12/ folder in my homedir, I have
>
> 4 -rwxr-xr-x  1 rj rj   2912 Dec 26  2010 custom_os.patch*
>
> but it isn't working.  Has the patch been made obsolete or am i not invoking it
> correctly?
>

So, how did you use the patch file "custom_os.patch" ?

Re: [slrn] custom_os.patch still working?
#257132
Author: rj
Date: Mon, 03 Mar 2014 02:59
10 lines
1655 bytes
On Sun, 2 Mar 2014 11:00:13 +0000 (UTC),
Feranija <feranija@mouse-potato.com> wrote:

> So, how did you use the patch file "custom_os.patch" ?

I don't think I *was* using it.  It's been long enough since I've applied
a patch to slrn -- or to anything -- that I've forgotten, for now at least,
how to do it.  In any case I don't really need custom_os patch, I was just
wondering (and wondering, I see) about it.
Re: [slrn] custom_os.patch still working?
#257158
Author: andrew
Date: Fri, 21 Mar 2014 07:10
107 lines
4535 bytes
On 2014-03-01, Mike Yetto <unet.lighthouse@xoxy.net> wrote:

> Mike "unless you finally catch andrew's eye" Yetto

The patch will probably still work although I have not tested it for a
while. My website, where the patch normally lived, is gone but here is
the most recent version of the patch:

#v+ 

#----------------------------------------------------------------
#              custom_os patch for slrn 
#----------------------------------------------------------------
#
# This patch adds the ability to alter the "Operating System" 
# section of the User-Agent header generated by slrn. The patch
# allows this to be manipulated from the .slrnrc file as follows:
#
#           set custom_os "Slackware 13.1"
#
# Thanks to:
# Jeroen van Nieuwenhuizen:    http://www.jeroen.se/
# Thomas Wiegner:              http://www.foory.de/thw/slrn/
#
# Patch by Andrew Strong
#
# Changelog:
# 01 Jul 2008:  First working version
# 22 Aug 2008:  Added TW's 'branding scheme' to version.c
# 16 Apr 2010:  Small line adjustment for current svn
# 25 Apr 2013:  Adjustment for current git slrn
----------------------------------------------------------------
diff --git a/src/post.c b/src/post.c
index 0f30f85..d12628f 100644
--- a/src/post.c
+++ b/src/post.c
@@ -76,6 +76,7 @@
 #define MAX_LINE_BUFLEN	2048
 
 /*{{{ Public Global Variables */
+char *Slrn_Custom_OS_Name;
 char *Slrn_CC_Post_Message = NULL;
 char *Slrn_Failed_Post_Filename;
 char *Slrn_Post_Custom_Headers;
@@ -664,7 +665,14 @@ static int prepare_header (VFILE *vp, unsigned int *linenum, Slrn_Article_Type *
    Slrn_Mime_Error_Obj *mime_err;
    char *tmp, *system_os_name;
 
-   system_os_name = slrn_get_os_name ();
+  if (Slrn_Custom_OS_Name == NULL)
+ {
+      system_os_name = slrn_get_os_name ();
+}
+ else
+  {
+  system_os_name = Slrn_Custom_OS_Name;
+}
 
 #if SLRN_HAS_STRICT_FROM
    if (NULL != (tmp = slrn_make_from_header ()))
diff --git a/src/post.h b/src/post.h
index 1b69372..95a6f22 100644
--- a/src/post.h
+++ b/src/post.h
@@ -18,6 +18,7 @@
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */
+extern char *Slrn_Custom_OS_Name;
 extern int slrn_add_signature (FILE *);
 extern char *slrn_gen_date_header (void);
 extern int slrn_add_custom_headers (FILE *, char *, int (*)(char *, FILE *));
diff --git a/src/startup.c b/src/startup.c
index 76162fb..b68a904 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -719,6 +719,7 @@ static int get_set_macro_dir (Slrn_Str_Var_Type *sv, int set, char **valp)
 
 Slrn_Str_Var_Type Slrn_Str_Variables [] = /*{{{*/
 {
+     {"custom_os", &Slrn_Custom_OS_Name, NULL},
      {"failed_posts_file", &Slrn_Failed_Post_Filename, NULL},
 #if ! SLRN_HAS_STRICT_FROM
      {"hostname", &Slrn_User_Info.hostname, NULL},
diff --git a/src/version.c b/src/version.c
index 79bfe18..979eb6c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -43,7 +43,8 @@
 #include "art.h"
 #include "snprintf.h"
 
-char *Slrn_Version_String = SLRN_VERSION_STRING;
+#define SLRN_VERSION_STRING_AS SLRN_VERSION_STRING"/co"
+char *Slrn_Version_String = SLRN_VERSION_STRING_AS;
 int Slrn_Version = SLRN_VERSION;
 
 typedef struct

#v- 

I leave this copy here for others to work with if they wish, it
certainly was a lot of fun putting it together all that time ago :)

Andrew
-- 
Do you think that's air you're breathing?
Re: [slrn] custom_os.patch still working?
#257161
Author: Mike Yetto
Date: Fri, 21 Mar 2014 12:05
112 lines
5424 bytes
Bada bing andrew <andrew@skamandros.invalid> bada bang...
> On 2014-03-01, Mike Yetto <unet.lighthouse@xoxy.net> wrote:

>> Mike "unless you finally catch andrew's eye" Yetto

> The patch will probably still work although I have not tested it for a
> while. My website, where the patch normally lived, is gone but here is
> the most recent version of the patch:

> #v+ 

> #----------------------------------------------------------------
> #              custom_os patch for slrn 
> #----------------------------------------------------------------
> #
> # This patch adds the ability to alter the "Operating System" 
> # section of the User-Agent header generated by slrn. The patch
> # allows this to be manipulated from the .slrnrc file as follows:
> #
> #           set custom_os "Slackware 13.1"
> #
> # Thanks to:
> # Jeroen van Nieuwenhuizen:    http://www.jeroen.se/
> # Thomas Wiegner:              http://www.foory.de/thw/slrn/
> #
> # Patch by Andrew Strong
> #
> # Changelog:
> # 01 Jul 2008:  First working version
> # 22 Aug 2008:  Added TW's 'branding scheme' to version.c
> # 16 Apr 2010:  Small line adjustment for current svn
> # 25 Apr 2013:  Adjustment for current git slrn
> ----------------------------------------------------------------
> diff --git a/src/post.c b/src/post.c
> index 0f30f85..d12628f 100644
> --- a/src/post.c
> +++ b/src/post.c
> @@ -76,6 +76,7 @@
>  #define MAX_LINE_BUFLEN	2048
>  
>  /*{{{ Public Global Variables */
> +char *Slrn_Custom_OS_Name;
>  char *Slrn_CC_Post_Message = NULL;
>  char *Slrn_Failed_Post_Filename;
>  char *Slrn_Post_Custom_Headers;
> @@ -664,7 +665,14 @@ static int prepare_header (VFILE *vp, unsigned int *linenum, Slrn_Article_Type *
>     Slrn_Mime_Error_Obj *mime_err;
>     char *tmp, *system_os_name;
>  
> -   system_os_name = slrn_get_os_name ();
> +  if (Slrn_Custom_OS_Name == NULL)
> + {
> +      system_os_name = slrn_get_os_name ();
> +}
> + else
> +  {
> +  system_os_name = Slrn_Custom_OS_Name;
> +}
>  
>  #if SLRN_HAS_STRICT_FROM
>     if (NULL != (tmp = slrn_make_from_header ()))
> diff --git a/src/post.h b/src/post.h
> index 1b69372..95a6f22 100644
> --- a/src/post.h
> +++ b/src/post.h
> @@ -18,6 +18,7 @@
>   with this program; if not, write to the Free Software Foundation, Inc.,
>   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
>  */
> +extern char *Slrn_Custom_OS_Name;
>  extern int slrn_add_signature (FILE *);
>  extern char *slrn_gen_date_header (void);
>  extern int slrn_add_custom_headers (FILE *, char *, int (*)(char *, FILE *));
> diff --git a/src/startup.c b/src/startup.c
> index 76162fb..b68a904 100644
> --- a/src/startup.c
> +++ b/src/startup.c
> @@ -719,6 +719,7 @@ static int get_set_macro_dir (Slrn_Str_Var_Type *sv, int set, char **valp)
>  
>  Slrn_Str_Var_Type Slrn_Str_Variables [] = /*{{{*/
>  {
> +     {"custom_os", &Slrn_Custom_OS_Name, NULL},
>       {"failed_posts_file", &Slrn_Failed_Post_Filename, NULL},
>  #if ! SLRN_HAS_STRICT_FROM
>       {"hostname", &Slrn_User_Info.hostname, NULL},
> diff --git a/src/version.c b/src/version.c
> index 79bfe18..979eb6c 100644
> --- a/src/version.c
> +++ b/src/version.c
> @@ -43,7 +43,8 @@
>  #include "art.h"
>  #include "snprintf.h"
>  
> -char *Slrn_Version_String = SLRN_VERSION_STRING;
> +#define SLRN_VERSION_STRING_AS SLRN_VERSION_STRING"/co"
> +char *Slrn_Version_String = SLRN_VERSION_STRING_AS;
>  int Slrn_Version = SLRN_VERSION;
>  
>  typedef struct

> #v- 

> I leave this copy here for others to work with if they wish, it
> certainly was a lot of fun putting it together all that time ago :)

Thank you once again, kind sir.

Mike "maybe I can get it working again" Yetto
-- 
"I had no shoes and I pitied myself.  Then I met a man who had no
feet, so I took his shoes."
 - Dave Barry
Re: [slrn] custom_os.patch still working?
#257166
Author: Mike Yetto
Date: Sat, 22 Mar 2014 21:55
17 lines
2034 bytes
Bada bing andrew <andrew@skamandros.invalid> bada bang...
> On 2014-03-01, Mike Yetto <unet.lighthouse@xoxy.net> wrote:

>> Mike "unless you finally catch andrew's eye" Yetto

> The patch will probably still work although I have not tested it for a
> while. My website, where the patch normally lived, is gone but here is
> the most recent version of the patch:

It does seem to be working, but will it save the world?

Mike "tune in next week to find out" Yetto
-- 
"I was talking aloud to myself. A habit of the old: they choose
the wisest person present to speak to; the long explanations
needed by the young are wearying."
 - Gandalf
Re: slrn custom_os.patch still working?
#257167
Author: tdk
Date: Sun, 23 Mar 2014 01:39
12 lines
1893 bytes
>  "I had no shoes and I pitied myself. Then I met a man who had no feet, so I took 
> his shoes." - Dave Barry 

Was he shot by Oscar Pistorius? 


-- 
regards
~tdk
View this thread at http://squte.com/node/4892#comment-19156
Re: [slrn] custom_os.patch still working?
#257171
Author: andrew
Date: Mon, 24 Mar 2014 07:22
9 lines
1354 bytes
On 2014-03-22, Mike Yetto <unet.lighthouse@xoxy.net> wrote:

> It does seem to be working, but will it save the world?

Good to see :)

Andrew
-- 
Do you think that's air you're breathing?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads