summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@gentoo.org>2003-01-28 16:02:00 +0000
committerBrandon Low <lostlogic@gentoo.org>2003-01-28 16:02:00 +0000
commitb30965a0f7cbe33c36e30121b7bf11974c774ea6 (patch)
tree1ee4a77df78a6283d97be18cb95d936d9d1239a8 /net-im/pork/files
parentbump (diff)
downloadgentoo-2-b30965a0f7cbe33c36e30121b7bf11974c774ea6.tar.gz
gentoo-2-b30965a0f7cbe33c36e30121b7bf11974c774ea6.tar.bz2
gentoo-2-b30965a0f7cbe33c36e30121b7bf11974c774ea6.zip
cleanup
Diffstat (limited to 'net-im/pork/files')
-rw-r--r--net-im/pork/files/README.gentoo-0.4.0 (renamed from net-im/pork/files/README.gentoo-0.3.0)0
-rw-r--r--net-im/pork/files/digest-pork-0.3.01
-rw-r--r--net-im/pork/files/digest-pork-0.3.0-r11
-rw-r--r--net-im/pork/files/pork-0.3.0-help.patch141
4 files changed, 0 insertions, 143 deletions
diff --git a/net-im/pork/files/README.gentoo-0.3.0 b/net-im/pork/files/README.gentoo-0.4.0
index d36f63532c4c..d36f63532c4c 100644
--- a/net-im/pork/files/README.gentoo-0.3.0
+++ b/net-im/pork/files/README.gentoo-0.4.0
diff --git a/net-im/pork/files/digest-pork-0.3.0 b/net-im/pork/files/digest-pork-0.3.0
deleted file mode 100644
index 9925ebb99cc0..000000000000
--- a/net-im/pork/files/digest-pork-0.3.0
+++ /dev/null
@@ -1 +0,0 @@
-MD5 ffafe7b2a0f99c5fd66f60786a415b05 pork-0.3.0.tar.gz 341832
diff --git a/net-im/pork/files/digest-pork-0.3.0-r1 b/net-im/pork/files/digest-pork-0.3.0-r1
deleted file mode 100644
index 9925ebb99cc0..000000000000
--- a/net-im/pork/files/digest-pork-0.3.0-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 ffafe7b2a0f99c5fd66f60786a415b05 pork-0.3.0.tar.gz 341832
diff --git a/net-im/pork/files/pork-0.3.0-help.patch b/net-im/pork/files/pork-0.3.0-help.patch
deleted file mode 100644
index 449f38c8b045..000000000000
--- a/net-im/pork/files/pork-0.3.0-help.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-diff -Nru pork-0.3.0-clean/src/Makefile.am pork-0.3.0/src/Makefile.am
---- pork-0.3.0-clean/src/Makefile.am 2003-01-08 21:24:34.000000000 -0600
-+++ pork-0.3.0/src/Makefile.am 2003-01-13 19:02:10.000000000 -0600
-@@ -2,7 +2,7 @@
- bin_PROGRAMS = pork
-
- AM_CFLAGS = -funsigned-char -Imissing -Wall
--AM_CFLAGS += -DSYSTEM_PORKRC=\"$(pkgdatadir)/porkrc\"
-+AM_CFLAGS += -DHELP_PATH=\"$(pkgdatadir)/help\" -DSYSTEM_PORKRC=\"$(pkgdatadir)/porkrc\"
- AM_CFLAGS += $(PERL_CFLAGS) $(DEBUG_CFLAGS)
-
- pork_LDFLAGS = -Lmissing -Llibfaim
-diff -Nru pork-0.3.0-clean/src/Makefile.in pork-0.3.0/src/Makefile.in
---- pork-0.3.0-clean/src/Makefile.in 2003-01-08 21:41:16.000000000 -0600
-+++ pork-0.3.0/src/Makefile.in 2003-01-13 19:02:10.000000000 -0600
-@@ -122,7 +122,7 @@
- SUBDIRS = missing libfaim
- bin_PROGRAMS = pork
-
--AM_CFLAGS = -funsigned-char -Imissing -Wall -DSYSTEM_PORKRC=\"$(pkgdatadir)/porkrc\" $(PERL_CFLAGS) $(DEBUG_CFLAGS)
-+AM_CFLAGS = -funsigned-char -Imissing -Wall -DHELP_PATH=\"$(pkgdatadir)/help\" -DSYSTEM_PORKRC=\"$(pkgdatadir)/porkrc\" $(PERL_CFLAGS) $(DEBUG_CFLAGS)
-
- pork_LDFLAGS = -Lmissing -Llibfaim
- pork_LDADD = -lmissing -lfaim -lncurses $(PERL_LIBS) $(DEBUG_LIBS)
-diff -Nru pork-0.3.0-clean/src/pork_command.c pork-0.3.0/src/pork_command.c
---- pork-0.3.0-clean/src/pork_command.c 2003-01-08 20:33:32.000000000 -0600
-+++ pork-0.3.0/src/pork_command.c 2003-01-13 22:11:43.000000000 -0600
-@@ -11,7 +11,9 @@
- #include <config.h>
-
- #include <unistd.h>
-+#include <dirent.h>
- #include <ncurses.h>
-+#include <sys/stat.h>
- #include <sys/types.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -1932,6 +1934,103 @@
- }
-
- USER_COMMAND(cmd_help) {
-+ /* For printing help files */
-+ char buf[4096];
-+
-+ /* Next 3 for separating args */
-+ char *section;
-+ char *command;
-+ char *last;
-+
-+ /* Directory and filenames of help area */
-+ char *dir_name;
-+ char *file_name;
-+
-+ struct stat st;
-+ struct dirent *d_ent;
-+
-+ DIR *dp;
-+ FILE *fp;
-+
-+ /* Start both pointers at the beginning */
-+ section = args;
-+ command = section;
-+
-+ /* Ensure that the help files are available */
-+ if (stat(HELP_PATH, &st) != 0 || !S_ISDIR(st.st_mode)) {
-+ screen_err_msg("Cannot find help path: %s", HELP_PATH);
-+ } else if (args != NULL) {
-+ /* Parse the arguments into a section and a command */
-+ while ((last = strsep(&args, " ")) != NULL) {
-+ if (args != NULL) {
-+ command = args;
-+ }
-+ if ( section < last && last < command ) {
-+ *(last - 1) = '/';
-+ }
-+ }
-+
-+ /* Create full path of section */
-+ dir_name = malloc(sizeof(HELP_PATH) + strlen(section) + 2);
-+ snprintf(dir_name, sizeof(HELP_PATH) + strlen(section) + 2,
-+ "%s/%s", HELP_PATH, section);
-+ /* Create full path of command */
-+ if ( command == section ) {
-+ file_name = dir_name;
-+ } else {
-+ file_name = malloc(strlen(dir_name) + strlen(command) + 2);
-+ snprintf(file_name, strlen(dir_name) + strlen(command) + 2,
-+ "%s/%s", dir_name, command);
-+ }
-+
-+ /* Make sure that we have a valid section */
-+ if (stat(dir_name, &st) != 0 || !S_ISDIR(st.st_mode)) {
-+ screen_err_msg("Error: %s is not a valid help command",
-+ section);
-+ /* Make sure we have a valid command */
-+ } else if (stat(file_name, &st) != 0) {
-+ screen_err_msg("Error: No help in section %s for %s",
-+ section, command);
-+ /* If command is a section itself, print the section */
-+ } else if (S_ISDIR(st.st_mode)) {
-+ screen_win_msg(cur_window(), 0, 0, 1,
-+ "Help topics from command %s:", section);
-+ dp = opendir(dir_name);
-+ while((d_ent = readdir(dp)) != NULL){
-+ if ( d_ent->d_name[0] != '.' )
-+ screen_win_msg(cur_window(), 0, 0, 1,
-+ "%s", d_ent->d_name);
-+ }
-+ closedir(dp);
-+ /* If command matches a helpfile, print it */
-+ } else if (S_ISREG(st.st_mode)) {
-+ screen_win_msg(cur_window(), 0, 0, 1,
-+ "Help from command %s for %s:", section, command);
-+ fp = fopen(file_name,"r");
-+ while (fgets(buf, sizeof(buf), fp) != NULL)
-+ screen_win_msg(cur_window(), 0, 0, 1, "%s", buf);
-+ fclose(fp);
-+ /* If command matches anything else, error */
-+ } else {
-+ screen_err_msg("Error opening help file");
-+ }
-+ /* Clean up */
-+ if (file_name != dir_name)
-+ free(file_name);
-+ free(dir_name);
-+ /* Otherwise print the list of sections */
-+ } else {
-+
-+ screen_win_msg(cur_window(), 0, 0, 1, "Available help commands:");
-+
-+ dp = opendir(HELP_PATH);
-+ while((d_ent = readdir(dp)) != NULL){
-+ if ( d_ent->d_name[0] != '.' )
-+ screen_win_msg(cur_window(), 0, 0, 1,
-+ "%s", d_ent->d_name);
-+ }
-+ closedir(dp);
-+ }
- }
-
- USER_COMMAND(cmd_idle) {