Re: New patch to work around default OUR_ORGANIZATION
Jörg Sommer <[email protected]>
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Message-ID | <[email protected]> |
Hallo Jörg, Jörg Sommer <[email protected]> wrote: > #! /bin/sh /usr/share/dpatch/dpatch-run > ## 205_organization.diff original author unknown > ## © 2008 Jörg Sommer <[email protected]> > ## > ## DP: We set OUR_ORGANIZATION to /etc/news/organization in 203_locations.diff > ## DP: which causes Slrn_User_Info.org is != NULL every time. But if this file > ## DP: doesn't exist, then the organization field in the header of postings > ## DP: contains the filename. > > @DPATCH@ > --- slrn-0.9.8.0.orig/src/misc.c > +++ slrn-0.9.8.0/src/misc.c > @@ -2720,6 +2720,10 @@ > } > slrn_fclose (fporg); > } > +#ifdef OUR_ORGANIZATION > + else if (OUR_ORGANIZATION == Slrn_User_Info.org) Better use strcmp() here, because gcc complains: “warning: comparison with string literal results in unspecified behaviour” > + Slrn_User_Info.org = ""; > +#endif > } > Slrn_User_Info.org = slrn_safe_strmalloc (Slrn_User_Info.org); > } Schöne Grüße, Jörg. -- Man soll Denken lehren, nicht Gedachtes. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone