1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

Add edyvalue 2007.01.06, utility to print a statement of Edy card.

PR:		ports/108177
Submitted by:	Yoshihiko Sarumaru <mistral at imasy.or.jp>
This commit is contained in:
Norikatsu Shigemura 2007-01-21 14:36:17 +00:00
parent 13f08785fd
commit 88c5aa0bbe
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=182909
7 changed files with 104 additions and 0 deletions

View File

@ -53,6 +53,7 @@
SUBDIR += edict
SUBDIR += edict-fpw
SUBDIR += edict-utf-8
SUBDIR += edyvalue
SUBDIR += egg-canna
SUBDIR += eijiro-fpw
SUBDIR += elisa8x8

View File

@ -0,0 +1,31 @@
# New ports collection makefile for: edyvalue
# Date created: 18 January 2007
# Whom: Yoshihiko Sarumaru <mistral@imasy.or.jp>
#
# $FreeBSD$
PORTNAME= edyvalue
PORTVERSION= 2007.01.06
CATEGORIES= japanese
MASTER_SITES= http://www.imfj.net/people/nomura/soft/PaSoRi/
DISTNAME= EdyValue
DIST_SUBDIR= ${PORTNAME}/${PORTVERSION}
EXTRACT_SUFX= .c
EXTRACT_ONLY=
MAINTAINER= mistral@imasy.or.jp
COMMENT= Utility to print a statement of Edy card
BUILD_DEPENDS= ${LOCALBASE}/lib/libpasori.a:${PORTSDIR}/devel/libpasori
PLIST_FILES= bin/EdyValue
post-extract:
@${MKDIR} ${WRKSRC}
@${CP} -f ${DISTDIR}/${DISTFILES} ${WRKSRC}
@${CP} -f ${FILESDIR}/Makefile ${WRKSRC}
post-install:
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (edyvalue/2007.01.06/EdyValue.c) = 1b6cb4f287d9a225913dd4077973211a
SHA256 (edyvalue/2007.01.06/EdyValue.c) = 71005c7bc3f0378f8b76da4f6f908cf61b1791fb04b1a82ef8b3d66019156688
SIZE (edyvalue/2007.01.06/EdyValue.c) = 1675

View File

@ -0,0 +1,13 @@
# $FreeBSD$
PROG= EdyValue
DPADD= ${LOCALBASE}/lib/libpasori.a
LDADD= -L${LOCALBASE}/lib -lpasori
BINDIR= ${LOCALBASE}/bin
NO_MAN=
CFLAGS+= -I${LOCALBASE}/include
CFLAGS+= -Wall -W
.include <bsd.prog.mk>

View File

@ -0,0 +1,49 @@
--- EdyValue.c.orig Sat Jan 6 16:36:29 2007
+++ EdyValue.c Sun Jan 21 02:36:09 2007
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "libpasori.h"
+#include "libpasori_command.h"
#define TRUE 1
#define FALSE 0
@@ -19,21 +20,25 @@
return (FALSE);
}
-int main(void){
+int main(int argc, char **argv){
pasori* p;
felica* f;
int i;
- int m;
- int year, month, day;
+ unsigned int month, day;
uint8 b[16];
- p = pasori_open(NULL);
+ char* devpath = NULL;
+ if (argc == 2) {
+ devpath = argv[1];
+ }
+ p = pasori_open(devpath);
if(!p){
printf("error\n");
exit(-1);
}
pasori_init(p);
f = felica_polling(p,0xFE00,0,0);
+ if (f) {
printf("*** Edy Value ***\n");
i=0;
while(!felica_read_without_encryption02(f,0x170F,0,i,b)){
@@ -79,6 +84,8 @@
printf(" --> % 5d Yen (rest) ",b[14]*256+b[15]);
printf("%02X%02X%02X\n",b[1],b[2],b[3]);
i++;
+ }
+ free(f);
}
pasori_close(p);
return 0;

View File

@ -0,0 +1,4 @@
EdyValue prints statements from an Edy card.
You need a Sony RC-S320 or VAIO with FeliCa port to use this program.
WWW: http://www.imfj.net/people/nomura/soft/PaSoRi/EdyValue.html

View File

@ -0,0 +1,3 @@
******************************************************************************
Place your Edy card on PaSoRi before executing EdyValue.
******************************************************************************