Xref: utzoo news.software.b:3462 comp.sources.bugs:2048 Path: utzoo!utstat!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!cs.utexas.edu!uunet!ateng!chip From: chip@ateng.com (Chip Salzenberg) Newsgroups: news.software.b,comp.sources.bugs Subject: C News patch for X- headers in local articles Message-ID: <255F55F6.19192@ateng.com> Date: 14 Nov 89 00:01:57 GMT Organization: A T Engineering, Tampa, FL Lines: 41 In writing a local program to take a news article and repost it to another newsgroup, I added a field "X-Original-Newsgroups:" with obvious purpose. To avoid confusing rn, I put it at the end of the header. However, I found that the defhdrs.awk program outputs most headers in a random order, and the X- header was being output in the middle. This header arrangement confused rn's hide-these-headers feature. Therefore, I modified defhdrs.awk to output all non-standard (X-) headers last. Here is the (small) patch: *** defhdrs.awk.P Mon Aug 28 16:05:49 1989 --- defhdrs.awk Mon Nov 13 18:55:52 1989 *************** *** 103,109 **** } ! # print misc. non-empty headers in random order for (i in hdrval) ! if (hdrval[i] != "" && hdrval[i] !~ /^[^\t ]*:[\t ]*$/) print hdrval[i] } --- 103,116 ---- } ! # print remaining standard headers in random order for (i in hdrval) ! if (i !~ /^X-/ && \ ! hdrval[i] != "" && hdrval[i] !~ /^[^\t ]*:[\t ]*$/) print hdrval[i] + + # print remaining non-standard headers in random order + for (i in hdrval) + if (i ~ /^X-/ && \ + hdrval[i] != "" && hdrval[i] !~ /^[^\t ]*:[\t ]*$/) + print hdrval[i] } I trust that others will also find this patch useful. (Geoff? Henry?) -- You may redistribute this article only to those who may freely do likewise. Chip Salzenberg at A T Engineering; or