With the power of USES=dos2unix, get rid of most patches and files
with CRLF. While there, run make makepatch, rename patches to use the new scheme, and various fixes. With hat: portmgr Sponsored by: Absolight
This commit is contained in:
parent
a35ba13770
commit
7ae7b018cc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=417166
273 changed files with 2844 additions and 2846 deletions
|
@ -15,7 +15,7 @@ GH_ACCOUNT= engerim42
|
|||
|
||||
PLIST_FILES= bin/wmSolar
|
||||
USE_XORG= x11 xext xpm
|
||||
USES= gmake
|
||||
USES= dos2unix gmake
|
||||
|
||||
pre-patch:
|
||||
@${REINPLACE_CMD} -e 's|values.h|float.h|; s|MAXDOUBLE|DBL_MAX|g' \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- Makefile.orig Tue Jan 15 17:54:38 2002
|
||||
+++ Makefile Tue Jan 15 17:56:37 2002
|
||||
--- Makefile.orig 2016-06-20 12:40:27 UTC
|
||||
+++ Makefile
|
||||
@@ -1,8 +1,6 @@
|
||||
-CC = g++
|
||||
-CFLAGS = -O2 -Wall
|
||||
|
@ -11,7 +11,7 @@
|
|||
# for linux
|
||||
LIBS = -lXpm -lX11 -lXext -lm
|
||||
# for Solaris
|
||||
@@ -19,14 +17,14 @@
|
||||
@@ -19,14 +17,14 @@ OBJS = wmSolar.o \
|
||||
RiseSet.o \
|
||||
Vsop.o
|
||||
.c.o:
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- Vsop.h.orig Tue Nov 26 15:41:59 2002
|
||||
+++ Vsop.h Tue Nov 26 15:42:13 2002
|
||||
--- Vsop.h.orig 2016-06-20 12:40:27 UTC
|
||||
+++ Vsop.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#define VSOP__H
|
||||
|
||||
#include "PlanetData.h" // for enum Planet
|
||||
#define VSOP__H
|
||||
|
||||
#include "PlanetData.h" // for enum Planet
|
||||
+#include <math.h>
|
||||
|
||||
// * * * * * simple support structs * * * * *
|
||||
|
||||
|
||||
// * * * * * simple support structs * * * * *
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@ COMMENT= Speech recognition system
|
|||
GNU_CONFIGURE= yes
|
||||
USE_LDCONFIG= yes
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
USES= gmake libtool shebangfix
|
||||
USES= dos2unix gmake libtool shebangfix
|
||||
DOS2UNIX_FILES= src/libsphinx2fe/fe_sigproc.c
|
||||
SHEBANG_FILES= scripts/sphinx2-demo.in
|
||||
perl_OLD_CMD= "@PERL@ -w"
|
||||
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
--- src/libsphinx2/include/pconf.h.orig 2007-12-06 18:24:09.000000000 +0100
|
||||
+++ src/libsphinx2/include/pconf.h 2007-12-06 18:24:20.000000000 +0100
|
||||
@@ -124,4 +124,4 @@
|
||||
char * (*GetDefault)(char const *, char const *), char last);
|
||||
void pusage(char *prog, Config_t *cp);
|
||||
|
||||
-#endif _PCONF_
|
||||
+#endif
|
|
@ -1,10 +0,0 @@
|
|||
--- src/libsphinx2/eht_quit.c.orig 2007-12-06 18:21:53.000000000 +0100
|
||||
+++ src/libsphinx2/eht_quit.c 2007-12-06 18:22:13.000000000 +0100
|
||||
@@ -85,6 +85,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void
|
|
@ -1,9 +0,0 @@
|
|||
--- src/libsphinx2/prime.c.orig 2007-12-06 18:27:41.000000000 +0100
|
||||
+++ src/libsphinx2/prime.c 2007-12-06 18:27:51.000000000 +0100
|
||||
@@ -75,5 +75,4 @@
|
||||
}
|
||||
}
|
||||
|
||||
-#endif MAIN
|
||||
-
|
||||
+#endif
|
|
@ -1,10 +0,0 @@
|
|||
--- src/libsphinx2/r_agc_noise.c.orig 2007-12-06 18:28:21.000000000 +0100
|
||||
+++ src/libsphinx2/r_agc_noise.c 2007-12-06 18:28:49.000000000 +0100
|
||||
@@ -34,6 +34,7 @@
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "s2types.h"
|
||||
#include "c.h"
|
|
@ -1,10 +0,0 @@
|
|||
--- src/libsphinx2/sc_vq.c.orig 2007-12-06 18:38:16.000000000 +0100
|
||||
+++ src/libsphinx2/sc_vq.c 2007-12-06 18:38:36.000000000 +0100
|
||||
@@ -64,6 +64,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
--- src/libsphinx2fe/fe_sigproc.c.orig 2007-12-06 18:34:10.000000000 +0100
|
||||
+++ src/libsphinx2fe/fe_sigproc.c 2007-12-06 18:34:25.000000000 +0100
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI (3.14159265358979323846)
|
||||
-#endif M_PI
|
||||
+#endif
|
||||
|
||||
#define FORWARD_FFT 1
|
||||
#define INVERSE_FFT -1
|
|
@ -1,6 +1,6 @@
|
|||
--- src/examples/clicore.c.orig 2007-12-06 18:36:24.000000000 +0100
|
||||
+++ src/examples/clicore.c 2007-12-06 18:36:39.000000000 +0100
|
||||
@@ -323,7 +323,7 @@
|
||||
--- src/examples/clicore.c.orig 2001-12-13 21:11:13 UTC
|
||||
+++ src/examples/clicore.c
|
||||
@@ -323,7 +323,7 @@ SOCKET cli_open (char *hostname, int32 p
|
||||
memcpy (&addr.sin_addr, hp->h_addr, hp->h_length);
|
||||
addr.sin_port = htons((u_short) port);
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- src/examples/srvcore.c.orig 2007-12-06 18:35:25.000000000 +0100
|
||||
+++ src/examples/srvcore.c 2007-12-06 18:35:56.000000000 +0100
|
||||
@@ -381,7 +381,7 @@
|
||||
--- src/examples/srvcore.c.orig 2001-12-13 21:11:15 UTC
|
||||
+++ src/examples/srvcore.c
|
||||
@@ -381,7 +381,7 @@ SOCKET server_await_conn ( void )
|
||||
|
||||
ERRLOG((stderr, "%s(%d): Listening at port %d\n", __FILE__, __LINE__, bindport));
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
author: Andriy Gapon
|
||||
|
||||
--- src/examples/tty-continuous.c.orig Thu Dec 13 21:11:15 2001
|
||||
+++ src/examples/tty-continuous.c Mon Oct 20 12:12:58 2003
|
||||
--- src/examples/tty-continuous.c.orig 2001-12-13 21:11:15 UTC
|
||||
+++ src/examples/tty-continuous.c
|
||||
@@ -175,7 +175,6 @@ static void utterance_loop()
|
||||
* listening until current utterance completely decoded
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- src/libsphinx2/blk_cdcn_norm.c.orig 2007-12-06 19:23:43.000000000 +0100
|
||||
+++ src/libsphinx2/blk_cdcn_norm.c 2007-12-06 19:23:25.000000000 +0100
|
||||
--- src/libsphinx2/blk_cdcn_norm.c.orig 2001-12-13 21:11:20 UTC
|
||||
+++ src/libsphinx2/blk_cdcn_norm.c
|
||||
@@ -36,6 +36,18 @@
|
||||
#include <math.h>
|
||||
#include "cdcn.h"
|
||||
|
@ -19,7 +19,7 @@
|
|||
/************************************************************************
|
||||
* Dummy routine to convert from suitcase to sane varibles
|
||||
***************************************************************************/
|
||||
@@ -46,7 +58,6 @@
|
||||
@@ -46,7 +58,6 @@ void block_cdcn_norm (float z[][NUM_COEF
|
||||
{
|
||||
/* Multidimensional arrays in C suck, so we have to
|
||||
forward-declare-hack this. */
|
||||
|
@ -27,7 +27,7 @@
|
|||
float *variance, *prob, *tilt, *noise, *codebook, *corrbook;
|
||||
int num_codes;
|
||||
|
||||
@@ -88,7 +99,6 @@
|
||||
@@ -88,7 +99,6 @@ void block_cdcn_norm (float z[][NUM_COEF
|
||||
* Coded by Alex Acero (acero@s), November 1989
|
||||
*
|
||||
*************************************************************************/
|
|
@ -1,5 +1,5 @@
|
|||
--- src/libsphinx2/cdcn_norm.c.orig 2007-12-06 19:24:33.000000000 +0100
|
||||
+++ src/libsphinx2/cdcn_norm.c 2007-12-06 19:26:24.000000000 +0100
|
||||
--- src/libsphinx2/cdcn_norm.c.orig 2001-12-13 21:11:20 UTC
|
||||
+++ src/libsphinx2/cdcn_norm.c
|
||||
@@ -35,6 +35,15 @@
|
||||
*/
|
||||
#include <math.h>
|
|
@ -1,5 +1,5 @@
|
|||
--- src/libsphinx2/cdcn_update.c.orig 2001-12-13 22:11:20.000000000 +0100
|
||||
+++ src/libsphinx2/cdcn_update.c 2007-12-06 19:40:02.000000000 +0100
|
||||
--- src/libsphinx2/cdcn_update.c.orig 2001-12-13 21:11:20 UTC
|
||||
+++ src/libsphinx2/cdcn_update.c
|
||||
@@ -47,6 +47,11 @@
|
||||
* Modified by Uday Jain, June 95
|
||||
*
|
||||
|
@ -12,7 +12,7 @@
|
|||
|
||||
float
|
||||
cdcn_update (float *z, /* The observed cepstrum vectors */
|
||||
@@ -56,13 +61,7 @@
|
||||
@@ -56,13 +61,7 @@ cdcn_update (float *z, /* The observed
|
||||
float distortion;
|
||||
float *noise, *tilt, *codebook, *prob, *variance, *corrbook;
|
||||
int num_codes;
|
10
audio/sphinx/files/patch-src_libsphinx2_eht__quit.c
Normal file
10
audio/sphinx/files/patch-src_libsphinx2_eht__quit.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/libsphinx2/eht_quit.c.orig 2001-12-13 21:11:20 UTC
|
||||
+++ src/libsphinx2/eht_quit.c
|
||||
@@ -85,6 +85,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void
|
|
@ -1,5 +1,5 @@
|
|||
--- src/libsphinx2/err.c.orig 2007-12-06 18:22:49.000000000 +0100
|
||||
+++ src/libsphinx2/err.c 2007-12-06 18:23:27.000000000 +0100
|
||||
--- src/libsphinx2/err.c.orig 2001-12-13 21:11:20 UTC
|
||||
+++ src/libsphinx2/err.c
|
||||
@@ -49,6 +49,7 @@
|
||||
*/
|
||||
|
8
audio/sphinx/files/patch-src_libsphinx2_include_pconf.h
Normal file
8
audio/sphinx/files/patch-src_libsphinx2_include_pconf.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
--- src/libsphinx2/include/pconf.h.orig 2001-12-13 21:11:27 UTC
|
||||
+++ src/libsphinx2/include/pconf.h
|
||||
@@ -124,4 +124,4 @@ int ppconf(int argc, char *argv[],
|
||||
char * (*GetDefault)(char const *, char const *), char last);
|
||||
void pusage(char *prog, Config_t *cp);
|
||||
|
||||
-#endif _PCONF_
|
||||
+#endif
|
|
@ -1,5 +1,5 @@
|
|||
--- src/libsphinx2/linklist.c.orig 2007-12-06 18:25:48.000000000 +0100
|
||||
+++ src/libsphinx2/linklist.c 2007-12-06 18:27:00.000000000 +0100
|
||||
--- src/libsphinx2/linklist.c.orig 2001-12-13 21:11:22 UTC
|
||||
+++ src/libsphinx2/linklist.c
|
||||
@@ -81,7 +81,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include "s2types.h"
|
||||
|
||||
@@ -132,7 +131,7 @@
|
||||
@@ -132,7 +131,7 @@ void *listelem_alloc (int32 elem_size)
|
||||
cpp = list[i].freelist = (void **) malloc (list[i].n_malloc * elem_size);
|
||||
cp = (void *) cpp;
|
||||
for (j = list[i].n_malloc-1; j > 0; --j) {
|
9
audio/sphinx/files/patch-src_libsphinx2_prime.c
Normal file
9
audio/sphinx/files/patch-src_libsphinx2_prime.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
--- src/libsphinx2/prime.c.orig 2001-12-13 21:11:23 UTC
|
||||
+++ src/libsphinx2/prime.c
|
||||
@@ -75,5 +75,4 @@ main ()
|
||||
}
|
||||
}
|
||||
|
||||
-#endif MAIN
|
||||
-
|
||||
+#endif
|
10
audio/sphinx/files/patch-src_libsphinx2_r__agc__noise.c
Normal file
10
audio/sphinx/files/patch-src_libsphinx2_r__agc__noise.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/libsphinx2/r_agc_noise.c.orig 2001-12-13 21:11:23 UTC
|
||||
+++ src/libsphinx2/r_agc_noise.c
|
||||
@@ -34,6 +34,7 @@
|
||||
*
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "s2types.h"
|
||||
#include "c.h"
|
10
audio/sphinx/files/patch-src_libsphinx2_sc__vq.c
Normal file
10
audio/sphinx/files/patch-src_libsphinx2_sc__vq.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- src/libsphinx2/sc_vq.c.orig 2001-12-13 21:11:23 UTC
|
||||
+++ src/libsphinx2/sc_vq.c
|
||||
@@ -64,6 +64,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- src/libsphinx2/search.c.orig 2007-12-06 18:29:23.000000000 +0100
|
||||
+++ src/libsphinx2/search.c 2007-12-06 18:33:21.000000000 +0100
|
||||
@@ -2236,6 +2236,9 @@
|
||||
--- src/libsphinx2/search.c.orig 2001-12-13 21:11:24 UTC
|
||||
+++ src/libsphinx2/search.c
|
||||
@@ -2236,6 +2236,9 @@ search_one_ply_fwd (void)
|
||||
lm_next_frame ();
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
|||
void
|
||||
search_finish_fwd (void)
|
||||
{
|
||||
@@ -2245,7 +2248,6 @@
|
||||
@@ -2245,7 +2248,6 @@ search_finish_fwd (void)
|
||||
CHAN_T *hmm, /* *thmm,*/ **acl;
|
||||
/* int32 bp, bestbp, bestscore; */
|
||||
/* int32 l_scr; */
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
if ((CurrentFrame > 0) && (topsen_window > 1)) {
|
||||
/* Wind up remaining frames */
|
||||
@@ -2306,7 +2308,6 @@
|
||||
@@ -2306,7 +2308,6 @@ search_finish_fwd (void)
|
||||
/* Get pscr-score for fwdtree recognition */
|
||||
{
|
||||
search_hyp_t *pscrpath;
|
|
@ -1,7 +1,7 @@
|
|||
author: Andriy Gapon
|
||||
|
||||
--- src/libsphinx2ad/ad_oss_bsd.c.orig Thu Dec 13 21:11:27 2001
|
||||
+++ src/libsphinx2ad/ad_oss_bsd.c Fri Oct 24 04:11:22 2003
|
||||
--- src/libsphinx2ad/ad_oss_bsd.c.orig 2001-12-13 21:11:27 UTC
|
||||
+++ src/libsphinx2ad/ad_oss_bsd.c
|
||||
@@ -61,7 +61,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -27,7 +27,7 @@ author: Andriy Gapon
|
|||
int32 audioFormat=AUDIO_FORMAT;
|
||||
int32 dspCaps=0;
|
||||
int32 sampleRate;
|
||||
@@ -96,7 +93,6 @@
|
||||
@@ -96,7 +93,6 @@ ad_rec_t *ad_open_sps (int32 sps) {
|
||||
}
|
||||
sampleRate = sps;
|
||||
|
||||
|
@ -35,7 +35,7 @@ author: Andriy Gapon
|
|||
if((dspFD = open ("/dev/dsp", O_RDONLY))<0){
|
||||
if (errno == EBUSY)
|
||||
fprintf(stderr, "Audio device busy\n");
|
||||
@@ -105,18 +101,6 @@
|
||||
@@ -105,18 +101,6 @@ ad_rec_t *ad_open_sps (int32 sps) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ author: Andriy Gapon
|
|||
if (ioctl (dspFD, SNDCTL_DSP_SETFMT, &audioFormat) < 0){
|
||||
fprintf(stderr, "Audio ioctl(SETFMT 0x%x) failed: %s\n", audioFormat, strerror(errno));
|
||||
close (dspFD);
|
||||
@@ -139,12 +123,6 @@
|
||||
@@ -139,12 +123,6 @@ ad_rec_t *ad_open_sps (int32 sps) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ author: Andriy Gapon
|
|||
if (ioctl (dspFD, SNDCTL_DSP_GETCAPS, &dspCaps) < 0) {
|
||||
fprintf(stderr, "ioctl(GETCAPS) failed: %s\n", strerror(errno));
|
||||
close (dspFD);
|
||||
@@ -161,8 +139,6 @@
|
||||
@@ -161,8 +139,6 @@ ad_rec_t *ad_open_sps (int32 sps) {
|
||||
printf("DSP %s memory map capability.\n", (dspCaps&DSP_CAP_MMAP)?"has":"does not have");
|
||||
#endif
|
||||
|
||||
|
@ -76,7 +76,7 @@ author: Andriy Gapon
|
|||
|
||||
/* Patched by N. Roy (nickr@ri.cmu.edu), 99/7/23.
|
||||
Previously, mixer was set through dspFD. This is incorrect. Should
|
||||
@@ -210,10 +186,10 @@
|
||||
@@ -210,10 +186,10 @@ ad_rec_t *ad_open_sps (int32 sps) {
|
||||
}
|
||||
|
||||
handle->dspFD = dspFD;
|
||||
|
@ -89,7 +89,7 @@ author: Andriy Gapon
|
|||
return(handle);
|
||||
}
|
||||
|
||||
@@ -224,15 +200,10 @@
|
||||
@@ -224,15 +200,10 @@ ad_rec_t *ad_open ( void )
|
||||
|
||||
int32 ad_close (ad_rec_t *handle)
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ author: Andriy Gapon
|
|||
free(handle);
|
||||
|
||||
return(0);
|
||||
@@ -240,48 +211,62 @@
|
||||
@@ -240,48 +211,62 @@ int32 ad_close (ad_rec_t *handle)
|
||||
|
||||
int32 ad_start_rec (ad_rec_t *handle)
|
||||
{
|
||||
|
@ -198,7 +198,7 @@ author: Andriy Gapon
|
|||
|
||||
if ((length = read (handle->dspFD, buf, length)) > 0) {
|
||||
#if 0
|
||||
@@ -292,7 +277,7 @@
|
||||
@@ -292,7 +277,7 @@ int32 ad_read (ad_rec_t *handle, int16 *
|
||||
}
|
||||
|
||||
if (length < 0) {
|
11
audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c
Normal file
11
audio/sphinx/files/patch-src_libsphinx2fe_fe__sigproc.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- src/libsphinx2fe/fe_sigproc.c.orig 2016-06-20 13:31:26 UTC
|
||||
+++ src/libsphinx2fe/fe_sigproc.c
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI (3.14159265358979323846)
|
||||
-#endif M_PI
|
||||
+#endif
|
||||
|
||||
#define FORWARD_FFT 1
|
||||
#define INVERSE_FFT -1
|
|
@ -19,7 +19,8 @@ LICENSE= LGPL20 # (or later)
|
|||
|
||||
EXTRACT_DEPENDS= lha:archivers/lha
|
||||
|
||||
USES= fortran zip
|
||||
USES= dos2unix fortran zip
|
||||
DOS2UNIX_GLOB= *.c *.f
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- himenobmtxp_l.f.orig 2002-01-07 04:54:46 UTC
|
||||
--- himenobmtxp_l.f.orig 2016-06-20 13:01:22 UTC
|
||||
+++ himenobmtxp_l.f
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
PARAMETER (mimax=513,mjmax=257,mkmax=257)
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
PARAMETER (mimax=513,mjmax=257,mkmax=257)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- himenobmtxp_m.f.orig 2002-01-07 04:54:48 UTC
|
||||
--- himenobmtxp_m.f.orig 2016-06-20 13:01:22 UTC
|
||||
+++ himenobmtxp_m.f
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
C PARAMETER (mimax=513,mjmax=257,mkmax=257)
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
C PARAMETER (mimax=513,mjmax=257,mkmax=257)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- himenobmtxp_s.f.orig 2001-12-17 07:45:16 UTC
|
||||
--- himenobmtxp_s.f.orig 2016-06-20 13:01:22 UTC
|
||||
+++ himenobmtxp_s.f
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
C PARAMETER (mimax=513,mjmax=257,mkmax=257)
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
C PARAMETER (mimax=513,mjmax=257,mkmax=257)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
--- himenobmtxp_xl.f.orig 2002-01-07 04:54:42 UTC
|
||||
--- himenobmtxp_xl.f.orig 2016-06-20 13:01:22 UTC
|
||||
+++ himenobmtxp_xl.f
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
PARAMETER (mimax=1025,mjmax=513,mkmax=513)
|
||||
@@ -39,7 +39,6 @@ C -------------------
|
||||
C "use portlib" statement on the next line is for Visual fortran
|
||||
C to use UNIX libraries. Please remove it if your system is UNIX.
|
||||
C -------------------
|
||||
- use portlib
|
||||
IMPLICIT REAL*4(a-h,o-z)
|
||||
C
|
||||
PARAMETER (mimax=1025,mjmax=513,mkmax=513)
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
--- himenobmtxps.c.orig 2002-02-21 00:27:48 UTC
|
||||
--- himenobmtxps.c.orig 2016-06-20 13:01:22 UTC
|
||||
+++ himenobmtxps.c
|
||||
@@ -37,6 +37,7 @@
|
||||
********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <sys/time.h>
|
||||
|
||||
#ifdef SSMALL
|
||||
#define MIMAX 33
|
||||
@@ -245,7 +246,6 @@ mflops(int nn,double cpu,double flop)
|
||||
double
|
||||
second()
|
||||
{
|
||||
-#include <sys/time.h>
|
||||
|
||||
struct timeval tm;
|
||||
double t ;
|
||||
********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <sys/time.h>
|
||||
|
||||
#ifdef SSMALL
|
||||
#define MIMAX 33
|
||||
@@ -245,7 +246,6 @@ mflops(int nn,double cpu,double flop)
|
||||
double
|
||||
second()
|
||||
{
|
||||
-#include <sys/time.h>
|
||||
|
||||
struct timeval tm;
|
||||
double t ;
|
||||
|
|
|
@ -11,8 +11,8 @@ MAINTAINER= arved@FreeBSD.org
|
|||
COMMENT= Network benchmark
|
||||
|
||||
WRKSRC= ${WRKDIR}
|
||||
USES= gmake zip
|
||||
PATCH_ARGS= -d ${PATCH_WRKSRC} -N -s -E ${PATCH_STRIP} -l
|
||||
USES= dos2unix gmake zip
|
||||
DOS2UNIX_FILES= Makefile netio.c
|
||||
PLIST_FILES= bin/netio
|
||||
|
||||
CFLAGS+= -DUNIX -DSOCKLEN_T
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- Makefile.orig Sat Sep 2 13:27:40 2006
|
||||
+++ Makefile Sat Sep 2 13:29:30 2006
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
.SUFFIXES: .c $O
|
||||
.c$O:
|
||||
- $(CC) $(CFLAGS) $(INC) -c $*.c
|
||||
+ $(CC) $(OUT) $@ $(CFLAGS) $(INC) -c $*.c
|
||||
|
||||
netio$O: netio.c netbios.h getopt.h
|
||||
netbios$O: netbios.c netbios.h
|
||||
--- Makefile.orig 2016-06-20 13:21:43 UTC
|
||||
+++ Makefile
|
||||
@@ -102,7 +102,7 @@ netio$X: netio$O getopt$O
|
||||
|
||||
.SUFFIXES: .c $O
|
||||
.c$O:
|
||||
- $(CC) $(CFLAGS) $(INC) -c $*.c
|
||||
+ $(CC) $(OUT) $@ $(CFLAGS) $(INC) -c $*.c
|
||||
|
||||
netio$O: netio.c getopt.h
|
||||
getopt$O: getopt.c getopt.h
|
||||
|
|
|
@ -1,335 +1,335 @@
|
|||
--- netio.c.orig 2012-11-22 17:47:38.000000000 +0100
|
||||
+++ netio.c 2015-03-23 11:52:42.000000000 +0100
|
||||
@@ -136,6 +136,7 @@
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#if defined(UNIX) || defined(DJGPP)
|
||||
--- netio.c.orig 2016-06-20 13:21:43 UTC
|
||||
+++ netio.c
|
||||
@@ -136,6 +136,7 @@ static char *rcsrev = "$Revision: 1.32 $
|
||||
#include <ctype.h>
|
||||
#include <signal.h>
|
||||
#if defined(UNIX) || defined(DJGPP)
|
||||
+#include <arpa/inet.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@@ -546,7 +547,7 @@
|
||||
|
||||
int recv_data(int socket, void *buffer, size_t size, int flags)
|
||||
{
|
||||
- size_t rc = recv(socket, buffer, size, flags);
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
@@ -546,7 +547,7 @@ int send_data(int socket, void *buffer,
|
||||
|
||||
int recv_data(int socket, void *buffer, size_t size, int flags)
|
||||
{
|
||||
- size_t rc = recv(socket, buffer, size, flags);
|
||||
+ ssize_t rc = recv(socket, buffer, size, flags);
|
||||
|
||||
if (rc < 0)
|
||||
{
|
||||
@@ -563,8 +564,13 @@
|
||||
const int sobufsize = 131072;
|
||||
int nPort = DEFAULTPORT;
|
||||
int nAuxPort = DEFAULTPORT + 1;
|
||||
|
||||
if (rc < 0)
|
||||
{
|
||||
@@ -563,8 +564,13 @@ int recv_data(int socket, void *buffer,
|
||||
const int sobufsize = 131072;
|
||||
int nPort = DEFAULTPORT;
|
||||
int nAuxPort = DEFAULTPORT + 1;
|
||||
+#ifdef USE_IPV6
|
||||
+struct in6_addr addr_server;
|
||||
+struct in6_addr addr_local;
|
||||
+#else
|
||||
struct in_addr addr_server;
|
||||
struct in_addr addr_local;
|
||||
struct in_addr addr_server;
|
||||
struct in_addr addr_local;
|
||||
+#endif
|
||||
|
||||
int udpsocket, udpd;
|
||||
unsigned long nUDPCount;
|
||||
@@ -577,7 +583,11 @@
|
||||
TIMER nTimer;
|
||||
long nTime;
|
||||
long long nData;
|
||||
|
||||
int udpsocket, udpd;
|
||||
unsigned long nUDPCount;
|
||||
@@ -577,7 +583,11 @@ THREAD TCP_Server(void *arg)
|
||||
TIMER nTimer;
|
||||
long nTime;
|
||||
long long nData;
|
||||
+#ifdef USE_IPV6
|
||||
+ struct sockaddr_in6 sa_server, sa_client;
|
||||
+#else
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
+#endif
|
||||
int server, client;
|
||||
socklen_type length;
|
||||
struct timeval tv;
|
||||
@@ -591,7 +601,11 @@
|
||||
return THREADRESULT;
|
||||
}
|
||||
|
||||
int server, client;
|
||||
socklen_type length;
|
||||
struct timeval tv;
|
||||
@@ -591,7 +601,11 @@ THREAD TCP_Server(void *arg)
|
||||
return THREADRESULT;
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
|
||||
+#else
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
+#endif
|
||||
{
|
||||
psock_errno("socket()");
|
||||
free(cBuffer);
|
||||
@@ -601,9 +615,15 @@
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
{
|
||||
psock_errno("socket()");
|
||||
free(cBuffer);
|
||||
@@ -601,9 +615,15 @@ THREAD TCP_Server(void *arg)
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_server.sin6_family = AF_INET6;
|
||||
+ sa_server.sin6_port = htons(nPort);
|
||||
+ sa_server.sin6_addr = addr_local;
|
||||
+#else
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nPort);
|
||||
sa_server.sin_addr = addr_local;
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nPort);
|
||||
sa_server.sin_addr = addr_local;
|
||||
+#endif
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -753,7 +773,11 @@
|
||||
long nTime;
|
||||
long long nData;
|
||||
int i;
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -753,7 +773,11 @@ void TCP_Bench(void *arg)
|
||||
long nTime;
|
||||
long long nData;
|
||||
int i;
|
||||
+#ifdef USE_IPV6
|
||||
+ struct sockaddr_in6 sa_server, sa_client;
|
||||
+#else
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
+#endif
|
||||
int server;
|
||||
int rc;
|
||||
int nByte;
|
||||
@@ -764,7 +788,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
int server;
|
||||
int rc;
|
||||
int nByte;
|
||||
@@ -764,7 +788,11 @@ void TCP_Bench(void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
|
||||
+#else
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
+#endif
|
||||
{
|
||||
psock_errno("socket()");
|
||||
free(cBuffer);
|
||||
@@ -774,21 +802,33 @@
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
{
|
||||
psock_errno("socket()");
|
||||
free(cBuffer);
|
||||
@@ -774,21 +802,33 @@ void TCP_Bench(void *arg)
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_client.sin6_family = AF_INET6;
|
||||
+ sa_client.sin6_port = htons(0);
|
||||
+ sa_client.sin6_addr = addr_local;
|
||||
+#else
|
||||
sa_client.sin_family = AF_INET;
|
||||
sa_client.sin_port = htons(0);
|
||||
sa_client.sin_addr = addr_local;
|
||||
sa_client.sin_family = AF_INET;
|
||||
sa_client.sin_port = htons(0);
|
||||
sa_client.sin_addr = addr_local;
|
||||
+#endif
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0)
|
||||
{
|
||||
psock_errno("bind()");
|
||||
soclose(server);
|
||||
free(cBuffer);
|
||||
- return THREADRESULT;
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0)
|
||||
{
|
||||
psock_errno("bind()");
|
||||
soclose(server);
|
||||
free(cBuffer);
|
||||
- return THREADRESULT;
|
||||
+ return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_server.sin6_family = AF_INET6;
|
||||
+ sa_server.sin6_port = htons(nPort);
|
||||
+ sa_server.sin6_addr = addr_server;
|
||||
+#else
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nPort);
|
||||
sa_server.sin_addr = addr_server;
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nPort);
|
||||
sa_server.sin_addr = addr_server;
|
||||
+#endif
|
||||
|
||||
if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -911,7 +951,11 @@
|
||||
THREAD UDP_Receiver(void *arg)
|
||||
{
|
||||
char *cBuffer;
|
||||
|
||||
if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -911,7 +951,11 @@ void TCP_Bench(void *arg)
|
||||
THREAD UDP_Receiver(void *arg)
|
||||
{
|
||||
char *cBuffer;
|
||||
+#ifdef USE_IPV6
|
||||
+ struct sockaddr_in6 sa_server, sa_client;
|
||||
+#else
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
+#endif
|
||||
int rc;
|
||||
socklen_type nBytes;
|
||||
|
||||
@@ -921,7 +965,11 @@
|
||||
return THREADRESULT;
|
||||
}
|
||||
|
||||
int rc;
|
||||
socklen_type nBytes;
|
||||
|
||||
@@ -921,7 +965,11 @@ THREAD UDP_Receiver(void *arg)
|
||||
return THREADRESULT;
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ if ((udpsocket = socket(PF_INET6, SOCK_DGRAM, 0)) < 0)
|
||||
+#else
|
||||
if ((udpsocket = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
|
||||
if ((udpsocket = socket(PF_INET, SOCK_DGRAM, 0)) < 0)
|
||||
+#endif
|
||||
{
|
||||
psock_errno("socket(DGRAM)");
|
||||
free(cBuffer);
|
||||
@@ -931,9 +979,15 @@
|
||||
setsockopt(udpsocket, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(udpsocket, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
{
|
||||
psock_errno("socket(DGRAM)");
|
||||
free(cBuffer);
|
||||
@@ -931,9 +979,15 @@ THREAD UDP_Receiver(void *arg)
|
||||
setsockopt(udpsocket, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(udpsocket, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_server.sin6_family = AF_INET6;
|
||||
+ sa_server.sin6_port = htons(nAuxPort);
|
||||
+ sa_server.sin6_addr = addr_local;
|
||||
+#else
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nAuxPort);
|
||||
sa_server.sin_addr = addr_local;
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nAuxPort);
|
||||
sa_server.sin_addr = addr_local;
|
||||
+#endif
|
||||
|
||||
if (bind(udpsocket, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -973,7 +1027,11 @@
|
||||
TIMER nTimer;
|
||||
long nTime;
|
||||
long long nData;
|
||||
|
||||
if (bind(udpsocket, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -973,7 +1027,11 @@ THREAD UDP_Server(void *arg)
|
||||
TIMER nTimer;
|
||||
long nTime;
|
||||
long long nData;
|
||||
+#ifdef USE_IPV6
|
||||
+ struct sockaddr_in6 sa_server, sa_client;
|
||||
+#else
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
+#endif
|
||||
int server, client;
|
||||
struct timeval tv;
|
||||
fd_set fds;
|
||||
@@ -986,7 +1044,11 @@
|
||||
return THREADRESULT;
|
||||
}
|
||||
|
||||
int server, client;
|
||||
struct timeval tv;
|
||||
fd_set fds;
|
||||
@@ -986,7 +1044,11 @@ THREAD UDP_Server(void *arg)
|
||||
return THREADRESULT;
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
|
||||
+#else
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
+#endif
|
||||
{
|
||||
psock_errno("socket(STREAM)");
|
||||
free(cBuffer);
|
||||
@@ -996,9 +1058,15 @@
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
{
|
||||
psock_errno("socket(STREAM)");
|
||||
free(cBuffer);
|
||||
@@ -996,9 +1058,15 @@ THREAD UDP_Server(void *arg)
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_server.sin6_family = AF_INET6;
|
||||
+ sa_server.sin6_port = htons(nAuxPort);
|
||||
+ sa_server.sin6_addr = addr_local;
|
||||
+#else
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nAuxPort);
|
||||
sa_server.sin_addr = addr_local;
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nAuxPort);
|
||||
sa_server.sin_addr = addr_local;
|
||||
+#endif
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -1044,7 +1112,11 @@
|
||||
printf("UDP connection established ... ");
|
||||
fflush(stdout);
|
||||
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -1044,7 +1112,11 @@ THREAD UDP_Server(void *arg)
|
||||
printf("UDP connection established ... ");
|
||||
fflush(stdout);
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_client.sin6_port = htons(nAuxPort);
|
||||
+#else
|
||||
sa_client.sin_port = htons(nAuxPort);
|
||||
sa_client.sin_port = htons(nAuxPort);
|
||||
+#endif
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -1160,7 +1232,11 @@
|
||||
long nResult;
|
||||
long long nData;
|
||||
int i;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@@ -1160,7 +1232,11 @@ void UDP_Bench(void *arg)
|
||||
long nResult;
|
||||
long long nData;
|
||||
int i;
|
||||
+#ifdef USE_IPV6
|
||||
+ struct sockaddr_in6 sa_server, sa_client;
|
||||
+#else
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
struct sockaddr_in sa_server, sa_client;
|
||||
+#endif
|
||||
int server;
|
||||
int rc, nByte;
|
||||
|
||||
@@ -1170,7 +1246,11 @@
|
||||
return;
|
||||
}
|
||||
|
||||
int server;
|
||||
int rc, nByte;
|
||||
|
||||
@@ -1170,7 +1246,11 @@ void UDP_Bench(void *arg)
|
||||
return;
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ if ((server = socket(PF_INET6, SOCK_STREAM, 0)) < 0)
|
||||
+#else
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
if ((server = socket(PF_INET, SOCK_STREAM, 0)) < 0)
|
||||
+#endif
|
||||
{
|
||||
psock_errno("socket()");
|
||||
free(cBuffer);
|
||||
@@ -1180,21 +1260,33 @@
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
{
|
||||
psock_errno("socket()");
|
||||
free(cBuffer);
|
||||
@@ -1180,21 +1260,33 @@ void UDP_Bench(void *arg)
|
||||
setsockopt(server, SOL_SOCKET, SO_RCVBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
setsockopt(server, SOL_SOCKET, SO_SNDBUF, (char *) &sobufsize, sizeof(sobufsize));
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_client.sin6_family = AF_INET6;
|
||||
+ sa_client.sin6_port = htons(0);
|
||||
+ sa_client.sin6_addr = addr_local;
|
||||
+#else
|
||||
sa_client.sin_family = AF_INET;
|
||||
sa_client.sin_port = htons(0);
|
||||
sa_client.sin_addr = addr_local;
|
||||
sa_client.sin_family = AF_INET;
|
||||
sa_client.sin_port = htons(0);
|
||||
sa_client.sin_addr = addr_local;
|
||||
+#endif
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0)
|
||||
{
|
||||
psock_errno("bind(STREAM)");
|
||||
soclose(server);
|
||||
free(cBuffer);
|
||||
- return THREADRESULT;
|
||||
|
||||
if (bind(server, (struct sockaddr *) &sa_client, sizeof(sa_client)) < 0)
|
||||
{
|
||||
psock_errno("bind(STREAM)");
|
||||
soclose(server);
|
||||
free(cBuffer);
|
||||
- return THREADRESULT;
|
||||
+ return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ sa_server.sin6_family = AF_INET6;
|
||||
+ sa_server.sin6_port = htons(nAuxPort);
|
||||
+ sa_server.sin6_addr = addr_server;
|
||||
+#else
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nAuxPort);
|
||||
sa_server.sin_addr = addr_server;
|
||||
sa_server.sin_family = AF_INET;
|
||||
sa_server.sin_port = htons(nAuxPort);
|
||||
sa_server.sin_addr = addr_server;
|
||||
+#endif
|
||||
|
||||
if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -1425,17 +1517,29 @@
|
||||
return psock_errno("sock_init()"), 1;
|
||||
|
||||
if (szLocal == 0)
|
||||
|
||||
if (connect(server, (struct sockaddr *) &sa_server, sizeof(sa_server)) < 0)
|
||||
{
|
||||
@@ -1425,17 +1517,29 @@ int main(int argc, char **argv)
|
||||
return psock_errno("sock_init()"), 1;
|
||||
|
||||
if (szLocal == 0)
|
||||
+#ifdef USE_IPV6
|
||||
+ addr_local = in6addr_any;
|
||||
+#else
|
||||
addr_local.s_addr = INADDR_ANY;
|
||||
addr_local.s_addr = INADDR_ANY;
|
||||
+#endif
|
||||
else
|
||||
{
|
||||
if (isdigit(*szLocal))
|
||||
else
|
||||
{
|
||||
if (isdigit(*szLocal))
|
||||
+#ifdef USE_IPV6
|
||||
+ inet_pton(AF_INET6, szLocal, &addr_local);
|
||||
+#else
|
||||
addr_local.s_addr = inet_addr(szLocal);
|
||||
addr_local.s_addr = inet_addr(szLocal);
|
||||
+#endif
|
||||
else
|
||||
{
|
||||
if ((host = gethostbyname(szLocal)) == NULL)
|
||||
return psock_errno("gethostbyname()"), 1;
|
||||
|
||||
else
|
||||
{
|
||||
if ((host = gethostbyname(szLocal)) == NULL)
|
||||
return psock_errno("gethostbyname()"), 1;
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ addr_local = * (struct in6_addr *) (host->h_addr);
|
||||
+#else
|
||||
addr_local = * (struct in_addr *) (host->h_addr);
|
||||
addr_local = * (struct in_addr *) (host->h_addr);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1445,13 +1549,21 @@
|
||||
usage();
|
||||
|
||||
if (isdigit(*argv[optind]))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1445,13 +1549,21 @@ int main(int argc, char **argv)
|
||||
usage();
|
||||
|
||||
if (isdigit(*argv[optind]))
|
||||
+#ifdef USE_IPV6
|
||||
+ inet_pton(AF_INET6, argv[optind], &addr_server);
|
||||
+#else
|
||||
addr_server.s_addr = inet_addr(argv[optind]);
|
||||
addr_server.s_addr = inet_addr(argv[optind]);
|
||||
+#endif
|
||||
else
|
||||
{
|
||||
if ((host = gethostbyname(argv[optind])) == NULL)
|
||||
return psock_errno("gethostbyname()"), 1;
|
||||
|
||||
else
|
||||
{
|
||||
if ((host = gethostbyname(argv[optind])) == NULL)
|
||||
return psock_errno("gethostbyname()"), 1;
|
||||
|
||||
+#ifdef USE_IPV6
|
||||
+ addr_server = * (struct in6_addr *) (host->h_addr);
|
||||
+#else
|
||||
addr_server = * (struct in_addr *) (host->h_addr);
|
||||
addr_server = * (struct in_addr *) (host->h_addr);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@ LICENSE= MIT
|
|||
LICENSE_FILE= ${WRKSRC}/license.txt
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
USES= uidfix zip
|
||||
USES= dos2unix uidfix zip
|
||||
DOS2UNIX_GLOB= *.c *.h
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e '/int main/s/short argc/int argc/' \
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
--- Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ Makefile Wed Oct 27 17:03:17 2004
|
||||
--- Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ Makefile
|
||||
@@ -0,0 +1,4 @@
|
||||
+
|
||||
+SUBDIR= lib apps
|
||||
+
|
||||
+.include <bsd.subdir.mk>
|
||||
--- apps/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/Makefile
|
||||
@@ -0,0 +1,6 @@
|
||||
+
|
||||
+SUBDIR= atodtst counter coupler fish gethumd memutil mweather shaapp \
|
||||
|
@ -14,8 +14,8 @@
|
|||
+
|
||||
+.include <bsd.subdir.mk>
|
||||
+
|
||||
--- apps/atodtst/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/atodtst/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/atodtst/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/atodtst/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= atodtst
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -32,8 +32,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/counter/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/counter/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/counter/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/counter/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= counter
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -50,8 +50,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/coupler/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/coupler/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/coupler/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/coupler/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= coupler
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -68,8 +68,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/fish/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/fish/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/fish/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/fish/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= fish
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -86,8 +86,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/gethumd/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/gethumd/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/gethumd/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/gethumd/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= gethumd
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -104,8 +104,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/memutil/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/memutil/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/memutil/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/memutil/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= memutil
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -122,8 +122,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/mweather/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/mweather/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/mweather/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/mweather/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= mweather
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -140,8 +140,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/shaapp/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/shaapp/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/shaapp/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/shaapp/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= shaapp
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -158,8 +158,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/swtloop/Makefile.app Thu Jan 1 01:00:00 1970
|
||||
+++ apps/swtloop/Makefile.app Wed Oct 27 17:03:17 2004
|
||||
--- apps/swtloop/Makefile.app.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/swtloop/Makefile.app
|
||||
@@ -0,0 +1,8 @@
|
||||
+PROG= tstfind
|
||||
+CFLAGS= -I. -Wall -I ../../common
|
||||
|
@ -169,8 +169,8 @@
|
|||
+SRCS= tstfind.c
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/swtsngl/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/swtsngl/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/swtsngl/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/swtsngl/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= swtsngl
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -187,8 +187,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/temp/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/temp/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/temp/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/temp/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= temp
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -205,8 +205,8 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/thermo/Makefile.app Thu Jan 1 01:00:00 1970
|
||||
+++ apps/thermo/Makefile.app Wed Oct 27 17:03:17 2004
|
||||
--- apps/thermo/Makefile.app.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/thermo/Makefile.app
|
||||
@@ -0,0 +1,8 @@
|
||||
+PROG= tstfind
|
||||
+CFLAGS= -I. -Wall -I ../../common
|
||||
|
@ -216,8 +216,8 @@
|
|||
+SRCS= tstfind.c
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- apps/tstfind/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ apps/tstfind/Makefile Wed Oct 27 17:03:17 2004
|
||||
--- apps/tstfind/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ apps/tstfind/Makefile
|
||||
@@ -0,0 +1,15 @@
|
||||
+PROG= tstfind
|
||||
+PREFIX?= /usr/local
|
||||
|
@ -234,37 +234,37 @@
|
|||
+ ./${PROG} /dev/cuaa0
|
||||
+
|
||||
+.include <bsd.prog.mk>
|
||||
--- common/ownet.h Fri Sep 28 21:42:02 2001
|
||||
+++ common/ownet.h Wed Oct 27 17:03:17 2004
|
||||
--- common/ownet.h.orig 2016-06-20 12:38:29 UTC
|
||||
+++ common/ownet.h
|
||||
@@ -133,6 +133,10 @@
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned long ulong;
|
||||
#endif
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned long ulong;
|
||||
#endif
|
||||
+ #if (__FreeBSD__)
|
||||
+ #include <sys/types.h>
|
||||
+ typedef unsigned long ulong;
|
||||
+ #endif
|
||||
#endif
|
||||
#ifdef SDCC
|
||||
//intent of ushort is 2 bytes unsigned.
|
||||
--- lib/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ lib/Makefile Wed Oct 27 17:03:17 2004
|
||||
#endif
|
||||
#ifdef SDCC
|
||||
//intent of ushort is 2 bytes unsigned.
|
||||
--- lib/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ lib/Makefile
|
||||
@@ -0,0 +1,3 @@
|
||||
+SUBDIR= userial
|
||||
+
|
||||
+.include <bsd.subdir.mk>
|
||||
--- lib/userial/Link/linuxlnk.c Fri Sep 28 21:42:14 2001
|
||||
+++ lib/userial/Link/linuxlnk.c Wed Oct 27 17:03:17 2004
|
||||
--- lib/userial/Link/linuxlnk.c.orig 2016-06-20 12:38:29 UTC
|
||||
+++ lib/userial/Link/linuxlnk.c
|
||||
@@ -93,6 +93,7 @@
|
||||
#include <termios.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
#include <termios.h>
|
||||
#include <errno.h>
|
||||
#include <sys/time.h>
|
||||
+#include <string.h>
|
||||
|
||||
#include "ds2480.h"
|
||||
#include "ownet.h"
|
||||
--- lib/userial/Makefile Thu Jan 1 01:00:00 1970
|
||||
+++ lib/userial/Makefile Wed Oct 27 17:03:56 2004
|
||||
|
||||
#include "ds2480.h"
|
||||
#include "ownet.h"
|
||||
--- lib/userial/Makefile.orig 2016-06-20 12:38:29 UTC
|
||||
+++ lib/userial/Makefile
|
||||
@@ -0,0 +1,33 @@
|
||||
+MLANCOM= ${.CURDIR}/../../common
|
||||
+MLANLNK= ${.CURDIR}/Link
|
||||
|
|
|
@ -11,10 +11,10 @@ DISTNAME= pgAgent-${PORTVERSION}-Source
|
|||
MAINTAINER= fjoe@FreeBSD.org
|
||||
COMMENT= Job scheduler for PostgreSQL
|
||||
|
||||
USES= cmake pgsql
|
||||
USES= cmake dos2unix pgsql
|
||||
DOS2UNIX_GLOB= *.txt
|
||||
CMAKE_ARGS= -DSTATIC_BUILD:BOOL=NO -DWX_CONFIG_PATH:FILEPATH="${WX_CONFIG}"
|
||||
USE_WX= 2.8
|
||||
WX_UNICODE= yes
|
||||
|
||||
PLIST_FILES= bin/pgagent \
|
||||
share/postgresql/extension/pgagent--3.4.sql \
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
--- CMakeLists.txt.orig 2014-02-26 04:48:45.000000000 +0700
|
||||
+++ CMakeLists.txt 2015-01-28 08:06:29.000000000 +0600
|
||||
@@ -134,12 +134,12 @@
|
||||
INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION .)
|
||||
ELSE(WIN32)
|
||||
INSTALL(TARGETS pgagent DESTINATION bin)
|
||||
- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share)
|
||||
- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share)
|
||||
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share/pgagent)
|
||||
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share/pgagent)
|
||||
ENDIF(WIN32)
|
||||
|
||||
-INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .)
|
||||
-INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .)
|
||||
+INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION share/pgagent)
|
||||
+INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION share/pgagent)
|
||||
|
||||
# Extension
|
||||
IF(PG_EXTENSION)
|
||||
--- CMakeLists.txt.orig 2016-06-20 15:30:20 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -134,12 +134,12 @@ IF (WIN32)
|
||||
INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION .)
|
||||
ELSE(WIN32)
|
||||
INSTALL(TARGETS pgagent DESTINATION bin)
|
||||
- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share)
|
||||
- INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share)
|
||||
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent.sql DESTINATION share/pgagent)
|
||||
+ INSTALL(FILES ${pgagent_SOURCE_DIR}/sql/pgagent_upgrade.sql DESTINATION share/pgagent)
|
||||
ENDIF(WIN32)
|
||||
|
||||
-INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION .)
|
||||
-INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION .)
|
||||
+INSTALL(FILES ${pgagent_SOURCE_DIR}/README DESTINATION share/pgagent)
|
||||
+INSTALL(FILES ${pgagent_SOURCE_DIR}/LICENSE DESTINATION share/pgagent)
|
||||
|
||||
# Extension
|
||||
IF(PG_EXTENSION)
|
||||
|
|
|
@ -10,7 +10,8 @@ MASTER_SITES= SF
|
|||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Dynamic GUI for an OS command
|
||||
|
||||
USES= python
|
||||
USES= dos2unix python
|
||||
DOS2UNIX_GLOB= *.py
|
||||
USE_PYTHON= distutils autoplist
|
||||
USE_GNOME= libglade2 pygnome2
|
||||
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
--- setup.py.orig Tue Jan 10 09:59:47 2006
|
||||
+++ setup.py Sun Jan 15 11:46:49 2006
|
||||
@@ -8,11 +8,6 @@
|
||||
from distutils.core import setup
|
||||
import glob
|
||||
--- setup.py.orig 2016-06-20 15:30:48 UTC
|
||||
+++ setup.py
|
||||
@@ -8,11 +8,6 @@ import sys
|
||||
from distutils.core import setup
|
||||
import glob
|
||||
|
||||
-try:
|
||||
- import gtk
|
||||
-except:
|
||||
- sys.exit("pyGTK version 2.6 or greater is required to run everygui. http://www.pygtk.org")
|
||||
-
|
||||
|
||||
setup(
|
||||
name='everygui',
|
||||
@@ -29,4 +24,3 @@
|
||||
("share/everygui/egconfig", glob.glob("egconfig/*.egd"))]
|
||||
|
||||
setup(
|
||||
name='everygui',
|
||||
@@ -29,4 +24,3 @@ setup(
|
||||
("share/everygui/egconfig", glob.glob("egconfig/*.egd"))]
|
||||
)
|
||||
|
||||
-os.chmod("/usr/share/everygui/egconfig", 0777)
|
||||
|
|
|
@ -17,22 +17,17 @@ RUN_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:java/jakarta-commons-logging
|
|||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
USES= dos2unix zip
|
||||
DOS2UNIX_FILES= c/src/Makefile.freebsd.txt
|
||||
DOS2UNIX_GLOB= build.xml Makefile.freebsd.txt *.c *.java
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.6+
|
||||
USE_ANT= yes
|
||||
ALL_TARGET= clean makeDLL dist
|
||||
|
||||
PLIST_SUB= JAVA_HOME=${JAVA_HOME:S/${PREFIX}\///}
|
||||
PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar \
|
||||
%%JAVA_HOME%%/jre/lib/${MACHINE_ARCH}/libTerminal.so
|
||||
PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar \
|
||||
${JAVA_HOME}/jre/lib/${MACHINE_ARCH}/libTerminal.so
|
||||
PORTDOCS= *
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
ALL_TARGET+= javadoc
|
||||
.endif
|
||||
DOCS_ALL_TARGET= javadoc
|
||||
|
||||
do-install:
|
||||
@${ECHO_MSG} -n ">> Installing JAR file as ${JAVAJARDIR}/${PORTNAME}.jar..."
|
||||
|
@ -44,12 +39,12 @@ do-install:
|
|||
@${INSTALL_PROGRAM} ${WRKSRC}/c/lib/libTerminal.so \
|
||||
${STAGEDIR}${JAVA_HOME}/jre/lib/${MACHINE_ARCH}/libTerminal.so
|
||||
@${ECHO_MSG} " [DONE]"
|
||||
.if ${PORT_OPTIONS:MDOCS}
|
||||
|
||||
do-install-DOCS-on:
|
||||
@${ECHO_MSG} -n ">> Installing documentation..."
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
@cd ${WRKSRC}/docs && ${FIND} * \
|
||||
| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${STAGEDIR}${DOCSDIR} > /dev/null 2>&1
|
||||
@${ECHO_MSG} " [DONE]"
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
--- build.xml.orig Sun Sep 10 22:10:16 2006
|
||||
+++ build.xml Tue Dec 12 08:37:44 2006
|
||||
--- build.xml.orig 2016-06-20 12:40:44 UTC
|
||||
+++ build.xml
|
||||
@@ -90,6 +90,7 @@
|
||||
<property name="src.home" value="${basedir}/java/src"/>
|
||||
<property name="test.home" value="${basedir}/test"/>
|
||||
<property name="c.home" value="${basedir}/c"/>
|
||||
+ <property name="os.type" value="freebsd"/>
|
||||
|
||||
|
||||
<!-- ==================== Compilation Control Options ==================== -->
|
||||
<property name="src.home" value="${basedir}/java/src"/>
|
||||
<property name="test.home" value="${basedir}/test"/>
|
||||
<property name="c.home" value="${basedir}/c"/>
|
||||
+ <property name="os.type" value="freebsd"/>
|
||||
|
||||
|
||||
<!-- ==================== Compilation Control Options ==================== -->
|
||||
@@ -189,14 +190,8 @@
|
||||
description="Compile the JNI shared library">
|
||||
|
||||
<mkdir dir="${c.home}/lib"/>
|
||||
- <input
|
||||
- message="Enter the operating system type: "
|
||||
- validargs="aix,beos,freebsd,gcj,hpux,linux,mac_osx,solaris,win32"
|
||||
- addproperty="os.type"
|
||||
- />
|
||||
-
|
||||
<echo>Compiling the shared library using "Makefile.${os.type}.txt"</echo>
|
||||
- <exec executable="make"
|
||||
+ <exec executable="gmake"
|
||||
dir="${c.home}/src"
|
||||
output="${c.home}/lib/make.out.txt"
|
||||
failonerror="true">
|
||||
description="Compile the JNI shared library">
|
||||
|
||||
<mkdir dir="${c.home}/lib"/>
|
||||
- <input
|
||||
- message="Enter the operating system type: "
|
||||
- validargs="aix,beos,freebsd,gcj,hpux,linux,mac_osx,solaris,win32"
|
||||
- addproperty="os.type"
|
||||
- />
|
||||
-
|
||||
<echo>Compiling the shared library using "Makefile.${os.type}.txt"</echo>
|
||||
- <exec executable="make"
|
||||
+ <exec executable="gmake"
|
||||
dir="${c.home}/src"
|
||||
output="${c.home}/lib/make.out.txt"
|
||||
failonerror="true">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ./c/src/Makefile.freebsd.txt.orig 2013-10-30 08:21:28.829906040 +0000
|
||||
+++ ./c/src/Makefile.freebsd.txt 2013-10-30 08:21:37.384905061 +0000
|
||||
@@ -6,7 +6,6 @@
|
||||
--- c/src/Makefile.freebsd.txt.orig 2016-06-20 12:40:44 UTC
|
||||
+++ c/src/Makefile.freebsd.txt
|
||||
@@ -6,7 +6,6 @@ OS = freebsd
|
||||
SHARED_OBJECT_EXT = so
|
||||
TARGET = libTerminal.${SHARED_OBJECT_EXT}
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
--- c/src/Toolkit.c.orig Wed Dec 13 12:29:03 2006
|
||||
+++ c/src/Toolkit.c Wed Dec 13 12:35:30 2006
|
||||
@@ -372,6 +372,7 @@
|
||||
if (colors_started)
|
||||
attr = COLOR_PAIR(colorpair_);
|
||||
|
||||
+ attron(attr);
|
||||
// If the top of the box is outside the clipping rectangle, don't bother
|
||||
// to draw the top.
|
||||
if (top_ >= top && top_ <= bottom) {
|
||||
@@ -414,6 +415,7 @@
|
||||
my_addch_with_clip(ACS_VLINE); // right vertical line
|
||||
}
|
||||
}
|
||||
+ attroff(attr);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_charva_awt_Toolkit_blankBoxNative
|
||||
--- c/src/Toolkit.c.orig 2016-06-20 12:40:44 UTC
|
||||
+++ c/src/Toolkit.c
|
||||
@@ -372,6 +372,7 @@ JNIEXPORT void JNICALL Java_charva_awt_T
|
||||
if (colors_started)
|
||||
attr = COLOR_PAIR(colorpair_);
|
||||
|
||||
+ attron(attr);
|
||||
// If the top of the box is outside the clipping rectangle, don't bother
|
||||
// to draw the top.
|
||||
if (top_ >= top && top_ <= bottom) {
|
||||
@@ -414,6 +415,7 @@ JNIEXPORT void JNICALL Java_charva_awt_T
|
||||
my_addch_with_clip(ACS_VLINE); // right vertical line
|
||||
}
|
||||
}
|
||||
+ attroff(attr);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_charva_awt_Toolkit_blankBoxNative
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- java/src/charva/awt/CardLayout.java.orig Mon Jan 29 09:39:30 2007
|
||||
+++ java/src/charva/awt/CardLayout.java Mon Jan 29 09:39:30 2007
|
||||
--- java/src/charva/awt/CardLayout.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/CardLayout.java
|
||||
@@ -0,0 +1,115 @@
|
||||
+package charva.awt;
|
||||
+
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
--- java/src/charva/awt/Component.java.orig Mon Aug 14 18:03:14 2006
|
||||
+++ java/src/charva/awt/Component.java Mon Jan 29 09:39:30 2007
|
||||
@@ -118,6 +118,17 @@ public abstract class Component {
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Determines whether this component will be displayed on the screen
|
||||
+ * if it's displayable.
|
||||
+ * @return <code>true</code> if the component and all of its ancestors
|
||||
+ * are visible, <code>false</code> otherwise
|
||||
+ */
|
||||
+ public boolean isRecursivelyVisible() {
|
||||
+ Container parent = getParent();
|
||||
+ return _visible && (parent == null || parent.isRecursivelyVisible());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
* To be implemented by concrete subclasses.
|
||||
*/
|
||||
public abstract void draw();
|
||||
@@ -449,7 +460,7 @@ public abstract class Component {
|
||||
* traversal.
|
||||
*/
|
||||
public boolean isFocusTraversable() {
|
||||
- return (_enabled && _visible);
|
||||
+ return (_enabled && isRecursivelyVisible());
|
||||
}
|
||||
|
||||
/**
|
||||
--- java/src/charva/awt/Component.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/Component.java
|
||||
@@ -118,6 +118,17 @@ public abstract class Component {
|
||||
}
|
||||
|
||||
/**
|
||||
+ * Determines whether this component will be displayed on the screen
|
||||
+ * if it's displayable.
|
||||
+ * @return <code>true</code> if the component and all of its ancestors
|
||||
+ * are visible, <code>false</code> otherwise
|
||||
+ */
|
||||
+ public boolean isRecursivelyVisible() {
|
||||
+ Container parent = getParent();
|
||||
+ return _visible && (parent == null || parent.isRecursivelyVisible());
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
* To be implemented by concrete subclasses.
|
||||
*/
|
||||
public abstract void draw();
|
||||
@@ -449,7 +460,7 @@ public abstract class Component {
|
||||
* traversal.
|
||||
*/
|
||||
public boolean isFocusTraversable() {
|
||||
- return (_enabled && _visible);
|
||||
+ return (_enabled && isRecursivelyVisible());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,100 +1,100 @@
|
|||
--- java/src/charva/awt/Container.java.orig Mon Aug 7 12:07:52 2006
|
||||
+++ java/src/charva/awt/Container.java Mon Jan 29 09:39:30 2007
|
||||
@@ -89,6 +89,23 @@ public abstract class Container
|
||||
invalidate();
|
||||
}
|
||||
|
||||
+ public void setBounds(int top_, int left_, int bottom_, int right_) {
|
||||
+ super.setBounds(top_, left_, bottom_, right_);
|
||||
+ setSize(right_ - left_ + 1, bottom_ - top_ + 1);
|
||||
+ }
|
||||
+
|
||||
+ public void setBounds(Point topleft_, Dimension size_) {
|
||||
+ super.setBounds(topleft_, size_);
|
||||
+ setSize(size_);
|
||||
+ }
|
||||
+
|
||||
+ public void setBounds(Rectangle bounds) {
|
||||
+ super.setBounds(bounds);
|
||||
+ setSize(
|
||||
+ bounds.getRight() - bounds.getLeft() + 1,
|
||||
+ bounds.getBottom() - bounds.getTop() + 1);
|
||||
+ }
|
||||
+
|
||||
public Dimension minimumSize() {
|
||||
if (_layoutMgr == null)
|
||||
return _size;
|
||||
@@ -105,13 +122,30 @@ public abstract class Container
|
||||
return (Component) _components.elementAt(n);
|
||||
}
|
||||
|
||||
+ protected Component getComponentAt(int x, int y, boolean checkVisibility) {
|
||||
+ Enumeration e = _components.elements();
|
||||
+ while (e.hasMoreElements()) {
|
||||
+ Component c = (Component) e.nextElement();
|
||||
+ if ((!checkVisibility || c.isVisible()) && c.contains(x, y)) {
|
||||
+ if (c instanceof Container) {
|
||||
+ // Calculate the coordinates of the point relative
|
||||
+ // to the origin of the container
|
||||
+ Point origin = c.getLocation();
|
||||
+ return ((Container) c).getComponentAt(x - origin.x, y - origin.y, checkVisibility);
|
||||
+ } else
|
||||
+ return c;
|
||||
+ }
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Returns the component that contains the specified point, or null
|
||||
* if no component contains the point. The x and y coordinates of
|
||||
* the point are relative to the origin of this container.
|
||||
*/
|
||||
public Component getComponentAt(Point p) {
|
||||
- return getComponentAt(p.x, p.y);
|
||||
+ return getComponentAt(p.x, p.y, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,20 +154,27 @@ public abstract class Container
|
||||
* the point are relative to the origin of this container.
|
||||
*/
|
||||
public Component getComponentAt(int x, int y) {
|
||||
- Enumeration e = _components.elements();
|
||||
- while (e.hasMoreElements()) {
|
||||
- Component c = (Component) e.nextElement();
|
||||
- if (c.contains(x, y)) {
|
||||
- if (c instanceof Container) {
|
||||
- // Calculate the coordinates of the point relative
|
||||
- // to the origin of the container
|
||||
- Point origin = c.getLocation();
|
||||
- return ((Container) c).getComponentAt(x - origin.x, y - origin.y);
|
||||
- } else
|
||||
- return c;
|
||||
- }
|
||||
- }
|
||||
- return null;
|
||||
+ return getComponentAt(x, y, false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the visible component that contains the specified point,
|
||||
+ * or null if no visible component contains the point. The x and y
|
||||
+ * coordinates of the point are relative to the origin of this container.
|
||||
+ */
|
||||
+ public final Component findComponentAt(Point p) {
|
||||
+ return findComponentAt(p.x, p.y);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the visible component that contains the specified point,
|
||||
+ * or null if no visible component contains the point. The x and y
|
||||
+ * coordinates of the point are relative to the origin of this container.
|
||||
+ */
|
||||
+ public final Component findComponentAt(int x, int y) {
|
||||
+ if (!isRecursivelyVisible())
|
||||
+ return null;
|
||||
+ return(getComponentAt(x, y, true));
|
||||
}
|
||||
|
||||
/**
|
||||
--- java/src/charva/awt/Container.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/Container.java
|
||||
@@ -89,6 +89,23 @@ public abstract class Container
|
||||
invalidate();
|
||||
}
|
||||
|
||||
+ public void setBounds(int top_, int left_, int bottom_, int right_) {
|
||||
+ super.setBounds(top_, left_, bottom_, right_);
|
||||
+ setSize(right_ - left_ + 1, bottom_ - top_ + 1);
|
||||
+ }
|
||||
+
|
||||
+ public void setBounds(Point topleft_, Dimension size_) {
|
||||
+ super.setBounds(topleft_, size_);
|
||||
+ setSize(size_);
|
||||
+ }
|
||||
+
|
||||
+ public void setBounds(Rectangle bounds) {
|
||||
+ super.setBounds(bounds);
|
||||
+ setSize(
|
||||
+ bounds.getRight() - bounds.getLeft() + 1,
|
||||
+ bounds.getBottom() - bounds.getTop() + 1);
|
||||
+ }
|
||||
+
|
||||
public Dimension minimumSize() {
|
||||
if (_layoutMgr == null)
|
||||
return _size;
|
||||
@@ -105,13 +122,30 @@ public abstract class Container
|
||||
return (Component) _components.elementAt(n);
|
||||
}
|
||||
|
||||
+ protected Component getComponentAt(int x, int y, boolean checkVisibility) {
|
||||
+ Enumeration e = _components.elements();
|
||||
+ while (e.hasMoreElements()) {
|
||||
+ Component c = (Component) e.nextElement();
|
||||
+ if ((!checkVisibility || c.isVisible()) && c.contains(x, y)) {
|
||||
+ if (c instanceof Container) {
|
||||
+ // Calculate the coordinates of the point relative
|
||||
+ // to the origin of the container
|
||||
+ Point origin = c.getLocation();
|
||||
+ return ((Container) c).getComponentAt(x - origin.x, y - origin.y, checkVisibility);
|
||||
+ } else
|
||||
+ return c;
|
||||
+ }
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Returns the component that contains the specified point, or null
|
||||
* if no component contains the point. The x and y coordinates of
|
||||
* the point are relative to the origin of this container.
|
||||
*/
|
||||
public Component getComponentAt(Point p) {
|
||||
- return getComponentAt(p.x, p.y);
|
||||
+ return getComponentAt(p.x, p.y, false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -120,20 +154,27 @@ public abstract class Container
|
||||
* the point are relative to the origin of this container.
|
||||
*/
|
||||
public Component getComponentAt(int x, int y) {
|
||||
- Enumeration e = _components.elements();
|
||||
- while (e.hasMoreElements()) {
|
||||
- Component c = (Component) e.nextElement();
|
||||
- if (c.contains(x, y)) {
|
||||
- if (c instanceof Container) {
|
||||
- // Calculate the coordinates of the point relative
|
||||
- // to the origin of the container
|
||||
- Point origin = c.getLocation();
|
||||
- return ((Container) c).getComponentAt(x - origin.x, y - origin.y);
|
||||
- } else
|
||||
- return c;
|
||||
- }
|
||||
- }
|
||||
- return null;
|
||||
+ return getComponentAt(x, y, false);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the visible component that contains the specified point,
|
||||
+ * or null if no visible component contains the point. The x and y
|
||||
+ * coordinates of the point are relative to the origin of this container.
|
||||
+ */
|
||||
+ public final Component findComponentAt(Point p) {
|
||||
+ return findComponentAt(p.x, p.y);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns the visible component that contains the specified point,
|
||||
+ * or null if no visible component contains the point. The x and y
|
||||
+ * coordinates of the point are relative to the origin of this container.
|
||||
+ */
|
||||
+ public final Component findComponentAt(int x, int y) {
|
||||
+ if (!isRecursivelyVisible())
|
||||
+ return null;
|
||||
+ return(getComponentAt(x, y, true));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,113 +1,113 @@
|
|||
--- java/src/charva/awt/Toolkit.java.orig Mon Aug 14 20:59:42 2006
|
||||
+++ java/src/charva/awt/Toolkit.java Mon Jan 29 09:39:30 2007
|
||||
@@ -157,13 +157,9 @@ public class Toolkit {
|
||||
* key as defined in the "VK_*" values.
|
||||
*/
|
||||
public void fireKeystroke(int key_, Component source_) {
|
||||
- int id;
|
||||
- if (Toolkit.isActionKey(key_))
|
||||
- id = AWTEvent.KEY_TYPED;
|
||||
- else
|
||||
- id = AWTEvent.KEY_PRESSED;
|
||||
-
|
||||
- _evtQueue.postEvent(new KeyEvent(key_, id, source_));
|
||||
+ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_PRESSED, source_));
|
||||
+ if (!Toolkit.isActionKey(key_))
|
||||
+ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_TYPED, source_));
|
||||
}
|
||||
|
||||
public FocusEvent getLastFocusEvent() {
|
||||
@@ -225,7 +221,7 @@ public class Toolkit {
|
||||
_lastMousePressTime = System.currentTimeMillis();
|
||||
|
||||
Component component =
|
||||
- top_window.getComponentAt(x - origin.x, y - origin.y);
|
||||
+ top_window.findComponentAt(x - origin.x, y - origin.y);
|
||||
|
||||
if (component != null) {
|
||||
_evtQueue.postEvent(new MouseEvent(component, modifiers, x, y, 0, button));
|
||||
@@ -796,43 +792,47 @@ public class Toolkit {
|
||||
//public boolean isActionKey() { return (_key >= 256); }
|
||||
public static boolean isActionKey( int _key )
|
||||
{
|
||||
- boolean value = false;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_ESCAPE ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_DOWN ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_UP ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_LEFT ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_RIGHT ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_HOME ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_BACK_SPACE ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F1 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F2 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F3 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F4 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F5 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F6 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F7 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F8 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F9 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F10 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F11 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F12 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F13 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F14 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F15 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F16 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F17 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F18 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F19 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F20 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_DELETE ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_INSERT ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_DOWN ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_UP ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_ENTER ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_BACK_TAB ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_END ) value=true;
|
||||
-
|
||||
- return (value);
|
||||
+ switch (_key) {
|
||||
+ case charva.awt.event.KeyEvent.VK_ESCAPE:
|
||||
+ case charva.awt.event.KeyEvent.VK_DOWN:
|
||||
+ case charva.awt.event.KeyEvent.VK_UP:
|
||||
+ case charva.awt.event.KeyEvent.VK_LEFT:
|
||||
+ case charva.awt.event.KeyEvent.VK_RIGHT:
|
||||
+ case charva.awt.event.KeyEvent.VK_HOME:
|
||||
+ case charva.awt.event.KeyEvent.VK_BACK_SPACE:
|
||||
+ case charva.awt.event.KeyEvent.VK_F1:
|
||||
+ case charva.awt.event.KeyEvent.VK_F2:
|
||||
+ case charva.awt.event.KeyEvent.VK_F3:
|
||||
+ case charva.awt.event.KeyEvent.VK_F4:
|
||||
+ case charva.awt.event.KeyEvent.VK_F5:
|
||||
+ case charva.awt.event.KeyEvent.VK_F6:
|
||||
+ case charva.awt.event.KeyEvent.VK_F7:
|
||||
+ case charva.awt.event.KeyEvent.VK_F8:
|
||||
+ case charva.awt.event.KeyEvent.VK_F9:
|
||||
+ case charva.awt.event.KeyEvent.VK_F10:
|
||||
+ case charva.awt.event.KeyEvent.VK_F11:
|
||||
+ case charva.awt.event.KeyEvent.VK_F12:
|
||||
+ case charva.awt.event.KeyEvent.VK_F13:
|
||||
+ case charva.awt.event.KeyEvent.VK_F14:
|
||||
+ case charva.awt.event.KeyEvent.VK_F15:
|
||||
+ case charva.awt.event.KeyEvent.VK_F16:
|
||||
+ case charva.awt.event.KeyEvent.VK_F17:
|
||||
+ case charva.awt.event.KeyEvent.VK_F18:
|
||||
+ case charva.awt.event.KeyEvent.VK_F19:
|
||||
+ case charva.awt.event.KeyEvent.VK_F20:
|
||||
+ case charva.awt.event.KeyEvent.VK_DELETE:
|
||||
+ case charva.awt.event.KeyEvent.VK_INSERT:
|
||||
+ case charva.awt.event.KeyEvent.VK_PAGE_DOWN:
|
||||
+ case charva.awt.event.KeyEvent.VK_PAGE_UP:
|
||||
+ case charva.awt.event.KeyEvent.VK_ENTER:
|
||||
+ case charva.awt.event.KeyEvent.VK_BACK_TAB:
|
||||
+ case charva.awt.event.KeyEvent.VK_END:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ if ( _key < 32 )
|
||||
+ return true;
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
--- java/src/charva/awt/Toolkit.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/Toolkit.java
|
||||
@@ -157,13 +157,9 @@ public class Toolkit {
|
||||
* key as defined in the "VK_*" values.
|
||||
*/
|
||||
public void fireKeystroke(int key_, Component source_) {
|
||||
- int id;
|
||||
- if (Toolkit.isActionKey(key_))
|
||||
- id = AWTEvent.KEY_TYPED;
|
||||
- else
|
||||
- id = AWTEvent.KEY_PRESSED;
|
||||
-
|
||||
- _evtQueue.postEvent(new KeyEvent(key_, id, source_));
|
||||
+ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_PRESSED, source_));
|
||||
+ if (!Toolkit.isActionKey(key_))
|
||||
+ _evtQueue.postEvent(new KeyEvent(key_, AWTEvent.KEY_TYPED, source_));
|
||||
}
|
||||
|
||||
public FocusEvent getLastFocusEvent() {
|
||||
@@ -225,7 +221,7 @@ public class Toolkit {
|
||||
_lastMousePressTime = System.currentTimeMillis();
|
||||
|
||||
Component component =
|
||||
- top_window.getComponentAt(x - origin.x, y - origin.y);
|
||||
+ top_window.findComponentAt(x - origin.x, y - origin.y);
|
||||
|
||||
if (component != null) {
|
||||
_evtQueue.postEvent(new MouseEvent(component, modifiers, x, y, 0, button));
|
||||
@@ -796,43 +792,47 @@ public class Toolkit {
|
||||
//public boolean isActionKey() { return (_key >= 256); }
|
||||
public static boolean isActionKey( int _key )
|
||||
{
|
||||
- boolean value = false;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_ESCAPE ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_DOWN ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_UP ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_LEFT ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_RIGHT ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_HOME ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_BACK_SPACE ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F1 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F2 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F3 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F4 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F5 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F6 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F7 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F8 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F9 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F10 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F11 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F12 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F13 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F14 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F15 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F16 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F17 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F18 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F19 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_F20 ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_DELETE ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_INSERT ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_DOWN ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_PAGE_UP ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_ENTER ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_BACK_TAB ) value=true;
|
||||
- if ( _key == charva.awt.event.KeyEvent.VK_END ) value=true;
|
||||
-
|
||||
- return (value);
|
||||
+ switch (_key) {
|
||||
+ case charva.awt.event.KeyEvent.VK_ESCAPE:
|
||||
+ case charva.awt.event.KeyEvent.VK_DOWN:
|
||||
+ case charva.awt.event.KeyEvent.VK_UP:
|
||||
+ case charva.awt.event.KeyEvent.VK_LEFT:
|
||||
+ case charva.awt.event.KeyEvent.VK_RIGHT:
|
||||
+ case charva.awt.event.KeyEvent.VK_HOME:
|
||||
+ case charva.awt.event.KeyEvent.VK_BACK_SPACE:
|
||||
+ case charva.awt.event.KeyEvent.VK_F1:
|
||||
+ case charva.awt.event.KeyEvent.VK_F2:
|
||||
+ case charva.awt.event.KeyEvent.VK_F3:
|
||||
+ case charva.awt.event.KeyEvent.VK_F4:
|
||||
+ case charva.awt.event.KeyEvent.VK_F5:
|
||||
+ case charva.awt.event.KeyEvent.VK_F6:
|
||||
+ case charva.awt.event.KeyEvent.VK_F7:
|
||||
+ case charva.awt.event.KeyEvent.VK_F8:
|
||||
+ case charva.awt.event.KeyEvent.VK_F9:
|
||||
+ case charva.awt.event.KeyEvent.VK_F10:
|
||||
+ case charva.awt.event.KeyEvent.VK_F11:
|
||||
+ case charva.awt.event.KeyEvent.VK_F12:
|
||||
+ case charva.awt.event.KeyEvent.VK_F13:
|
||||
+ case charva.awt.event.KeyEvent.VK_F14:
|
||||
+ case charva.awt.event.KeyEvent.VK_F15:
|
||||
+ case charva.awt.event.KeyEvent.VK_F16:
|
||||
+ case charva.awt.event.KeyEvent.VK_F17:
|
||||
+ case charva.awt.event.KeyEvent.VK_F18:
|
||||
+ case charva.awt.event.KeyEvent.VK_F19:
|
||||
+ case charva.awt.event.KeyEvent.VK_F20:
|
||||
+ case charva.awt.event.KeyEvent.VK_DELETE:
|
||||
+ case charva.awt.event.KeyEvent.VK_INSERT:
|
||||
+ case charva.awt.event.KeyEvent.VK_PAGE_DOWN:
|
||||
+ case charva.awt.event.KeyEvent.VK_PAGE_UP:
|
||||
+ case charva.awt.event.KeyEvent.VK_ENTER:
|
||||
+ case charva.awt.event.KeyEvent.VK_BACK_TAB:
|
||||
+ case charva.awt.event.KeyEvent.VK_END:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ if ( _key < 32 )
|
||||
+ return true;
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
|
||||
//====================================================================
|
||||
|
|
|
@ -1,232 +1,232 @@
|
|||
--- java/src/charva/awt/VerticalFlowLayout.java.orig Mon Jan 29 09:39:30 2007
|
||||
+++ java/src/charva/awt/VerticalFlowLayout.java Mon Jan 29 09:39:30 2007
|
||||
--- java/src/charva/awt/VerticalFlowLayout.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/VerticalFlowLayout.java
|
||||
@@ -0,0 +1,229 @@
|
||||
+/* class FlowLayout
|
||||
+ *
|
||||
+ * Copyright (C) 2001 R M Pitman
|
||||
+ * Copyright (C) 2007 Lapo Luchini
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+package charva.awt;
|
||||
+
|
||||
+import java.util.Enumeration;
|
||||
+import java.util.Vector;
|
||||
+
|
||||
+/**
|
||||
+ * A concrete implementation of LayoutManager that lays out its
|
||||
+ * components top-to-bottom.
|
||||
+ */
|
||||
+public class VerticalFlowLayout
|
||||
+ implements LayoutManager {
|
||||
+ /**
|
||||
+ * Default constructor. Sets alignment to MIDDLE, hgap to 1,
|
||||
+ * and vgap to 0.
|
||||
+ */
|
||||
+ public VerticalFlowLayout() {
|
||||
+ this(MIDDLE, 1, 0);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Use this constructor when you want to set the alignment and the
|
||||
+ * horizontal and vertical gaps.
|
||||
+ */
|
||||
+ public VerticalFlowLayout(int align_, int hgap_, int vgap_) {
|
||||
+ _align = align_;
|
||||
+ _hgap = hgap_;
|
||||
+ _vgap = vgap_;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the alignment for this layout. Allowable values are
|
||||
+ * VerticalFlowLayout.TOP, VerticalFlowLayout.MIDDLE and
|
||||
+ * VerticalFlowLayout.BOTTOM.
|
||||
+ */
|
||||
+ public void setAlignment(int align_) {
|
||||
+ _align = align_;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the alignment for this layout.
|
||||
+ */
|
||||
+ public int getAlignment() {
|
||||
+ return _align;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Calculate the minimum-size rectangle that can enclose all the
|
||||
+ * components in the given container.
|
||||
+ */
|
||||
+ public Dimension minimumSize(Container container_) {
|
||||
+
|
||||
+ int width = 0;
|
||||
+ int height = 0;
|
||||
+
|
||||
+ Component[] components = container_.getComponents();
|
||||
+ for (int i = 0; i < components.length; i++) {
|
||||
+ Dimension d = components[i].minimumSize();
|
||||
+
|
||||
+ /* Make allowance for the gap between this component and the
|
||||
+ * previous component.
|
||||
+ */
|
||||
+ if (i != 0)
|
||||
+ height += _vgap;
|
||||
+
|
||||
+ height += d.height;
|
||||
+ if (d.width > width)
|
||||
+ width = d.width;
|
||||
+ }
|
||||
+
|
||||
+ /* Take into account the border frame (if any).
|
||||
+ */
|
||||
+ Insets insets = container_.getInsets();
|
||||
+ height += insets.top + insets.bottom;
|
||||
+ width += insets.left + insets.right;
|
||||
+
|
||||
+ return new Dimension(width, height);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Lay out the components according to the specified alignment, hgap
|
||||
+ * and vgap.
|
||||
+ * This is called when the size of the container has already been
|
||||
+ * calculated.
|
||||
+ * It lays out the components in a column, one at a time, until it
|
||||
+ * determines that there is not enough space left in the column.
|
||||
+ * Then it moves to the next row. If there is not enough horizontal
|
||||
+ * space in the container to lay out all of the components, it
|
||||
+ * removes the remaining components from the container; they don't
|
||||
+ * appear at all.
|
||||
+ */
|
||||
+ public void doLayout(Container container_) {
|
||||
+
|
||||
+ Insets insets = container_.getInsets();
|
||||
+ int availableHeight = container_.getSize().height -
|
||||
+ insets.top - insets.bottom;
|
||||
+ int heightLeft = availableHeight;
|
||||
+ int widthLeft = container_.getSize().width -
|
||||
+ insets.left - insets.right;
|
||||
+
|
||||
+ int hoffset = insets.left;
|
||||
+
|
||||
+ Component[] components = container_.getComponents();
|
||||
+ Vector localvector = new Vector();
|
||||
+ for (int i = 0; i < components.length; i++) {
|
||||
+ Component c = components[i];
|
||||
+
|
||||
+ /* Get the contained container to lay itself out at its
|
||||
+ * preferred size, if it is not already laid out.
|
||||
+ */
|
||||
+ if (c instanceof Container) {
|
||||
+ Container cont = (Container) c;
|
||||
+ if (cont.isValid() == false) {
|
||||
+ cont.setSize(cont.minimumSize());
|
||||
+ cont.doLayout();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Determine the width required to lay out the current
|
||||
+ * component (including the gap between this component and
|
||||
+ * the previous component).
|
||||
+ */
|
||||
+ int requiredHeight = c.getSize().height;
|
||||
+ if (i != 0)
|
||||
+ requiredHeight += _vgap;
|
||||
+
|
||||
+ if (requiredHeight > heightLeft) {
|
||||
+ int columnWidth = 0;
|
||||
+ if (localvector.size() != 0) {
|
||||
+ columnWidth = layoutColumn(container_, localvector,
|
||||
+ widthLeft, heightLeft, hoffset);
|
||||
+ localvector.removeAllElements();
|
||||
+ }
|
||||
+ hoffset += columnWidth + _hgap;
|
||||
+ heightLeft = availableHeight;
|
||||
+ widthLeft -= columnWidth + _hgap;
|
||||
+ }
|
||||
+ heightLeft -= requiredHeight;
|
||||
+
|
||||
+ // Build up a temporary list of components for this row.
|
||||
+ localvector.add(c);
|
||||
+ }
|
||||
+ layoutColumn(container_, localvector, widthLeft, heightLeft, hoffset);
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * private function to layout a single column of components.
|
||||
+ *
|
||||
+ * @return The height of the laid-out column.
|
||||
+ */
|
||||
+ private int layoutColumn(Container container_, Vector components_,
|
||||
+ int widthleft_, int heightleft_, int hoffset_) {
|
||||
+
|
||||
+ int voffset = 0;
|
||||
+ int columnWidth = 0;
|
||||
+ Insets insets = container_.getInsets();
|
||||
+
|
||||
+ switch (_align) {
|
||||
+ case TOP:
|
||||
+ voffset = insets.top;
|
||||
+ break;
|
||||
+ case MIDDLE:
|
||||
+ voffset = insets.top + heightleft_ / 2;
|
||||
+ break;
|
||||
+ case BOTTOM:
|
||||
+ voffset = insets.top + heightleft_;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ Enumeration e = components_.elements();
|
||||
+ while (e.hasMoreElements()) {
|
||||
+ Component c = (Component) e.nextElement();
|
||||
+ if (c.getSize().width > columnWidth)
|
||||
+ columnWidth = c.getSize().width;
|
||||
+
|
||||
+ if (columnWidth > widthleft_) {
|
||||
+ container_.remove(c); // we have run out of space
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ c.setLocation(hoffset_, voffset);
|
||||
+ voffset += c.getSize().height + _vgap;
|
||||
+ }
|
||||
+ return columnWidth;
|
||||
+ }
|
||||
+
|
||||
+ //====================================================================
|
||||
+ // INSTANCE VARIABLES
|
||||
+
|
||||
+ /**
|
||||
+ * Alignment of components (TOP, BOTTOM or MIDDLE)
|
||||
+ */
|
||||
+ private int _align = MIDDLE;
|
||||
+
|
||||
+ /**
|
||||
+ * Horizontal gap between components
|
||||
+ */
|
||||
+ private int _hgap = 1;
|
||||
+
|
||||
+ /**
|
||||
+ * Vertical gap between components
|
||||
+ */
|
||||
+ private int _vgap = 0;
|
||||
+
|
||||
+ public static final int TOP = 1;
|
||||
+ public static final int MIDDLE = 2;
|
||||
+ public static final int BOTTOM = 3;
|
||||
+
|
||||
+}
|
||||
+/* class FlowLayout
|
||||
+ *
|
||||
+ * Copyright (C) 2001 R M Pitman
|
||||
+ * Copyright (C) 2007 Lapo Luchini
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
+ */
|
||||
+
|
||||
+package charva.awt;
|
||||
+
|
||||
+import java.util.Enumeration;
|
||||
+import java.util.Vector;
|
||||
+
|
||||
+/**
|
||||
+ * A concrete implementation of LayoutManager that lays out its
|
||||
+ * components top-to-bottom.
|
||||
+ */
|
||||
+public class VerticalFlowLayout
|
||||
+ implements LayoutManager {
|
||||
+ /**
|
||||
+ * Default constructor. Sets alignment to MIDDLE, hgap to 1,
|
||||
+ * and vgap to 0.
|
||||
+ */
|
||||
+ public VerticalFlowLayout() {
|
||||
+ this(MIDDLE, 1, 0);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Use this constructor when you want to set the alignment and the
|
||||
+ * horizontal and vertical gaps.
|
||||
+ */
|
||||
+ public VerticalFlowLayout(int align_, int hgap_, int vgap_) {
|
||||
+ _align = align_;
|
||||
+ _hgap = hgap_;
|
||||
+ _vgap = vgap_;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Sets the alignment for this layout. Allowable values are
|
||||
+ * VerticalFlowLayout.TOP, VerticalFlowLayout.MIDDLE and
|
||||
+ * VerticalFlowLayout.BOTTOM.
|
||||
+ */
|
||||
+ public void setAlignment(int align_) {
|
||||
+ _align = align_;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the alignment for this layout.
|
||||
+ */
|
||||
+ public int getAlignment() {
|
||||
+ return _align;
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Calculate the minimum-size rectangle that can enclose all the
|
||||
+ * components in the given container.
|
||||
+ */
|
||||
+ public Dimension minimumSize(Container container_) {
|
||||
+
|
||||
+ int width = 0;
|
||||
+ int height = 0;
|
||||
+
|
||||
+ Component[] components = container_.getComponents();
|
||||
+ for (int i = 0; i < components.length; i++) {
|
||||
+ Dimension d = components[i].minimumSize();
|
||||
+
|
||||
+ /* Make allowance for the gap between this component and the
|
||||
+ * previous component.
|
||||
+ */
|
||||
+ if (i != 0)
|
||||
+ height += _vgap;
|
||||
+
|
||||
+ height += d.height;
|
||||
+ if (d.width > width)
|
||||
+ width = d.width;
|
||||
+ }
|
||||
+
|
||||
+ /* Take into account the border frame (if any).
|
||||
+ */
|
||||
+ Insets insets = container_.getInsets();
|
||||
+ height += insets.top + insets.bottom;
|
||||
+ width += insets.left + insets.right;
|
||||
+
|
||||
+ return new Dimension(width, height);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Lay out the components according to the specified alignment, hgap
|
||||
+ * and vgap.
|
||||
+ * This is called when the size of the container has already been
|
||||
+ * calculated.
|
||||
+ * It lays out the components in a column, one at a time, until it
|
||||
+ * determines that there is not enough space left in the column.
|
||||
+ * Then it moves to the next row. If there is not enough horizontal
|
||||
+ * space in the container to lay out all of the components, it
|
||||
+ * removes the remaining components from the container; they don't
|
||||
+ * appear at all.
|
||||
+ */
|
||||
+ public void doLayout(Container container_) {
|
||||
+
|
||||
+ Insets insets = container_.getInsets();
|
||||
+ int availableHeight = container_.getSize().height -
|
||||
+ insets.top - insets.bottom;
|
||||
+ int heightLeft = availableHeight;
|
||||
+ int widthLeft = container_.getSize().width -
|
||||
+ insets.left - insets.right;
|
||||
+
|
||||
+ int hoffset = insets.left;
|
||||
+
|
||||
+ Component[] components = container_.getComponents();
|
||||
+ Vector localvector = new Vector();
|
||||
+ for (int i = 0; i < components.length; i++) {
|
||||
+ Component c = components[i];
|
||||
+
|
||||
+ /* Get the contained container to lay itself out at its
|
||||
+ * preferred size, if it is not already laid out.
|
||||
+ */
|
||||
+ if (c instanceof Container) {
|
||||
+ Container cont = (Container) c;
|
||||
+ if (cont.isValid() == false) {
|
||||
+ cont.setSize(cont.minimumSize());
|
||||
+ cont.doLayout();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Determine the width required to lay out the current
|
||||
+ * component (including the gap between this component and
|
||||
+ * the previous component).
|
||||
+ */
|
||||
+ int requiredHeight = c.getSize().height;
|
||||
+ if (i != 0)
|
||||
+ requiredHeight += _vgap;
|
||||
+
|
||||
+ if (requiredHeight > heightLeft) {
|
||||
+ int columnWidth = 0;
|
||||
+ if (localvector.size() != 0) {
|
||||
+ columnWidth = layoutColumn(container_, localvector,
|
||||
+ widthLeft, heightLeft, hoffset);
|
||||
+ localvector.removeAllElements();
|
||||
+ }
|
||||
+ hoffset += columnWidth + _hgap;
|
||||
+ heightLeft = availableHeight;
|
||||
+ widthLeft -= columnWidth + _hgap;
|
||||
+ }
|
||||
+ heightLeft -= requiredHeight;
|
||||
+
|
||||
+ // Build up a temporary list of components for this row.
|
||||
+ localvector.add(c);
|
||||
+ }
|
||||
+ layoutColumn(container_, localvector, widthLeft, heightLeft, hoffset);
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * private function to layout a single column of components.
|
||||
+ *
|
||||
+ * @return The height of the laid-out column.
|
||||
+ */
|
||||
+ private int layoutColumn(Container container_, Vector components_,
|
||||
+ int widthleft_, int heightleft_, int hoffset_) {
|
||||
+
|
||||
+ int voffset = 0;
|
||||
+ int columnWidth = 0;
|
||||
+ Insets insets = container_.getInsets();
|
||||
+
|
||||
+ switch (_align) {
|
||||
+ case TOP:
|
||||
+ voffset = insets.top;
|
||||
+ break;
|
||||
+ case MIDDLE:
|
||||
+ voffset = insets.top + heightleft_ / 2;
|
||||
+ break;
|
||||
+ case BOTTOM:
|
||||
+ voffset = insets.top + heightleft_;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ Enumeration e = components_.elements();
|
||||
+ while (e.hasMoreElements()) {
|
||||
+ Component c = (Component) e.nextElement();
|
||||
+ if (c.getSize().width > columnWidth)
|
||||
+ columnWidth = c.getSize().width;
|
||||
+
|
||||
+ if (columnWidth > widthleft_) {
|
||||
+ container_.remove(c); // we have run out of space
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ c.setLocation(hoffset_, voffset);
|
||||
+ voffset += c.getSize().height + _vgap;
|
||||
+ }
|
||||
+ return columnWidth;
|
||||
+ }
|
||||
+
|
||||
+ //====================================================================
|
||||
+ // INSTANCE VARIABLES
|
||||
+
|
||||
+ /**
|
||||
+ * Alignment of components (TOP, BOTTOM or MIDDLE)
|
||||
+ */
|
||||
+ private int _align = MIDDLE;
|
||||
+
|
||||
+ /**
|
||||
+ * Horizontal gap between components
|
||||
+ */
|
||||
+ private int _hgap = 1;
|
||||
+
|
||||
+ /**
|
||||
+ * Vertical gap between components
|
||||
+ */
|
||||
+ private int _vgap = 0;
|
||||
+
|
||||
+ public static final int TOP = 1;
|
||||
+ public static final int MIDDLE = 2;
|
||||
+ public static final int BOTTOM = 3;
|
||||
+
|
||||
+}
|
||||
|
|
|
@ -1,56 +1,56 @@
|
|||
--- java/src/charva/awt/Window.java.orig Mon Aug 14 17:38:56 2006
|
||||
+++ java/src/charva/awt/Window.java Mon Jan 29 09:39:30 2007
|
||||
@@ -156,13 +156,21 @@ public class Window
|
||||
*/
|
||||
SyncQueue.getInstance().postEvent(new SyncEvent(this));
|
||||
|
||||
- if (_dispatchThreadRunning)
|
||||
- run();
|
||||
- else {
|
||||
- _dispatchThreadRunning = true;
|
||||
- Thread dispatchThread = new Thread(this);
|
||||
- dispatchThread.setName("event dispatcher");
|
||||
- dispatchThread.start();
|
||||
+ if (_dispatchThread != null) {
|
||||
+ if (Thread.currentThread() == _dispatchThread) {
|
||||
+ // we are in the EDT, we must manage events
|
||||
+ run();
|
||||
+ } else {
|
||||
+ // we are not the EDT, let's wait for him to ask us to close
|
||||
+ synchronized (this) {
|
||||
+ while (!_windowClosed)
|
||||
+ try { wait(); } catch (InterruptedException e) { }
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ _dispatchThread = new Thread(this);
|
||||
+ _dispatchThread.setName("event dispatcher");
|
||||
+ _dispatchThread.start();
|
||||
|
||||
/* If "charva.script.playback" is defined, we start up
|
||||
* a thread for playing back the script. Keys from both the
|
||||
@@ -270,7 +278,10 @@ public class Window
|
||||
*/
|
||||
if (we.getID() == AWTEvent.WINDOW_CLOSING) {
|
||||
|
||||
- we.getWindow()._windowClosed = true;
|
||||
+ synchronized (we.getWindow()) {
|
||||
+ we.getWindow()._windowClosed = true;
|
||||
+ we.getWindow().notify();
|
||||
+ }
|
||||
|
||||
/* Remove this window from the list of those displayed,
|
||||
* and blank out the screen area where the window was
|
||||
@@ -407,10 +418,10 @@ public class Window
|
||||
|
||||
private Window _owner;
|
||||
protected Toolkit _term;
|
||||
- private boolean _windowClosed = false;
|
||||
+ private volatile boolean _windowClosed = false;
|
||||
|
||||
private Vector _windowListeners = null;
|
||||
|
||||
- private static boolean _dispatchThreadRunning = false;
|
||||
+ private static Thread _dispatchThread = null;
|
||||
|
||||
}
|
||||
--- java/src/charva/awt/Window.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/Window.java
|
||||
@@ -156,13 +156,21 @@ public class Window
|
||||
*/
|
||||
SyncQueue.getInstance().postEvent(new SyncEvent(this));
|
||||
|
||||
- if (_dispatchThreadRunning)
|
||||
- run();
|
||||
- else {
|
||||
- _dispatchThreadRunning = true;
|
||||
- Thread dispatchThread = new Thread(this);
|
||||
- dispatchThread.setName("event dispatcher");
|
||||
- dispatchThread.start();
|
||||
+ if (_dispatchThread != null) {
|
||||
+ if (Thread.currentThread() == _dispatchThread) {
|
||||
+ // we are in the EDT, we must manage events
|
||||
+ run();
|
||||
+ } else {
|
||||
+ // we are not the EDT, let's wait for him to ask us to close
|
||||
+ synchronized (this) {
|
||||
+ while (!_windowClosed)
|
||||
+ try { wait(); } catch (InterruptedException e) { }
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ _dispatchThread = new Thread(this);
|
||||
+ _dispatchThread.setName("event dispatcher");
|
||||
+ _dispatchThread.start();
|
||||
|
||||
/* If "charva.script.playback" is defined, we start up
|
||||
* a thread for playing back the script. Keys from both the
|
||||
@@ -270,7 +278,10 @@ public class Window
|
||||
*/
|
||||
if (we.getID() == AWTEvent.WINDOW_CLOSING) {
|
||||
|
||||
- we.getWindow()._windowClosed = true;
|
||||
+ synchronized (we.getWindow()) {
|
||||
+ we.getWindow()._windowClosed = true;
|
||||
+ we.getWindow().notify();
|
||||
+ }
|
||||
|
||||
/* Remove this window from the list of those displayed,
|
||||
* and blank out the screen area where the window was
|
||||
@@ -407,10 +418,10 @@ public class Window
|
||||
|
||||
private Window _owner;
|
||||
protected Toolkit _term;
|
||||
- private boolean _windowClosed = false;
|
||||
+ private volatile boolean _windowClosed = false;
|
||||
|
||||
private Vector _windowListeners = null;
|
||||
|
||||
- private static boolean _dispatchThreadRunning = false;
|
||||
+ private static Thread _dispatchThread = null;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- java/src/charva/awt/event/FocusAdapter.java.orig Mon Jan 29 09:39:30 2007
|
||||
+++ java/src/charva/awt/event/FocusAdapter.java Mon Jan 29 09:39:30 2007
|
||||
--- java/src/charva/awt/event/FocusAdapter.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charva/awt/event/FocusAdapter.java
|
||||
@@ -0,0 +1,17 @@
|
||||
+package charva.awt.event;
|
||||
+
|
||||
|
|
|
@ -1,90 +1,90 @@
|
|||
--- java/src/charvax/swing/AbstractButton.java.orig Sat Dec 17 15:27:30 2005
|
||||
+++ java/src/charvax/swing/AbstractButton.java Mon Jan 29 09:39:30 2007
|
||||
--- java/src/charvax/swing/AbstractButton.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/AbstractButton.java
|
||||
@@ -19,15 +19,16 @@
|
||||
|
||||
package charvax.swing;
|
||||
|
||||
+import java.util.Enumeration;
|
||||
+import java.util.Vector;
|
||||
+
|
||||
+import charva.awt.Container;
|
||||
import charva.awt.EventQueue;
|
||||
import charva.awt.ItemSelectable;
|
||||
import charva.awt.Toolkit;
|
||||
import charva.awt.Window;
|
||||
import charva.awt.event.*;
|
||||
|
||||
-import java.util.Enumeration;
|
||||
-import java.util.Vector;
|
||||
-
|
||||
/**
|
||||
* This forms the base class for components that exhibit button-like
|
||||
* behavior.
|
||||
@@ -50,6 +51,12 @@ public abstract class AbstractButton
|
||||
_label = label_;
|
||||
}
|
||||
|
||||
+ protected void addKeyListenerToAncestor() {
|
||||
+ Window ancestor = super.getAncestorWindow();
|
||||
+ if (ancestor != null)
|
||||
+ ancestor.addKeyListener(this);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Set the button's mnemonic character.
|
||||
* The mnemonic is the key which will activate this button if focus
|
||||
@@ -76,10 +83,16 @@ public abstract class AbstractButton
|
||||
*/
|
||||
public void setMnemonic(int mnemonic_) {
|
||||
_mnemonic = mnemonic_;
|
||||
- Window ancestor = super.getAncestorWindow();
|
||||
- if (ancestor != null) {
|
||||
- ancestor.addKeyListener(this);
|
||||
- }
|
||||
+ addKeyListenerToAncestor();
|
||||
+ }
|
||||
+
|
||||
+ public void setParent(Container container_) {
|
||||
+ if ((_mnemonic != 0) && (_parent != null) && (_parent.get() != null))
|
||||
+ throw new RuntimeException("Removal from previous parent currently not implemented");
|
||||
+ //removeKeyListenerFromAncestor();
|
||||
+ super.setParent(container_);
|
||||
+ if (_mnemonic != 0)
|
||||
+ addKeyListenerToAncestor();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,24 +250,23 @@ public abstract class AbstractButton
|
||||
* character or a function key or cursor key was typed.
|
||||
*/
|
||||
public void keyPressed(KeyEvent ke_) {
|
||||
- if (ke_.getKeyCode() == getMnemonic()) {
|
||||
+ int code = ke_.getKeyCode();
|
||||
+ int mnem = getMnemonic();
|
||||
+ if (!ke_.isActionKey()) {
|
||||
+ code = Character.toLowerCase(code);
|
||||
+ mnem = Character.toLowerCase(mnem);
|
||||
+ }
|
||||
+ if (code == mnem) {
|
||||
doClick();
|
||||
ke_.consume();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
- * Implements the KeyListener interface; this is called if a printable
|
||||
- * (ASCII or ISO8859-1) character was typed.
|
||||
+ * Implements the KeyListener interface; this is called only if a
|
||||
+ * printable (ASCII or ISO8859-1) character was typed.
|
||||
*/
|
||||
public void keyTyped(KeyEvent ke_) {
|
||||
- // We must accept either uppercase or lowercase mnemonic characters.
|
||||
- char keyLower = Character.toLowerCase((char) ke_.getKeyChar());
|
||||
- char mnemonicLower = Character.toLowerCase((char) getMnemonic());
|
||||
- if (keyLower == mnemonicLower) {
|
||||
- doClick();
|
||||
- ke_.consume();
|
||||
- }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
package charvax.swing;
|
||||
|
||||
+import java.util.Enumeration;
|
||||
+import java.util.Vector;
|
||||
+
|
||||
+import charva.awt.Container;
|
||||
import charva.awt.EventQueue;
|
||||
import charva.awt.ItemSelectable;
|
||||
import charva.awt.Toolkit;
|
||||
import charva.awt.Window;
|
||||
import charva.awt.event.*;
|
||||
|
||||
-import java.util.Enumeration;
|
||||
-import java.util.Vector;
|
||||
-
|
||||
/**
|
||||
* This forms the base class for components that exhibit button-like
|
||||
* behavior.
|
||||
@@ -50,6 +51,12 @@ public abstract class AbstractButton
|
||||
_label = label_;
|
||||
}
|
||||
|
||||
+ protected void addKeyListenerToAncestor() {
|
||||
+ Window ancestor = super.getAncestorWindow();
|
||||
+ if (ancestor != null)
|
||||
+ ancestor.addKeyListener(this);
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Set the button's mnemonic character.
|
||||
* The mnemonic is the key which will activate this button if focus
|
||||
@@ -76,10 +83,16 @@ public abstract class AbstractButton
|
||||
*/
|
||||
public void setMnemonic(int mnemonic_) {
|
||||
_mnemonic = mnemonic_;
|
||||
- Window ancestor = super.getAncestorWindow();
|
||||
- if (ancestor != null) {
|
||||
- ancestor.addKeyListener(this);
|
||||
- }
|
||||
+ addKeyListenerToAncestor();
|
||||
+ }
|
||||
+
|
||||
+ public void setParent(Container container_) {
|
||||
+ if ((_mnemonic != 0) && (_parent != null) && (_parent.get() != null))
|
||||
+ throw new RuntimeException("Removal from previous parent currently not implemented");
|
||||
+ //removeKeyListenerFromAncestor();
|
||||
+ super.setParent(container_);
|
||||
+ if (_mnemonic != 0)
|
||||
+ addKeyListenerToAncestor();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,24 +250,23 @@ public abstract class AbstractButton
|
||||
* character or a function key or cursor key was typed.
|
||||
*/
|
||||
public void keyPressed(KeyEvent ke_) {
|
||||
- if (ke_.getKeyCode() == getMnemonic()) {
|
||||
+ int code = ke_.getKeyCode();
|
||||
+ int mnem = getMnemonic();
|
||||
+ if (!ke_.isActionKey()) {
|
||||
+ code = Character.toLowerCase(code);
|
||||
+ mnem = Character.toLowerCase(mnem);
|
||||
+ }
|
||||
+ if (code == mnem) {
|
||||
doClick();
|
||||
ke_.consume();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
- * Implements the KeyListener interface; this is called if a printable
|
||||
- * (ASCII or ISO8859-1) character was typed.
|
||||
+ * Implements the KeyListener interface; this is called only if a
|
||||
+ * printable (ASCII or ISO8859-1) character was typed.
|
||||
*/
|
||||
public void keyTyped(KeyEvent ke_) {
|
||||
- // We must accept either uppercase or lowercase mnemonic characters.
|
||||
- char keyLower = Character.toLowerCase((char) ke_.getKeyChar());
|
||||
- char mnemonicLower = Character.toLowerCase((char) getMnemonic());
|
||||
- if (keyLower == mnemonicLower) {
|
||||
- doClick();
|
||||
- ke_.consume();
|
||||
- }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
--- java/src/charvax/swing/ButtonGroup.java.orig 2005-12-17 15:27:30.000000000 +0100
|
||||
+++ java/src/charvax/swing/ButtonGroup.java 2009-11-16 10:26:42.000000000 +0100
|
||||
@@ -63,9 +63,10 @@
|
||||
* Adds the specified button to the group.
|
||||
*/
|
||||
public void add(AbstractButton button_) {
|
||||
+ if (getSelection() != null)
|
||||
+ button_.setSelected(false);
|
||||
_buttons.add(button_);
|
||||
button_.addItemListener(this);
|
||||
- button_.setSelected(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,10 +134,9 @@
|
||||
for (Enumeration e = _buttons.elements(); e.hasMoreElements();) {
|
||||
|
||||
AbstractButton b = (AbstractButton) e.nextElement();
|
||||
- if (source != b || statechange != ItemEvent.SELECTED) {
|
||||
+ if (source != b && statechange == ItemEvent.SELECTED) {
|
||||
if (b.isSelected()) {
|
||||
b._selected = false;
|
||||
- b.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
--- java/src/charvax/swing/ButtonGroup.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/ButtonGroup.java
|
||||
@@ -63,9 +63,10 @@ public class ButtonGroup
|
||||
* Adds the specified button to the group.
|
||||
*/
|
||||
public void add(AbstractButton button_) {
|
||||
+ if (getSelection() != null)
|
||||
+ button_.setSelected(false);
|
||||
_buttons.add(button_);
|
||||
button_.addItemListener(this);
|
||||
- button_.setSelected(false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,10 +134,9 @@ public class ButtonGroup
|
||||
for (Enumeration e = _buttons.elements(); e.hasMoreElements();) {
|
||||
|
||||
AbstractButton b = (AbstractButton) e.nextElement();
|
||||
- if (source != b || statechange != ItemEvent.SELECTED) {
|
||||
+ if (source != b && statechange == ItemEvent.SELECTED) {
|
||||
if (b.isSelected()) {
|
||||
b._selected = false;
|
||||
- b.setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,47 +1,47 @@
|
|||
--- java/src/charvax/swing/JLabel.java.orig Sat Dec 17 15:27:30 2005
|
||||
+++ java/src/charvax/swing/JLabel.java Mon Jan 29 09:39:30 2007
|
||||
--- java/src/charvax/swing/JLabel.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/JLabel.java
|
||||
@@ -20,6 +20,7 @@
|
||||
package charvax.swing;
|
||||
|
||||
import charva.awt.Dimension;
|
||||
+import charva.awt.Font;
|
||||
import charva.awt.Insets;
|
||||
import charva.awt.Point;
|
||||
import charva.awt.Toolkit;
|
||||
@@ -79,6 +80,10 @@ public class JLabel
|
||||
// Draw the border if it exists
|
||||
super.draw();
|
||||
|
||||
+ int attrib = 0;
|
||||
+ if (_bold)
|
||||
+ attrib |= Toolkit.A_BOLD;
|
||||
+
|
||||
/* Get the absolute origin of this component.
|
||||
*/
|
||||
Point origin = getLocationOnScreen();
|
||||
@@ -98,7 +103,7 @@ public class JLabel
|
||||
buf.setLength(_width); // truncate
|
||||
|
||||
int colorpair = getCursesColor();
|
||||
- term.addString(buf.toString(), 0, colorpair);
|
||||
+ term.addString(buf.toString(), attrib, colorpair);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,10 +174,16 @@ public class JLabel
|
||||
return "JLabel: [" + getText() + "]";
|
||||
}
|
||||
|
||||
+ public void setFont(Font font_) {
|
||||
+ _bold = ((font_.getStyle() & Font.BOLD) != 0);
|
||||
+ }
|
||||
+
|
||||
//====================================================================
|
||||
// INSTANCE VARIABLES
|
||||
|
||||
private String _labeltext;
|
||||
private int _width;
|
||||
+
|
||||
+ protected boolean _bold = false;
|
||||
|
||||
}
|
||||
package charvax.swing;
|
||||
|
||||
import charva.awt.Dimension;
|
||||
+import charva.awt.Font;
|
||||
import charva.awt.Insets;
|
||||
import charva.awt.Point;
|
||||
import charva.awt.Toolkit;
|
||||
@@ -79,6 +80,10 @@ public class JLabel
|
||||
// Draw the border if it exists
|
||||
super.draw();
|
||||
|
||||
+ int attrib = 0;
|
||||
+ if (_bold)
|
||||
+ attrib |= Toolkit.A_BOLD;
|
||||
+
|
||||
/* Get the absolute origin of this component.
|
||||
*/
|
||||
Point origin = getLocationOnScreen();
|
||||
@@ -98,7 +103,7 @@ public class JLabel
|
||||
buf.setLength(_width); // truncate
|
||||
|
||||
int colorpair = getCursesColor();
|
||||
- term.addString(buf.toString(), 0, colorpair);
|
||||
+ term.addString(buf.toString(), attrib, colorpair);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,10 +174,16 @@ public class JLabel
|
||||
return "JLabel: [" + getText() + "]";
|
||||
}
|
||||
|
||||
+ public void setFont(Font font_) {
|
||||
+ _bold = ((font_.getStyle() & Font.BOLD) != 0);
|
||||
+ }
|
||||
+
|
||||
//====================================================================
|
||||
// INSTANCE VARIABLES
|
||||
|
||||
private String _labeltext;
|
||||
private int _width;
|
||||
|
||||
+ protected boolean _bold = false;
|
||||
+
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- java/src/charvax/swing/JPasswordField.java.orig Sat Dec 17 15:27:30 2005
|
||||
+++ java/src/charvax/swing/JPasswordField.java Mon Jan 29 09:39:30 2007
|
||||
@@ -133,8 +133,10 @@ public class JPasswordField
|
||||
* UNDERLINE attribute.
|
||||
*/
|
||||
int attrib = 0;
|
||||
- if (super._enabled)
|
||||
+ if (_enabled)
|
||||
attrib |= Toolkit.A_UNDERLINE;
|
||||
+ if (_bold)
|
||||
+ attrib |= Toolkit.A_BOLD;
|
||||
|
||||
term.setCursor(origin);
|
||||
term.addString(_padding, attrib, colorpair);
|
||||
--- java/src/charvax/swing/JPasswordField.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/JPasswordField.java
|
||||
@@ -133,8 +133,10 @@ public class JPasswordField
|
||||
* UNDERLINE attribute.
|
||||
*/
|
||||
int attrib = 0;
|
||||
- if (super._enabled)
|
||||
+ if (_enabled)
|
||||
attrib |= Toolkit.A_UNDERLINE;
|
||||
+ if (_bold)
|
||||
+ attrib |= Toolkit.A_BOLD;
|
||||
|
||||
term.setCursor(origin);
|
||||
term.addString(_padding, attrib, colorpair);
|
||||
|
|
|
@ -1,40 +1,40 @@
|
|||
--- java/src/charvax/swing/JTextArea.java.orig Fri Dec 30 16:14:22 2005
|
||||
+++ java/src/charvax/swing/JTextArea.java Mon Jan 29 09:39:30 2007
|
||||
@@ -412,6 +412,10 @@ public class JTextArea
|
||||
Point tempCaret = null;
|
||||
Point caret = _caret;
|
||||
|
||||
+ int attrib = 0;
|
||||
+ if (_bold)
|
||||
+ attrib |= Toolkit.A_BOLD;
|
||||
+
|
||||
/* Get the absolute origin of this component.
|
||||
*/
|
||||
Point origin = getLocationOnScreen();
|
||||
@@ -458,7 +462,7 @@ public class JTextArea
|
||||
_rows++;
|
||||
term.setCursor(origin.addOffset(col, row));
|
||||
} else {
|
||||
- term.addChar(chr, 0, colorpair);
|
||||
+ term.addChar(chr, attrib, colorpair);
|
||||
col++;
|
||||
}
|
||||
} else { // We have reached the right-hand column.
|
||||
@@ -470,7 +474,7 @@ public class JTextArea
|
||||
_rows++;
|
||||
term.setCursor(origin.addOffset(col, row));
|
||||
} else {
|
||||
- term.addChar(chr, 0, colorpair);
|
||||
+ term.addChar(chr, attrib, colorpair);
|
||||
col++;
|
||||
_columns++;
|
||||
}
|
||||
@@ -482,7 +486,7 @@ public class JTextArea
|
||||
_rows++;
|
||||
term.setCursor(origin.addOffset(col, row));
|
||||
if (chr != '\n') // thanks to Chris Rogers for this
|
||||
- term.addChar(chr, 0, colorpair);
|
||||
+ term.addChar(chr, attrib, colorpair);
|
||||
} else {
|
||||
/* We must back-track until we get to whitespace, so
|
||||
* that we can move the word to the next line.
|
||||
--- java/src/charvax/swing/JTextArea.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/JTextArea.java
|
||||
@@ -412,6 +412,10 @@ public class JTextArea
|
||||
Point tempCaret = null;
|
||||
Point caret = _caret;
|
||||
|
||||
+ int attrib = 0;
|
||||
+ if (_bold)
|
||||
+ attrib |= Toolkit.A_BOLD;
|
||||
+
|
||||
/* Get the absolute origin of this component.
|
||||
*/
|
||||
Point origin = getLocationOnScreen();
|
||||
@@ -458,7 +462,7 @@ public class JTextArea
|
||||
_rows++;
|
||||
term.setCursor(origin.addOffset(col, row));
|
||||
} else {
|
||||
- term.addChar(chr, 0, colorpair);
|
||||
+ term.addChar(chr, attrib, colorpair);
|
||||
col++;
|
||||
}
|
||||
} else { // We have reached the right-hand column.
|
||||
@@ -470,7 +474,7 @@ public class JTextArea
|
||||
_rows++;
|
||||
term.setCursor(origin.addOffset(col, row));
|
||||
} else {
|
||||
- term.addChar(chr, 0, colorpair);
|
||||
+ term.addChar(chr, attrib, colorpair);
|
||||
col++;
|
||||
_columns++;
|
||||
}
|
||||
@@ -482,7 +486,7 @@ public class JTextArea
|
||||
_rows++;
|
||||
term.setCursor(origin.addOffset(col, row));
|
||||
if (chr != '\n') // thanks to Chris Rogers for this
|
||||
- term.addChar(chr, 0, colorpair);
|
||||
+ term.addChar(chr, attrib, colorpair);
|
||||
} else {
|
||||
/* We must back-track until we get to whitespace, so
|
||||
* that we can move the word to the next line.
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
--- java/src/charvax/swing/JTextField.java.orig Fri Dec 30 16:15:12 2005
|
||||
+++ java/src/charvax/swing/JTextField.java Mon Jan 29 09:39:30 2007
|
||||
@@ -118,11 +118,6 @@ public class JTextField
|
||||
return _columns;
|
||||
}
|
||||
|
||||
- public void setFont(Font font_) {
|
||||
- _bold = ((font_.getStyle() & Font.BOLD) != 0);
|
||||
- }
|
||||
-
|
||||
-
|
||||
/**
|
||||
* Set the action command
|
||||
*/
|
||||
@@ -189,9 +184,8 @@ public class JTextField
|
||||
* UNDERLINE attribute.
|
||||
*/
|
||||
int attrib = 0;
|
||||
- if (super._enabled)
|
||||
+ if (_enabled)
|
||||
attrib |= Toolkit.A_UNDERLINE;
|
||||
-
|
||||
if (_bold)
|
||||
attrib |= Toolkit.A_BOLD;
|
||||
|
||||
@@ -247,7 +241,7 @@ public class JTextField
|
||||
|
||||
/*
|
||||
*/
|
||||
- if (ke_.isActionKey() == false) {
|
||||
+ if (!ke_.isActionKey() && (ke_.getID() == KeyEvent.KEY_TYPED)) {
|
||||
|
||||
/* If it is a control character, ignore it.
|
||||
* @todo Do something more useful with control chars.
|
||||
@@ -414,8 +408,6 @@ public class JTextField
|
||||
|
||||
//====================================================================
|
||||
// INSTANCE VARIABLES
|
||||
-
|
||||
- protected boolean _bold = false;
|
||||
|
||||
protected int _columns;
|
||||
|
||||
--- java/src/charvax/swing/JTextField.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/JTextField.java
|
||||
@@ -118,11 +118,6 @@ public class JTextField
|
||||
return _columns;
|
||||
}
|
||||
|
||||
- public void setFont(Font font_) {
|
||||
- _bold = ((font_.getStyle() & Font.BOLD) != 0);
|
||||
- }
|
||||
-
|
||||
-
|
||||
/**
|
||||
* Set the action command
|
||||
*/
|
||||
@@ -189,9 +184,8 @@ public class JTextField
|
||||
* UNDERLINE attribute.
|
||||
*/
|
||||
int attrib = 0;
|
||||
- if (super._enabled)
|
||||
+ if (_enabled)
|
||||
attrib |= Toolkit.A_UNDERLINE;
|
||||
-
|
||||
if (_bold)
|
||||
attrib |= Toolkit.A_BOLD;
|
||||
|
||||
@@ -247,7 +241,7 @@ public class JTextField
|
||||
|
||||
/*
|
||||
*/
|
||||
- if (ke_.isActionKey() == false) {
|
||||
+ if (!ke_.isActionKey() && (ke_.getID() == KeyEvent.KEY_TYPED)) {
|
||||
|
||||
/* If it is a control character, ignore it.
|
||||
* @todo Do something more useful with control chars.
|
||||
@@ -415,8 +409,6 @@ public class JTextField
|
||||
//====================================================================
|
||||
// INSTANCE VARIABLES
|
||||
|
||||
- protected boolean _bold = false;
|
||||
-
|
||||
protected int _columns;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
--- java/src/charvax/swing/text/JTextComponent.java.orig Sat Dec 17 15:27:30 2005
|
||||
+++ java/src/charvax/swing/text/JTextComponent.java Mon Jan 29 09:39:30 2007
|
||||
--- java/src/charvax/swing/text/JTextComponent.java.orig 2016-06-20 12:40:44 UTC
|
||||
+++ java/src/charvax/swing/text/JTextComponent.java
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
package charvax.swing.text;
|
||||
|
||||
+import charva.awt.Font;
|
||||
import charvax.swing.JComponent;
|
||||
|
||||
/**
|
||||
@@ -72,6 +73,10 @@ public abstract class JTextComponent
|
||||
_editable = editable_;
|
||||
}
|
||||
|
||||
+ public void setFont(Font font_) {
|
||||
+ _bold = ((font_.getStyle() & Font.BOLD) != 0);
|
||||
+ }
|
||||
+
|
||||
//====================================================================
|
||||
// INSTANCE VARIABLES
|
||||
|
||||
@@ -84,4 +89,6 @@ public abstract class JTextComponent
|
||||
protected StringBuffer _document;
|
||||
|
||||
protected boolean _editable = true;
|
||||
+
|
||||
+ protected boolean _bold = false;
|
||||
}
|
||||
|
||||
package charvax.swing.text;
|
||||
|
||||
+import charva.awt.Font;
|
||||
import charvax.swing.JComponent;
|
||||
|
||||
/**
|
||||
@@ -72,6 +73,10 @@ public abstract class JTextComponent
|
||||
_editable = editable_;
|
||||
}
|
||||
|
||||
+ public void setFont(Font font_) {
|
||||
+ _bold = ((font_.getStyle() & Font.BOLD) != 0);
|
||||
+ }
|
||||
+
|
||||
//====================================================================
|
||||
// INSTANCE VARIABLES
|
||||
|
||||
@@ -84,4 +89,6 @@ public abstract class JTextComponent
|
||||
protected StringBuffer _document;
|
||||
|
||||
protected boolean _editable = true;
|
||||
+
|
||||
+ protected boolean _bold = false;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,8 @@ DISTNAME= FlickrNet${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}-Src-48055
|
|||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Flickr .Net API Library
|
||||
|
||||
USES= mono zip
|
||||
USES= dos2unix mono zip
|
||||
DOS2UNIX_GLOB= *.cs
|
||||
WRKSRC= ${WRKDIR}/FlickrNet
|
||||
|
||||
do-build:
|
||||
|
|
|
@ -1,16 +1,11 @@
|
|||
--- AssemblyInfo.cs.orig
|
||||
--- AssemblyInfo.cs.orig 2016-06-20 14:46:51 UTC
|
||||
+++ AssemblyInfo.cs
|
||||
@@ -61,10 +61,10 @@
|
||||
[assembly: AssemblyKeyName("")]
|
||||
|
||||
#if !WindowsCE
|
||||
-[assembly: AssemblyKeyFile("..\\..\\FlickrNet.snk")]
|
||||
+[assembly: AssemblyKeyFile("FlickrNet.snk")]
|
||||
[assembly: AllowPartiallyTrustedCallers()]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)]
|
||||
#endif
|
||||
|
||||
[assembly: CLSCompliantAttribute(true)]
|
||||
-[assembly: ComVisible(false)]
|
||||
\ No newline at end of file
|
||||
+[assembly: ComVisible(false)]
|
||||
@@ -61,7 +61,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyKeyName("")]
|
||||
|
||||
#if !WindowsCE
|
||||
-[assembly: AssemblyKeyFile("..\\..\\FlickrNet.snk")]
|
||||
+[assembly: AssemblyKeyFile("FlickrNet.snk")]
|
||||
[assembly: AllowPartiallyTrustedCallers()]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Execution = true)]
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
--- /dev/null
|
||||
--- flickrnet.pc.in.orig 2016-06-20 14:46:51 UTC
|
||||
+++ flickrnet.pc.in
|
||||
@@ -0,0 +1,8 @@
|
||||
+prefix=@prefix@
|
||||
|
|
|
@ -23,7 +23,8 @@ RUN_DEPENDS= ${JAVAJARDIR}/bcmail.jar:java/bouncycastle \
|
|||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
USES= tar:bzip2
|
||||
USES= dos2unix tar:bzip2
|
||||
DOS2UNIX_GLOB= *.java
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.6+
|
||||
USE_ANT= yes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- ant/.ant.properties.orig 2010-01-12 10:03:11.000000000 +0100
|
||||
+++ ant/.ant.properties 2010-01-12 10:05:47.000000000 +0100
|
||||
@@ -3,7 +3,7 @@
|
||||
--- ant/.ant.properties.orig 2009-11-27 12:59:39 UTC
|
||||
+++ ant/.ant.properties
|
||||
@@ -3,7 +3,7 @@ releasedate=2009-11-27
|
||||
|
||||
itext.home=../..
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- ant/compile.xml.orig 2009-06-08 02:50:15.000000000 +0200
|
||||
+++ ant/compile.xml 2011-11-24 20:55:01.000000000 +0100
|
||||
--- ant/compile.xml.orig 2009-06-08 00:50:15 UTC
|
||||
+++ ant/compile.xml
|
||||
@@ -92,11 +92,17 @@
|
||||
<include name="**/*.html"/>
|
||||
</fileset>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- ant/site.xml.orig 2014-06-05 07:50:18.377016755 +0000
|
||||
+++ ant/site.xml 2014-06-05 07:49:27.026098152 +0000
|
||||
--- ant/site.xml.orig 2009-06-08 00:50:15 UTC
|
||||
+++ ant/site.xml
|
||||
@@ -65,7 +65,7 @@
|
||||
<javadoc
|
||||
destdir="${itext.docs}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- core/com/lowagie/text/pdf/PRTokeniser.java.orig 2012-07-03 16:02:24.000000000 +0200
|
||||
+++ core/com/lowagie/text/pdf/PRTokeniser.java 2012-07-03 16:03:30.000000000 +0200
|
||||
@@ -281,6 +281,12 @@
|
||||
--- core/com/lowagie/text/pdf/PRTokeniser.java.orig 2016-06-20 15:02:42 UTC
|
||||
+++ core/com/lowagie/text/pdf/PRTokeniser.java
|
||||
@@ -281,6 +281,12 @@ public class PRTokeniser {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- core/com/lowagie/text/pdf/PdfReader.java.orig 2012-01-27 11:27:08.000000000 +0100
|
||||
+++ core/com/lowagie/text/pdf/PdfReader.java 2012-01-27 11:27:41.000000000 +0100
|
||||
@@ -1464,7 +1464,7 @@
|
||||
--- core/com/lowagie/text/pdf/PdfReader.java.orig 2016-06-20 15:02:42 UTC
|
||||
+++ core/com/lowagie/text/pdf/PdfReader.java
|
||||
@@ -1464,7 +1464,7 @@ public class PdfReader implements PdfVie
|
||||
}
|
||||
}
|
||||
thisStream *= 2;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- core/com/lowagie/text/pdf/PdfStamperImp.java.orig 2009-11-16 13:48:42.000000000 +0100
|
||||
+++ core/com/lowagie/text/pdf/PdfStamperImp.java 2012-07-12 10:27:01.000000000 +0200
|
||||
@@ -208,8 +208,17 @@
|
||||
--- core/com/lowagie/text/pdf/PdfStamperImp.java.orig 2016-06-20 15:02:42 UTC
|
||||
+++ core/com/lowagie/text/pdf/PdfStamperImp.java
|
||||
@@ -208,8 +208,17 @@ class PdfStamperImp extends PdfWriter {
|
||||
}
|
||||
// metadata
|
||||
int skipInfo = -1;
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
--- core/com/lowagie/text/xml/xmp/XmpReader.java.orig 2011-11-24 16:34:23.000000000 +0100
|
||||
+++ core/com/lowagie/text/xml/xmp/XmpReader.java 2011-11-24 16:41:54.000000000 +0100
|
||||
@@ -103,8 +103,19 @@
|
||||
public boolean replace(String namespaceURI, String localName, String value) {
|
||||
NodeList nodes = domDocument.getElementsByTagNameNS(namespaceURI, localName);
|
||||
Node node;
|
||||
- if (nodes.getLength() == 0)
|
||||
+ if (nodes.getLength() == 0) {
|
||||
+ nodes = domDocument.getElementsByTagNameNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "Description");
|
||||
+ if (nodes.getLength() == 0) return false;
|
||||
+ for (int i = 0; i < nodes.getLength(); i++) {
|
||||
+ node = nodes.item(i);
|
||||
+ Node attribute = node.getAttributes().getNamedItemNS(namespaceURI, localName);
|
||||
+ if (attribute != null) {
|
||||
+ attribute.setNodeValue(value);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
return false;
|
||||
+ }
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
node = nodes.item(i);
|
||||
setNodeText(domDocument, node, value);
|
||||
--- core/com/lowagie/text/xml/xmp/XmpReader.java.orig 2016-06-20 15:02:42 UTC
|
||||
+++ core/com/lowagie/text/xml/xmp/XmpReader.java
|
||||
@@ -103,8 +103,19 @@ public class XmpReader {
|
||||
public boolean replace(String namespaceURI, String localName, String value) {
|
||||
NodeList nodes = domDocument.getElementsByTagNameNS(namespaceURI, localName);
|
||||
Node node;
|
||||
- if (nodes.getLength() == 0)
|
||||
+ if (nodes.getLength() == 0) {
|
||||
+ nodes = domDocument.getElementsByTagNameNS("http://www.w3.org/1999/02/22-rdf-syntax-ns#", "Description");
|
||||
+ if (nodes.getLength() == 0) return false;
|
||||
+ for (int i = 0; i < nodes.getLength(); i++) {
|
||||
+ node = nodes.item(i);
|
||||
+ Node attribute = node.getAttributes().getNamedItemNS(namespaceURI, localName);
|
||||
+ if (attribute != null) {
|
||||
+ attribute.setNodeValue(value);
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
return false;
|
||||
+ }
|
||||
for (int i = 0; i < nodes.getLength(); i++) {
|
||||
node = nodes.item(i);
|
||||
setNodeText(domDocument, node, value);
|
||||
|
|
|
@ -18,7 +18,8 @@ BUILD_DEPENDS= p5-Tree-R>0:devel/p5-Tree-R \
|
|||
RUN_DEPENDS:= ${BUILD_DEPENDS}
|
||||
|
||||
NO_ARCH= yes
|
||||
USES= perl5
|
||||
USES= dos2unix perl5
|
||||
DOS2UNIX_GLOB= *.pm *.pl *.t
|
||||
USE_PERL5= configure
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
--- t/main_tests.t.orig 2015-10-16 16:34:06.906634577 +0200
|
||||
+++ t/main_tests.t 2015-10-16 16:34:56.598631573 +0200
|
||||
--- t/main_tests.t.orig 2016-06-20 14:43:13 UTC
|
||||
+++ t/main_tests.t
|
||||
@@ -3,7 +3,10 @@
|
||||
use Test::More;
|
||||
use strict;
|
||||
use warnings;
|
||||
-use rlib '../lib', './lib';
|
||||
+#use rlib '../lib', './lib';
|
||||
+use FindBin;
|
||||
+use lib "$FindBin::Bin/lib";
|
||||
+use lib "$FindBin::Bin/../lib";
|
||||
|
||||
use Geo::ShapeFile;
|
||||
use Geo::ShapeFile::Shape;
|
||||
use Test::More;
|
||||
use strict;
|
||||
use warnings;
|
||||
-use rlib '../lib', './lib';
|
||||
+#use rlib '../lib', './lib';
|
||||
+use FindBin;
|
||||
+use lib "$FindBin::Bin/lib";
|
||||
+use lib "$FindBin::Bin/../lib";
|
||||
|
||||
use Geo::ShapeFile;
|
||||
use Geo::ShapeFile::Shape;
|
||||
|
|
|
@ -11,7 +11,7 @@ PKGNAMEPREFIX= p5-
|
|||
MAINTAINER= terry@sucked-in.com
|
||||
COMMENT= Sys::CPU - Perl extension for getting CPU information
|
||||
|
||||
USES= perl5
|
||||
USES= dos2unix perl5
|
||||
USE_PERL5= configure
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
--- CPU.xs.orig 2010-09-03 23:30:18.000000000 +0100
|
||||
+++ CPU.xs 2010-09-03 23:57:31.000000000 +0100
|
||||
@@ -40,6 +40,11 @@
|
||||
#define _have_cpu_clock
|
||||
#define _have_cpu_type
|
||||
#endif
|
||||
+#ifdef __FreeBSD__
|
||||
+ #include <sys/sysctl.h>
|
||||
+ #define _have_cpu_type
|
||||
+ #define _have_cpu_clock
|
||||
+#endif
|
||||
#ifdef WINDOWS
|
||||
/* Registry Functions */
|
||||
|
||||
@@ -317,6 +322,10 @@
|
||||
int value = proc_cpuinfo_clock();
|
||||
if (value) clock = value;
|
||||
#endif
|
||||
+#ifdef __FreeBSD__
|
||||
+ size_t len = sizeof(clock);
|
||||
+ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0);
|
||||
+#endif
|
||||
#ifdef WINDOWS
|
||||
char *clock_str = malloc(MAX_IDENT_SIZE);
|
||||
/*!! untested !!*/
|
||||
@@ -356,6 +365,10 @@
|
||||
{
|
||||
char *value = malloc(MAX_IDENT_SIZE);
|
||||
int retcode = 0;
|
||||
+#ifdef __FreeBSD__
|
||||
+ size_t len = MAX_IDENT_SIZE;
|
||||
+ sysctlbyname("hw.model", value, &len, NULL, 0);
|
||||
+#endif
|
||||
#ifdef __linux__
|
||||
value = proc_cpuinfo_field ("model name");
|
||||
if (!value) value = proc_cpuinfo_field ("machine");
|
||||
--- CPU.xs.orig 2016-06-20 15:01:16 UTC
|
||||
+++ CPU.xs
|
||||
@@ -40,6 +40,11 @@
|
||||
#define _have_cpu_clock
|
||||
#define _have_cpu_type
|
||||
#endif
|
||||
+#ifdef __FreeBSD__
|
||||
+ #include <sys/sysctl.h>
|
||||
+ #define _have_cpu_type
|
||||
+ #define _have_cpu_clock
|
||||
+#endif
|
||||
#ifdef WINDOWS
|
||||
/* Registry Functions */
|
||||
|
||||
@@ -317,6 +322,10 @@ CODE:
|
||||
int value = proc_cpuinfo_clock();
|
||||
if (value) clock = value;
|
||||
#endif
|
||||
+#ifdef __FreeBSD__
|
||||
+ size_t len = sizeof(clock);
|
||||
+ sysctlbyname("hw.clockrate", &clock, &len, NULL, 0);
|
||||
+#endif
|
||||
#ifdef WINDOWS
|
||||
char *clock_str = malloc(MAX_IDENT_SIZE);
|
||||
/*!! untested !!*/
|
||||
@@ -356,6 +365,10 @@ CODE:
|
||||
{
|
||||
char *value = malloc(MAX_IDENT_SIZE);
|
||||
int retcode = 0;
|
||||
+#ifdef __FreeBSD__
|
||||
+ size_t len = MAX_IDENT_SIZE;
|
||||
+ sysctlbyname("hw.model", value, &len, NULL, 0);
|
||||
+#endif
|
||||
#ifdef __linux__
|
||||
value = proc_cpuinfo_field ("model name");
|
||||
if (!value) value = proc_cpuinfo_field ("machine");
|
||||
|
|
|
@ -16,6 +16,8 @@ OPTIONS_DEFINE= DOCS
|
|||
#RUN_DEPENDS= ${RUBY_SITELIBDIR}/runit/error.rb:devel/ruby-unit \
|
||||
# ${RUBY_SITELIBDIR}/aspectr.rb:devel/ruby-aspectr
|
||||
|
||||
USES= dos2unix
|
||||
|
||||
USE_RUBY= yes
|
||||
|
||||
NO_BUILD= yes
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- aspects/profiler/lib/rbprof.rb.orig Tue Jan 29 07:45:45 2002
|
||||
+++ aspects/profiler/lib/rbprof.rb Fri Oct 3 18:02:23 2003
|
||||
--- aspects/profiler/lib/rbprof.rb.orig 2016-06-20 14:57:12 UTC
|
||||
+++ aspects/profiler/lib/rbprof.rb
|
||||
@@ -1,5 +1,5 @@
|
||||
require 'aspectr'
|
||||
-require 'trap_method_definitions'
|
||||
+require 'rbprof/trap_method_definitions'
|
||||
|
||||
class Profiler < AspectR::Aspect
|
||||
def initialize
|
||||
require 'aspectr'
|
||||
-require 'trap_method_definitions'
|
||||
+require 'rbprof/trap_method_definitions'
|
||||
|
||||
class Profiler < AspectR::Aspect
|
||||
def initialize
|
|
@ -13,13 +13,14 @@ COMMENT= Simple API for Binary REpresentations and an UDF Library
|
|||
LICENSE= LGPL21
|
||||
|
||||
WRKSRC= ${WRKDIR}/Simple\ API\ for\ Binary\ REpresentations\ \(SABRE\)
|
||||
USES= zip
|
||||
USES= dos2unix zip
|
||||
DOS2UNIX_GLOB= *.xml *.java
|
||||
USE_JAVA= yes
|
||||
JAVA_VERSION= 1.6+
|
||||
USE_ANT= yes
|
||||
ALL_TARGET= dist
|
||||
|
||||
PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}.jar %%JAVAJARDIR%%/udflib.jar
|
||||
PLIST_FILES= ${JAVAJARDIR}/${PORTNAME}.jar ${JAVAJARDIR}/udflib.jar
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}${JAVAJARDIR}
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
--- build.xml.orig 2012-01-10 16:24:58.000000000 +0100
|
||||
+++ build.xml 2012-01-10 16:25:09.000000000 +0100
|
||||
--- build.xml.orig 2016-06-20 14:54:06 UTC
|
||||
+++ build.xml
|
||||
@@ -32,7 +32,7 @@
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="prepare">
|
||||
- <javac destdir="${build}/classes" classpathref="classpath.libs" debug="on">
|
||||
+ <javac destdir="${build}/classes" source="1.5" target="1.5" classpathref="classpath.libs" debug="on">
|
||||
<src path="${src}"/>
|
||||
</javac>
|
||||
</target>
|
||||
@@ -77,4 +77,4 @@
|
||||
<filelocation location="${build}/image" childfilesonly="true" />
|
||||
</udfimage>
|
||||
</target>
|
||||
-</project>
|
||||
\ No newline at end of file
|
||||
+</project>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="prepare">
|
||||
- <javac destdir="${build}/classes" classpathref="classpath.libs" debug="on">
|
||||
+ <javac destdir="${build}/classes" source="1.5" target="1.5" classpathref="classpath.libs" debug="on">
|
||||
<src path="${src}"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
--- src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java.orig 2010-06-28 11:44:55.000000000 +0200
|
||||
+++ src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java 2010-06-28 11:46:18.000000000 +0200
|
||||
@@ -32,6 +32,14 @@
|
||||
// Symlink // TODO: maybe support symlinks
|
||||
}
|
||||
|
||||
+ public UDFImageBuilderFile( String fileIdentifier, File sourceFile )
|
||||
+ throws Exception
|
||||
+ {
|
||||
+ this(sourceFile);
|
||||
+
|
||||
+ identifier = fileIdentifier;
|
||||
+ }
|
||||
+
|
||||
public UDFImageBuilderFile( File sourceFile )
|
||||
throws Exception
|
||||
{
|
||||
--- src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java.orig 2016-06-20 14:54:06 UTC
|
||||
+++ src/java/de/tu_darmstadt/informatik/rbg/bstickler/udflib/UDFImageBuilderFile.java
|
||||
@@ -32,6 +32,14 @@ public class UDFImageBuilderFile impleme
|
||||
// Symlink // TODO: maybe support symlinks
|
||||
}
|
||||
|
||||
+ public UDFImageBuilderFile( String fileIdentifier, File sourceFile )
|
||||
+ throws Exception
|
||||
+ {
|
||||
+ this(sourceFile);
|
||||
+
|
||||
+ identifier = fileIdentifier;
|
||||
+ }
|
||||
+
|
||||
public UDFImageBuilderFile( File sourceFile )
|
||||
throws Exception
|
||||
{
|
|
@ -13,7 +13,7 @@ COMMENT= C++ library for SDTS related development
|
|||
|
||||
LIB_DEPENDS= libboost_thread.so:devel/boost-libs
|
||||
|
||||
DOS2UNIX_FILES= sdts++/io/sio_Utils.cpp
|
||||
DOS2UNIX_GLOB= *.cpp
|
||||
USES= autoreconf bison dos2unix gmake libtool makeinfo
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_ARGS= --with-boost=${LOCALBASE}/include
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
--- doc/sdts++.texi.orig Wed Jan 12 00:48:47 2000
|
||||
+++ doc/sdts++.texi Fri Jul 28 09:12:44 2000
|
||||
--- doc/sdts++.texi.orig 2003-06-10 18:15:51 UTC
|
||||
+++ doc/sdts++.texi
|
||||
@@ -7,6 +7,10 @@
|
||||
@setfilename sdts++.info
|
||||
@settitle @code{sdts++} Library
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
--- sdts++/io/sio_8211Converter.cpp.orig 2002-11-25 07:07:43.000000000 +0900
|
||||
+++ sdts++/io/sio_8211Converter.cpp 2012-09-12 16:47:10.000000000 +0900
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <strstream>
|
||||
#include <iomanip>
|
||||
+#include <cstring>
|
||||
|
||||
#include <algorithm>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- sdts++/io/sio_8211DDRField.cpp.orig 2002-11-25 07:07:43.000000000 +0900
|
||||
+++ sdts++/io/sio_8211DDRField.cpp 2012-09-12 16:48:13.000000000 +0900
|
||||
@@ -18,6 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include <strstream>
|
||||
+#include <cstring>
|
||||
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- sdts++/io/sio_Utils.cpp.orig 2002-10-08 05:44:24.000000000 +0900
|
||||
+++ sdts++/io/sio_Utils.cpp 2012-09-12 16:50:32.000000000 +0900
|
||||
@@ -15,6 +15,7 @@
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
+#include <cstring>
|
||||
|
||||
|
||||
|
|
@ -1,46 +1,41 @@
|
|||
--- sdts++/builder/sb_Accessor.cpp.orig 2003-06-11 00:51:40.000000000 +0400
|
||||
+++ sdts++/builder/sb_Accessor.cpp 2012-03-11 20:18:18.000000000 +0300
|
||||
--- sdts++/builder/sb_Accessor.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sdts++/builder/sb_Accessor.cpp
|
||||
@@ -26,6 +26,13 @@
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+# include <osreldate.h>
|
||||
+# if __FreeBSD_version < 500035
|
||||
+# include <stlport/iosfwd>
|
||||
+# endif
|
||||
+#endif
|
||||
+namespace std { using ::mbstate_t; }
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
@@ -155,27 +162,27 @@
|
||||
|
||||
|
||||
|
||||
-static const char* module_mnemonics_[] =
|
||||
-{
|
||||
- {"CATS"},
|
||||
- {"CATD"},
|
||||
- {"DDOM"},
|
||||
- {"DDSH"},
|
||||
- {"MDOM"},
|
||||
- {"MDEF"},
|
||||
- {"DQHL"},
|
||||
- {"DQPA"},
|
||||
- {"DQAA"},
|
||||
- {"DQLC"},
|
||||
- {"DQCG"},
|
||||
- {"IDEN"},
|
||||
- {"IREF"},
|
||||
- {"LDEF"},
|
||||
- {"RSDF"},
|
||||
- {"STAT"},
|
||||
- {"XREF"},
|
||||
- {""}
|
||||
-}; // module_mnemonics
|
||||
+static const char* module_mnemonics_[] =
|
||||
+{
|
||||
+namespace std { using ::mbstate_t; }
|
||||
#include <boost/smart_ptr.hpp>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem/operations.hpp>
|
||||
@@ -157,24 +164,24 @@ sb_Accessor::~sb_Accessor( )
|
||||
|
||||
static const char* module_mnemonics_[] =
|
||||
{
|
||||
- {"CATS"},
|
||||
- {"CATD"},
|
||||
- {"DDOM"},
|
||||
- {"DDSH"},
|
||||
- {"MDOM"},
|
||||
- {"MDEF"},
|
||||
- {"DQHL"},
|
||||
- {"DQPA"},
|
||||
- {"DQAA"},
|
||||
- {"DQLC"},
|
||||
- {"DQCG"},
|
||||
- {"IDEN"},
|
||||
- {"IREF"},
|
||||
- {"LDEF"},
|
||||
- {"RSDF"},
|
||||
- {"STAT"},
|
||||
- {"XREF"},
|
||||
- {""}
|
||||
+ "CATS",
|
||||
+ "CATD",
|
||||
+ "DDOM",
|
||||
|
@ -59,7 +54,6 @@
|
|||
+ "STAT",
|
||||
+ "XREF",
|
||||
+ ""
|
||||
+}; // module_mnemonics
|
||||
|
||||
|
||||
|
||||
}; // module_mnemonics
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
--- sdts++/io/FormatParser.yy.orig 2002-10-08 05:44:24.000000000 +0900
|
||||
+++ sdts++/io/FormatParser.yy 2012-09-12 16:53:19.000000000 +0900
|
||||
--- sdts++/io/FormatParser.yy.orig 2002-10-07 20:44:24 UTC
|
||||
+++ sdts++/io/FormatParser.yy
|
||||
@@ -71,6 +71,10 @@
|
||||
|
||||
#include <iostream>
|
10
devel/sdts++/files/patch-sdts++_io_sio__8211Converter.cpp
Normal file
10
devel/sdts++/files/patch-sdts++_io_sio__8211Converter.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sdts++/io/sio_8211Converter.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sdts++/io/sio_8211Converter.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <strstream>
|
||||
#include <iomanip>
|
||||
+#include <cstring>
|
||||
|
||||
#include <algorithm>
|
||||
|
10
devel/sdts++/files/patch-sdts++_io_sio__8211DDRField.cpp
Normal file
10
devel/sdts++/files/patch-sdts++_io_sio__8211DDRField.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sdts++/io/sio_8211DDRField.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sdts++/io/sio_8211DDRField.cpp
|
||||
@@ -18,6 +18,7 @@
|
||||
#endif
|
||||
|
||||
#include <strstream>
|
||||
+#include <cstring>
|
||||
|
||||
|
||||
|
10
devel/sdts++/files/patch-sdts++_io_sio__Utils.cpp
Normal file
10
devel/sdts++/files/patch-sdts++_io_sio__Utils.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sdts++/io/sio_Utils.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sdts++/io/sio_Utils.cpp
|
||||
@@ -15,6 +15,7 @@
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
+#include <cstring>
|
||||
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- sysutils/t_basename.cpp.orig 2002-11-27 09:21:34.000000000 +0900
|
||||
+++ sysutils/t_basename.cpp 2012-09-12 16:55:05.000000000 +0900
|
||||
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
+#include <cstdlib>
|
||||
|
||||
#include "fileutils.h"
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
--- sysutils/t_dirname.cpp.orig 2002-11-27 09:21:34.000000000 +0900
|
||||
+++ sysutils/t_dirname.cpp 2012-09-12 16:54:58.000000000 +0900
|
||||
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
+#include <cstdlib>
|
||||
|
||||
#include "fileutils.h"
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
--- sysutils/t_stringutils.cpp.orig 2001-07-18 05:50:15.000000000 +0900
|
||||
+++ sysutils/t_stringutils.cpp 2012-09-12 16:44:29.000000000 +0900
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
+#include <cstdlib>
|
||||
|
||||
using namespace std;
|
10
devel/sdts++/files/patch-sysutils_t__basename.cpp
Normal file
10
devel/sdts++/files/patch-sysutils_t__basename.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sysutils/t_basename.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sysutils/t_basename.cpp
|
||||
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
+#include <cstdlib>
|
||||
|
||||
#include "fileutils.h"
|
||||
|
10
devel/sdts++/files/patch-sysutils_t__dirname.cpp
Normal file
10
devel/sdts++/files/patch-sysutils_t__dirname.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sysutils/t_dirname.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sysutils/t_dirname.cpp
|
||||
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
+#include <cstdlib>
|
||||
|
||||
#include "fileutils.h"
|
||||
|
10
devel/sdts++/files/patch-sysutils_t__stringutils.cpp
Normal file
10
devel/sdts++/files/patch-sysutils_t__stringutils.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- sysutils/t_stringutils.cpp.orig 2016-06-20 14:59:02 UTC
|
||||
+++ sysutils/t_stringutils.cpp
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
+#include <cstdlib>
|
||||
|
||||
using namespace std;
|
||||
|
|
@ -16,6 +16,8 @@ RUN_DEPENDS= mkfontdir:x11-fonts/mkfontdir \
|
|||
mkfontscale:x11-fonts/mkfontscale
|
||||
|
||||
USE_XORG= x11 xext
|
||||
USES= dos2unix
|
||||
DOS2UNIX_FILES= programs/config.sys
|
||||
MAKE_ENV= FILESDIR=${FILESDIR} STAGEDIR=${STAGEDIR}
|
||||
MAKE_ARGS= CC="${CC}"
|
||||
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
*** programs/config.sys.orig Mon Mar 27 21:27:23 1995
|
||||
--- programs/config.sys Mon Mar 27 22:19:26 1995
|
||||
***************
|
||||
*** 1,2 ****
|
||||
! device=emufs.sys /
|
||||
! stacks 9,512
|
||||
--- 1,3 ----
|
||||
! device=\emufs.sys /usr/local/lib/pcemu/C
|
||||
! stacks 9,512
|
||||
!
|
||||
--- programs/config.sys.orig 2016-06-20 15:48:12 UTC
|
||||
+++ programs/config.sys
|
||||
@@ -1,2 +1,3 @@
|
||||
-device=emufs.sys /
|
||||
+device=\emufs.sys /usr/local/lib/pcemu/C
|
||||
stacks 9,512
|
||||
+
|
||||
|
|
|
@ -12,7 +12,7 @@ COMMENT= Sega Saturn system emulator
|
|||
LICENSE= GPLv2+
|
||||
|
||||
USES= cmake dos2unix openal:soft pkgconfig
|
||||
DOS2UNIX_FILES= src/qt/YabauseThread.cpp
|
||||
DOS2UNIX_FILES= src/qt/YabauseThread.cpp src/core.h
|
||||
USE_XORG= xmu xrandr
|
||||
USE_GL= gl glu glut
|
||||
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
#endif
|
||||
+#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef _MSC_VER
|
||||
# define BSWAP16(x) ((_byteswap_ushort((x) >> 16) << 16) | _byteswap_ushort((x)))
|
||||
|
|
|
@ -10,6 +10,8 @@ DISTNAME= ${PORTNAME}
|
|||
MAINTAINER= ports@FreeBSD.org
|
||||
COMMENT= Text based card game, the objective is to get rid of all your cards
|
||||
|
||||
USES= dos2unix
|
||||
DOS2UNIX_FILES= eights.c
|
||||
NO_WRKSUBDIR= yes
|
||||
PLIST_FILES= bin/eights
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue