From acd518031f8b4acdb37b90dab7c24d5601de1d92 Mon Sep 17 00:00:00 2001 From: cheesestraws Date: Tue, 13 May 2025 20:31:30 +0100 Subject: [PATCH 1/3] getzones: normalise formatting --- bin/getzones/getzones.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/getzones/getzones.c b/bin/getzones/getzones.c index 2e8e3e96eca..b8101073b7d 100644 --- a/bin/getzones/getzones.c +++ b/bin/getzones/getzones.c @@ -31,15 +31,15 @@ static void usage(char *s) int main(int argc, char *argv[]) { - struct atp_handle *ah; - struct atp_block atpb; - struct sockaddr_at saddr; - struct servent *se; - char reqdata[4], buf[ATP_MAXDATA]; - struct iovec iov; - short temp, index = 0; - int c, myzoneflg = 0, localzonesflg = 0, errflg = 0; - extern int optind; + struct atp_handle *ah; + struct atp_block atpb; + struct sockaddr_at saddr; + struct servent *se; + char reqdata[4], buf[ATP_MAXDATA]; + struct iovec iov; + short temp, index = 0; + int c, myzoneflg = 0, localzonesflg = 0, errflg = 0; + extern int optind; reqdata[0] = ZIPOP_GETZONELIST; while ((c = getopt(argc, argv, "ml")) != EOF) { From d49ec6ec5253c2a3ce7292075f0e97481499849c Mon Sep 17 00:00:00 2001 From: cheesestraws Date: Wed, 14 May 2025 11:29:02 +0100 Subject: [PATCH 2/3] nbplkup: put loose unicode include where it belongs with the other libatalk includes --- bin/nbp/nbplkup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/nbp/nbplkup.c b/bin/nbp/nbplkup.c index 5e59895d0cc..d430f9610d4 100644 --- a/bin/nbp/nbplkup.c +++ b/bin/nbp/nbplkup.c @@ -29,15 +29,13 @@ #include #include #include +#include #include #include #include #include #include - -#include - #define MACCHARSET "MAC_ROMAN" static char *Obj = "="; From 08128ddbbfbb87464406df88c41e5a7ba58afa7d Mon Sep 17 00:00:00 2001 From: cheesestraws Date: Wed, 14 May 2025 11:31:29 +0100 Subject: [PATCH 3/3] pap: remove unconditional conditional While I appreciate the extra contextual information about the problem space which is communicated by the macro name, it's still permanently set, so the macro and its ifdefs are redundant. The command line options it gates are already documented as fixtures in the man page. --- bin/pap/pap.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/bin/pap/pap.c b/bin/pap/pap.c index af5cc8f2e10..9af1fce6c92 100644 --- a/bin/pap/pap.c +++ b/bin/pap/pap.c @@ -23,8 +23,6 @@ #include #include -#define FUCKED - #define _PATH_PAPRC ".paprc" #define IMAGEWRITER "ImageWriter" @@ -172,8 +170,6 @@ int main(int ac, char **av) while ((c = getopt(ac, av, "dWwcep:s:EA:")) != EOF) { switch (c) { -#ifdef FUCKED - case 'w' : waitforprinter = 1; break; @@ -181,7 +177,6 @@ int main(int ac, char **av) case 'W' : waitforidle = 1; break; -#endif /* FUCKED */ /* enable debugging */ case 'd' : @@ -932,8 +927,6 @@ static int send_file(int fd, ATP atp, int lastfile, int is_imagewriter) printf("< STATUS\n"), fflush(stdout); } -#ifdef FUCKED - if (waitforprinter) { char st_buf[1024]; /* XXX too big */ memcpy(st_buf, (char *) rniov[0].iov_base + 9, @@ -945,7 +938,6 @@ static int send_file(int fd, ATP atp, int lastfile, int is_imagewriter) } } -#endif /* FUCKED */ updatestatus((char *) rniov[0].iov_base + 9, ((char *)rniov[0].iov_base)[8]); }