Skip to content

Commit 580f8a4

Browse files
authored
feat: remove embedded FTPD (~3,300 LOC, ~48 KB runtime)
Delete all src/ftp*.c files (32 files) and include/ftpd.h. Extract UCHAR/USHRT/UINT/ULONG/U64 typedefs into include/types.h. Update include/httpcgi.h to use types.h instead of inline typedefs. In include/httpd.h: - Remove #include "ftpd.h", add #include "types.h" - Replace FTPD *ftpd field with void *unused_50 (offset-stable) In src/httpd.c: - Remove FTP listener creation and accept() from socket_thread - Remove FTPC eye-catcher branch from worker_thread - Remove ftpdterm() call from terminate() In src/httpdsrv.c: - Remove display_ftpd() and FTPD table row - Remove FTPC branch from display_queue_data() In src/httpcons.c: - Remove FTPD port display and FTPC branch from d_queue() Fixes #42
1 parent 6eb1638 commit 580f8a4

39 files changed

Lines changed: 17 additions & 3864 deletions

include/ftpd.h

Lines changed: 0 additions & 206 deletions
This file was deleted.

include/httpcgi.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@
3434
/* Basic typedefs (no dependency) */
3535
/* ------------------------------------------------------------------ */
3636

37-
typedef unsigned char UCHAR;
38-
typedef unsigned short USHRT;
39-
typedef unsigned int UINT;
40-
typedef unsigned long ULONG;
37+
#include "types.h"
4138

4239
/* ------------------------------------------------------------------ */
4340
/* Forward declarations — CGI modules hold pointers, never dereference */

include/httpd.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include "dbg.h" /* debugging goodies */
4242
#include "errors.h" /* the missing errno values */
4343
#include "racf.h" /* security environment */
44-
#include "ftpd.h" /* FTP daemon and client */
44+
#include "types.h" /* UCHAR, USHRT, UINT, ULONG */
4545
#include "cred.h" /* Credentials */
4646
#include "mqtc370.h" /* MQTT Client */
4747
#include "httpxlat.h" /* ASCII/EBCDIC translation */
@@ -63,14 +63,6 @@ typedef enum rdw RDW; /* RDW option */
6363

6464
#include "httppub.h" /* HTTP Telemetry Publisher */
6565

66-
#if 0 /* declared in FTPD.H */
67-
typedef unsigned char UCHAR;
68-
typedef unsigned short USHRT;
69-
typedef unsigned int UINT;
70-
typedef unsigned long ULONG;
71-
typedef unsigned long long U64;
72-
#endif
73-
7466
#ifndef OR
7567
#define OR ??!??! /* logical OR trigraph */
7668
#endif
@@ -122,7 +114,7 @@ struct httpd {
122114
char rname[12]; /* 38 resource name */
123115
HTTPCGI **httpcgi; /* 44 CGI path and programs */
124116
time64_t uptime; /* 48 Server startup time */
125-
FTPD *ftpd; /* 50 FTP daemon */
117+
void *unused_50; /* 50 (was: FTPD *ftpd) */
126118
UFSSYS *ufssys; /* 54 Unix like file system */
127119
LUAX *luax; /* 58 Lua function vector */
128120
const char *version; /* 5C HTTPD Version */

include/types.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#ifndef TYPES_H
2+
#define TYPES_H
3+
/*
4+
** TYPES.H - Basic unsigned type definitions for HTTPD and CGI modules
5+
*/
6+
7+
typedef unsigned char UCHAR;
8+
typedef unsigned short USHRT;
9+
typedef unsigned int UINT;
10+
typedef unsigned long ULONG;
11+
typedef unsigned long long U64;
12+
13+
#endif

src/ftpcdsc.c

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)