aboutsummaryrefslogtreecommitdiffstats
path: root/g10/build-packet.c
diff options
context:
space:
mode:
authorStefan Bellon <[email protected]>2002-10-29 14:37:12 +0000
committerStefan Bellon <[email protected]>2002-10-29 14:37:12 +0000
commite4021a4c95b858f0618f7b1d27520abd97b2da79 (patch)
treeead4b32dffb518f744068c07bda60bcfa99a5e04 /g10/build-packet.c
parentfiletype support for RISC OS (diff)
downloadgnupg-e4021a4c95b858f0618f7b1d27520abd97b2da79.tar.gz
gnupg-e4021a4c95b858f0618f7b1d27520abd97b2da79.zip
tidied RISC OS filetype support
Diffstat (limited to '')
-rw-r--r--g10/build-packet.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/g10/build-packet.c b/g10/build-packet.c
index a1f93094e..da1cbbe39 100644
--- a/g10/build-packet.c
+++ b/g10/build-packet.c
@@ -528,14 +528,7 @@ do_pubkey_enc( IOBUF out, int ctb, PKT_pubkey_enc *enc )
static u32
calc_plaintext( PKT_plaintext *pt )
{
-#ifndef __riscos__
return pt->len? (1 + 1 + pt->namelen + 4 + pt->len) : 0;
-#else
- /* Under RISC OS, we add ",xxx" to the file name in order to
- be able to recreate the correct file type on the recipients'
- side. Therefore we need 4 bytes more. */
- return pt->len? (1 + 1 + pt->namelen + 4 + pt->len + 4) : 0;
-#endif
}
static int
@@ -548,26 +541,9 @@ do_plaintext( IOBUF out, int ctb, PKT_plaintext *pt )
write_header(out, ctb, calc_plaintext( pt ) );
iobuf_put(out, pt->mode );
-#ifndef __riscos__
iobuf_put(out, pt->namelen );
for(i=0; i < pt->namelen; i++ )
iobuf_put(out, pt->name[i] );
-#else
- /* Under RISC OS, we add ",xxx" to the file name in order to
- be able to recreate the correct file type on the recipients'
- side. Therefore we need 4 bytes more. */
- iobuf_put(out, pt->namelen + 4);
- for(i=0; i < pt->namelen; i++ )
- if( pt->name[i] != '/' )
- iobuf_put(out, pt->name[i] );
- else
- iobuf_put(out, '.' );
- i = riscos_get_filetype( iobuf_get_real_fname( pt->buf ) );
- iobuf_put(out, ',');
- iobuf_put(out, "0123456789abcdef"[(i >> 8) & 0xf]);
- iobuf_put(out, "0123456789abcdef"[(i >> 4) & 0xf]);
- iobuf_put(out, "0123456789abcdef"[(i >> 0) & 0xf]);
-#endif
if( write_32(out, pt->timestamp ) )
rc = G10ERR_WRITE_FILE;