[mw-devel] MW3 r1022 - in trunk: . src
welshbyte at sucs.org
welshbyte at sucs.org
Sun Mar 30 00:26:54 GMT 2008
Author: welshbyte
Date: 2008-03-30 00:26:53 +0000 (Sun, 30 Mar 2008)
New Revision: 1022
Removed:
trunk/folders.bb
Modified:
trunk/Makefile
trunk/mw.spec
trunk/src/files.c
trunk/src/main.c
trunk/src/newmain.c
Log:
Handle missing folders.bb nicely
- Don't exit() when folders.bb is missing in openfolderfile()
- Add return value checks where necessary
- Remove folders.bb stub from svn and don't install it in Makefile
- Update spec file - folders.bb should never have been a config file
- Fix typo
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2008-03-29 22:15:57 UTC (rev 1021)
+++ trunk/Makefile 2008-03-30 00:26:53 UTC (rev 1022)
@@ -5,7 +5,7 @@
VERSION=$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_TWEAK)
# the non source files that should get installed
-INSTALLFILES = colour help login.banner mudhelp rooms scripthelp talkhelp wizhelp folders.bb COPYING INSTALL LICENSE README
+INSTALLFILES = colour help login.banner mudhelp rooms scripthelp talkhelp wizhelp COPYING INSTALL LICENSE README
ifndef TMPDIR
rpm:
Deleted: trunk/folders.bb
===================================================================
--- trunk/folders.bb 2008-03-29 22:15:57 UTC (rev 1021)
+++ trunk/folders.bb 2008-03-30 00:26:53 UTC (rev 1022)
@@ -1 +0,0 @@
-Fish @f-hiFish "\e[3~" delete-char "\e[2 -insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert # ]@h]@f-history "\e[3~" delete-char "\e[2~" quoted-insert #
\ No newline at end of file
Modified: trunk/mw.spec
===================================================================
--- trunk/mw.spec 2008-03-29 22:15:57 UTC (rev 1021)
+++ trunk/mw.spec 2008-03-30 00:26:53 UTC (rev 1022)
@@ -39,7 +39,6 @@
%defattr (755,mw,mw)
%dir %{_libdir}/mw
%{_libdir}/mw/colour
-%config %attr(660,mw,mw) %{_libdir}/mw/folders.bb
%attr(771,mw,mw) %{_libdir}/mw/mesgs
%attr(751,mw,mw) %{_libdir}/mw/rooms
%config %attr(640,mw,mw) %{_libdir}/mw/login.banner
Modified: trunk/src/files.c
===================================================================
--- trunk/src/files.c 2008-03-29 22:15:57 UTC (rev 1021)
+++ trunk/src/files.c 2008-03-30 00:26:53 UTC (rev 1022)
@@ -134,7 +134,6 @@
if (x<0)
{
perror("Open Folder File");
- exit(-1);
}
return(x);
}
@@ -185,7 +184,7 @@
int no;
struct folder fold;
- file=openfolderfile(O_RDONLY);
+ if ((file=openfolderfile(O_RDONLY)) < 0) return -1;
do{
no=get_folder_entry(file,&fold);
number++;
@@ -213,7 +212,7 @@
if (nofolders())
{printf("There are no folders !\n");return 0;}
- file=openfolderfile(O_RDONLY);
+ if ((file=openfolderfile(O_RDONLY)) < 0) return 0;
lseek(file,sizeof(*fol)*num,0);
if ((no=read(file,fol,sizeof(*fol)))<0)
{
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2008-03-29 22:15:57 UTC (rev 1021)
+++ trunk/src/main.c 2008-03-30 00:26:53 UTC (rev 1022)
@@ -1901,7 +1901,7 @@
{
if (nofolders()) return(NULL);
if (file!=0) close(file);
- file=openfolderfile(O_RDONLY);
+ if ((file=openfolderfile(O_RDONLY))<0) return NULL;
len=strlen(text);
}
Modified: trunk/src/newmain.c
===================================================================
--- trunk/src/newmain.c 2008-03-29 22:15:57 UTC (rev 1021)
+++ trunk/src/newmain.c 2008-03-30 00:26:53 UTC (rev 1022)
@@ -469,7 +469,7 @@
{
printf(_("Current folder = %s\n"),fold->name);
if (last_mesg==0)
- printf(_("You havn't read any messages in this folder yet.\n"));
+ printf(_("You haven't read any messages in this folder yet.\n"));
else
printf(_("You last read message %d.\n"),last_mesg);
}
More information about the mw-devel
mailing list