[mw-devel] MW3 r1031 - in trunk: . src
welshbyte at sucs.org
welshbyte at sucs.org
Thu Apr 3 01:26:51 BST 2008
Author: welshbyte
Date: 2008-04-03 01:26:50 +0100 (Thu, 03 Apr 2008)
New Revision: 1031
Modified:
trunk/Makefile
trunk/mw.spec
trunk/src/proto.h
trunk/src/strings.c
Log:
Replace makepath() with a more general buildpath() and define makepath as a
macro which uses buildpath(). This will aid in changing the .i and .t file
paths later.
Also contains spec and makefile updates I missed in the last commit.
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2008-04-02 22:33:46 UTC (rev 1030)
+++ trunk/Makefile 2008-04-03 00:26:50 UTC (rev 1031)
@@ -16,7 +16,7 @@
endif
install:
- install -d $(libdir)/mw/mesgs
+ install -d $(libdir)/mw
cp -a $(INSTALLFILES) $(libdir)/mw/
make -C src install
Modified: trunk/mw.spec
===================================================================
--- trunk/mw.spec 2008-04-02 22:33:46 UTC (rev 1030)
+++ trunk/mw.spec 2008-04-03 00:26:50 UTC (rev 1031)
@@ -39,10 +39,10 @@
%defattr (755,mw,mw)
%dir %{_libdir}/mw
%{_libdir}/mw/colour
-%attr(771,mw,mw) %{_libdir}/mw/mesgs
%attr(751,mw,mw) %{_libdir}/mw/rooms
%attr(755,mw,mw) %dir /var/log/mw
%attr(711,mw,mw) %dir /var/lib/mw
+%attr(755,mw,mw) %dir /var/run/mw
%config %attr(640,mw,mw) %{_libdir}/mw/login.banner
%{_libdir}/mw/help
%{_libdir}/mw/mudhelp
Modified: trunk/src/proto.h
===================================================================
--- trunk/src/proto.h 2008-04-02 22:33:46 UTC (rev 1030)
+++ trunk/src/proto.h 2008-04-03 00:26:50 UTC (rev 1031)
@@ -150,7 +150,8 @@
void read2cr(void);
int getachar(void);
void strip_str(char *string);
-char *makepath(char *a, char *b, char *c);
+char *buildpath(char *a, char *b, char *c, char *d);
+#define makepath(a,b,c) (buildpath(HOMEPATH,a,b,c))
int err_open(char *path, int type, int mode);
char *mw_fgets(char *string, int size, FILE *fp);
void strcatc(char **str, char c);
Modified: trunk/src/strings.c
===================================================================
--- trunk/src/strings.c 2008-04-02 22:33:46 UTC (rev 1030)
+++ trunk/src/strings.c 2008-04-03 00:26:50 UTC (rev 1031)
@@ -189,11 +189,11 @@
/* common file functions */
-char *makepath(char *a, char *b, char *c)
+char *buildpath(char *a, char *b, char *c, char *d)
{
static char fullpath[PATHSIZE];
- snprintf(fullpath, PATHSIZE-1, "%s/%s%s%s",HOMEPATH,a,b,c);
+ snprintf(fullpath, PATHSIZE-1, "%s/%s%s%s",a,b,c,d);
return(fullpath);
}
More information about the mw-devel
mailing list