5.2.6
This commit is contained in:
commit
0345d741b4
39780 changed files with 10601155 additions and 0 deletions
733
CHANGELOG.md
Normal file
733
CHANGELOG.md
Normal file
|
@ -0,0 +1,733 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 5.3.0 - undefined
|
||||
### Added
|
||||
- Screen Sharing
|
||||
|
||||
## 5.2.6 - 2024-07-22
|
||||
|
||||
### Fixed
|
||||
- Crash on Windows when using non-UTF8 characters in system username.
|
||||
- Update SDK to 5.3.72
|
||||
|
||||
## 5.2.5 - 2024-07-10
|
||||
|
||||
### Fixed
|
||||
- Case sensitive issue with sip attributes on LDAP search.
|
||||
- Update SDK to 5.3.68
|
||||
|
||||
## 5.2.4 - 2024-04-11
|
||||
|
||||
### Fixed
|
||||
- File permission after auto downloading a file.
|
||||
- Update SDK to 5.3.41
|
||||
|
||||
### Added
|
||||
- Option to mute chat reactions.
|
||||
- Notify reactions only on local accounts messages.
|
||||
|
||||
## 5.2.3 - 2024-03-29
|
||||
|
||||
### Fixed
|
||||
- Call logs : incoming filter will not display missed calls.
|
||||
- Call logs synchronization.
|
||||
- URI handlers when mixing remote provisioning and call.
|
||||
- Blinking on resize or Ui updates on screen that have low frame rates.
|
||||
- Timezones and Windows fix.
|
||||
- Update SDK to 5.3.39.
|
||||
|
||||
## 5.2.2 - 2024-03-11
|
||||
|
||||
### Fixed
|
||||
- Audio latency and bad echo behavior when going to media settings while being in call.
|
||||
- About panel in readonly
|
||||
- Wrong day offset in start date when scheduling a conference.
|
||||
- Empty route can now be set in account settings.
|
||||
- Network remote file can be used in chat attachment on Windows.
|
||||
- Crash on forwarding a message to a new secure chat room.
|
||||
- URI handlers and remote provisioning.
|
||||
- Avoid to remove file on cancelling upload and fix cancelling file transfers.
|
||||
- Update SDK to 5.3.34.
|
||||
|
||||
### Added
|
||||
- '[ui] logs_max_size' : option to set the max size of one log file.
|
||||
- '[ui] notification_origin' : option to specify where to display notifications (only supported: 0=bottom-right and 1=top-right).
|
||||
- '[ui] systray_notification_blink' : option to activate/deactivate the blinking systray on unread notifications.
|
||||
- '[ui] systray_notification_global' : option to display notification number from all accounts or only selected.
|
||||
- '[ui] systray_notification_filtered' : option to filter the notification number (not count if chat room is muted).
|
||||
- Keyboard shortcuts:
|
||||
* 'Ctrl+Shift+W' (or V): accept with video the last incoming call.
|
||||
* 'Ctrl+Shift+A': accept without video the last incoming call.
|
||||
* 'Ctrl+Shift+D': terminate the last call.
|
||||
* 'Ctrl+Shift+E': Enable/disable echo cancellation.
|
||||
* 'Ctrl+Shift+L': Unmute/Mute speaker.
|
||||
* 'Ctrl+Shift+M': Unmute/Mute microphone.
|
||||
- Request application focus when hovering a call notification.
|
||||
|
||||
## 5.2.1 - 2024-02-01
|
||||
|
||||
### Fixed
|
||||
- URI handlers when no domain are provided like tel:number.
|
||||
- Empty page on first date in date picker.
|
||||
- Ephemeral deactivation while restarting it.
|
||||
- Fix rates on capture audio (SDK).
|
||||
- Update SDK to 5.3.14.
|
||||
|
||||
### Added
|
||||
- Remove trailing newlines in smart search bar.
|
||||
|
||||
## 5.2.0 - 2023-12-22
|
||||
|
||||
### Fixed
|
||||
- Download path and emojis size settings
|
||||
- Mac emoji font.
|
||||
- Better SVG preview in thumbnails.
|
||||
- Unstable forward message menu.
|
||||
- Display all call logs on default account.
|
||||
- Avoid sending composing when openning chat.
|
||||
- Crashes.
|
||||
- Double chat rooms.
|
||||
- Update SDK to 5.3.1
|
||||
|
||||
### Added
|
||||
- Dedicated call history view.
|
||||
- Chat reactions
|
||||
- Update UI layouts.
|
||||
- Spellchecker
|
||||
- LDAP search with multi-criteria.
|
||||
- Export Desktop entry from menu for Linux.
|
||||
|
||||
## Removed
|
||||
- Call events from chats.
|
||||
- Missed call count in application side (done by SDK).
|
||||
|
||||
## 5.1.3 - Undefined
|
||||
|
||||
### Fixed
|
||||
- Wrong dates from DatePicker.
|
||||
- Update SDK to 5.2.98
|
||||
- Date from scheduling a meeting from chat room.
|
||||
|
||||
## 5.1.2 - 2023-08-25
|
||||
|
||||
### Fixed
|
||||
- Mac Freeze on Active Speaker.
|
||||
- Apply Accessibility workaround on all systems.
|
||||
- Null access on QML object while being in fullscreen.
|
||||
|
||||
## 5.1.1 - 2023-08-24
|
||||
|
||||
### Fixed
|
||||
- Windows freeze on Accessibility and with Qt < 5.15.10
|
||||
- Update SDK to 5.2.97
|
||||
|
||||
## 5.1.0 - 2023-08-23
|
||||
|
||||
### Fixed
|
||||
- Primary color for links in chat.
|
||||
- Bubble chat layout.
|
||||
- Camera stickers and conference layout stabilization.
|
||||
- Robot voice with some devices (SDK fix).
|
||||
- Crash after adding an account (SDK fix).
|
||||
- Smart search bar behavior on empty text and focus changing.
|
||||
|
||||
### Added
|
||||
- VFS Encryption.
|
||||
- File viewer in chats (Image/Animated Image/Video/Texts/Pdf) with the option to export the file for VFS mode.
|
||||
- Accept/decline CLI commands.
|
||||
- Colored Emojis with its own font family.
|
||||
- Option to set RLS URI in settings.
|
||||
- Option to display only usernames when showing SIP addresses.
|
||||
- Option to change the max results of the Magic Search bar.
|
||||
- OAuth2 connection to retrieve remote provisioning (Experimental and not usable without configuration).
|
||||
- Create an account with a manual validation (external captcha as of 5.1.0).
|
||||
- Add/View contact from a message.
|
||||
- Mute option for each chatrooms.
|
||||
- New Chat Layout.
|
||||
- Display last seen for contacts.
|
||||
- New language support: Czech
|
||||
- An option to set dial prefix and its use on numbers.
|
||||
- Fetch remote provisioning from URI handler and with confirmation.
|
||||
- Emojis picker.
|
||||
- Text edit in chat can now understand rich texts.
|
||||
- Create thumbnails into memory instead of disk.
|
||||
- Display video thumbnails.
|
||||
- Crop thumbnail and pictures if distored.
|
||||
- Enable registration from accounts list.
|
||||
- Update SDK to 5.2.95
|
||||
|
||||
### Removed
|
||||
- Picture zoom on mouse over.
|
||||
|
||||
## 5.0.18 - 2023-06-16
|
||||
|
||||
### Fixed
|
||||
- Robot voice with some devices (SDK fix).
|
||||
- Crash from Lime db failure (SDK fix).
|
||||
- Loading optimization (SDK fix).
|
||||
- Update SDK to 5.2.75
|
||||
|
||||
## 5.0.17 - 2023-06-01
|
||||
|
||||
### Fixed
|
||||
- Section date timezone and conferences timezone.
|
||||
- Couldn't select the default account without selecting another one before.
|
||||
- Display a message about not having a configured account instead of displaying the local one. Local address can still be accessible from settings if activated.
|
||||
- Display Assistant at home if no account has been set.
|
||||
- Update SDK to 5.2.67 (Mac crash on resources)
|
||||
|
||||
## 5.0.16 - 2023-05-12
|
||||
|
||||
### Fixed
|
||||
- Section date timezone in chat.
|
||||
- Use custom font for chat compose area.
|
||||
- Calling conference from history.
|
||||
- Speaking border display.
|
||||
- Replace double click on avatar by a simple click for copying address into the SmartSearchBar.
|
||||
- Update SDK to 5.2.60 (Active Speaker fix)
|
||||
|
||||
## 5.0.15 - 2023-04-11
|
||||
|
||||
### Fixed
|
||||
- Fix using only username in URI handlers.
|
||||
- Chat flickering on load.
|
||||
- Portait thumbnails.
|
||||
- Color of busy indicator when the chat is loading.
|
||||
- Incoming ephemerals weren't removed without reloading chat rooms.
|
||||
- Update SDK to 5.2.42
|
||||
|
||||
### Added
|
||||
- New language support: Czech
|
||||
- Multiple files can be selected as attachement.
|
||||
|
||||
## 5.0.14 - 2023-03-16
|
||||
|
||||
## Fixed
|
||||
- Downgrade Qt back to 5.15.2 because of Qt commercial licence that break other GPL licences.
|
||||
- Show file extension image instead of thumbnails if image's size factor is too low/high.
|
||||
- Update SDK to 5.2.35 (ZLib vulnerability).
|
||||
|
||||
## 5.0.13 - 2023-03-13 - postprone to 5.0.14
|
||||
|
||||
### Fixed
|
||||
- Conference layout refreshing on creation.
|
||||
- Crash and display of local conferences.
|
||||
- Crash on chat rooms with default account.
|
||||
- Show display name for local accounts.
|
||||
- Update SDK to 5.2.32
|
||||
|
||||
## 5.0.12 - 2023-03-01 - postprone to 5.0.14
|
||||
|
||||
### Fixed
|
||||
- Some case of unwanted settings folders creation.
|
||||
- Replace black thumbnails that contains transparency by white color.
|
||||
- Unusable Contact sheet.
|
||||
- Update SDK to 5.2.28 (cleanup orphan NAT sections and race condition on MSTicker threads).
|
||||
|
||||
## 5.0.11 - 2023-02-24 - postprone to 5.0.14
|
||||
|
||||
### Fixed
|
||||
- Crash on ending call in conference.
|
||||
- Icon transparency generations on icon.ico
|
||||
- Remove duplicated nat policies.
|
||||
- Remove unadmin feature to self because of not fully supported.
|
||||
- Save Stun/Turn proxy configuration.
|
||||
- Crash after showing participant devices.
|
||||
- Display of non-Ascii avatar
|
||||
- Switch off camera at startup.
|
||||
- Upgrade Qt to 5.15.12
|
||||
- Update SDK to 5.2.24 (Fix unresponsive video conference on Mac/Windows)
|
||||
|
||||
## 5.0.10 - 2023-02-02
|
||||
|
||||
### Fixed
|
||||
- Remove blank notification when declining incoming call.
|
||||
- Remove blank page when opening calls window and add a waiting step while connecting to call.
|
||||
- Camera activation issue based on call status.
|
||||
- Crash when editing contacts from chat.
|
||||
- Contacts synchronization on creation.
|
||||
- Contact menu in secure chats.
|
||||
- Remove FFMPEG from dependencies as it is no more needed.
|
||||
|
||||
## 5.0.9 - 2023-01-31
|
||||
|
||||
### Fixed
|
||||
- Display hidden scrollbars.
|
||||
- Display hidden error icon on messages.
|
||||
- Display recordings page on Mac.
|
||||
- Update SDK to 5.2.19 (fix crash)
|
||||
|
||||
## 5.0.8 - 2023-01-20
|
||||
|
||||
### Fixed
|
||||
- Qt 5.12 compatibility on recordings.
|
||||
|
||||
## 5.0.7 - 2023-01-19
|
||||
|
||||
### Added
|
||||
- Interactive preview in call:
|
||||
* Movable on holding mouse's left click.
|
||||
* Resizeable on mouse's wheel.
|
||||
* Reset on mouse's right click (first for size if changed, second for position)
|
||||
- Hide the active speaker from the mini views.
|
||||
- Display recordings list from the burger menu.
|
||||
|
||||
### Fixed
|
||||
- Mini views layout on actives speaker.
|
||||
- Set 1 month to default message expires.
|
||||
- User-agent format compliance
|
||||
- Update SDK to 5.2.15
|
||||
|
||||
## 5.0.6 - 2023-01-10
|
||||
|
||||
### Fixed
|
||||
- URI Handlers to a conference.
|
||||
- Display application icon and estimated size in Windows programs list.
|
||||
|
||||
## 5.0.5 - 2023-01-09
|
||||
|
||||
### Fixed
|
||||
- Crash at startup.
|
||||
- Deploy missing OpenSSL libraries on Windows (fix blank message on image url).
|
||||
- Update SDK to 5.2.10
|
||||
|
||||
## 5.0.4 - 2022-12-28
|
||||
|
||||
### Fixed
|
||||
- Volume gauge in multimedia parameters while being in call.
|
||||
|
||||
## 5.0.3 - 2022-12-21
|
||||
|
||||
### Fixed
|
||||
- Missing SetThreadDescription entry point on Windows 7/8 (SDK update)
|
||||
- Add more margin on message's IMDN that was behind the icon menu in chats.
|
||||
- Remove JSON dependencies on unused Flexiapi.
|
||||
- Crash at startup about missing contact address on account (SDK fix)
|
||||
|
||||
## 5.0.2 - 2022-12-13
|
||||
|
||||
### Fixed
|
||||
- Default Language didn't match with the system language (Qt bug).
|
||||
|
||||
## 5.0.1 - 2022-12-09
|
||||
|
||||
### Fixed
|
||||
- RF3987 to allow IRI parsing in chats.
|
||||
- Image display in chats from an URL.
|
||||
- Display a notification of all kind of messages.
|
||||
|
||||
## 5.0.0 - 2022-12-07
|
||||
|
||||
### Added
|
||||
- Video conference and iCalendars.
|
||||
- Make a meeting directly from a group chat.
|
||||
- New call layouts.
|
||||
- Display a waiting room before going into a conference.
|
||||
- Log viewer.
|
||||
- Read contacts from all friends lists.
|
||||
- Option to set the display name in "using an account" tab of assistant.
|
||||
- Long pressed buttons.
|
||||
- Date and Time pickers.
|
||||
- Phone dialpad on main window.
|
||||
- Animated file in chats/notifications.
|
||||
- Round progress bar for transferring a file and allow to cancel it.
|
||||
- Hide all accounts if their custom parameter 'hidden' is set to 1.
|
||||
- Right-click on a timeline will show a slide menu to do actions on the timeline.
|
||||
- Post quantum ZRTP.
|
||||
- Windows stack trace dumps into logs on crash.
|
||||
- Mark as Read synchronized between devices.
|
||||
- Merge messages into one notification to avoid spam.
|
||||
- Design overhaul on calls.
|
||||
- Audio devices can be changed while being in call.
|
||||
- Use a cryptographic checksum when downloading openH264 from CISCO (Update to 2.2.0)
|
||||
|
||||
### Fixed
|
||||
- Crash on exit.
|
||||
- Crash when using no account.
|
||||
- Many Windows crashs (camera, incall)
|
||||
- Memory stability.
|
||||
- Clean 3 chat behaviors : Leave chat room (in group info section of conversation menu), erase history (in conversation's menu), delete chat room (in slide menu, or if chat room is empty and left)
|
||||
- On Mac, close windows instead of minimizing them.
|
||||
- Running application detection on Install/Uninstall.
|
||||
- SVG Icons in better quality.
|
||||
- Event timestamps.
|
||||
- Optimizations and more minor fixes.
|
||||
|
||||
## 4.4.10 - 2022-09-20
|
||||
|
||||
### Fixes
|
||||
- Lime exceptions because of unknown boundaries.
|
||||
- AppimageTool update for code signing.
|
||||
|
||||
## 4.4.9 - 2022-08-29
|
||||
|
||||
### Fixes
|
||||
- Update SDK to fix a crash on startup due to a test on a removed participant device.
|
||||
- Use default values for new accounts in settings panel.
|
||||
|
||||
### Added
|
||||
- Add 'sip' scheme in authentication popup.
|
||||
|
||||
## 4.4.8 - 2022-07-05
|
||||
|
||||
### Fixes
|
||||
- Display name are based on friends (coming from local or LDAP server) and caller address only.
|
||||
- Running application detection for uninstalling.
|
||||
|
||||
## 4.4.7 - 2022-07-01
|
||||
|
||||
### Fixes
|
||||
- When receiving a SIP URL, copy it in Smart search bar instead of openning conversation.
|
||||
- Update SDK to prepare video conference and improve DTLS handshakes.
|
||||
|
||||
## 4.4.6 - 2022-06-14
|
||||
|
||||
### Fixed
|
||||
- Url version check and selection synchronisation.
|
||||
- Show display name of the caller if it exists instead of call logs.
|
||||
|
||||
## 4.4.4 - 2022-06-01
|
||||
|
||||
### Fixed
|
||||
- Revert ordering messages from receiving time.
|
||||
- Some crashes on Wasapi.
|
||||
- Update SDK to 5.1.41
|
||||
|
||||
## 4.4.3 - 2022-05-30
|
||||
|
||||
### Fixed
|
||||
- Crash on searchs with special characters
|
||||
- Update SDK to 5.1.38
|
||||
|
||||
## 4.4.2 - 2022-05-25
|
||||
|
||||
### Added
|
||||
- Based on LinphoneSDK 5.1.36
|
||||
- Add Sanitizer build.
|
||||
- Version types selection for version checker.
|
||||
|
||||
### Fixed
|
||||
- Order messages from receiving time.
|
||||
- Fix H264 download URL on Linux.
|
||||
- Hide Admin status in One-to-one chats.
|
||||
|
||||
## 4.4.1 - 2022-04-06
|
||||
|
||||
### Fixed
|
||||
- Fix codec downloading on Windows and popup progress bar.
|
||||
|
||||
## 4.4.0 - 2022-04-04
|
||||
|
||||
### Added
|
||||
- Features:
|
||||
* Messages features : Reply, forward (to contact, to a SIP address or to a timeline), Vocal record and play, multi contents, preview.
|
||||
- Add a feedback on fetching remote provisioning when it failed.
|
||||
- Option to enable message notifications.
|
||||
- CPIM on basic chat rooms.
|
||||
- Device name can be changed from settings.
|
||||
- New event on new messages in chat and a shortcut to go to the end of chat if last message is not shown.
|
||||
- Shortcut in Reply to message's origin.
|
||||
- Allow redirected downloads (bzip2/OpenH264)
|
||||
- Auto-download message files, editable in settings (10Mb as default)
|
||||
- 64bits application on Windows
|
||||
- Based on Linphone SDK 5.1
|
||||
|
||||
### Fixed
|
||||
- Simplify filtering timelines with 2 modes (minimal or exhaustive) and on 3 kind of search : security level, simple/group chats, ephemerals.
|
||||
- Sort timelines by taken account of unread events in chat rooms.
|
||||
- Fix systemTrayIcon that could be cloned on each restart.
|
||||
- Fix thumbnails display in notification.
|
||||
- Fix errors on Action-Buttons on restart.
|
||||
- Enable G729 on public builds.
|
||||
- Take account of return key on Numpad.
|
||||
- Huge messages are better shown and with less flickering.
|
||||
- High CPU consumption on idle state.
|
||||
- Hide deleted/terminated chat rooms.
|
||||
- Adapt UserAgent with device name.
|
||||
- Video freeze on network change.
|
||||
- Support OpenGL 4.1 and GLSL 4.10.
|
||||
- Fix some glitches on Apple M1.
|
||||
- Audio errors in settings when using different audio format between input and output.
|
||||
- Set default log size to 50MB
|
||||
- Reduce ICE candidates on Windows.
|
||||
- Show logs in console on Windows.
|
||||
- Crash on the smart search bar.
|
||||
|
||||
|
||||
## 4.3.2
|
||||
|
||||
### Fixed
|
||||
|
||||
- ALSA volumes can be view/changed while being in call.
|
||||
- Remove constraints on actions (call/chat) that were based on friends capabilities.
|
||||
- Unblock secure group chat activation.
|
||||
- Unselect current contact if history call view is displayed.
|
||||
- Show chat actions in history view.
|
||||
- Group chat creation : If no groupchat capabilities has been found in recent contacts, ignore test on capability and display them.
|
||||
|
||||
## 4.3.1 - 2021-11-04
|
||||
|
||||
### Added
|
||||
|
||||
- Features:
|
||||
* New version behavior : Manual check for new version, option to activate the automatic check and a way to set the URL.
|
||||
* A banner is shown when copying text.
|
||||
* Options to enable standard and secure chats.
|
||||
* Add tunnel support if build.
|
||||
* Overhaul of color managment and use monochrome images.
|
||||
* Change Contact Edit and SIP Addresses selections to start a standard chat or a secure one.
|
||||
* Call history button in the timeline panel.
|
||||
* Timeout of incoming call notification is now based on `inc_timeout`
|
||||
* More actions in contact edit panel (call/video call).
|
||||
* Allow to make a readonly variable in configuration (only for enabling chats yet).
|
||||
|
||||
### Fixed
|
||||
|
||||
- Better quality of icons.
|
||||
- Crash on start and on exit.
|
||||
- Allow to use a secure chat room to be used when calling (set by context : encrypted call/secure chat enabled).
|
||||
- History buttons that should not appear if chat room mode is not activated.
|
||||
- Keep the fullscreen mode when receiving a notification.
|
||||
- Clicking on the fullscreen action on the call window will go to the fullscreen if exists.
|
||||
- Fix scrolling speed and add a cache in lists.
|
||||
- Fix Mac crash by adding an option to deactivate mipmap.
|
||||
- Add more translations.
|
||||
- Mac: Enable automatic graphics switching indicating whether an OpenGL app may utilize the integrated GPU.
|
||||
- Version checking that could request an update to older version.
|
||||
- A crash on authentication with empty configs.
|
||||
- Main search with UTF8
|
||||
- When requested, remove all history of a chat room and not only desplayed entries.
|
||||
- Fix missing qml variables.
|
||||
- Add more debug logs.
|
||||
- Use macqtdeploy when building in order to use binary without having enabling packaging.
|
||||
|
||||
## 4.3.0 - 2021-10-20
|
||||
|
||||
### Added
|
||||
|
||||
- Features:
|
||||
* Chat groups with administrator mode, participants management and devices display.
|
||||
* Secure chat rooms for 1-1 and group chat using LIME end-to-end encryption.
|
||||
* Ephemerals Chat rooms (per-participant mode).
|
||||
* Attended transfer.
|
||||
* LDAP integration: settings allow remote LDAP servers to be configured. Contacts can then be searched in the smart search bar, and during incoming call the display name of the caller is automatically retrieved from the LDAP server.
|
||||
* Address book connectors : custom plugins can now be imported from settings in order to be used to synchronize contacts.
|
||||
|
||||
- Enhance user experience :
|
||||
* Show subject in notifications for group chats.
|
||||
* Attended transfer.
|
||||
* Chat area is no more fixed but adapts to content.
|
||||
* Click on notification bubble in top left account lead to the call history view.
|
||||
* Double-Click on avatar in conversation to fill the smart search bar with the participant address.
|
||||
* Allow to hide or show the timeline panel.
|
||||
* Allow to hide or show empty chat rooms in settings.
|
||||
* Messages font can now be changed in settings.
|
||||
* Sort contact list using System Locale.
|
||||
* In fullscreen mode, the preview size can be changed by using mouse wheel.
|
||||
* Echo calibration in settings view.
|
||||
* Autostart for AppImage.
|
||||
* Add more tooltips.
|
||||
* Add a forgotten password link in assistant.
|
||||
|
||||
- Search and filtering features:
|
||||
* Search in timeline from subject/addresses.
|
||||
* Search in messages.
|
||||
* Filter timelines by the kind of chat rooms (1-1, group chats) and modes (secure and ephemerals).
|
||||
|
||||
- Chat room management:
|
||||
* Updatable subject by clicking on it.
|
||||
* Upgrade security level by authenticating participants.
|
||||
* Add more events in chat rooms like chat rooms status, participants updates, security level updates, ephemerals activations.
|
||||
|
||||
- In Chat, allow custom menu to appear by removing the repeating key when holding it. On Mac, there is an accent menu for this feature.
|
||||
- Add URI handler configuration : `linphone-config` to fetch a configuration file.
|
||||
- Fetch a configuration file from a CLI command/URI Handlers :
|
||||
* sip:user@domain?method=call&fetch-config=base64(scheme://url)
|
||||
* linphone-config://url
|
||||
* linphone-config:fetch-config=base64(scheme://url)
|
||||
* linphone --fetch-config=scheme://url
|
||||
* linphone "<method> fetch-config=scheme://url"
|
||||
- Options to audio codec can be used and stored.
|
||||
- Devices can be selected in linphone configuration file from a regex rule.
|
||||
- Opus can now use `packetlosspercentage` and `useinbandfec` configuration.
|
||||
- A silence file have been added : `silence.mkv` and can be used to switch off some musics (hold_music).
|
||||
- Use of new mediastreamer2 MSQOgl filter as video display backend (based on QQuickFramebufferObject).
|
||||
- MSYS2 support for Windows.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Cursor shape of mouse is changed when hovering on buttons.
|
||||
- When clicking on a chat notification, it will close it.
|
||||
- Persistent call bubble notifications.
|
||||
- Fix on Missed calls and messages count bubbles.
|
||||
- Unmatched room when using malformed username.
|
||||
- Contact names handle special characters.
|
||||
- UTF8 characters on Windows.
|
||||
- Mark as Read only if in foreground.
|
||||
- Show avatar and username once for a same kind of message.
|
||||
- Load optimizations.
|
||||
- Refactoring data modelisation and colors management.
|
||||
- On Mac : Camera freeze and black screen when using third-party.
|
||||
- Prevent opening call Window if the option to stay in background has been activated.
|
||||
- Crash while searching contacts.
|
||||
- Stop receiving messages when proxy has been deleted.
|
||||
- Transfer menu of calls : Dynamic size for texts.
|
||||
- XCode build wasn't fully supported.
|
||||
- Sort languages in the UI settings.
|
||||
|
||||
## 4.2.5 - 2020-12-18
|
||||
|
||||
### Added
|
||||
|
||||
-iLBC support
|
||||
|
||||
### Fixed
|
||||
|
||||
- VP8 freeze
|
||||
- Audio quality distortion
|
||||
- OSX deployment target propagated to linphone SDK
|
||||
|
||||
## 4.2.4 - 2020-11-21
|
||||
|
||||
### Added
|
||||
|
||||
- Play DTMF when receiving it and show the Dialpad on outgoing call to allow sending DTMF
|
||||
- Transport protocol deactivation has been replaced by not listening ports
|
||||
- Show all call logs when clicking on the `previously` bar in the left panel
|
||||
- A call log can be used to callback or add the contact in friends list
|
||||
|
||||
### Fixed
|
||||
|
||||
- Displaying names in UTF8
|
||||
- Keep unsend typed message in memory when changing of chat room
|
||||
- Log files have Qt logs
|
||||
- Missing `sqlite3` backend
|
||||
- Use the more generic `linphone` folder and not `Linphone` for installation
|
||||
- Simplify build process to use install keyword
|
||||
- Links errors like liblinphone++.so.10
|
||||
|
||||
## 4.2.3 - 2020-10-09
|
||||
|
||||
### Added
|
||||
|
||||
- Add support to tel and callto protocols
|
||||
- Allow Pulseaudio to switch devices automatically. For example, it will mute all applications that have music when receive a call from Linphone.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Contact name can contain special characters
|
||||
- Avoid to reduce window if it is currently maximized when clicking on contacts
|
||||
- Cleaner use of Windows registries
|
||||
|
||||
## 4.2.2 - 2020-07-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- Crash on Opus
|
||||
|
||||
## 4.2.1 - 2020-07-03
|
||||
|
||||
### Fixed
|
||||
- Crash on authentifications
|
||||
- Multiple Popups are no longer ignored and are open in a StackView.
|
||||
|
||||
## 4.2.0 - 2020-06-26
|
||||
|
||||
### Added
|
||||
|
||||
- Added a `CLI` function in order to support `URI handlers` from browsers. Help is available with `linphone --cli-help`. (See also: https://wiki.linphone.org/xwiki/wiki/public/view/Linphone/URI%20Handlers%20%28Desktop%20only%29/).
|
||||
- Improved general audio/video quality thanks to better rate control algorithms in liblinphone and mediastreamer2.
|
||||
- More efficient echo cancellation.
|
||||
- `OpenH264` codec can be downloaded and used in the application from Cisco website.
|
||||
- `G729` codec can be used in the application.
|
||||
- Improved High DPI Displays support for 4K screens.
|
||||
- On multiscreens, when choosing full screen mode during a call, the call screen open in the current screen. The old behaviour kept the call screen in the primary screen.
|
||||
- Detect audio/video hardware changes while using settings.
|
||||
- Updatable audio/video devices while in call.
|
||||
|
||||
- Added an option to automatically show Dialpad.
|
||||
- Dialpad supports A, B, C and D keys.
|
||||
- Dialpad supports keyboard when hovering on it.
|
||||
- DTMF sound played when sent.
|
||||
|
||||
- Added an option to keep windows in background when a call is received.
|
||||
- Added an option to allow Linphone to be launched automatically with the system (autostart).
|
||||
- Added an option to play sound notification when an incoming chat message is received.
|
||||
- Added Call tools in Fullscreen mode (medias settings, security, mutable speaker).
|
||||
- Audio settings display the microphone being used and allow you to adjust capture and playback gains.
|
||||
- Conference participants are mutable by clicking on them.
|
||||
- Added the possibility to record calls automatically.
|
||||
- Moved logs folder without restart.
|
||||
- Added caller and callee information into file names of recordings.
|
||||
|
||||
- Enhanced interface for switching between multiple SIP accounts: the timeline now shows activity for the currently selected SIP account only.
|
||||
- Timeline uses current proxy config info and show data only on selected profile.
|
||||
- Tooltips can be shown in multiple lines.
|
||||
- Display the name of the caller in incoming notifications.
|
||||
- Notifications are shown in all available screens.
|
||||
- Display unread message count in system tray (Linphone icon).
|
||||
- Display unread chat message count and missed calls in `Manage Accounts` dialog and in `Main Window`.
|
||||
- Added a media parameter dialog in the `Call View` to select devices and set volume.
|
||||
- Display a spinner when a message is being sent.
|
||||
- Disabled screensaver on fullscreen video call.
|
||||
- New logo, icons and installer assets.
|
||||
|
||||
- New Linux deployment (Appimage).
|
||||
- Supports chinese, danish, french, english, german, hungarian, italian, japanese, lithuanian, portuguese, russian, spanish, swedish, turkish, ukrainian from community contributions.
|
||||
|
||||
- Use Native BZip2 instead of Embedded Minizip to extract `OpenH264` codec.
|
||||
- App Nap avoiding for MacOs.
|
||||
- Simplified building process.
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded to use QT 5.12.
|
||||
- Depends on linphone-sdk project (numerous direct submodules removed).
|
||||
- License changed from GPLv2 to GPLv3.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Removed `:` separator from file names of recordings because it is not allowed on Windows.
|
||||
- Avoided mark `as read` on selected chat rooms if window is not active.
|
||||
- Search box in main page will not reset text when clicking on it.
|
||||
- More stable account authentifications.
|
||||
- Message status behaviour : Resuming status when changing logs, cursor shapes updates, bind the resend message action to error icon.
|
||||
- Apple permissions that could lead to muted microphone.
|
||||
- Incoming call notification window (sometimes not showing).
|
||||
|
||||
### Removed
|
||||
|
||||
- `Prepare.py` configuration.
|
||||
- Remove useless splashscreen.
|
||||
- `Minizip` dependencies.
|
||||
- `Flatpak` support.
|
||||
|
||||
## 4.1.0 - 2017-07-19
|
||||
|
||||
### Added
|
||||
|
||||
- Add tooltips on `recording` and `screenshot` buttons in `Calls Window`.
|
||||
- Show notifications on `recording` and `screenshot`.
|
||||
- Show `XXX is typing...` in `Timeline` and `Chat View`.
|
||||
- Handle correctly `SIGINT`.
|
||||
- Handle clicks on SIP URI in chat messages.
|
||||
- Show video framerate in `Calls Stats`.
|
||||
- Add a `Logs` menu entry in `Settings Window`, it provides send, remove, activate buttons...
|
||||
- Supports EXIF orientation for file transfer images preview.
|
||||
- Echo canceller supports 48kHz.
|
||||
- Better GUI when a proxy config is modified in `Settings Window`.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Handle correctly ringer device changes in `Settings Window`.
|
||||
- In `Video Settings`, display FPS field only in `custom preset` mode.
|
||||
- Use now the directory containing user documents files for saved video/audio/screenshots.
|
||||
- Update `Chat View` correctly if it is used in many windows.
|
||||
- Update correctly selected language when app is restarted.
|
||||
- Avoid a deadlock on Mac OS when a call ends in fullscreen mode.
|
||||
- Application can be started from one binary only.
|
||||
- Single instance is now supported with flatpak. (It uses D-Bus.)
|
260
CMakeLists.txt
Normal file
260
CMakeLists.txt
Normal file
|
@ -0,0 +1,260 @@
|
|||
################################################################################
|
||||
#
|
||||
# Copyright (c) 2010-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This file is part of linphone-desktop
|
||||
# (see https://www.linphone.org).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
|
||||
get_cmake_property(vars CACHE_VARIABLES)
|
||||
foreach(var ${vars})
|
||||
get_property(currentHelpString CACHE "${var}" PROPERTY HELPSTRING)
|
||||
if("${currentHelpString}" MATCHES "No help, variable specified on the command line." OR "${currentHelpString}" STREQUAL "")
|
||||
#message("${var} = [${${var}}] -- ${currentHelpString}") # uncomment to see the variables being processed
|
||||
list(APPEND USER_ARGS "-D${var}=${${var}}")
|
||||
if( "${var}" STREQUAL "CMAKE_PREFIX_PATH")
|
||||
set(PREFIX_PATH ";${${var}}")
|
||||
endif()
|
||||
elseif("${var}" STREQUAL "CMAKE_GENERATOR_PLATFORM" AND NOT("${${var}}" STREQUAL ""))
|
||||
message(STATUS "User-Setting Platform to ${${var}}")
|
||||
endif()
|
||||
endforeach()
|
||||
if(ENABLE_BUILD_VERBOSE)
|
||||
message("User Args : ${USER_ARGS}")
|
||||
endif()
|
||||
|
||||
project(linphoneqt)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(CheckCXXCompilerFlag)
|
||||
include(linphone-app/application_info.cmake)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
if(LINPHONEAPP_INSTALL_PREFIX)
|
||||
set(APPLICATION_OUTPUT_DIR "${LINPHONEAPP_INSTALL_PREFIX}")
|
||||
else()
|
||||
set(APPLICATION_OUTPUT_DIR "${CMAKE_BINARY_DIR}/OUTPUT")
|
||||
endif()
|
||||
|
||||
|
||||
set(CMAKE_INSTALL_PREFIX "${APPLICATION_OUTPUT_DIR}")
|
||||
|
||||
if( APPLE )
|
||||
set(LINPHONEAPP_MACOS_ARCHS "x86_64" CACHE STRING "MacOS architectures to build: comma-separated list of values in [arm64, x86_64]")
|
||||
set(LINPHONESDK_BUILD_TYPE "Default")#Using Mac will remove all SDK targets.
|
||||
set(ENABLE_FAT_BINARY "ON") # Disable XCFrameworks as it is not supported.
|
||||
|
||||
set(CMAKE_INSTALL_BINDIR "${APPLICATION_NAME}.app/Contents/MacOS")
|
||||
set(CMAKE_INSTALL_LIBDIR "${APPLICATION_NAME}.app/Contents/Frameworks")
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "${APPLICATION_NAME}.app/Contents/Resources/include")
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "${APPLICATION_NAME}.app/Contents/Resources/share")
|
||||
|
||||
if( NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15")#Qt: 'path' is unavailable: introduced in macOS 10.15
|
||||
endif()
|
||||
set(LINPHONESDK_MACOS_ARCHS ${LINPHONEAPP_MACOS_ARCHS})
|
||||
set(CMAKE_OSX_ARCHITECTURES ${LINPHONESDK_MACOS_ARCHS} CACHE STRING "")
|
||||
elseif(WIN32)
|
||||
set(LINPHONESDK_BUILD_TYPE "Default")
|
||||
else()
|
||||
endif()
|
||||
|
||||
|
||||
if(NOT LINPHONE_OUTPUT_DIR)# set this variable only if you don't build the module
|
||||
set(LINPHONE_OUTPUT_DIR "${CMAKE_INSTALL_PREFIX}")# Cannot be different from the current CMAKE_INSTALL_PREFIX
|
||||
endif()
|
||||
|
||||
if( NOT QTKEYCHAIN_OUTPUT_DIR) # set this variable only if you don't build the module
|
||||
set(QTKEYCHAIN_OUTPUT_DIR "${CMAKE_INSTALL_PREFIX}")# Cannot be different from the current CMAKE_INSTALL_PREFIX
|
||||
endif()
|
||||
|
||||
if(NOT ISPELL_OUTPUT_DIR) # set this variable only if you don't build the module
|
||||
set(ISPELL_OUTPUT_DIR "${CMAKE_INSTALL_PREFIX}")# Cannot be different from the current CMAKE_INSTALL_PREFIX
|
||||
endif()
|
||||
|
||||
|
||||
# Avoid cmake warning if CMP0071 is not set.
|
||||
if (POLICY CMP0071)
|
||||
cmake_policy(SET CMP0071 NEW)
|
||||
endif ()
|
||||
#set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Prepare gobal CMAKE configuration specific to the current project
|
||||
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/OUTPUT" CACHE PATH "Default linphone-app installation prefix" FORCE)
|
||||
set(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified")
|
||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo" FORCE)
|
||||
# Set the available build type values for cmake-gui
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo")
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# SET OPTIONS
|
||||
#-------------------------------------------------------------------------------
|
||||
set(OPTION_LIST "")
|
||||
#function doesn't work with strings value
|
||||
function(add_option _OPTION_LIST OPTION DESC VALUE)
|
||||
option(${OPTION} ${DESC} ${VALUE})
|
||||
list(APPEND _OPTION_LIST ${${_OPTION_LIST}} "-D${OPTION}=${${OPTION}}")
|
||||
set(${${_OPTION_LIST}} ${_OPTION_LIST} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(add_cache _OPTION_LIST OPTION DESC VALUE)
|
||||
set(${OPTION} ${VALUE} CACHE STRING ${DESC})
|
||||
list(APPEND _OPTION_LIST ${${_OPTION_LIST}} "-D${OPTION}=${${OPTION}}")
|
||||
set(${${_OPTION_LIST}} ${_OPTION_LIST} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
add_option(OPTION_LIST ENABLE_APP_LICENSE "Enable the license in packages." ON)
|
||||
add_option(OPTION_LIST ENABLE_APP_OAUTH2 "Build with OAuth2 support for remote provisioning." OFF) # Experimental.
|
||||
add_option(OPTION_LIST ENABLE_APP_PACKAGING "Enable packaging" OFF)
|
||||
add_option(OPTION_LIST ENABLE_APP_PACKAGE_ROOTCA "Embed the rootca file into the package" ON)
|
||||
add_option(OPTION_LIST ENABLE_APP_PDF_VIEWER "Enable Pdf viewer. Only enable if the version of Qt have the module. Cannot be activated because of Qt find_package() make an error on unbound pdf." OFF)
|
||||
add_option(OPTION_LIST ENABLE_APP_WEBVIEW "Enable webviews. Webview is not fully supported because of deployments. Used for subscription." OFF)
|
||||
add_option(OPTION_LIST ENABLE_BUILD_APP_PLUGINS "Enable the build of plugins" ON)
|
||||
add_option(OPTION_LIST ENABLE_BUILD_EXAMPLES "Enable the build of examples" OFF)
|
||||
add_option(OPTION_LIST ENABLE_BUILD_VERBOSE "Enable the build generation to be more verbose" OFF)
|
||||
add_option(OPTION_LIST ENABLE_CONSOLE_UI "Turn on or off compilation of console interface." OFF)
|
||||
add_option(OPTION_LIST ENABLE_DAEMON "Enable the linphone daemon interface." OFF)
|
||||
add_option(OPTION_LIST ENABLE_DOC "Enable API documentation generation." OFF)
|
||||
add_option(OPTION_LIST ENABLE_FFMPEG "Build mediastreamer2 with ffmpeg video support. No more needed." OFF)
|
||||
add_option(OPTION_LIST ENABLE_LDAP "Enable LDAP support." YES)
|
||||
add_option(OPTION_LIST ENABLE_NON_FREE_CODECS "Enable the use of non free codecs" YES)
|
||||
add_option(OPTION_LIST ENABLE_NON_FREE_FEATURES "Enable the use of non free codecs" ${ENABLE_NON_FREE_CODECS})
|
||||
add_option(OPTION_LIST ENABLE_QT_KEYCHAIN "Build QtKeychain to manage VFS from System key stores." ON)
|
||||
add_option(OPTION_LIST ENABLE_QRCODE "Enable QRCode support" OFF)#Experimental
|
||||
add_option(OPTION_LIST ENABLE_RELATIVE_PREFIX "Set Internal packages relative to the binary" ON)
|
||||
add_option(OPTION_LIST ENABLE_SANITIZER "Enable sanitizer." OFF)
|
||||
add_option(OPTION_LIST ENABLE_STRICT "Build with strict compilator flags e.g. -Wall -Werror" OFF)
|
||||
add_option(OPTION_LIST ENABLE_TESTS "Build with testing binaries of SDK" OFF)
|
||||
add_option(OPTION_LIST ENABLE_TESTS_COMPONENTS "Build libbctoolbox-tester" OFF)
|
||||
add_option(OPTION_LIST ENABLE_TOOLS "Enable tools of SDK" OFF)
|
||||
add_option(OPTION_LIST ENABLE_UNIT_TESTS "Enable unit test of SDK." OFF)
|
||||
add_option(OPTION_LIST ENABLE_UPDATE_CHECK "Enable update check." ON)
|
||||
add_option(OPTION_LIST ENABLE_VIDEO "Enable Video support." YES)
|
||||
add_option(OPTION_LIST ENABLE_WINDOWS_TOOLS_CHECK "Enable tools checks on Windows for auto install." OFF)
|
||||
add_option(OPTION_LIST ENABLE_OPENH264 "Enable the use of OpenH264 codec" ${ENABLE_VIDEO})
|
||||
|
||||
add_option(OPTION_LIST LINPHONE_SDK_MAKE_RELEASE_FILE_URL "Make a RELEASE file that work along check_version and use this URL" "")
|
||||
|
||||
# QtKeychain
|
||||
add_option(OPTION_LIST LIBSECRET_SUPPORT "Build with libsecret support" OFF) # Need libsecret-devel
|
||||
if(WIN32)
|
||||
add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt5Keychain library name for a workaround with windeployqt" "EQt5Keychain")
|
||||
else()
|
||||
add_cache(OPTION_LIST QTKEYCHAIN_TARGET_NAME "Override Qt5Keychain library name" "Qt5Keychain")
|
||||
endif()
|
||||
if(WIN32)
|
||||
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" YES)
|
||||
elseif(APPLE)
|
||||
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" OFF)
|
||||
else()
|
||||
add_option(OPTION_LIST ENABLE_V4L "Ability to capture and display video using libv4l2 or libv4l." YES)
|
||||
add_option(OPTION_LIST ENABLE_OPENSSL_EXPORT "Enable OpenSSL deployment" OFF)
|
||||
endif()
|
||||
|
||||
# Set some SDK variables to configure the APP build as we want it
|
||||
set(ENABLE_CXX_WRAPPER ON CACHE BOOL "Build the C++ wrapper for Liblinphone." FORCE)
|
||||
set(ENABLE_THEORA OFF)
|
||||
set(ENABLE_QT_GL ${ENABLE_VIDEO})
|
||||
|
||||
# Qt5.13 because of Spitview
|
||||
find_package(Qt5 5.13 COMPONENTS Core REQUIRED)
|
||||
|
||||
if(NOT Qt5_FOUND)
|
||||
message(FATAL_ERROR "Minimum supported Qt5 version is 5.13!")
|
||||
endif()
|
||||
|
||||
set(LINPHONEAPP_BUILD_TYPE "Default" CACHE STRING "Type of build")
|
||||
set_property(CACHE LINPHONEAPP_BUILD_TYPE PROPERTY STRINGS "Default" "Macos" "Normal")
|
||||
|
||||
if(LINPHONEAPP_BUILD_TYPE STREQUAL "Default")
|
||||
if(APPLE)
|
||||
set(LINPHONEAPP_BUILD_TYPE "Macos")
|
||||
else()
|
||||
set(LINPHONEAPP_BUILD_TYPE "Normal")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(NOT APPLE OR MONO_ARCH)
|
||||
add_custom_target(linphone-deps)
|
||||
if(NOT LINPHONE_QT_ONLY)
|
||||
function(add_linphone_sdk)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here
|
||||
add_subdirectory("linphone-sdk")
|
||||
endfunction()
|
||||
add_linphone_sdk()
|
||||
|
||||
if(ENABLE_QT_KEYCHAIN)
|
||||
function(add_linphone_keychain)
|
||||
add_subdirectory("external/qtkeychain")
|
||||
endfunction()
|
||||
add_linphone_keychain()
|
||||
endif()
|
||||
if(NOT APPLE AND NOT WIN32)
|
||||
function(add_linphone_ispell)
|
||||
add_subdirectory("external/ispell")
|
||||
endfunction()
|
||||
add_linphone_ispell()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
||||
endif()
|
||||
endif()
|
||||
function(add_linphone_app)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) # Prevent project from overriding the options we just set here
|
||||
if(APPLE)
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
|
||||
elseif(UNIX)
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN:$ORIGIN/lib64:$ORIGIN/../lib64:$ORIGIN/lib:$ORIGIN/../lib")
|
||||
endif()
|
||||
add_subdirectory("linphone-app")
|
||||
endfunction()
|
||||
add_linphone_app()
|
||||
if(ENABLE_BUILD_APP_PLUGINS)
|
||||
add_subdirectory("plugins" "plugins-app")
|
||||
endif()
|
||||
|
||||
if(NOT LINPHONE_QT_ONLY)
|
||||
# Move root folders to app
|
||||
if(APPLE)
|
||||
file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
file(MAKE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
|
||||
install(CODE "execute_process(COMMAND rsync -a --force \"${CMAKE_INSTALL_PREFIX}/Frameworks\" \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}\" )") #Use rsync to bypass symlinks override issues of frameworks. copy_directory will fail without explicit error...
|
||||
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory \"${CMAKE_INSTALL_PREFIX}/include/\" \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/\")")
|
||||
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory \"${CMAKE_INSTALL_PREFIX}/share/\" \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/\")")
|
||||
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory \"${CMAKE_INSTALL_PREFIX}/mkspecs/\" \"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/\")")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
else()
|
||||
include(cmake/TasksMacos.cmake)
|
||||
endif()
|
||||
|
675
LICENSE.txt
Normal file
675
LICENSE.txt
Normal file
|
@ -0,0 +1,675 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
|
292
README.md
Normal file
292
README.md
Normal file
|
@ -0,0 +1,292 @@
|
|||
[](https://gitlab.linphone.org/BC/public/linphone-desktop/commits/master) [](https://weblate.linphone.org/engage/linphone-desktop/?utm_source=widget)
|
||||
|
||||
|
||||
# Linphone Desktop
|
||||
|
||||
Linphone is an open source softphone for voice and video over IP calling and instant messaging.
|
||||
|
||||
It is fully SIP-based, for all calling, presence and IM features.
|
||||
|
||||
General description is available from [Linphone web site](https://www.linphone.org/technical-corner/linphone)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © Belledonne Communications
|
||||
|
||||
Linphone is dual licensed, and is available either :
|
||||
|
||||
- under a [GNU/GPLv3 license](https://www.gnu.org/licenses/gpl-3.0.en.html), for free (open source). Please make sure that you understand and agree with the terms of this license before using it (see LICENSE file for details).
|
||||
|
||||
- under a proprietary license, for a fee, to be used in closed source applications. Contact [Belledonne Communications](https://www.linphone.org/contact) for any question about costs and services.
|
||||
|
||||
### Documentation
|
||||
|
||||
- [Supported features and RFCs](https://www.linphone.org/technical-corner/linphone/features)
|
||||
|
||||
- [Linphone public wiki](https://wiki.linphone.org/xwiki/wiki/public/view/Linphone/)
|
||||
|
||||
### Parameters
|
||||
|
||||
`--help` : display available parameters.
|
||||
|
||||
`--verbose` : print logs into stdout/stderr.
|
||||
|
||||
`--qt-logs-only` : print only logs from the application. It strips SDK logs from the output.
|
||||
|
||||
## Getting started
|
||||
|
||||
Here are the general instructions to build Linphone for desktop. The specific instructions for each build platform is described just below.
|
||||
You will need the tools :
|
||||
- `cmake` >= 3.22 : download it in https://cmake.org/download/
|
||||
- `python` : https://www.python.org/downloads/release/python-381/
|
||||
- `pip` : it is already embedded inside Python, so there should be nothing to do about it
|
||||
- `yasm` : https://yasm.tortall.net/Download.html
|
||||
- `nasm` : https://www.nasm.us/pub/nasm/releasebuilds/
|
||||
- `doxygen` (required for the Cxx Wrapper)
|
||||
- `Perl`
|
||||
- `pystache` : use 'pip install pystache --user'
|
||||
- `six` : use 'pip install six --user'
|
||||
- `git`
|
||||
|
||||
For Desktop : you will need [Qt5](https://www.qt.io/download-thank-you) (_5.15 or newer_). `C++11` support is required!
|
||||
|
||||
### Set your environment
|
||||
|
||||
1. It's necessary to install the `pip` command and to execute:
|
||||
|
||||
pip install pystache six
|
||||
|
||||
2. You have to set the environment variable `Qt5_DIR` to point to the path containing the cmake folders of Qt5, and the `PATH` to the Qt5 `bin`. Example:
|
||||
|
||||
Qt5_DIR="~/Qt/5.15.2/gcc_64/lib/cmake/Qt5"
|
||||
PATH="~/Qt/5.15.2/gcc_64/bin/:$PATH"
|
||||
|
||||
Note: If you have the third party tool `qtchooser` installed :
|
||||
eval "$(qtchooser -print-env)"
|
||||
export Qt5_DIR=${QTLIBDIR}/cmake/Qt5
|
||||
export PATH=${QTTOOLDIR}:$PATH
|
||||
3. For specific requirements, see platform instructions sections below.
|
||||
|
||||
### Summary of Building steps
|
||||
|
||||
`git clone https://gitlab.linphone.org/BC/public/linphone-desktop.git --recursive`
|
||||
`cd linphone-desktop`
|
||||
`mkdir build`
|
||||
`cd build`
|
||||
`cmake .. -DCMAKE_BUILD_PARALLEL_LEVEL=10 -DCMAKE_BUILD_TYPE=RelWithDebInfo`
|
||||
`cmake --build . --parallel 10 --config RelWithDebInfo`
|
||||
`cmake --install .`
|
||||
`./OUTPUT/bin/linphone --verbose` or `./OUTPUT/Linphone.app/Contents/MacOS/linphone --verbose`
|
||||
|
||||
### Get sources
|
||||
|
||||
git clone https://gitlab.linphone.org/BC/public/linphone-desktop.git --recursive
|
||||
|
||||
|
||||
### Building : General Steps
|
||||
|
||||
The build is done by building the SDK and the application. Their targets are `sdk` and `linphone-qt`.
|
||||
|
||||
1. Create your build folder at the root of the project : `mkdir build`
|
||||
Go to this new folder and begin the build process : `cd build`
|
||||
|
||||
2. Prepare your options : `cmake ..`. By default, it will try compile all needed dependencies. You can remove some by adding `-DENABLE_<COMPONENT>=NO` to the command. You can use `cmake-gui ..` if you want to have a better access to them. You can add `-DCMAKE_BUILD_PARALLEL_LEVEL=<count>` to do `<count>` parallel builds for speeding up the process.
|
||||
Also, you can add `-DENABLE_BUILD_VERBOSE=ON` to get more feedback while generating the project.
|
||||
|
||||
Note : For Makefile or Ninja, you have to add `-DCMAKE_BUILD_TYPE=<your_config>` if you wish to build in a specific configuration (for example `RelWithDebInfo`).
|
||||
|
||||
3. Build and install the whole project : `cmake --build . --target <target> --parallel <count>` (replace `<target>` with the target name and `<count>` by the number of parallel builds).
|
||||
|
||||
Note : For XCode or Visual Studio, you have to add `--config <your_config>` if you wish to build in a specific configuration (for example `RelWithDebInfo`).
|
||||
|
||||
When all are over, the files will be in the OUTPUT folder in the build directory. When rebuilding, you have to use `cmake --build . --target install` (or `cmake --install .`) to put the application in the correct configuration.
|
||||
|
||||
Binaries inside other folders (like `linphone-app` and `linphone-sdk`) are not supposed to work.
|
||||
|
||||
4. When doing some modifications in the SDK, you can rebuild only the SDK with the target `sdk` and the same for the application with `linphone-qt-only`
|
||||
|
||||
5. In order to get packages, you can use `cmake .. -DENABLE_APP_PACKAGING=YES`. The files will be in `OUTPUT/packages` folder.
|
||||
|
||||
|
||||
### Update your project
|
||||
|
||||
1. Update your project with :
|
||||
|
||||
git fetch
|
||||
git pull --rebase
|
||||
|
||||
2. Update sub-modules from your current branch
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
Then simply re-build using cmake.
|
||||
|
||||
|
||||
#### General Troubleshooting
|
||||
|
||||
* The latest version of Doxygen may not work with the SDK. If you some build issues and have a specific version of Doxygen that is not in your PATH, you can use `-DLINPHONESDK_DOXYGEN_PROGRAM`.
|
||||
|
||||
Eg on Mac : `-DLINPHONESDK_DOXYGEN_PROGRAM=/Applications/Doxygen.app/Contents/Resources/doxygen`
|
||||
|
||||
* If the build of the SDK crash with something like "cmd.exe failed" and no more info, it can be a dependency that is not available. You have to check if all are in your PATH.
|
||||
Usually, if it is about VPX or Decaf, this could come from your Perl installation.
|
||||
|
||||
* If the application doesn't start and create an empty file with a random name, it could be come from a bad configuration between your application and others sub-modules. Check your configurations and force them with `-DCMAKE_BUILD_TYPE=<your_config>` or `--config <your_config>`.
|
||||
|
||||
* On Mac, the application can crash at the start from QOpenGLContext. A workaround is to deactivate the mipmap mode on images by adding into your configuration file (linphonerc): `mipmap_enabled=0` in `[ui]` section.
|
||||
|
||||
|
||||
## Specific instructions for the Mac Os X platform
|
||||
|
||||
To install the required dependencies on Mac OS X, you can use [Homebrew](https://brew.sh/).
|
||||
Before you install packages with Brew, you may have to change directories permissions (if you can't change permissions with sudo on a MacOS >= High Sierra, get a look at [this StackOverflow answer](https://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions#46844441)).
|
||||
|
||||
1. Install XCode from the Apple store. Run it at least once to allow it to install its tools. You may need to run :
|
||||
|
||||
xcode-select --install
|
||||
|
||||
2. Install Homebrew by following the instructions here https://brew.sh/
|
||||
|
||||
3. Install dependencies:
|
||||
|
||||
brew install cmake pkg-config git doxygen nasm yasm
|
||||
|
||||
4. First ensure you have [pip](https://pypi.org/project/pip/)
|
||||
|
||||
5. Then, you can install a pip package with the following command:
|
||||
|
||||
python -m pip install [package]
|
||||
|
||||
For instance, enter the following command:
|
||||
|
||||
python -m pip install pystache six graphviz
|
||||
|
||||
6. Download [Qt](https://www.qt.io/download), install a Qt5 version and set Qt5_DIR and PATH variables.
|
||||
|
||||
7. The default architecture is x86_64 because Qt 5.15.2 is not available for arm64. LINPHONEAPP_MACOS_ARCHS can be used to change it.
|
||||
|
||||
-DLINPHONEAPP_MACOS_ARCHS=arm64
|
||||
|
||||
|
||||
8. Build as usual (General Steps).
|
||||
|
||||
9. If you get an error about modules that are not found for Python, it may be because cmake try to use another version from your PATH. It can be the case if you installed Python from brew. Install Python modules by using absolute path.
|
||||
For example:
|
||||
|
||||
/opt/homebrew/python3 -m pip install pystache six graphviz
|
||||
|
||||
## Specific instructions for the Windows platform
|
||||
|
||||
1. Install main tools:
|
||||
- `MinGW/MSYS2` : [download](https://www.msys2.org/)
|
||||
- Follow instructions on their "Getting Started" page.
|
||||
- Install toolchains and prepare python:
|
||||
- `pacman -Sy --needed base-devel mingw-w64-x86_64-toolchain`
|
||||
- `pacman -S python3-pip` in `MSYS2 MSYS` console
|
||||
- `python3 -m pip install pystache six` in `cmd`
|
||||
- In this order, add `C:\msys64\mingw64\bin`, `C:\msys64\` and `C:\msys64\usr\bin` in your PATH environement variable from Windows advanced settings. Binaries from the msys folder (not from mingw32/64) doesn't fully support Windows Path and thus, they are to be avoided.
|
||||
|
||||
When building the SDK, it will install automatically from MSYS2 : `toolchain`, `python`, `doxygen`, `perl`, `yasm`, `gawk`, `bzip2`, `nasm`, `sed`, `patch`, `pkg-config`, `gettext`, `glib2`, `intltool` and `graphviz` (if needed)
|
||||
|
||||
- `git` : use MSYS2 : `pacman -S git` or [download](https://git-scm.com/download/win)
|
||||
|
||||
- Visual Studio must also be properly configured with addons. Under "Tools"->"Obtain tools and features", make sure that the following components are installed:
|
||||
- Tasks: Select Windows Universal Platform development, Desktop C++ Development, .NET Development
|
||||
|
||||
2. Ensure that you have downloaded the `Qt msvc2019 version` (64-bit). Note that `Qt msvc2019` can be use with earlier version of Visual Studio.
|
||||
|
||||
3. Or open a Command line with Visual Studio `Developer Command Prompt for VS 2019` and call qtenv2.bat that is in your qt binaries eg: `C:\Qt\<version>\msvc2019\bin\qtenv2.bat`
|
||||
|
||||
4. Build as usual with adding `-A x64` to `cmake ..` (General Steps) :
|
||||
- `cmake .. -DCMAKE_BUILD_PARALLEL_LEVEL=10 -DCMAKE_BUILD_TYPE=RelWithDebInfo -A x64`
|
||||
The default build is very long. It is prefered to use the Ninja generator `-G "Ninja"`
|
||||
- `cmake --build . --target ALL_BUILD --parallel 10 --config RelWithDebInfo`
|
||||
|
||||
5. The project folder will be in the build directory and binaries should be in the OUTPUT folder.
|
||||
|
||||
|
||||
## Installing dependencies
|
||||
|
||||
There are [docker files](docker-files) configurations where dependencies can be retrieved.
|
||||
|
||||
Also, more configurations are available in the docker-files folder of linphone-sdk submodule.
|
||||
|
||||
## Options
|
||||
|
||||
|
||||
| Options | Description | Default value |
|
||||
| :--- | :---: | ---: |
|
||||
| ENABLE_APP_LICENSE | Enable the license in packages. | YES |
|
||||
| ENABLE_APP_PACKAGING | Enable packaging. Package will be deployed in `OUTPUT/packages` | NO |
|
||||
| ENABLE_APP_PDF_VIEWER | Enable PDF viewer. Need Qt PDF module. | YES |
|
||||
| ENABLE_APP_WEBVIEW | Enable webview for accounts. The Webview engine must be deployed, it takes a large size. | NO |
|
||||
| ENABLE_APP_PACKAGE_ROOTCA | Embed the rootca file (concatenation of all root certificates published by mozilla) into the package | YES |
|
||||
| ENABLE_BUILD_APP_PLUGINS | Enable the build of plugins | YES |
|
||||
| ENABLE_BUILD_EXAMPLES | Enable the build of examples | NO |
|
||||
| ENABLE_BUILD_VERBOSE | Enable the build generation to be more verbose | NO |
|
||||
| ENABLE_DAEMON | Enable the linphone daemon interface. | NO |
|
||||
| ENABLE_PQCRYPTO | Enable post quantum ZRTP. | NO |
|
||||
| ENABLE_STRICT | Build with strict compilator flags e.g. -Wall -Werror | NO |
|
||||
| ENABLE_TESTS | Build with testing binaries of SDK | NO |
|
||||
| ENABLE_TESTS_COMPONENTS | Build libbctoolbox-tester | NO |
|
||||
| ENABLE_TOOLS | Enable tools of SDK | NO |
|
||||
| ENABLE_UNIT_TESTS | Enable unit test of SDK. | NO |
|
||||
| ENABLE_UPDATE_CHECK | Enable update check. | YES |
|
||||
| LINPHONE_SDK_MAKE_RELEASE_FILE_URL | Make a RELEASE file that work along check_version and use this URL | "" |
|
||||
|
||||
|
||||
<!-- Not customizable without warranty
|
||||
| ENABLE_LDAP | Enable LDAP support. | YES |
|
||||
| ENABLE_VIDEO | Enable Video support. | YES |
|
||||
| ENABLE_OPENH264 | Enable the use of OpenH264 codec | YES |
|
||||
| ENABLE_NON_FREE_FEATURES | Enable the use of non free features | YES |
|
||||
| ENABLE_FFMPEG | Build mediastreamer2 with ffmpeg video support. | NO |
|
||||
| ENABLE_CONSOLE_UI | Turn on or off compilation of console interface. | NO |
|
||||
-->
|
||||
|
||||
## Contributing
|
||||
|
||||
### Code
|
||||
|
||||
In order to submit a patch for inclusion in Linphone's source code:
|
||||
|
||||
1. First make sure that your patch applies to the latest Git sources before submitting : patches made to old versions can't and won't be merged.
|
||||
|
||||
2. Fill out and send the contributor agreement for your patch to be included in the Git tree by following links [there](https://www.linphone.org/contact). The goal of this agreement is to grant us the peaceful exercise of our rights to the Linphone source code, without losing your rights over your contribution.
|
||||
|
||||
3. Then go to the [github repository](https://github.com/BelledonneCommunications/linphone-desktop/pulls) and make a Pull Requests based on your code.
|
||||
|
||||
Please note that we don't offer free support and these contributions will be addressed on our free-time.
|
||||
|
||||
<a href="https://weblate.linphone.org/engage/linphone-desktop/?utm_source=widget">
|
||||
<img src="https://weblate.linphone.org/widgets/linphone-desktop/-/multi-auto.svg" alt="Translation status" align="right"/>
|
||||
</a>
|
||||
|
||||
### Languages
|
||||
|
||||
|
||||
|
||||
<br />
|
||||
Linphone is getting a full internationalization support.<br />
|
||||
<br />
|
||||
We no longer use transifex for the translation process, instead we have deployed our own instance of [Weblate](https://weblate.linphone.org).<br />
|
||||
<br />
|
||||
<br />
|
||||
If you want you can contribute at: https://weblate.linphone.org/projects/linphone-desktop/
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
### Feedback or bug reporting
|
||||
|
||||
Launch the application with `--verbose` parameter to get full logs and send it with your request. You can use the "Send logs" button in settings to upload log files and share it by email or with a post in the corresponding Github project :
|
||||
- [Desktop Application](https://github.com/BelledonneCommunications/linphone-desktop/issues)
|
||||
- [Linphone SDK](https://github.com/BelledonneCommunications/linphone-sdk/issues)
|
||||
|
||||
On some OS (like Fedora 22 and later), they disable Qt debug output by default. To get full output, you need to create `~/.config/QtProject/qtlogging.ini` and add :
|
||||
|
||||
[Rules]
|
||||
*.debug=true
|
||||
qt.*.debug=false
|
135
cmake/GenerateAppMacos.cmake
Normal file
135
cmake/GenerateAppMacos.cmake
Normal file
|
@ -0,0 +1,135 @@
|
|||
################################################################################
|
||||
# GenerateFrameworks.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
cmake_policy(SET CMP0009 NEW) # Do not follow symlinks when doing file(GLOB_RECURSE)
|
||||
|
||||
include("${LINPHONESDK_DIR}/cmake/LinphoneSdkUtils.cmake")
|
||||
|
||||
|
||||
linphone_sdk_convert_comma_separated_list_to_cmake_list("${LINPHONEAPP_MACOS_ARCHS}" _MACOS_ARCHS)
|
||||
list(GET _MACOS_ARCHS 0 _FIRST_ARCH)
|
||||
|
||||
set(MAIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${LINPHONEAPP_NAME}) #OUTPUT/linphone-app/macos
|
||||
|
||||
################################
|
||||
# Create the desktop directory that will contain the merged content of all architectures
|
||||
################################
|
||||
|
||||
execute_process(
|
||||
COMMAND "${CMAKE_COMMAND}" "-E" "remove_directory" "${MAIN_INSTALL_DIR}"
|
||||
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${MAIN_INSTALL_DIR}"
|
||||
)
|
||||
|
||||
################################
|
||||
# Copy outside folders that should be in .app package
|
||||
################################
|
||||
|
||||
function( copy_outside_folders _ARCH)
|
||||
# Prepare .app
|
||||
execute_process(COMMAND rsync -a --force "${MAIN_INSTALL_DIR}-${_ARCH}/Frameworks/" "${MAIN_INSTALL_DIR}-${_ARCH}/${CMAKE_INSTALL_LIBDIR}/")
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${MAIN_INSTALL_DIR}-${_ARCH}/include/" "${MAIN_INSTALL_DIR}-${_ARCH}/${CMAKE_INSTALL_INCLUDEDIR}/")
|
||||
# move share
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${MAIN_INSTALL_DIR}-${_ARCH}/share/" "${MAIN_INSTALL_DIR}-${_ARCH}/${CMAKE_INSTALL_DATAROOTDIR}/")
|
||||
# move mkspecs
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory "${MAIN_INSTALL_DIR}-${_ARCH}/mkspecs/" "${MAIN_INSTALL_DIR}-${_ARCH}/${CMAKE_INSTALL_DATAROOTDIR}/")
|
||||
endfunction()
|
||||
|
||||
set(_COPIED FALSE)
|
||||
foreach(_ARCH IN LISTS ${_MACOS_ARCHS})
|
||||
set(_COPIED TRUE)
|
||||
message(STATUS "Copying outside folders for ${_ARCH}")
|
||||
copy_outside_folders(${_ARCH})
|
||||
endforeach()
|
||||
|
||||
if(NOT _COPIED) # this is a bug on cmake as there is one element but foreach doesn't do loop.
|
||||
message(STATUS "Copying outside folders for ${_FIRST_ARCH}")
|
||||
copy_outside_folders(${_FIRST_ARCH})
|
||||
endif()
|
||||
|
||||
################################
|
||||
# Copy and merge content of all architectures in the desktop directory
|
||||
################################
|
||||
# Do not use copy_directory because of symlinks
|
||||
message(STATUS "Copying ${_FIRST_ARCH} into main")
|
||||
execute_process(COMMAND rsync -a --force "${MAIN_INSTALL_DIR}-${_FIRST_ARCH}/" "${MAIN_INSTALL_DIR}" WORKING_DIRECTORY "${LINPHONEAPP_BUILD_DIR}")
|
||||
|
||||
#if(NOT ENABLE_FAT_BINARY)
|
||||
# execute_process(
|
||||
# COMMAND "${CMAKE_COMMAND}" "-E" "remove_directory" "${CMAKE_INSTALL_PREFIX}/Frameworks"
|
||||
# COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${CMAKE_INSTALL_PREFIX}/XCFrameworks"
|
||||
# )
|
||||
#endif()
|
||||
|
||||
################################
|
||||
##### MIX (TODO)
|
||||
################################
|
||||
message(STATUS "Mixing")
|
||||
# Get all files in output
|
||||
file(GLOB_RECURSE _BINARIES RELATIVE "${MAIN_INSTALL_DIR}-${_FIRST_ARCH}/" "${MAIN_INSTALL_DIR}-${_FIRST_ARCH}/*")
|
||||
|
||||
if(NOT ENABLE_FAT_BINARY)
|
||||
# Remove all .framework inputs from the result
|
||||
list(FILTER _BINARIES EXCLUDE REGEX ".*\\.framework.*")
|
||||
endif()
|
||||
|
||||
foreach(_FILE IN LISTS ${_BINARIES})
|
||||
get_filename_component(ABSOLUTE_FILE "${MAIN_INSTALL_DIR}-${_FIRST_ARCH}/${_FILE}" ABSOLUTE)
|
||||
if(NOT IS_SYMLINK ${ABSOLUTE_FILE})
|
||||
# Check if lipo can detect an architecture
|
||||
execute_process(COMMAND lipo -archs "${MAIN_INSTALL_DIR}-${_FIRST_ARCH}/${_FILE}"
|
||||
OUTPUT_VARIABLE FILE_ARCHITECTURE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
WORKING_DIRECTORY "${LINPHONEAPP_BUILD_DIR}"
|
||||
ERROR_QUIET
|
||||
)
|
||||
if(NOT "${FILE_ARCHITECTURE}" STREQUAL "")
|
||||
# There is at least one architecture : Use this candidate to mix with another architecture
|
||||
set(_ALL_ARCH_FILES)
|
||||
foreach(_ARCH IN LISTS ${_ARCHS})
|
||||
list(APPEND _ALL_ARCH_FILES "${MAIN_INSTALL_DIR}-${_ARCH}/${_FILE}")
|
||||
endforeach()
|
||||
string(REPLACE ";" " " _ARCH_STRING "${_ARCHS}")
|
||||
message(STATUS "Mixing ${_FILE} for archs [${_ARCH_STRING}]")
|
||||
execute_process(
|
||||
COMMAND "lipo" "-create" "-output" "${MAIN_INSTALL_DIR}/${_FILE}" ${_ALL_ARCH_FILES}
|
||||
WORKING_DIRECTORY "${LINPHONEAPP_BUILD_DIR}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
#[[
|
||||
if(NOT ENABLE_FAT_BINARY)
|
||||
# Generate XCFrameworks
|
||||
file(GLOB _FRAMEWORKS "${LINPHONEAPP_BUILD_DIR}/${MAIN_INSTALL_DIR}-${_FIRST_ARCH}/Frameworks/*.framework")
|
||||
foreach(_FRAMEWORK IN LISTS _FRAMEWORKS)
|
||||
get_filename_component(_FRAMEWORK_NAME "${_FRAMEWORK}" NAME_WE)
|
||||
set(_ALL_ARCH_FRAMEWORKS)
|
||||
foreach(_ARCH IN LISTS _MACOS_ARCHS)
|
||||
list(APPEND _ALL_ARCH_FRAMEWORKS "-framework")
|
||||
list(APPEND _ALL_ARCH_FRAMEWORKS "${LINPHONEAPP_BUILD_DIR}/${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM}-${_ARCH}/Frameworks/${_FRAMEWORK_NAME}.framework")
|
||||
endforeach()
|
||||
string(REPLACE ";" " " _ARCH_STRING "${_MACOS_ARCHS}")
|
||||
message(STATUS "Creating XCFramework for ${_FRAMEWORK_NAME} for archs [${_ARCH_STRING}]")
|
||||
execute_process(
|
||||
COMMAND "xcodebuild" "-create-xcframework" "-output" "${CMAKE_INSTALL_PREFIX}/XCFrameworks/${_FRAMEWORK_NAME}.xcframework" ${_ALL_ARCH_FRAMEWORKS}
|
||||
WORKING_DIRECTORY "${LINPHONEAPP_BUILD_DIR}"
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
#]]
|
92
cmake/TasksMacos.cmake
Normal file
92
cmake/TasksMacos.cmake
Normal file
|
@ -0,0 +1,92 @@
|
|||
############################################################################
|
||||
# TasksMacos.cmake
|
||||
# Copyright (C) 2010-2023 Belledonne Communications, Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
option(ENABLE_FAT_BINARY "Enable fat binary generation using lipo." ON)
|
||||
|
||||
#linphone_sdk_convert_comma_separated_list_to_cmake_list("${LINPHONESDK_MACOS_ARCHS}" _MACOS_ARCHS)
|
||||
macro(linphone_app_convert_comma_separated_list_to_cmake_list INPUT OUTPUT)
|
||||
string(REPLACE " " "" ${OUTPUT} "${INPUT}")
|
||||
string(REPLACE "," ";" ${OUTPUT} "${${OUTPUT}}")
|
||||
endmacro()
|
||||
linphone_app_convert_comma_separated_list_to_cmake_list("${LINPHONEAPP_MACOS_ARCHS}" _MACOS_ARCHS)
|
||||
|
||||
|
||||
|
||||
set(LINPHONEAPP_NAME "linphone-app")
|
||||
set(LINPHONEAPP_PLATFORM "macos")
|
||||
set(SUB_TARGET app_macos)
|
||||
string(TOLOWER "${LINPHONEAPP_PLATFORM}" LINPHONEAPP_PLATFORM_LOWER)
|
||||
set(_MACOS_INSTALL_RELATIVE_DIR "${LINPHONEAPP_NAME}/${LINPHONEAPP_PLATFORM_LOWER}") # linphone-app/macos
|
||||
set(_MACOS_INSTALL_DIR "${APPLICATION_OUTPUT_DIR}/${_MACOS_INSTALL_RELATIVE_DIR}") # build/OUTPUT/linphone-app/macos
|
||||
# Use APPLICATION_OUTPUT_DIR. CMAKE_INSTALL_PREFIX can be in Linphone.app/Contents
|
||||
|
||||
############################################################################
|
||||
# Build each selected architecture
|
||||
############################################################################
|
||||
|
||||
#linphone_sdk_get_inherited_cmake_args(_CMAKE_CONFIGURE_ARGS _CMAKE_BUILD_ARGS)
|
||||
#linphone_sdk_get_enable_cmake_args(_MACOS_CMAKE_ARGS)
|
||||
set(_MACOS_CMAKE_ARGS ${CMAKE_OSX_DEPLOYMENT_TARGET})
|
||||
|
||||
set(_MACOS_TARGETS)
|
||||
foreach(_MACOS_ARCH IN LISTS _MACOS_ARCHS)
|
||||
set(_TARGET_NAME ${SUB_TARGET}-${_MACOS_ARCH}) # app_macos-x86_64
|
||||
set(_MACOS_ARCH_BINARY_DIR "${PROJECT_BINARY_DIR}/${_TARGET_NAME}") # build/app_macos-x86_64
|
||||
set(_MACOS_ARCH_INSTALL_DIR "${_MACOS_INSTALL_DIR}-${_MACOS_ARCH}") # build/OUTPUT/linphone-app/macos-x86_64
|
||||
|
||||
add_custom_target(${_TARGET_NAME} ALL
|
||||
COMMAND ${CMAKE_COMMAND} -B ${_MACOS_ARCH_BINARY_DIR} -DMONO_ARCH=${_MACOS_ARCH} ${USER_ARGS} ${OPTION_LIST} ${_MACOS_CMAKE_ARGS} -DLINPHONEAPP_INSTALL_PREFIX=${_MACOS_ARCH_INSTALL_DIR} -DCMAKE_TOOLCHAIN_FILE=${PROJECT_SOURCE_DIR}/cmake/toolchains/toolchain-mac-${_MACOS_ARCH}.cmake -DLINPHONEAPP_BUILD_TYPE="Normal"
|
||||
COMMAND ${CMAKE_COMMAND} --build ${_MACOS_ARCH_BINARY_DIR} --target install ${_CMAKE_BUILD_ARGS}
|
||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
||||
COMMENT "Building Linphone APP for MacOS ${_MACOS_ARCH}"
|
||||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
list(APPEND _MACOS_TARGETS ${_TARGET_NAME})
|
||||
endforeach()
|
||||
|
||||
|
||||
############################################################################
|
||||
# Generate the aggregated apps
|
||||
############################################################################
|
||||
add_custom_target(gen-apps ALL
|
||||
COMMAND "${CMAKE_COMMAND}"
|
||||
"-DLINPHONESDK_DIR=${PROJECT_SOURCE_DIR}/linphone-sdk"
|
||||
"-DLINPHONEAPP_BUILD_DIR=${CMAKE_BINARY_DIR}"
|
||||
"-DLINPHONEAPP_MACOS_ARCHS=${LINPHONEAPP_MACOS_ARCHS}"
|
||||
"-DLINPHONEAPP_NAME=${_MACOS_INSTALL_RELATIVE_DIR}"
|
||||
"-DLINPHONEAPP_PLATFORM=${LINPHONEAPP_PLATFORM_LOWER}"
|
||||
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
|
||||
"-DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}"
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
"-DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}"
|
||||
"-DCMAKE_INSTALL_DATAROOTDIR=${CMAKE_INSTALL_DATAROOTDIR}"
|
||||
"-DENABLE_FAT_BINARY=${ENABLE_FAT_BINARY}"
|
||||
"-P" "${PROJECT_SOURCE_DIR}/cmake/GenerateAppMacos.cmake"
|
||||
DEPENDS ${_MACOS_TARGETS}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
COMMENT "Aggregating applications of all architectures"
|
||||
USES_TERMINAL
|
||||
)
|
||||
|
||||
install(CODE "message(\"Dummy install target\")")
|
||||
|
23
cmake/toolchains/toolchain-mac-arm64.cmake
Normal file
23
cmake/toolchains/toolchain-mac-arm64.cmake
Normal file
|
@ -0,0 +1,23 @@
|
|||
################################################################################
|
||||
#
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
set(CMAKE_SYSTEM_PROCESSOR "arm64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "arm64")
|
||||
set(CLANG_TARGET "arm64-apple-macos")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/toolchain-mac-common.cmake")
|
106
cmake/toolchains/toolchain-mac-common.cmake
Normal file
106
cmake/toolchains/toolchain-mac-common.cmake
Normal file
|
@ -0,0 +1,106 @@
|
|||
############################################################################
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
# Building for Mac is only available under APPLE systems
|
||||
if(NOT APPLE)
|
||||
message(FATAL_ERROR "You need to build using a Mac OS X system")
|
||||
endif()
|
||||
execute_process(COMMAND xcode-select -print-path
|
||||
RESULT_VARIABLE XCODE_SELECT_RESULT
|
||||
OUTPUT_VARIABLE XCODE_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT ${XCODE_SELECT_RESULT} EQUAL 0)
|
||||
message(FATAL_ERROR "xcode-select failed: ${XCODE_SELECT_RESULT}. You may need to install Xcode.")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND xcrun --sdk macosx --show-sdk-version
|
||||
RESULT_VARIABLE XCRUN_SHOW_SDK_VERSION_RESULT
|
||||
OUTPUT_VARIABLE MACOS_SDK_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT ${XCRUN_SHOW_SDK_VERSION_RESULT} EQUAL 0)
|
||||
message(FATAL_ERROR "xcrun failed: ${XCRUN_SHOW_SDK_VERSION_RESULT}. You may need to install Xcode.")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND xcrun --sdk macosx --show-sdk-platform-path
|
||||
RESULT_VARIABLE XCRUN_SHOW_SDK_PATH_RESULT
|
||||
OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT ${XCRUN_SHOW_SDK_PATH_RESULT} EQUAL 0)
|
||||
message(FATAL_ERROR "xcrun failed: ${XCRUN_SHOW_SDK_PATH_RESULT}. You may need to install Xcode.")
|
||||
endif()
|
||||
set(CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}/Developer/SDKs/MacOSX.sdk")
|
||||
|
||||
execute_process(COMMAND xcrun --sdk macosx --find clang
|
||||
RESULT_VARIABLE XCRUN_FIND_CLANG_RESULT
|
||||
OUTPUT_VARIABLE CLANG_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT ${XCRUN_FIND_CLANG_RESULT} EQUAL 0)
|
||||
message(FATAL_ERROR "xcrun failed: ${XCRUN_FIND_CLANG_RESULT}. You may need to install Xcode.")
|
||||
endif()
|
||||
get_filename_component(TOOLCHAIN_PATH "${CLANG_PATH}" DIRECTORY)
|
||||
|
||||
message(STATUS "Using sysroot path: ${CMAKE_OSX_SYSROOT}")
|
||||
message(STATUS "Using sdk version: ${MACOS_SDK_VERSION}")
|
||||
set(SDK_BIN_PATH "${CMAKE_OSX_SYSROOT}/../../usr/bin")
|
||||
|
||||
set(TOOLCHAIN_CC "${TOOLCHAIN_PATH}/clang")
|
||||
set(TOOLCHAIN_CXX "${TOOLCHAIN_PATH}/clang++")
|
||||
set(TOOLCHAIN_OBJC "${TOOLCHAIN_PATH}/clang")
|
||||
set(TOOLCHAIN_LD "${TOOLCHAIN_PATH}/ld")
|
||||
set(TOOLCHAIN_AR "${TOOLCHAIN_PATH}/ar")
|
||||
set(TOOLCHAIN_RANLIB "${TOOLCHAIN_PATH}/ranlib")
|
||||
set(TOOLCHAIN_STRIP "${TOOLCHAIN_PATH}/strip")
|
||||
set(TOOLCHAIN_NM "${TOOLCHAIN_PATH}/nm")
|
||||
|
||||
execute_process(COMMAND xcodebuild -version OUTPUT_VARIABLE XCODE_VERSION_RAW OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
STRING(REGEX REPLACE "Xcode ([^\n]*).*" "\\1" XCODE_VERSION "${XCODE_VERSION_RAW}")
|
||||
|
||||
include(CMakeForceCompiler)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING FALSE)
|
||||
|
||||
# Define name of the target system
|
||||
set(CMAKE_SYSTEM_NAME "Darwin")
|
||||
set(CMAKE_SYSTEM_VERSION ${MACOS_SDK_VERSION})
|
||||
|
||||
# The following variables are needed to build correctly with Xcode
|
||||
if(CMAKE_GENERATOR STREQUAL "Xcode")
|
||||
set(CMAKE_MACOSX_BUNDLE NO)#if YES, cmake try_compile will not be able to test executable.app and then API info will fail.
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode")
|
||||
endif()
|
||||
|
||||
# Define the compiler
|
||||
set(CMAKE_C_COMPILER "${TOOLCHAIN_CC}")
|
||||
set(CMAKE_C_COMPILER_TARGET "${CLANG_TARGET}")
|
||||
set(CMAKE_CXX_COMPILER "${TOOLCHAIN_CXX}")
|
||||
set(CMAKE_CXX_COMPILER_TARGET "${CLANG_TARGET}")
|
||||
set(CMAKE_AR "${TOOLCHAIN_AR}" CACHE FILEPATH "ar")
|
||||
set(CMAKE_RANLIB "${TOOLCHAIN_RANLIB}" CACHE FILEPATH "ranlib")
|
||||
set(CMAKE_LINKER "${TOOLCHAIN_LD}" CACHE FILEPATH "linker")
|
||||
set(CMAKE_NM "${TOOLCHAIN_NM}" CACHE FILEPATH "nm")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT} ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
#important: the GUI identifier is required so that executables can be launched on simulators
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "org.linphone.\${PRODUCT_NAME:identifier}")
|
24
cmake/toolchains/toolchain-mac-x86_64.cmake
Normal file
24
cmake/toolchains/toolchain-mac-x86_64.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
################################################################################
|
||||
#
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64")
|
||||
set(CLANG_TARGET "x86_64-apple-darwin")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/toolchain-mac-common.cmake")
|
26
cmake/toolchains/toolchain-uwp-common.cmake
Normal file
26
cmake/toolchains/toolchain-uwp-common.cmake
Normal file
|
@ -0,0 +1,26 @@
|
|||
############################################################################
|
||||
# toolchain-uwp-common.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
set(CMAKE_CROSSCOMPILING TRUE)
|
||||
|
||||
set(CMAKE_SYSTEM_NAME "WindowsStore")
|
||||
set(CMAKE_SYSTEM_VERSION "10.0")
|
||||
|
||||
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD TRUE)
|
||||
set(CMAKE_VS_WINRT_BY_DEFAULT TRUE)
|
22
cmake/toolchains/toolchain-uwp-x64.cmake
Normal file
22
cmake/toolchains/toolchain-uwp-x64.cmake
Normal file
|
@ -0,0 +1,22 @@
|
|||
################################################################################
|
||||
# toolchain-uwp-x64.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/toolchain-uwp-common.cmake")
|
22
cmake/toolchains/toolchain-uwp-x86.cmake
Normal file
22
cmake/toolchains/toolchain-uwp-x86.cmake
Normal file
|
@ -0,0 +1,22 @@
|
|||
################################################################################
|
||||
# toolchain-uwp-x86.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/toolchain-uwp-common.cmake")
|
31
cmake/toolchains/toolchain-windows-store-common.cmake
Normal file
31
cmake/toolchains/toolchain-windows-store-common.cmake
Normal file
|
@ -0,0 +1,31 @@
|
|||
############################################################################
|
||||
# toolchain-windows-store-common.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
set(CMAKE_C_STANDARD_LIBRARIES "WindowsApp.lib ${CMAKE_C_STANDARD_LIBRARIES}")
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "WindowsApp.lib ${CMAKE_CXX_STANDARD_LIBRARIES}")
|
||||
|
||||
set(CMAKE_EXE_LINKER_FLAGS_INIT "/APPCONTAINER")
|
||||
set(CMAKE_MODULE_LINKER_FLAGS_INIT "/APPCONTAINER")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS_INIT "/APPCONTAINER")
|
||||
|
||||
|
||||
add_compile_definitions("ENABLE_MICROSOFT_STORE_APP" "_WIN32_WINNT=0x0A00")
|
||||
|
||||
|
||||
link_directories(BEFORE ${MICROSOFT_STORE_LINK_PATHS})
|
23
cmake/toolchains/toolchain-windows-store-x64.cmake
Normal file
23
cmake/toolchains/toolchain-windows-store-x64.cmake
Normal file
|
@ -0,0 +1,23 @@
|
|||
################################################################################
|
||||
# toolchain-windows-store-x64.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# set(CMAKE_SYSTEM_PROCESSOR "x86_64")
|
||||
set(MICROSOFT_STORE_LINK_PATHS "\$(WindowsSDK_LibraryPath_x64);\$(NETFXKitsDir)Lib\\um\\x64;\$(VC_LibraryPath_VC_x64_store);\$(VC_ReferencesPath_ATL_x64);\$(VC_LibraryPath_VC_x64);\$(VC_LibraryPath_x64);\$(VC_VS_LibraryPath_VC_VS_x64);\$(LibraryPath);\$(VC_LibraryPath_VC_x64_store)\\references")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/toolchain-windows-store-common.cmake")
|
23
cmake/toolchains/toolchain-windows-store-x86.cmake
Normal file
23
cmake/toolchains/toolchain-windows-store-x86.cmake
Normal file
|
@ -0,0 +1,23 @@
|
|||
################################################################################
|
||||
# toolchain-windows-store-x86.cmake
|
||||
# Copyright (c) 2021-2023 Belledonne Communications SARL.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# set(CMAKE_SYSTEM_PROCESSOR "x86")
|
||||
set(MICROSOFT_STORE_LINK_PATHS "\$(WindowsSDK_LibraryPath_x86);\$(NETFXKitsDir)Lib\\um\\x86;\$(VC_LibraryPath_VC_x86_store);\$(VC_ReferencesPath_ATL_x86);\$(VC_LibraryPath_VC_x86);\$(VC_LibraryPath_x86);\$(VC_VS_LibraryPath_VC_VS_x86);\$(LibraryPath);\$(VC_LibraryPath_VC_x86_store)\\references")
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/toolchain-windows-store-common.cmake")
|
44
docker-files/bc-dev-centos7-fuse-qt-wget
Normal file
44
docker-files/bc-dev-centos7-fuse-qt-wget
Normal file
|
@ -0,0 +1,44 @@
|
|||
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-centos7:20210217_python3
|
||||
|
||||
MAINTAINER Peio Rigaux <peio.rigaux@belledonne-communications.com>
|
||||
|
||||
|
||||
# QT Dependenciesi (pigz is used to parallelize compression)
|
||||
RUN sudo yum install -y libxkbcommon* libxcb freeglut-devel pigz icc-profiles-openicc fontconfig fontconfig-devel libfontconfig1-dev freetype-devel
|
||||
RUN sudo yum install -y devtoolset-8
|
||||
RUN sudo yum install -y devtoolset-8-gcc*
|
||||
RUN scl enable devtoolset-8 bash
|
||||
|
||||
RUN sudo yum install -y gperf flex
|
||||
|
||||
SHELL ["/bin/bash", "--login", "-c"]
|
||||
|
||||
RUN scl enable devtoolset-8 bash
|
||||
RUN gcc --version
|
||||
# Configure AppImages dependencies
|
||||
RUN sudo yum install -y fuse fuse-libs wget
|
||||
|
||||
|
||||
|
||||
# Build qt5.12.12
|
||||
RUN git clone -b feature/webview_subscription --single-branch https://gitlab.linphone.org/BC/public/linphone-desktop.git && \
|
||||
./linphone-desktop/tools/build_qt_rpm && \
|
||||
sudo rpm -i ./linphone-desktop/rpm-linphone-qt-5.12.12/rpmbuild/RPMS/x86_64/*.rpm && \
|
||||
sudo mv ./linphone-desktop/rpm-linphone-qt-5.12.12/rpmbuild/RPMS/x86_64/*.rpm / && \
|
||||
sudo rm -rf ./linphone-desktop
|
||||
|
||||
|
||||
RUN echo 'source /opt/rh/devtoolset-8/enable' >> /home/bc/.bashrc
|
||||
RUN echo 'source /opt/rh/devtoolset-8/enable' >> /home/bc/.shrc; exit 0
|
||||
|
||||
# This tells /bin/sh to load '~/.shrc' on starting
|
||||
ENV ENV=~/.shrc
|
||||
|
||||
|
||||
ENV Qt5_DIR=/opt/com.belledonne-communications/linphone/lib/cmake
|
||||
ENV PATH=$PATH:/opt/com.belledonne-communications/linphone/bin
|
||||
|
||||
USER bc
|
||||
WORKDIR /home/bc
|
||||
ENV PS1='\[\e[34m\]\u@bc-dev-centos7>\[\e[0m\] '
|
||||
CMD bash
|
60
docker-files/bc-dev-debian9-appimage
Normal file
60
docker-files/bc-dev-debian9-appimage
Normal file
|
@ -0,0 +1,60 @@
|
|||
|
||||
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-debian9:20230302_newer_clang_cpp17
|
||||
|
||||
ARG QT_EMAIL
|
||||
ARG QT_PASSWORD
|
||||
ARG QT_VERSION=5.15.2
|
||||
ARG QT_VERSION_MODULE=qt.qt5.51512
|
||||
ARG QT_MODULES=qtwebengine qtnetworkauth
|
||||
|
||||
MAINTAINER Peio Rigaux <peio.rigaux@belledonne-communications.com>
|
||||
|
||||
#Tools for QT buid script
|
||||
RUN sudo apt-get update && sudo apt-get install -y pigz
|
||||
|
||||
#QT Dependencies
|
||||
#atspi and dbus may be used to enable qt accessibility for screan reader
|
||||
#xkbcommon is needed for special keyboard features
|
||||
#flite1-dev, libspeechd-dev speech-dispatcher are needed for text to speech
|
||||
#libfontconfig1-dev is needed to load correct fonts (support of ideograms, etc..)
|
||||
#libgstreamer-plugins-base1.0 multimedia module (video playback)
|
||||
#needed for xcb : libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxkbcommon-x11-dev
|
||||
RUN sudo apt-get update && sudo apt-get install -y libxkbcommon* flite1-dev libspeechd-dev speech-dispatcher libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libx11-xcb* libxcb* qdbus-qt5 libqt5dbus5 libdbus-1-dev libdbus-glib-1-dev libatspi2.0-0 libatspi2.0-dev libgstreamer-plugins-base1.0
|
||||
RUN sudo apt-get update && sudo apt-get install -y libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev
|
||||
|
||||
#needed fot qt to find dbus
|
||||
ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
|
||||
#Appimage deps
|
||||
RUN sudo apt-get install -y wget fuse libfuse2 gnupg2
|
||||
|
||||
#Update certificates
|
||||
RUN sudo sed -i '/^mozilla\/DST_Root_CA_X3/s/^/!/' /etc/ca-certificates.conf
|
||||
RUN sudo update-ca-certificates -f
|
||||
|
||||
|
||||
########### QT
|
||||
# Add Qt and download
|
||||
#Maintenance tools
|
||||
#ADD https://download.qt.io/development_releases/online_installers/4.4/qt-unified-linux-x64-4.4.0-beta-online.run /home/bc/qt-unified-linux-x64-4.4.0-beta-online.run
|
||||
#RUN sudo chmod +x /home/bc/qt-unified-linux-x64-4.4.0-beta-online.run
|
||||
#RUN sudo /home/bc/qt-unified-linux-x64-4.4.0-beta-online.run install $QT_VERSION_MODULE $QT_VERSION_MODULE.qtpdf $QT_VERSION_MODULE.qtwebengine $QT_VERSION_MODULE.qtnetworkauth --email $QT_EMAIL --pw $QT_PASSWORD --accept-licenses --accept-obligations --auto-answer telemetry-question=No,AssociateCommonFiletypes=Yes --confirm-command --no-default-installations
|
||||
|
||||
USER bc
|
||||
WORKDIR /home/bc
|
||||
|
||||
# Manual
|
||||
RUN sudo pip3 install aqtinstall
|
||||
RUN sudo python3 -m aqt install $QT_VERSION linux desktop -O /opt/Qt -m $QT_MODULES
|
||||
## QtCore need libxcb-util.so.1 that need xorg-macros that is in xutils-dev
|
||||
RUN sudo apt-get install -y xutils-dev
|
||||
RUN git clone --recursive git://anongit.freedesktop.org/git/xcb/util
|
||||
## The copy is needed because the appimage doesn't get the dependency in /usr/local/lib (why is unknown)
|
||||
RUN cd util && ./autogen.sh && make && sudo make install && sudo cp /usr/local/lib/libxcb-util.so.1 /opt/Qt/$QT_VERSION/gcc_64/lib/
|
||||
RUN sudo chown -R bc:bc /opt/Qt/
|
||||
|
||||
|
||||
ENV Qt5_DIR=/opt/Qt/$QT_VERSION/gcc_64/lib/cmake
|
||||
ENV PATH=/opt/Qt/$QT_VERSION/gcc_64/bin:$PATH
|
||||
ENV PS1='\[\e[34m\]\u@bc-dev-centos7>\[\e[0m\] '
|
||||
CMD bash
|
110
docker-files/bc-dev-ubuntu-20-04-lts
Normal file
110
docker-files/bc-dev-ubuntu-20-04-lts
Normal file
|
@ -0,0 +1,110 @@
|
|||
###############################################################################
|
||||
# Dockerfile used to make gitlab.linphone.org:4567/bc/public/linphone-desktop/bc-dev-ubuntu-20-04-lts:20231024_add_multimedia
|
||||
###############################################################################
|
||||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
# Qt on Ubuntu 20.04 is too old. Use a downloader.
|
||||
ARG QT_VERSION=5.15.2
|
||||
ARG QT6_VERSION=6.5.3
|
||||
#Do not use it. It seems that it cannot be used from python command.
|
||||
#ARG QT_MODULES=qtnetworkauth qtquick3d qtmultimedia
|
||||
|
||||
MAINTAINER Julien Wadel <julien.wadel@belledonne-communications.com>
|
||||
|
||||
# Use a Swiss mirror
|
||||
RUN sed -i -E 's/(archive|security)\.ubuntu\.com/ch.archive.ubuntu.com/' /etc/apt/sources.list
|
||||
|
||||
# add fallbacks for timeout connections.
|
||||
|
||||
#France
|
||||
RUN echo "deb http://fr.archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list
|
||||
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main restricted" >> /etc/apt/sources.list
|
||||
RUN echo "deb http://ch.archive.ubuntu.com/ubuntu/ bionic-updates main restricted" >> /etc/apt/sources.list
|
||||
#Belgium
|
||||
RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list
|
||||
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main restricted" >> /etc/apt/sources.list
|
||||
RUN echo "deb http://be.archive.ubuntu.com/ubuntu/ bionic-updates main restricted" >> /etc/apt/sources.list
|
||||
#International
|
||||
RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic main restricted" >> /etc/apt/sources.list
|
||||
RUN echo "deb http://security.ubuntu.com/ubuntu bionic-security main restricted" >> /etc/apt/sources.list
|
||||
RUN echo "deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted" >> /etc/apt/sources.list
|
||||
|
||||
# Configure locale
|
||||
RUN apt-get update && \
|
||||
apt-get install -y locales && \
|
||||
apt-get clean && \
|
||||
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||
locale-gen
|
||||
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
|
||||
ENV TZ=Europe/Paris
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ENV SHELL=/bin/bash
|
||||
#ENV PS1='\[\e[33m\]\u@bc-dev-ubuntu-20-04>\[\e[0m\] '
|
||||
|
||||
# Install common general tools
|
||||
RUN apt-get update && \
|
||||
apt-get install -y nano sudo vim && \
|
||||
apt-get clean
|
||||
|
||||
# Install development tools
|
||||
RUN apt-get update && \
|
||||
apt-get install -y alien at autoconf bison ccache clang doxygen elfutils g++ gdb git graphviz intltool libtool lsb-release make ninja-build openssh-client patch perl python3-pip python3-pystache python-six python3-jsonschema python3-jinja2 meson yasm && \
|
||||
apt-get clean
|
||||
|
||||
# Install linphone & flexisip dependencies development packages
|
||||
RUN apt-get update && \
|
||||
apt-get install -y libasound2-dev libavcodec-dev libavutil-dev libbsd-dev libegl1-mesa-dev libglew-dev libgsm1-dev libjansson-dev libmariadb-dev-compat libmbedtls-dev libopus-dev libpq-dev libprotobuf-dev libpulse-dev libqt5svg5-dev libsnmp-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libsrtp2-dev libssl-dev libswscale-dev libturbojpeg0-dev libv4l-dev libvpx-dev libxerces-c-dev libxml2-dev libxv-dev protobuf-compiler qttools5-dev qttools5-dev-tools xsdcxx && \
|
||||
apt-get clean
|
||||
|
||||
# Install signing tools
|
||||
RUN sudo apt-get install -y gnupg2
|
||||
|
||||
# Install configuration tools
|
||||
RUN sudo apt-get install -y wget
|
||||
|
||||
# Configure user bc
|
||||
RUN useradd -ms /bin/bash bc && \
|
||||
echo 'bc:cotcot' | chpasswd && \
|
||||
echo 'bc ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# Install newest cmake. Documented at https://gist.github.com/bmegli/4049b7394f9cfa016c24ed67e5041930
|
||||
RUN wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3.tar.gz && \
|
||||
tar -zvxf cmake-3.25.3.tar.gz && \
|
||||
cd cmake-3.25.3 && ./bootstrap && make -j8 && \
|
||||
sudo apt-get install checkinstall && sudo checkinstall --pkgname=cmake --pkgversion="3.25-custom" --default && hash -r && \
|
||||
cd .. && sudo rm -rf cmake-3.25.3 && rm -rf cmake-3.25.3.tar.gz
|
||||
|
||||
# Install nasm from source as we need a newer version than the one being packaged
|
||||
RUN curl --fail --silent --show-error --location https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/nasm-2.16.01.tar.gz | \
|
||||
tar --extract --gzip --file - && cd nasm-2.16.01 && \
|
||||
./configure --prefix=/usr/local && make && make install && \
|
||||
cd .. && rm -rf nasm-2.16.01
|
||||
|
||||
########### QT
|
||||
|
||||
RUN sudo apt-get update && sudo apt-get install -y libxkbcommon* flite1-dev libspeechd-dev speech-dispatcher libfontconfig1-dev libfreetype6-dev libx11-dev libxext-dev libxfixes-dev libxi-dev libxrender-dev libx11-xcb* libxcb* qdbus-qt5 libqt5dbus5 libdbus-1-dev libdbus-glib-1-dev libatspi2.0-0 libatspi2.0-dev
|
||||
RUN sudo apt-get update && sudo apt-get install -y libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev
|
||||
|
||||
USER bc
|
||||
WORKDIR /home/bc
|
||||
|
||||
RUN sudo pip3 install --upgrade setuptools
|
||||
RUN sudo pip3 install ez_setup
|
||||
|
||||
## Install Qt download tool
|
||||
# installation is split because there is a way where some modules are not downloaded in the first attempt.
|
||||
RUN sudo pip3 install py7zr aqtinstall
|
||||
RUN sudo python3 -m aqt install-qt linux desktop $QT_VERSION -O /opt/Qt
|
||||
RUN sudo python3 -m aqt install-qt linux desktop $QT_VERSION -O /opt/Qt --noarchives -m qtnetworkauth qtquick3d
|
||||
RUN sudo python3 -m aqt install-qt linux desktop $QT6_VERSION -O /opt/Qt
|
||||
RUN sudo python3 -m aqt install-qt linux desktop $QT6_VERSION -O /opt/Qt --noarchives -m qtnetworkauth qtquick3d qtmultimedia
|
||||
|
||||
RUN sudo chown -R bc:bc /opt/Qt/
|
||||
|
||||
RUN qtchooser -install $QT_VERSION /opt/Qt/$QT_VERSION/gcc_64/bin/qmake
|
||||
RUN qtchooser -install $QT6_VERSION /opt/Qt/$QT6_VERSION/gcc_64/bin/qmake
|
||||
|
||||
CMD bash
|
35
docker-files/bc-dev-ubuntu-rolling-qt-fuse-wget-gpg2
Normal file
35
docker-files/bc-dev-ubuntu-rolling-qt-fuse-wget-gpg2
Normal file
|
@ -0,0 +1,35 @@
|
|||
FROM gitlab.linphone.org:4567/bc/public/linphone-sdk/bc-dev-ubuntu-rolling:20210217_python3
|
||||
|
||||
MAINTAINER Peio Rigaux <peio.rigaux@belledonne-communications.com>
|
||||
|
||||
#Tools for QT buid script
|
||||
RUN sudo apt-get update && sudo apt-get install -y pigz
|
||||
|
||||
RUN sudo ln -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
#QT Dependencies
|
||||
#atspi and dbus may be used to enable qt accessibility for screan reader
|
||||
#xkbcommon is needed for special keyboard features
|
||||
#flite1-dev, libspeechd-dev speech-dispatcher are needed for text to speech
|
||||
#libfontconfig1-dev is needed to load correct fonts (support of ideograms, etc..)
|
||||
RUN sudo apt-get update && sudo apt-get install -y libxkbcommon* libxcb-xfixes0-dev flite1-dev libspeechd-dev speech-dispatcher libfontconfig1-dev qdbus-qt5 libqt5dbus5 libdbus-1-dev libdbus-glib-1-dev libatspi2.0-0 libatspi2.0-dev
|
||||
|
||||
#needed fot qt to find dbus
|
||||
ENV PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig
|
||||
# Build qt5.12.5
|
||||
RUN git clone -b master --single-branch https://gitlab.linphone.org/BC/public/linphone-desktop.git && \
|
||||
./linphone-desktop/tools/build_qt_rpm && \
|
||||
find "./linphone-desktop/rpm-linphone-qt-5.12.5/rpmbuild/RPMS/x86_64/" -iname "*.rpm" -exec sudo fakeroot alien -d {} + && \
|
||||
find "." -maxdepth 1 -iname "*.deb" -exec sudo dpkg -i --force-overwrite {} + && \
|
||||
rm -rf ./linphone-desktop
|
||||
|
||||
ENV Qt5_DIR=/opt/com.belledonne-communications/linphone/lib/cmake
|
||||
ENV PATH=/opt/com.belledonne-communications/linphone/bin:$PATH
|
||||
|
||||
#Appimage deps
|
||||
RUN sudo apt-get install -y wget fuse libfuse2 gnupg2
|
||||
|
||||
USER bc
|
||||
WORKDIR /home/bc
|
||||
ENV PS1='\[\e[34m\]\u@bc-dev-centos7>\[\e[0m\] '
|
||||
CMD bash
|
269
external/ispell/CHANGES
vendored
Normal file
269
external/ispell/CHANGES
vendored
Normal file
|
@ -0,0 +1,269 @@
|
|||
Version 3.4.02
|
||||
==============
|
||||
|
||||
- A major bug in 3.4.01 that caused incorrect behavior with many
|
||||
languages has been corrected.
|
||||
|
||||
- The default maximum number of stringchars has been doubled.
|
||||
|
||||
- Some spurious compiler warnings have been suppressed.
|
||||
|
||||
Version 3.4.01
|
||||
==============
|
||||
|
||||
- The english.aff file has been revised so that UTF-8 is now the
|
||||
default encoding for English dictionaries.
|
||||
|
||||
- Some subtle bugs with the handling of stringchars, which were
|
||||
revealed by the changes to english.aff, have been corrected.
|
||||
|
||||
- A new affix command, "options", has been added to allow selection
|
||||
of options related to a particular string character type. There
|
||||
are currently two options, raw_display and squeeze_strings. Both
|
||||
should be activated for UTF-8 encodings but few others. This
|
||||
change causes hash files built with earlier ispell versions to be
|
||||
incompatible; old hash files will need to be rebuilt.
|
||||
|
||||
- Over 6000 words have been added to the English dictionaries. Most
|
||||
of them are in the english.xlg variant, but some are included in
|
||||
smaller dictionaries as well. The English dictionaries also take
|
||||
advantage of the new UTF-8 encoding to support correct spellings of
|
||||
words adopted from other languages, such as crêpe.
|
||||
|
||||
Version 3.4.00
|
||||
==============
|
||||
|
||||
- The english.5 manual page has been dropped from the distribution;
|
||||
the english.aff file provides superior documentation (and in any
|
||||
case, most people will use munchlist to apply affixes).
|
||||
|
||||
- Ispell now supports systems (BSD) that foolish discarded backwards
|
||||
compatibility and insist on using termios.
|
||||
|
||||
- A function (getline) has been renamed in correct.c to solve
|
||||
compilation problems on some systems.
|
||||
|
||||
- The manual page now correctly identifies the ispell version that it
|
||||
describes.
|
||||
|
||||
- It is now possible to insert the ispell version information into
|
||||
shell scripts via the Makefile.
|
||||
|
||||
- An error has been corrected in the English affix files that caused
|
||||
certain words ending in "th" to be pluralized incorrectly. The
|
||||
dictionaries have been updated to ensure that no incorrect plurals
|
||||
have crept in.
|
||||
|
||||
- The personal dictionary is now written in a stable order when there
|
||||
are multiple variant capitalizations of a word.
|
||||
|
||||
- The security of temporary files has been improved on systems that
|
||||
don't have the "mktemp" command.
|
||||
|
||||
- The deformatters makefile has been changed to be compatible with
|
||||
older versions of make.
|
||||
|
||||
- A bug in TeX deformatting has been corrected. Previously, two
|
||||
adjacent math-mode environments introduced with dollar signs, such
|
||||
as $a=b$$c=d$, would cause ispell to lose track of whether it was
|
||||
in math mode.
|
||||
|
||||
- The Makefile now supports a DESTDIR installation prefix (patch from
|
||||
Petter Reinholdtsen)
|
||||
|
||||
- The American and British Makefiles have been simplified to ensure
|
||||
that dictionaries are always built with the lastest information.
|
||||
|
||||
Version 3.3.02
|
||||
==============
|
||||
|
||||
- A Makefile bug has been corrected which caused the default hash
|
||||
file to be created under the wrong name. If you installed 3.3.01,
|
||||
you should remove the file /usr/local/lib/ispell/english (or
|
||||
whatever your default language is, and in the appropriate
|
||||
directory) to clean up from the effects of this bug.
|
||||
|
||||
- A bug has been corrected that caused ispell to allocate space for
|
||||
zero elements when initializing the expansion tables.
|
||||
|
||||
- Hash files are now installed in reverse order of how they are
|
||||
listed in LANGUAGES. As a result, the default american or british
|
||||
hash file is now that first listed in LANGUAGES, rather than the
|
||||
last.
|
||||
|
||||
- A misspelling in config.X has been corrected. This would only have
|
||||
affected Windows systems that didn't use the supplied local.h
|
||||
files.
|
||||
|
||||
- EXEEXT is now printed by "ispell -vv".
|
||||
|
||||
- The local.h.macos file now correctly leaves USG undefined.
|
||||
|
||||
- There is now a local.h.cygwin file.
|
||||
|
||||
Version 3.3.01
|
||||
==============
|
||||
|
||||
- The default dictionary is now the first dictionary defined in
|
||||
LANGUAGES. It is no longer necessary to define MASTERHASH,
|
||||
DEFHASH, and DEFLANG. However, if you define those variables
|
||||
there, your definitions will be respected.
|
||||
|
||||
- Count files are no longer used for dictionaries; this corrects
|
||||
problems with hash table overflows for some users who build
|
||||
multiple dictionaries.
|
||||
|
||||
- If there is a directory named ~/.ispell_logs, ispell in
|
||||
command-line mode will create logs of your spelling corrections
|
||||
there. These logs may be useful in identifying your common
|
||||
errors. Someday, they may also be used for research into better
|
||||
methods of spelling correction.
|
||||
|
||||
- A bug has been fixed that caused installation to fail because it
|
||||
referred to the nonexistent file "fixispell-a".
|
||||
|
||||
- The pc/local.* files have been updated to choose consistent
|
||||
hash-file names.
|
||||
|
||||
- A tiny portability problem in ispell.1X has been corrected.
|
||||
|
||||
- DJGPP updates from Eli Zaretskii <eliz@gnu.org>:
|
||||
|
||||
* deformatters/Makefile (PROGRAMS): Use $EXEEXT.
|
||||
|
||||
* config.X (LINK): Define only if undefined.
|
||||
(EXEXT): New variable.
|
||||
|
||||
* Makefile (install-basic, install-dictbuild): Use $$EXEEXT for
|
||||
systems where executable files have special extensions.
|
||||
(install-deformatters): Run config.sh and pass EXEEXT to sub-Make.
|
||||
(config.sh): Add EXEEXT to the list of variables put into
|
||||
config.sh.
|
||||
|
||||
* pc/make-dj.bat: Sync with the new files and build commands.
|
||||
* pc/makeemx.bat: Ditto.
|
||||
|
||||
* pc/djterm.c (tputs, tgetent): Fix return value according to
|
||||
prototypes on proto.h.
|
||||
|
||||
* pc/cfglang.sed (PATH_SEPARATOR): Set to ":", since
|
||||
english/Makefile prepends to PATH using the ":" separator.
|
||||
|
||||
* pc/README: Update DJGPP repository URL, versions of utilities,
|
||||
and other relevant information.
|
||||
|
||||
* pc/local.djgpp: Update Eli Zaretskii's email address.
|
||||
(LINK): Set to "cp -p".
|
||||
(MAN4DIR): Delete.
|
||||
(MAN45DIR): New; define to point to DJGPP's man5.
|
||||
(INSTALL): Define to invoke `ginstall'.
|
||||
(OPTIONVAR, LIBRARYVAR): Remove, they are handled by config.X.
|
||||
(EXEEXT): New; define to ".exe".
|
||||
|
||||
- Constructed files (config.sh and defhash.h) now depend on the
|
||||
Makefile, since changes in the latter often affect the contents of
|
||||
the former. This is primarily of importance to the developer.
|
||||
|
||||
Version 3.3.00
|
||||
==============
|
||||
|
||||
- Item 4 in the license, which some people found objectionable, has
|
||||
been modified.
|
||||
|
||||
- Ispell and the scripts now handle temporary files securely.
|
||||
|
||||
- Sample local.h files are now distributed for several popular systems.
|
||||
|
||||
- Support has been added for compiling under DOS/Windows. See
|
||||
pc/README for information. Note that Windows is still an
|
||||
unsupported operating system because I don't have a Windows
|
||||
development environment. I will happily accept patches to correct
|
||||
problems under Windows, but cannot solve bugs myself.
|
||||
|
||||
- External deformatters now work.
|
||||
|
||||
- The two supplied deformatters have been renamed to defmt-c and
|
||||
defmt-sh. This change is necessary to allow them to be built on
|
||||
stupid MS-DOS systems with limits on filename lengths.
|
||||
|
||||
- A bug that could cause infinite loops when long lines were fed to
|
||||
ispell in "-a" mode has been corrected.
|
||||
|
||||
- A number of misspellings have been removed from the English
|
||||
dictionaries, and new words have been added.
|
||||
|
||||
- Command-line options can now be passed in the ISPELL_OPTIONS
|
||||
environment variable.
|
||||
|
||||
- A CHANGES file is now being distributed.
|
||||
|
||||
- A number of configuration options have been added. See config.X if
|
||||
something isn't to your liking.
|
||||
|
||||
- Workarounds have been added for POSIX stupidity that broke
|
||||
backwards compatibility.
|
||||
|
||||
- Obsolete notes about special systems have been removed from the
|
||||
README.
|
||||
|
||||
- A number of configuration options have been changed to have
|
||||
defaults that are more appropriate to modern systems.
|
||||
|
||||
- TeX deformatting has been slightly improved.
|
||||
|
||||
- A kludge has been added to deal with the fact that the German
|
||||
"ess-zed" character has no uppercase equivalent. Previously, when
|
||||
ispell was presented with an all-uppercase word such as GROSS, it
|
||||
would suggest that same word as a correction. It now accepts such
|
||||
constructs without complaint.
|
||||
|
||||
- A number of portability improvements have been added.
|
||||
|
||||
- Most ispell support programs and scripts now support the -w switch
|
||||
where appropriate.
|
||||
|
||||
- A new expand option, -e5, has been added.
|
||||
|
||||
- A new deformatting flag, -o ("ordinary" file) has been added.
|
||||
|
||||
- The shell scripts now use /tmp for temporary files by default,
|
||||
since some systems (Mac OS X) don't have /usr/tmp and modern
|
||||
machines have plenty of space in /tmp.
|
||||
|
||||
- An ancient syntax error in parse.y, long undetected by older
|
||||
versions of both yacc and bison, has been corrected.
|
||||
|
||||
- When MASKBITS is set to 64, the characters "[\]^_`" are now allowed
|
||||
as flag characters.
|
||||
|
||||
- On 64-bit machines, MASKBITS will always be at least 64.
|
||||
|
||||
- The defaults for various constants (in particular, the maximum size
|
||||
and number of string characters) have been expanded so that ispell
|
||||
can support most European languages at the default settings.
|
||||
|
||||
- The English dictionary now supports all the ISO Latin-1 characters,
|
||||
so that words borrowed from other languages can be spell-checked.
|
||||
|
||||
- The English affix file contains sample declarations for accented
|
||||
characters encoded in HTML and UTF-8.
|
||||
|
||||
- A bug has been corrected that caused ispell to hang when control-Z
|
||||
was typed. Ispell also now correctly resets the terminal when
|
||||
suspended. However, it still doesn't refresh the screen when
|
||||
resumed; fixing the latter problem is not easy.
|
||||
|
||||
- Thanks to Ed Avis, the code in tgood.c has been improved a lot.
|
||||
(Many of the other changes, such as the -e5 switch, are also due to
|
||||
Ed.)
|
||||
|
||||
- Ispell will no longer segfault under certain conditions if HOME is
|
||||
not in the environment.
|
||||
|
||||
- Trailing whitespace is now trimmed from the names of files included
|
||||
by the &Include_File& feature.
|
||||
|
||||
Version 3.2.06
|
||||
==============
|
||||
|
||||
Changes prior to version 3.2.06 are not itemized.
|
57
external/ispell/CMakeLists.txt
vendored
Normal file
57
external/ispell/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(ISPELL_VERSION 3.4.05)
|
||||
set(ISPELL_TARGET_NAME ISpell)
|
||||
project(${ISPELL_TARGET_NAME} VERSION ${ISPELL_VERSION} LANGUAGES C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
execute_process(COMMAND
|
||||
sh -c "mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/include && cp *.h ${CMAKE_CURRENT_BINARY_DIR}/include"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
set(LOCAL_H "local.h.macos")
|
||||
elseif (UNIX)
|
||||
set(LOCAL_H "local.h.linux")
|
||||
else()
|
||||
message(FATAL_ERROR "Only supported on APPLE and UNIX")
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND
|
||||
cp ${LOCAL_H} local.h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/local.h" FILE_CONTENT)
|
||||
string(REPLACE "/usr/local" "${CMAKE_INSTALL_FULL_DATAROOTDIR}/${EXECUTABLE_NAME}" FILE_CONTENT "${FILE_CONTENT}" )
|
||||
file(WRITE "${CMAKE_CURRENT_SOURCE_DIR}/local.h" "${FILE_CONTENT}")
|
||||
|
||||
|
||||
set(ISPELL_SOURCES
|
||||
term.c
|
||||
ispell.c
|
||||
correct.c
|
||||
defmt.c
|
||||
dump.c
|
||||
exp_table.c
|
||||
fields.c
|
||||
good.c
|
||||
lookup.c
|
||||
hash.c
|
||||
makedent.c
|
||||
tgood.c
|
||||
tree.c
|
||||
xgets.c
|
||||
)
|
||||
|
||||
add_library(${ISPELL_TARGET_NAME} SHARED ${ISPELL_SOURCES})
|
||||
|
||||
install(TARGETS ${ISPELL_TARGET_NAME}
|
||||
EXPORT ${ISPELL_TARGET_NAME}LibraryDepends
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
227
external/ispell/Contributors
vendored
Normal file
227
external/ispell/Contributors
vendored
Normal file
|
@ -0,0 +1,227 @@
|
|||
Ispell has a long and convoluted history. I have tried to track down
|
||||
as much as possible about it and condense it below.
|
||||
|
||||
THE DEVELOPMENT OF SPELL-CHECKING AND THE FIRST ISPELL
|
||||
|
||||
The following background information on spelling checkers in general,
|
||||
and ispell in particular, was provided to me by Les Earnest
|
||||
(les@dec-lite.stanford.edu):
|
||||
|
||||
> The earliest spelling checker (of sorts) of which I am aware was in a
|
||||
> program that attempted to automatically receive human-keyed Morse
|
||||
> code, which can be ambiguous because of the variable timing between
|
||||
> dots, dashes, intercharacter pauses, and interword pauses. This
|
||||
> program didn't use a full dictionary; instead, used a table of
|
||||
> digraphs (two-letter sequences) that occur in English and barred
|
||||
> improper letter sequences. This program was written by someone at MIT
|
||||
> Lincoln Lab around 1959 and, I think, ran on the TX-2 computer there.
|
||||
> Unfortunately, I don't remember his name. I might still have the
|
||||
> paper he wrote in my files but it would take a major search to find it
|
||||
> and I might not succeed.
|
||||
>
|
||||
> A program that I wrote in 1961 to read cursive writing contained a
|
||||
> real spelling checker, using the 10,000 most common English words.
|
||||
> It is reported in:
|
||||
> L. Earnest, "Machine Recognition of Cursive Writing," Information
|
||||
> Processing 62, (Proc. IFIP Congress 1962, Munich), North-Holland,
|
||||
> Amsterdam, 1963.
|
||||
> and
|
||||
> N. Lindgren, ``Machine Recognition of Human Language, Part III -
|
||||
> Cursive Script Recognition'', IEEE Spectrum, May 1965.
|
||||
>
|
||||
> I brought that dictionary to Stanford and got a PhD student to write
|
||||
> a spelling checker for text in Lisp running on our PDP-6 computer at
|
||||
> the Stanford Artificial Intelligence Lab around 1967.
|
||||
> Unfortunately, I do not remember which student it was; it could have
|
||||
> been Gil Falk. It was a rather simple program (certainly much
|
||||
> simpler than the earlier cursive writing program) and I didn't think
|
||||
> of it as a significant development at the time.
|
||||
>
|
||||
> [Later], I got another PhD student, Ralph Gorin, to do a better and
|
||||
> faster spelling checker sometime in the early '70s, still using my
|
||||
> old dictionary. Ralph later wrote an article about it in CACM. I
|
||||
> believe that he later augmented the dictionary.
|
||||
|
||||
[note: Ralph has since informed me that he wrote no such article. The
|
||||
program was called SPELL and was written in 1971. Ralph provided me
|
||||
with a reference to "Computer Programs for Spelling Correction", by
|
||||
James L. Peterson, Springer-Verlag, Berlin, 1980, No. 96 in the series
|
||||
"Lecture Notes in Computer Science." This book states that Ralph's
|
||||
SPELL program, which was the direct ancestor of ispell, was the first
|
||||
computer program written for checking the spelling of text documents.
|
||||
The book is also a good source of references on spelling programs.]
|
||||
|
||||
> ...
|
||||
>
|
||||
> [Ispell] was originally written in PDP-10 assembly language and ran
|
||||
> under the WAITS operating system, which is similar to TOPS-10 but existed
|
||||
> only on SAIL (a dual processor KA10/PDP-6 system). It was and is called
|
||||
> SPELL on that machine. It later was modified to run under Tenex and
|
||||
> TOPS-20.
|
||||
|
||||
[Ralph mentions that SPELL was also ported to MIT's ITS and TOPS-10.]
|
||||
|
||||
The Tenex version of ispell was later revised by W. E. Matson (1974),
|
||||
and Bill Ackerman (1978). Bill has provided the following information:
|
||||
|
||||
> I came across the SPELL program in 1978 on ITS. It was a port from
|
||||
> Stanford, and had the names Ralph Gorin (approximately 1971) and
|
||||
> Wayne Matson (1974) associated with it. I did 3 things to it:
|
||||
>
|
||||
> Rewrote it as a native program for ITS, and, shortly thereafter,
|
||||
> TOPS-20. (I never did anything for TOPS-10, and am not aware
|
||||
> that it ever ran on TOPS-10, though it may have.)
|
||||
>
|
||||
> Replaced the heuristics for suffix removal, which I found unreliable
|
||||
> and unsatisfactory, with an algorithm that was driven by specific
|
||||
> suffix flags in the dictionary. This way, the dictionary would have
|
||||
> complete control over what words were legal, and there would be no
|
||||
> spurious hits.
|
||||
>
|
||||
> Apparently most importantly, though I had no idea at time, gave it
|
||||
> the name "ISPELL", for "ITS version of spell", since I didn't
|
||||
> consider myself authorized to throw away an existing program
|
||||
> and overwrite it with a new one under the same name.
|
||||
>
|
||||
> I have not followed the history of the program since then, and do not know
|
||||
> if it still uses the "suffix flags" in its dictionary. But if it does,
|
||||
> I introduced them. The Ispell algorithm that uses those flags to make
|
||||
> accurate decisions about the legality of words was documented in great
|
||||
> detail in James Peterson's Springer-Verlag book. (He spent a semester
|
||||
> at MIT while working on the book, and I provided him with a lot of
|
||||
> information and documentation at that time.)
|
||||
>
|
||||
> Bill Ackerman
|
||||
> wba@apollo.hp.com
|
||||
|
||||
Michael Adler adds:
|
||||
|
||||
> I did work on ispell in 1982. Actually, I stole the ispell
|
||||
> dictionary and suffix compression algorithm and wrote a spelling
|
||||
> checker for CP/M in 8080 assembler that I very creatively called "SPELL."
|
||||
> By sorting the dictionary alphabetically and using a difference encoding
|
||||
> I managed to pack the entire dictionary that Bill was using in about
|
||||
> 56Kb. The CP/M program read a document, sorted all the words alphabetically
|
||||
> and then checked them. It then reread the document and compared words as
|
||||
> it found them against the in memory, sorted and checked words. SPELL was
|
||||
> around in the public domain on CP/M.
|
||||
>
|
||||
> I was in high school at the time and talked to Bill only over email.
|
||||
> We wound up in the same compiler group at Apollo in the late 80's by
|
||||
> coincidence.
|
||||
|
||||
DEVELOPMENT OF THE C/UNIX VERSION OF ISPELL
|
||||
|
||||
In 1983, Pace Willisson (pace@prep.ai.mit.edu) wrote a C/Unix version
|
||||
from scratch, based on the ispell documentation.
|
||||
|
||||
In 1987, Walt Buehring revised and enhanced ispell, and posted it to the
|
||||
Usenet along with a dictionary. In addition, Walt wrote the first version
|
||||
of "ispell.el", the emacs interface.
|
||||
|
||||
Geoff Kuenning (geoff@ITcorp.com, that's me, and by the way I
|
||||
pronounce it "Kenning"; the "u" is silent) picked up this version,
|
||||
fixed some bugs, and added further enhancements, all of which made me
|
||||
the de-facto ispell maintainer for the net. I also put quite a bit of
|
||||
work into improving the quality of the dictionaries. In 1987 I began
|
||||
work on the "munchlist" script, which I originally intended to be used
|
||||
to add flags to personal dictionary entries. At the same time I was
|
||||
studying German, and wanted to use ispell to check the papers I was
|
||||
writing for that class. After thinking about it for some time, I
|
||||
realized that the suffix flags could be table-driven, which would both
|
||||
add flexibility and would get rid of certain difficult-to-find bugs.
|
||||
In 1988 I rewrote major portions of the code to do this, resulting in
|
||||
the first multi-lingual version. Ole Bjoern Hessen (obh@ifi.uio.no)
|
||||
in Norway alpha-tested this version and provided several important
|
||||
enhancements.
|
||||
|
||||
Bob Devine (vianet!devine) provided two larger dictionaries (which
|
||||
became the basis for english.1 and english.2) to me for inclusion
|
||||
with subsequent releases.
|
||||
|
||||
Ashwin Ram (ram@cs.yale.edu) made substantial enhancements to Walt
|
||||
Buehring's emacs interface, and provided them to me for inclusion
|
||||
with an earlier release.
|
||||
|
||||
The emacs interface was then completely overhauled by Ken Stevens
|
||||
(stevens@hplabs.hp.com), who also beta-tested the software and
|
||||
without whom this posting would not have been possible. If there's a
|
||||
feature in the emacs interface that you like, you probably have Ken to
|
||||
thank for it. His efforts have been tireless for many years.
|
||||
|
||||
Martin Boyer made major contributions to the munchlist script,
|
||||
including producing a version that runs under perl (see
|
||||
languages/Where for instructions on how to get that version).
|
||||
Philippe-Andre Prindeville provided xspell (a Motif-based X
|
||||
interface), and Moritz Willers provided a NeXTStep interface.
|
||||
|
||||
DEVELOPMENT AND DEATH OF ISPELL 4.0
|
||||
|
||||
Meanwhile, and unbeknownst to me, Pace Willisson was working on his
|
||||
own improvements to ispell. He focused primarily on dictionary size
|
||||
and startup time. His solution was a dictionary compression algorithm
|
||||
that detected and encoded frequent letter pairs. This also reduced
|
||||
the time needed to read it in. Pace also changed some internal data
|
||||
structures to improve startup time. Pace and I eventually discovered
|
||||
each other's efforts, and discussed re-merging our changes, but we
|
||||
decided that there would be too much work involved. This was partly
|
||||
because I was close to a release and didn't want to delay it with an
|
||||
extensive and error-prone merge.
|
||||
|
||||
In late 1992 (if my memory serves correctly), Richard Stallman
|
||||
contacted me, asking for permission to distribute ispell as part of
|
||||
the GNU suite. I responded that he was welcome to distribute it, but
|
||||
that I was not willing to place my software under the Gnu Public
|
||||
License. Through a misunderstanding, neither of us considered the
|
||||
possibility of finding a compromise license that both could live with.
|
||||
So Richard started a search for an alternate version, and found Pace
|
||||
working right in his back yard.
|
||||
|
||||
I have been told that when FSF first learned of Pace's version, they
|
||||
again considered using International Ispell instead because it was
|
||||
both more popular and more capable, but this idea was rejected due to
|
||||
the license misunderstanding. Instead, FSF enhanced Pace's version
|
||||
somewhat and called it ispell 4.0, apparently in the hopes that by
|
||||
numbering the version higher, it would become the standard.
|
||||
|
||||
When ispell 4.0 was released, much confusion ensued. Many ispell
|
||||
users innocently "upgraded" to 4.0 and then screamed when they could
|
||||
not find features to which they had grown accustomed. Europeans in
|
||||
general were angered by the apparent provincialism shown by the
|
||||
"dropping" of international support. I found myself inundated with
|
||||
questions about a version I had never heard of or seen.
|
||||
|
||||
One of the earliest and most common suggestions was that FSF should
|
||||
rename their version "gispell". This had a lot of precedent, both in
|
||||
the naming of other FSF utilities and in the then-recent change of the
|
||||
suffix used by gzip from ".z" to ".gz". Unfortunately, the FSF
|
||||
refused to do this. I may have inadvertently contributed to this
|
||||
refusal with a Usenet posting in which I tried to clarify what had
|
||||
happened, pointing out that the FSF version was more recently related
|
||||
to Pace's than my own. This may have been seen as an acknowledgment
|
||||
that FSF should have the rights to the name "ispell," and that I
|
||||
should rename my version.
|
||||
|
||||
A flame war arose, and I decided that the only way to solve the
|
||||
problem was to rename my version to eliminate the confusion. However,
|
||||
at about the same time Richard Stallman and I began negotiating via
|
||||
e-mail. We itemized and clarified his objections to my license, and I
|
||||
learned from a third party that FSF is willing to distribute software
|
||||
that falls under the University of California license (also known as
|
||||
the Berkeley license). Richard and I agreed that if I changed my
|
||||
license to be a paraphrase of the UC license, FSF would be willing to
|
||||
distribute my version with no changes. Since then, ispell 4.0 has
|
||||
been dropped by FSF and has pretty well disappeared from the net,
|
||||
leaving International Ispell as the version of choice for nearly everyone.
|
||||
|
||||
OTHER CONTRIBUTORS
|
||||
|
||||
Numerous other people have contributed enhancements, suggestions, and
|
||||
bug fixes. I used to attempt to keep track of all of them, and list
|
||||
their names here. However, I found that keeping the list of names
|
||||
correct was as time-consuming as fixing bugs, so I finally decided
|
||||
that the list had grown too long, and stopped keeping it current.
|
||||
This is unfortunate, because many people have made significant
|
||||
contributions to ispell and I would like to have a way to acknowledge
|
||||
them. So please remember that hundreds of people have helped in this
|
||||
effort, and that I appreciate each and every one of them.
|
18
external/ispell/ISpellConfig.cmake.in
vendored
Normal file
18
external/ispell/ISpellConfig.cmake.in
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
# - Config file for the ISpell package
|
||||
# It defines the following variables
|
||||
# ISpell_INCLUDE_DIRS - include directories for ISpell
|
||||
# ISpell_LIBRARIES - libraries to link against
|
||||
|
||||
|
||||
@PACKAGE_INIT@
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@ISPELL_TARGET_NAME@LibraryDepends.cmake")
|
||||
|
||||
set(ISPELL_LIBRARIES "@ISPELL_TARGET_NAME@")
|
||||
get_target_property(ISPELL_INCLUDE_DIRS "@ISPELL_TARGET_NAME@" INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18.0)
|
||||
add_library(@ISpell_TARGET_NAME@::@ISpell_TARGET_NAME@ ALIAS @ISpell_TARGET_NAME@)
|
||||
endif()
|
||||
|
||||
check_required_components(@ISpell_TARGET_NAME@)
|
74
external/ispell/Magiclines
vendored
Normal file
74
external/ispell/Magiclines
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
#
|
||||
# $Id: Magiclines,v 1.13 2005/04/14 14:38:23 geoff Exp $
|
||||
#
|
||||
# Copyright 1993, 1999, 2001, 2002, Geoff Kuenning, Claremont, CA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# The following lines can be inserted into /etc/magic or
|
||||
# /usr/lib/file/magic so that "file" will recognize ispell hash files.
|
||||
# On some systems, these lines will need modification. The most
|
||||
# common modifications involve turning the magic number into a 16-bit
|
||||
# integer (0x9602). Some systems (e.g., Ultrix) may require an extra
|
||||
# field to be added; see the documentation or comments for your magic
|
||||
# file for more information.
|
||||
#
|
||||
# $Log: Magiclines,v $
|
||||
# Revision 1.13 2005/04/14 14:38:23 geoff
|
||||
# Update license.
|
||||
#
|
||||
# Revision 1.12 2001/12/26 05:55:04 geoff
|
||||
# Get rid of obsolete options
|
||||
#
|
||||
# Revision 1.11 2001/07/25 21:51:47 geoff
|
||||
# Minor license update.
|
||||
#
|
||||
# Revision 1.10 2001/07/23 20:24:02 geoff
|
||||
# Update the copyright and the license.
|
||||
#
|
||||
# Revision 1.9 1999/01/07 01:57:49 geoff
|
||||
# Update the copyright.
|
||||
#
|
||||
# Revision 1.8 1995/01/08 23:23:52 geoff
|
||||
# Add comments that document minor variations in /etc/magic formats.
|
||||
#
|
||||
# Revision 1.7 1994/01/25 07:11:10 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
||||
#
|
||||
0 short 0xffff9602 ispell 3.x hash file
|
||||
>2 short 0x03 - 8-bit, capitalization, 26 flags
|
||||
>2 short 0x07 - 8-bit, capitalization, 52 flags
|
||||
>2 short 0x0B - 8-bit, capitalization, 128 flags
|
||||
>2 short 0x0F - 8-bit, capitalization, 256 flags
|
||||
>4 short >0 and %d string characters
|
280
external/ispell/Makekit
vendored
Executable file
280
external/ispell/Makekit
vendored
Executable file
|
@ -0,0 +1,280 @@
|
|||
: Use /bin/sh
|
||||
#
|
||||
# $Id: Makekit,v 1.53 2015-02-08 01:32:53-08 geoff Exp $
|
||||
#
|
||||
# Copyright 1992, 1993, 2001, 2005, Geoff Kuenning, Claremont, CA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Make an ispell distribution kit. This is not a clever script,
|
||||
# just a handy one.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
USAGE="Usage: Makekit [-d destdir] [-e]"
|
||||
#
|
||||
# destdir is the directory in which the kits will be made; you will
|
||||
# want to pick someplace that has lots of space.
|
||||
#
|
||||
# If -e is specified, the list of files in the kit is echoed to
|
||||
# stdout and no kit is made.
|
||||
#
|
||||
# $Log: Makekit,v $
|
||||
# Revision 1.53 2015-02-08 01:32:53-08 geoff
|
||||
# Remove english.5X from the kit.
|
||||
#
|
||||
# Revision 1.52 2005-05-25 09:17:57-07 geoff
|
||||
# Add local.h.cygwin to the kit.
|
||||
#
|
||||
# Revision 1.51 2005/04/27 01:18:34 geoff
|
||||
# Add the CHANGES file.
|
||||
#
|
||||
# Revision 1.50 2005/04/27 00:17:35 geoff
|
||||
# Add a sample local.h for BSD systems.
|
||||
#
|
||||
# Revision 1.49 2005/04/26 22:41:07 geoff
|
||||
# Remove fixispell-a, since it really doesn't do the job
|
||||
#
|
||||
# Revision 1.48 2005/04/14 14:38:23 geoff
|
||||
# Update license. Add several new files, notably Eli Zaretskii's
|
||||
# changes to support DOS/Windows systems.
|
||||
#
|
||||
# Revision 1.47 2002/06/21 00:19:30 geoff
|
||||
# Fix the names of the deformatters. Generate RCS version tags when
|
||||
# building a kit.
|
||||
#
|
||||
# Revision 1.46 2002/06/20 23:46:15 geoff
|
||||
# Put sq/unsq back, since some dictionaries are still distributed in sq
|
||||
# format.
|
||||
#
|
||||
# Revision 1.45 2001/07/25 21:51:46 geoff
|
||||
# Minor license update.
|
||||
#
|
||||
# Revision 1.44 2001/07/23 20:24:02 geoff
|
||||
# Update the copyright and the license.
|
||||
#
|
||||
# Revision 1.43 2001/06/07 08:02:18 geoff
|
||||
# Change the kit to use my deformatters.
|
||||
#
|
||||
# Revision 1.42 2001/06/06 23:08:23 geoff
|
||||
# Add some sample deformatters.
|
||||
#
|
||||
# Revision 1.41 1999/01/18 03:40:32 geoff
|
||||
# Build tar file from a version-numbered directory
|
||||
#
|
||||
# Revision 1.40 1999/01/07 01:23:03 geoff
|
||||
# Update the copyright. Make the kit into a gzipped tar file rather
|
||||
# than shars. Get rid of the -c switch. Remove the following files
|
||||
# from the kit: ishar, ispell.el, ispell.texinfo, makeshar, splitdict,
|
||||
# sq.1, sq.c, unsq.c, and all foreign-language affix files.
|
||||
#
|
||||
# Revision 1.39 1995/10/11 04:58:07 geoff
|
||||
# Add the Portuguese language files
|
||||
#
|
||||
# Revision 1.38 1995/01/15 00:54:45 geoff
|
||||
# Add iwhich and the new Spanish support
|
||||
#
|
||||
# Revision 1.37 1994/05/18 02:56:25 geoff
|
||||
# Remember to list dictionaries with the -e switch
|
||||
#
|
||||
# Revision 1.36 1994/04/27 02:58:42 geoff
|
||||
# Add the new English-dialect Makefiles
|
||||
#
|
||||
# Revision 1.35 1994/02/07 08:39:49 geoff
|
||||
# Don't delete everything when we're only echoing names
|
||||
#
|
||||
# Revision 1.34 1994/01/25 08:51:16 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
||||
#
|
||||
maxsize=60000 # This leaves room for some headers
|
||||
destdir=kits
|
||||
echolist=false
|
||||
PATH=`pwd`:$PATH; export PATH
|
||||
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-d)
|
||||
destdir="$2"
|
||||
shift; shift
|
||||
;;
|
||||
-e)
|
||||
echolist=true
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "$USAGE" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$destdir" in
|
||||
/*)
|
||||
;;
|
||||
*)
|
||||
destdir=`pwd`/$destdir
|
||||
;;
|
||||
esac
|
||||
|
||||
flist='
|
||||
CHANGES
|
||||
Contributors
|
||||
README
|
||||
Magiclines
|
||||
Makefile
|
||||
Makekit
|
||||
Makepatch
|
||||
WISHES
|
||||
buildhash.c
|
||||
config.X
|
||||
correct.c
|
||||
defmt.c
|
||||
dump.c
|
||||
exp_table.c
|
||||
exp_table.h
|
||||
fields.3
|
||||
fields.c
|
||||
fields.h
|
||||
findaffix.X
|
||||
good.c
|
||||
hash.c
|
||||
icombine.c
|
||||
ijoin.c
|
||||
ispell.1X
|
||||
ispell.5X
|
||||
ispell.c
|
||||
ispell.h
|
||||
iwhich
|
||||
local.h.bsd
|
||||
local.h.cygwin
|
||||
local.h.generic
|
||||
local.h.linux
|
||||
local.h.macos
|
||||
local.h.solaris
|
||||
lookup.c
|
||||
makedict.sh
|
||||
makedent.c
|
||||
munchlist.X
|
||||
parse.y
|
||||
proto.h
|
||||
sq.1
|
||||
sq.c
|
||||
subset.X
|
||||
term.c
|
||||
tgood.c
|
||||
tree.c
|
||||
tryaffix.X
|
||||
unsq.c
|
||||
version.h
|
||||
xgets.c
|
||||
zapdups.X
|
||||
languages/Makefile
|
||||
languages/Where
|
||||
languages/fix8bit.c
|
||||
languages/altamer/Makefile
|
||||
languages/american/Makefile
|
||||
languages/british/Makefile
|
||||
languages/dansk/Makefile
|
||||
languages/deutsch/Makefile
|
||||
languages/english/Makefile
|
||||
languages/english/altamer.0
|
||||
languages/english/altamer.1
|
||||
languages/english/altamer.2
|
||||
languages/english/american.0
|
||||
languages/english/american.1
|
||||
languages/english/american.2
|
||||
languages/english/british.0
|
||||
languages/english/british.1
|
||||
languages/english/british.2
|
||||
languages/english/english.0
|
||||
languages/english/english.1
|
||||
languages/english/english.2
|
||||
languages/english/english.3
|
||||
languages/english/english.aff
|
||||
languages/english/msgs.h
|
||||
languages/espanol/Makefile
|
||||
languages/francais/Makefile
|
||||
languages/nederlands/Makefile
|
||||
languages/norsk/Makefile
|
||||
languages/portugues/Makefile
|
||||
languages/svenska/Makefile
|
||||
addons/nextispell/Makefile
|
||||
addons/nextispell/README
|
||||
addons/nextispell/configure
|
||||
addons/nextispell/configure.h.template
|
||||
addons/nextispell/configureTeX
|
||||
addons/nextispell/nextispell.m
|
||||
addons/nextispell/services.template
|
||||
addons/xspell.shar
|
||||
deformatters/Makefile
|
||||
deformatters/README
|
||||
deformatters/defmt-c.c
|
||||
deformatters/defmt-sh.c
|
||||
pc/README
|
||||
pc/cfglang.sed
|
||||
pc/cfgmain.sed
|
||||
pc/configdj.bat
|
||||
pc/djterm.c
|
||||
pc/local.djgpp
|
||||
pc/local.emx
|
||||
pc/make-dj.bat
|
||||
pc/makeemx.bat
|
||||
'
|
||||
|
||||
if $echolist
|
||||
then
|
||||
echo $flist
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ -d "$destdir" ] || mkdir "$destdir"
|
||||
version=`egrep 'International Ispell' version.h | awk '{print $5;exit}'`
|
||||
rcsversion=`echo $version | tr . _`
|
||||
|
||||
TMP=$destdir/ispell-$version
|
||||
rm -rf $TMP
|
||||
trap "rm -rf $TMP; exit 1" 1 2 15
|
||||
trap "rm -rf $TMP; exit 0" 13
|
||||
|
||||
rcs -NV${rcsversion}: $flist
|
||||
|
||||
mkdir $TMP
|
||||
tar cf - $flist | (cd $TMP; tar xf -)
|
||||
|
||||
tarfile=$destdir/ispell-$version.tar.gz
|
||||
|
||||
rm -f $tarfile
|
||||
(cd $destdir; tar cvf - ispell-$version) | gzip -v -9 > $tarfile
|
||||
rm -rf $TMP
|
287
external/ispell/Makepatch
vendored
Executable file
287
external/ispell/Makepatch
vendored
Executable file
|
@ -0,0 +1,287 @@
|
|||
: Use /bin/sh
|
||||
#
|
||||
#
|
||||
# Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Make an ispell patch kit. This is not a clever script,
|
||||
# just a handy one.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
USAGE="Usage: Makepatch [-n] [-d destdir] [-o file] ... [new-files]"
|
||||
#
|
||||
# destdir is the directory in which the kits and patches are kept.
|
||||
#
|
||||
# new-files are any new files to be added to the distribution.
|
||||
#
|
||||
# The -n switch suppresses RCS updates, so that the patch can be
|
||||
# tested.
|
||||
#
|
||||
# The -o switch can be used to limit patching to certain files.
|
||||
# This is useful to control the size of patches. Version.h is
|
||||
# always patched. This switch can appear more than once.
|
||||
#
|
||||
# $Log: Makepatch,v $
|
||||
# Revision 1.21 2005/04/27 01:18:34 geoff
|
||||
# Work around idiotic POSIX incompatibilies in tail.
|
||||
#
|
||||
# Revision 1.20 2005/04/14 14:38:23 geoff
|
||||
# Update license.
|
||||
#
|
||||
# Revision 1.19 2001/07/25 21:51:47 geoff
|
||||
# Minor license update.
|
||||
#
|
||||
# Revision 1.18 2001/07/23 20:24:02 geoff
|
||||
# Update the copyright and the license.
|
||||
#
|
||||
# Revision 1.17 1999/01/07 01:58:06 geoff
|
||||
# Update the copyright.
|
||||
#
|
||||
# Revision 1.16 1994/11/01 05:54:33 geoff
|
||||
# When doing a partial run, update the fields code in the right RCS
|
||||
# directory.
|
||||
#
|
||||
# Revision 1.15 1994/11/01 05:27:14 geoff
|
||||
# Change the special code for handling the fields routines to reflect my
|
||||
# latest source-tree reorganization.
|
||||
#
|
||||
# Revision 1.14 1994/05/18 02:56:48 geoff
|
||||
# Correctly detect dictionary files for context selection
|
||||
#
|
||||
# Revision 1.13 1994/05/17 06:37:27 geoff
|
||||
# Add the -o switch, to help handle overly-large patches. Remember to
|
||||
# return a success status at the end (rcsdiff can return a nonzero
|
||||
# status).
|
||||
#
|
||||
# Revision 1.12 1994/02/08 06:03:56 geoff
|
||||
# Don't expect a comma after version number (it makes patch barf)
|
||||
#
|
||||
# Revision 1.11 1994/01/25 07:11:15 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
||||
#
|
||||
destdir=kits
|
||||
baserelease=3.1
|
||||
|
||||
trialrun=
|
||||
files=
|
||||
partialrun=false
|
||||
nl='
|
||||
'
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-d)
|
||||
destdir="$2"
|
||||
shift; shift
|
||||
;;
|
||||
-n)
|
||||
trialrun=echo
|
||||
shift
|
||||
;;
|
||||
-o)
|
||||
files="$files $2"
|
||||
partialrun=true
|
||||
shift; shift
|
||||
;;
|
||||
-*)
|
||||
echo "$USAGE" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
allfiles=`Makekit -e`
|
||||
if $partialrun
|
||||
then
|
||||
:
|
||||
else
|
||||
files="$allfiles"
|
||||
fi
|
||||
|
||||
[ -d "$destdir" ] || mkdir "$destdir"
|
||||
|
||||
#
|
||||
# Because some cretin decided to break backwards compatibility in
|
||||
# tail, we'll use sed to achieve the effect of "tail -1".
|
||||
#
|
||||
if [ -r "$destdir/Patch${baserelease}.01" ]
|
||||
then
|
||||
lastpatch=`ls $destdir/Patch${baserelease}.?? | sed -n -e '$p' \
|
||||
| sed "s;$destdir/Patch${baserelease}.;;"`
|
||||
else
|
||||
lastpatch=00
|
||||
fi
|
||||
|
||||
patchno=`expr $lastpatch + 1`
|
||||
case "$patchno" in
|
||||
[1-9])
|
||||
patchno=0$patchno
|
||||
;;
|
||||
esac
|
||||
|
||||
patchfile="$destdir/Patch${baserelease}.$patchno"
|
||||
case "$trialrun" in
|
||||
echo)
|
||||
patchfile="${patchfile}-test"
|
||||
;;
|
||||
esac
|
||||
lastpatchid=`echo Patch${baserelease}.$lastpatch | sed 's/\./_/g'`
|
||||
patchid=`echo Patch${baserelease}.$patchno | sed 's/\./_/g'`
|
||||
|
||||
echo 'Index: version.h' > "$patchfile"
|
||||
prereq=`co -r$lastpatchid -p RCS/version.h \
|
||||
| egrep 'International Ispell Version' \
|
||||
| sed -e 's/^.*International Ispell Version //' -e 's/ .*$//'`
|
||||
echo "Prereq: $prereq" >> "$patchfile"
|
||||
echo "" >> "$patchfile"
|
||||
patchlevel=`egrep "International Ispell Version $baserelease" version.h \
|
||||
| sed -e "s/^.*Version $baserelease\.//" -e 's/ .*$//'`
|
||||
case "$patchlevel" in
|
||||
$patchno)
|
||||
;;
|
||||
$lastpatch)
|
||||
$trialrun co -l version.h
|
||||
# Note this requires System V date command!
|
||||
date=`date +%D`
|
||||
co -p -q version.h \
|
||||
| sed "/International/s;$baserelease.$lastpatch ../../..;$baserelease.$patchno $date;" \
|
||||
| case "$trialrun" in
|
||||
'')
|
||||
cat > version.h
|
||||
;;
|
||||
echo)
|
||||
echo 'Edit version.h to produce:'
|
||||
egrep 'International Ispell Version'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Sorry, I can't figure out what level you're patching!" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
lastrev=`rlog -h version.h | sed -n 's/head:[ ]*//p'`
|
||||
if $partialrun
|
||||
then
|
||||
$trialrun rcs -N$patchid:$lastpatchid \
|
||||
`echo $allfiles | tr ' ' "$nl" \
|
||||
| sed '/^fields.[ch3]$/s;^;'"$HOME/src/local/fields/;"`
|
||||
fi
|
||||
case "$trialrun" in
|
||||
'')
|
||||
rcs -N$patchid:$lastrev version.h
|
||||
rcsdiff -r$lastpatchid -r$patchid version.h >> "$patchfile"
|
||||
;;
|
||||
echo)
|
||||
echo rcs -N$patchid:$lastrev version.h
|
||||
rcsdiff -r$lastpatchid version.h >> "$patchfile"
|
||||
;;
|
||||
esac
|
||||
|
||||
for basefile in $files
|
||||
do
|
||||
case "$basefile" in
|
||||
fields.[ch3])
|
||||
rcsfile=$HOME/src/local/fields/RCS/$basefile,v
|
||||
;;
|
||||
*)
|
||||
rcsfile=`rlog -R $basefile`
|
||||
;;
|
||||
esac
|
||||
lastrev=`rlog -h $rcsfile | sed -n 's/head:[ ]*//p'`
|
||||
case "$basefile" in
|
||||
version.h)
|
||||
;;
|
||||
*)
|
||||
$trialrun rcs -N$patchid:$lastrev $rcsfile
|
||||
case "$trialrun" in
|
||||
'')
|
||||
changes=`rcsdiff -r$lastpatchid -r$patchid $rcsfile \
|
||||
$basefile 2>/dev/null \
|
||||
| sed 1q`
|
||||
;;
|
||||
echo)
|
||||
changes=`rcsdiff -r$lastpatchid $rcsfile $basefile \
|
||||
2>/dev/null \
|
||||
| sed 1d`
|
||||
;;
|
||||
esac
|
||||
case "$changes" in
|
||||
'')
|
||||
;;
|
||||
*)
|
||||
case "$basefile" in
|
||||
languages/english/*.[0-9])
|
||||
context=
|
||||
;;
|
||||
*)
|
||||
context=-u
|
||||
;;
|
||||
esac
|
||||
echo "" >> "$patchfile"
|
||||
echo "Index: $basefile" >> "$patchfile"
|
||||
echo "" >> "$patchfile"
|
||||
case "$trialrun" in
|
||||
'')
|
||||
rcsdiff $context -r$lastpatchid -r$patchid \
|
||||
$rcsfile $basefile \
|
||||
>> "$patchfile"
|
||||
;;
|
||||
echo)
|
||||
rcsdiff $context -r$lastpatchid $rcsfile \
|
||||
$basefile \
|
||||
>> "$patchfile"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
done
|
||||
|
||||
#
|
||||
# Do new files
|
||||
#
|
||||
for basefile
|
||||
do
|
||||
echo "" >> "$patchfile"
|
||||
echo "Index: $basefile" >> "$patchfile"
|
||||
echo "" >> "$patchfile"
|
||||
diff -c /dev/null $basefile | sed "s;/dev/null;$basefile;" >> "$patchfile"
|
||||
done
|
||||
exit 0
|
261
external/ispell/README
vendored
Normal file
261
external/ispell/README
vendored
Normal file
|
@ -0,0 +1,261 @@
|
|||
This is ispell version 3.3, an interactive spelling checker.
|
||||
|
||||
Contents of this README file:
|
||||
|
||||
What Is Ispell and Why Do I Want It?
|
||||
What's New in This Version?
|
||||
Where Can I Get Ispell?
|
||||
OK, How Do I Install It?
|
||||
Who Wrote Ispell?
|
||||
Where Do I Send Bug Reports?
|
||||
How Do I Reference Ispell in Scholarly Papers?
|
||||
Where Do I Get Dictionaries?
|
||||
How Long Does It Take to Make Dictionaries?
|
||||
Special Installation Notes for Certain Machines
|
||||
What About Ispell for MS-DOS?
|
||||
|
||||
Note: this README file might not contain the latest information about
|
||||
ispell. For that information, visit the ispell Web page:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell.html
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
What Is Ispell and Why Do I Want It?
|
||||
|
||||
Ispell is a fast screen-oriented spelling checker that shows you
|
||||
your errors in the context of the original file, and suggests possible
|
||||
corrections when it can figure them out. Compared to UNIX spell, it
|
||||
is faster and much easier to use. Ispell can also handle languages
|
||||
other than English.
|
||||
|
||||
What's New in This Version?
|
||||
|
||||
Ispell 3.3 offers improved support for international languages,
|
||||
improved deformatting, and better support for compilation on
|
||||
Windows systems. All known security holes have been closed.
|
||||
A number of small bugs are also fixed.
|
||||
|
||||
Where Can I Get Ispell?
|
||||
|
||||
Point your Web browser at the ispell home page:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell.html
|
||||
|
||||
The current version of ispell is available for Web download from
|
||||
www.lasr.cs.ucla.edu using the following URL:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/tars
|
||||
|
||||
The latest version is always named "ispell-3.3.xx.tar.gz", where
|
||||
"xx" is the patch level. There are also sometimes files named
|
||||
"README-patchxx", which contain notes specific to a given version.
|
||||
|
||||
A number of ftp mirror sites also store ispell. Check your
|
||||
favorite search engine for "ispell-3.3" to find a site near you.
|
||||
|
||||
Ispell comes with English dictionaries. For other languages,
|
||||
visit the ispell dictionaries Web page at:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell-dictionaries.html
|
||||
|
||||
OK, How Do I Install It?
|
||||
|
||||
Quick installation instructions for American English:
|
||||
|
||||
1) Download Ispell from http://www.lasr.cs.ucla.edu/geoff/ispell.html
|
||||
2) gunzip ispell-3.3.xx.tar.gz
|
||||
3) tar -xvf ispell-3.3.xx.tar
|
||||
4) cd ispell-3.3.xx
|
||||
5) Copy one of the sample local.h files to local.h:
|
||||
cp local.h.bsd local.h
|
||||
cp local.h.cygwin local.h
|
||||
cp local.h.linux local.h
|
||||
cp local.h.macos local.h
|
||||
cp local.h.solaris local.h
|
||||
or
|
||||
cp local.h.generic local.h
|
||||
6) If you used the generic local.h file and are using a
|
||||
USG-style system (Linux, IRIX, HP-UX, Solaris, etc):
|
||||
Edit local.h and change:
|
||||
#undef USG
|
||||
to:
|
||||
#define USG
|
||||
7) make all
|
||||
If you get compile errors in term.c, do step 6 (or undo it
|
||||
if you already did it).
|
||||
8) make install
|
||||
|
||||
Long installation instructions:
|
||||
|
||||
(For installation on MS-DOS, see the section about MS-DOS at the
|
||||
end of this file.)
|
||||
|
||||
Ispell is quite portable (thanks to many people). If you speak
|
||||
American English and have one of the pre-configured systems,
|
||||
follow the instructions above.
|
||||
|
||||
For more complex installations, you will have to create a fancier
|
||||
local.h file. All customization of ispell, even for the Makefile,
|
||||
is done by creating or editing the file "local.h" to override the
|
||||
default definitions of certain variables. The most common change
|
||||
is to add or remove "#define USG" so that term.c will compile.
|
||||
The next most common changes will be to the LANGUAGES variable (to
|
||||
set the languages; see also the Makefiles in the various language
|
||||
subdirectories), CC (to choose gcc), and BINDIR through MAN45DIR
|
||||
(to control where ispell is installed). There are many other
|
||||
configuration parameters; see config.X for the complete list and
|
||||
further instructions. *DO NOT* make changes to config.X or to any
|
||||
of the Makefiles. Anything you define in "local.h" will override
|
||||
definitions in those files.
|
||||
|
||||
The English-language dictionary comes in four sizes: small,
|
||||
medium, large, and extra-large. I recommend using the medium
|
||||
dictionary unless you are very short on space. The small and
|
||||
medium dictionaries have been hand-checked against a paper
|
||||
dictionary to improve their accuracy. This is not true of the two
|
||||
larger ones. The large and extra-large dictionaries contain
|
||||
less-frequently-used words and are known to have misspelling in
|
||||
them. Also, even a correct large dictionary can hide misspellings
|
||||
of short words because there is some similar word that nobody
|
||||
uses. (For example, the crossword-puzzle favorite "ort" can keep
|
||||
you from finding a place where you mistyped "or".)
|
||||
|
||||
If you have a list of extra words (such as /usr/share/dict/words
|
||||
on some commercial Unixes), you can also choose to make a "plus"
|
||||
version, named by adding a plus sign to the size indication, to
|
||||
include that list in your dictionary. Because many modern
|
||||
computers don't have /usr/share/dict/words, the default dictionary
|
||||
is the "non-plus" version.
|
||||
|
||||
After all edits, you are ready to compile ispell. Simply type
|
||||
"make all" to compile all the programs, put the dictionaries
|
||||
together, and build the hash file. If you get errors while
|
||||
compiling term.c, change the setting of "#define USG" in your
|
||||
local.h file and try again.
|
||||
|
||||
After your first make completes, you are ready to install ispell.
|
||||
The standard "make install" will install ispell, the auxiliary
|
||||
programs and scripts, the manual page, and the dictionary hash
|
||||
file, all in the directories you have chosen for them. This
|
||||
usually has to be done as root, and on some systems you will not
|
||||
be able to redirect the output to a file. (If you're the careful
|
||||
sort, you'll check the output of "make -n install" first to be
|
||||
sure there are no hidden surprises.) If you don't want to install
|
||||
the dictionary-building tools, you can type "make partial-install"
|
||||
to install just the files needed to use ispell itself.
|
||||
|
||||
As well as the standard "make clean" and "make realclean" targets,
|
||||
there is also a "make dictclean" target which will get rid of
|
||||
constructed dictionary files such as "english.med+". This is a
|
||||
separate target because of the time it takes to build
|
||||
dictionaries.
|
||||
|
||||
Finally, there is a directory named "addons", which contains shar
|
||||
kits for ispell helper programs that were generously written by
|
||||
other people. These are not copyrighted or supported by the
|
||||
ispell maintainer. Contact the original authors (listed in README
|
||||
files in the kits) for more information.
|
||||
|
||||
Who Wrote Ispell?
|
||||
|
||||
Ispell is a very old program. The original was written in PDP-10
|
||||
assembly in 1971, by R. E. Gorin. The C version was written by
|
||||
Pace Willisson of MIT. Walt Buehring of Texas Instruments added
|
||||
the emacs interface and posted it to the net. Geoff Kuenning
|
||||
added the international support and created the current release.
|
||||
Ken Stevens has maintained the Emacs interface (ispell.el) for
|
||||
many years. Many, many other people contributed to the current
|
||||
version; a partial list (with a much more detailed history) can
|
||||
be found in the file "Contributors".
|
||||
|
||||
Where Do I Send Bug Reports?
|
||||
|
||||
Most ispell bug reports, except bugs related to the emacs-lisp
|
||||
interface, should be sent to "ispell-bugs@itcorp.com". Bugs in
|
||||
the emacs interface (ispell.el) should be sent to
|
||||
"ispell-el-bugs@itcorp.com". If you're not sure which address to
|
||||
use, send your report to "ispell-bugs@itcorp.com" and I'll sort it
|
||||
out from there. Note that the bug aliases are not discussion
|
||||
lists; membership is limited.
|
||||
|
||||
Bugs in add-on packages (found in the "addons" subdirectory)
|
||||
should not be sent to itcorp.com. Instead, send reports to the
|
||||
developers of those packages (see the README file for the package
|
||||
you are using).
|
||||
|
||||
How Do I Reference Ispell in Scholarly Papers?
|
||||
|
||||
There is no published paper on ispell, so if you make use of
|
||||
ispell in a fashion that requires a reference (e.g., using the
|
||||
dictionary as a word list in a research project), you are limited
|
||||
to an Internet reference. The full proper title is printed by
|
||||
"ispell -v": "International Ispell Version x.y.z". Please include
|
||||
the full version number in your reference so that people can
|
||||
discover the exact variant that you used; sometimes it's
|
||||
important. If you're feeling really nice, you can also credit me,
|
||||
Geoff Kuenning, as the author. Usually, you should also include a
|
||||
link to the ispell Web page:
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell.html
|
||||
so that readers of your paper can locate a copy of ispell if they wish.
|
||||
|
||||
Where Do I Get Dictionaries?
|
||||
|
||||
Ispell comes with American and British dictionaries. American-style
|
||||
spellings are the default. To get British spellings, copy the
|
||||
LANGUAGES and MASTERHASH definitions from config.X into your
|
||||
local.h, and then globally replace "american" with "british".
|
||||
|
||||
For other languages, consult the file "languages/Where", which
|
||||
lists everything I know about. You can also check the ispell
|
||||
dictionaries page:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell-dictionaries.html
|
||||
|
||||
which contains pointers to all known dictionaries.
|
||||
|
||||
As a general rule, if you use a dictionary that was not intended
|
||||
for ispell, or if you combine multiple dictionaries, you should
|
||||
use munchlist to reduce the size of the dictionary.
|
||||
|
||||
If you create a dictionary of your own and make it available for
|
||||
ftp, please send a notification to ispell-bugs@itcorp.com so that
|
||||
I can add your dictionary to the ftp list.
|
||||
|
||||
How Long Does It Take to Make Dictionaries?
|
||||
|
||||
Long ago, making a big dictionary took hours. But on a modern
|
||||
machine, it should only take a few minutes.
|
||||
|
||||
Special Installation Notes for Certain Machines:
|
||||
|
||||
Although I have tried to avoid putting in specific machine
|
||||
dependencies as a general rule, some machine-specific #defines
|
||||
will be found at the end of config.X.
|
||||
|
||||
If you get lots of warnings when compiling term.c, check to be
|
||||
sure that you have correctly defined SIGNAL_TYPE in your local.h.
|
||||
|
||||
Some recent "internationalized" Unixes (such as HP, and anything
|
||||
using the GNU tools, such as Linux) vary the behavior of sort(1)
|
||||
based on an environment variable such as LANG, LOCALE, or LC_xxx.
|
||||
The symptom is that munchlist does not produce an optimal
|
||||
dictionary. The shell scripts try to protect against this by setting
|
||||
all of these variables to "C", but if your system uses different
|
||||
environment variables, you may have to do this by hand.
|
||||
|
||||
If you get core dumps from the sort command (reported on HP
|
||||
systems building large German dictionaries), try adding the "-y"
|
||||
flag to the appropriate invocation of sort in the Makefile or in
|
||||
munchlist. This flag is only available on some systems.
|
||||
|
||||
Some BSDI systems have a screwy sort command that uses
|
||||
-T to specify the record (as opposed to field) delimiter. You'll
|
||||
have to disable SORTTMP and enable MAKE_SORTTMP.
|
||||
|
||||
What About Ispell for MS-DOS?
|
||||
|
||||
Although the ispell maintainer does not support MS-DOS and
|
||||
Windows, a generous contributor, Eli Zaretskii, has added MS-DOS
|
||||
support. You can build ispell for MS-DOS with either EMX/GCC or
|
||||
DJGPP. See the file pc/README for compilation instructions.
|
65
external/ispell/WISHES
vendored
Normal file
65
external/ispell/WISHES
vendored
Normal file
|
@ -0,0 +1,65 @@
|
|||
Things remaining to be done to ispell:
|
||||
|
||||
- It might be nice to support multiple personal dictionaries. On
|
||||
the other hand, it's pretty easy to combine them with "cat".
|
||||
- A small amount of string space could be saved if buildhash would
|
||||
combine strings with common suffixes (e.g., "and" could be stored
|
||||
as a pointer to the tail of "bland").
|
||||
- (Pace Willisson) Pace's latest version of ispell compresses
|
||||
common digrams to reduce the size of the hash file, and stores
|
||||
shorter words in the dictionary entry itself. (Since the digram
|
||||
compression also reduces word size, this is a big win). He also
|
||||
improved startup time, at a slight running-time penalty, by
|
||||
eliminating the mass conversion of string indexes to pointers
|
||||
and just using the indexes as such whenever a string is accessed.
|
||||
- The findaffix script takes ridiculous amounts of time and disk
|
||||
space. It desperately needs to be rewritten in C, which would
|
||||
also allow it to correctly support string characters and to
|
||||
suppress reporting of choices that are already in the affix file.
|
||||
- Some of the following ideas require more flag bits in the
|
||||
dictionary. Since there is only one bit remaining for most
|
||||
cases, I plan to use that bit as some sort of an indicator
|
||||
that more flag bits reside somewhere else. This will be a
|
||||
kludge, but it will save some space. Beware! Don't plan on
|
||||
using that last flag bit for something else.
|
||||
- (Ian Dall) For some applications, it can be handy to allow
|
||||
multiple dictionary hash files. This shouldn't be too hard, since
|
||||
there's already similar code to support the personal dictionary.
|
||||
- (Not mine, but I've lost the name of the originator.)
|
||||
Some misspellings are common, but corrections will not ever
|
||||
be found by ispell's algorithm. It would be nice to be able
|
||||
to explicitly specify misspelling/correction pairs for such
|
||||
words (e.g., "lite->light").
|
||||
- Several people, notably Peter Mutsaers, have asked if the
|
||||
affix file format could be extended to allow limited
|
||||
variables, so that you could specify things like
|
||||
"[AEIOU][DNL] > \2ING" to handle words like "pad->padding".
|
||||
- Ispell should be smart enough to ignore hyphenation signs,
|
||||
such as the TeX \- hyphenation indicator.
|
||||
- Since there can be two personal dictionaries, there should
|
||||
be a way to specify which dictionary a new word ("I"
|
||||
command) should be inserted into.
|
||||
- For languages that form lots of compound words, such as
|
||||
German, munchlist should be smart enough to split compound
|
||||
words into their components when appropriate.
|
||||
- (Jeff Edmonds) The personal dictionary should be able to
|
||||
remove certain words from the master dictionary, so that
|
||||
obscure words like "wether" wouldn't mask favorite typos.
|
||||
- (Jeff Edmonds) It would be wonderful if ispell could correct
|
||||
inserted spaces such as "th e" for "the" or even "can not"
|
||||
for "cannot".
|
||||
- Since ispell has dictionaries available to it, it is
|
||||
conceivable that it could automatically determine the
|
||||
language of a particular file by choosing the dictionary
|
||||
that produced the fewest spelling errors on the first few
|
||||
lines.
|
||||
- It is long past the time when the ispell.1 manual page
|
||||
should have been broken up into components describing the
|
||||
various programs in the suite.
|
||||
- If the -C flag is disabled, ispell should (at least
|
||||
optionally) use the "??" form to suggestion possible
|
||||
compound formations.
|
||||
- The elisp interface should provide a way for ispell to
|
||||
return error messages to emacs, so that users don't get
|
||||
inexplicable failures when things like dictionary open
|
||||
failures happen.
|
79
external/ispell/addons/nextispell/README
vendored
Normal file
79
external/ispell/addons/nextispell/README
vendored
Normal file
|
@ -0,0 +1,79 @@
|
|||
|
||||
|
||||
**** nextispell *******
|
||||
|
||||
|
||||
Release 0.5, 3rd of January 1995
|
||||
|
||||
This is a new improved release of the former internationalspell, a
|
||||
spell service for the NeXT spell panel (like the one in Edit).
|
||||
|
||||
The new release is quicker and more reliable.
|
||||
|
||||
by Moritz Willers (willers@butp.unibe.ch (NeXTMail))
|
||||
University of Berne
|
||||
Institute for Theoretical Physics
|
||||
Switzerland
|
||||
|
||||
|
||||
|
||||
To install just type: configure. To make TeX-style parsing be the
|
||||
default, use "configure -t". (You will have to make two configure
|
||||
runs to get both TeX-style and nroff-style parsing.) To install in
|
||||
the system-wide /LocalLibrary rather than in your personal ~/Library,
|
||||
you must be root, and use "configure -r" or "configure -r -t".
|
||||
|
||||
|
||||
You need to have ispell installed with the corresponding hash files to
|
||||
make use of this spell server (The spell server invokes ispell and
|
||||
communicates with it via a pipe).
|
||||
|
||||
Major advantage:
|
||||
based on ispell
|
||||
-> you can spellcheck any language!!
|
||||
Major disadvantage:
|
||||
I can't think of any (no more)
|
||||
except that it still isn't as fast as I would like it to be
|
||||
|
||||
to be more specific:
|
||||
- you can spellcheck in TeX mode
|
||||
- you can spell any language you've got or produced a wordlist and a
|
||||
*.aff file for
|
||||
- ispell can be a bit of a pain to install
|
||||
|
||||
to be found at cs.orst.edu in /pub/next/binaries/util/nextispell.tar.gz
|
||||
|
||||
Thanks to Detlev Droege and Geoff Kuenning for new ideas and thanks to
|
||||
Christoph Hauert for his ever patient help.
|
||||
|
||||
|
||||
****************
|
||||
|
||||
Internal:
|
||||
|
||||
The spellserver gives ispell the text to correct bout 80 characters at
|
||||
a time now, this makes it faster now. However with a huge hash file,
|
||||
like the german one, ispell is still rather slow. From time to time
|
||||
the program still hangs because the reading on a pipe would block. You
|
||||
will find this error in the Console.
|
||||
|
||||
Modify the code as you like and if you come up with anything better
|
||||
let me know it.
|
||||
|
||||
The configuration scripts haven't been improved yet.
|
||||
|
||||
|
||||
|
||||
*** Some words about ispell: ***
|
||||
|
||||
You can get ispell from (thanks to Geoff Kuenning)
|
||||
|
||||
ftp.cs.ucla.edu
|
||||
/pub/ispell
|
||||
|
||||
Current version:
|
||||
|
||||
International Ispell Version 3.1.00, 12/21/93
|
||||
|
||||
Be sure to get ispell 3.1 and not 4.0 which is something completely
|
||||
different and doesn't work with my program.
|
258
external/ispell/addons/nextispell/configure
vendored
Executable file
258
external/ispell/addons/nextispell/configure
vendored
Executable file
|
@ -0,0 +1,258 @@
|
|||
#!/bin/csh
|
||||
# Moritz Willers
|
||||
# 21. September 1993
|
||||
# Version 0.2
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
set USAGE = 'Usage: configure [-r] [-t]'
|
||||
#
|
||||
# If run with the -r switch, you must be root, and nextispell will be
|
||||
# installed in /LocalLibrary rather than your personal Library. If
|
||||
# run with the -t switch, TeX support will be installed. Installing
|
||||
# both TeX and non-TeX support requires two runs, one with and one
|
||||
# without the -t switch.
|
||||
#
|
||||
set INSTALLDIR = ~/Library
|
||||
set spellname = spell
|
||||
set texsuff
|
||||
set stringchartype = 'NeXT'
|
||||
unset definetex
|
||||
while ( $#argv > 0 )
|
||||
switch ($argv[1])
|
||||
case '-r':
|
||||
set INSTALLDIR = /LocalLibrary
|
||||
breaksw
|
||||
case '-t':
|
||||
set spellname = texspell
|
||||
set texsuff = '-TeX'
|
||||
set stringchartype = 'tex'
|
||||
set definetex
|
||||
breaksw
|
||||
default:
|
||||
sh -c "echo '$USAGE' 1>&2"
|
||||
exit 1
|
||||
breaksw
|
||||
endsw
|
||||
shift argv
|
||||
end
|
||||
|
||||
echo ""
|
||||
echo "Let's see whether you've got ispell"
|
||||
ispell -vv > /dev/null
|
||||
if ($status) then
|
||||
echo "You must first install ispell before you can run this skript"
|
||||
exit 0
|
||||
endif
|
||||
echo "Ok"
|
||||
|
||||
echo ""
|
||||
echo "Looking for your hash files"
|
||||
set LIBDIR = `ispell -vv | grep LIBDIR | awk '{print $3}' | sed 'y/"/ /'`
|
||||
set files = `ls ${LIBDIR}`
|
||||
echo "There are:"
|
||||
foreach file ($files)
|
||||
if ($file:e == "hash") then
|
||||
echo " $file"
|
||||
endif
|
||||
end
|
||||
|
||||
if ( ! -d ${INSTALLDIR}/Services) mkdir ${INSTALLDIR}/Services
|
||||
|
||||
foreach file ($files)
|
||||
if ($file:e == "hash") then
|
||||
set name = ${file:r}${spellname}
|
||||
echo ""
|
||||
#
|
||||
# English variants are listed first because there are so many;
|
||||
# all other languages are listed alphabetically by the native
|
||||
# name, with the English name given second
|
||||
#
|
||||
# I don't know enough about the NeXT's international-language
|
||||
# support to know whether non-English dictionaries can be
|
||||
# insalled under the native language name, instead of the
|
||||
# English one, so the "deutsch" dictionary is installed as
|
||||
# "German" and so forth. European NeXT owners are welcome to
|
||||
# change this if they wish.
|
||||
#
|
||||
switch ("$file:r")
|
||||
case 'altamer':
|
||||
set longname = "Default Alternate American"
|
||||
breaksw
|
||||
case 'altamersml':
|
||||
set longname = "Alternate American, Small"
|
||||
breaksw
|
||||
case 'altamersml+':
|
||||
set longname = "Alternate American, Small-Plus"
|
||||
breaksw
|
||||
case 'altamermed':
|
||||
set longname = "Alternate American, Medium"
|
||||
breaksw
|
||||
case 'altamermed+':
|
||||
set longname = "Alternate American, Medium-Plus"
|
||||
breaksw
|
||||
case 'altamerlrg':
|
||||
set longname = "Alternate American, Large"
|
||||
breaksw
|
||||
case 'altamerlrg+':
|
||||
set longname = "Alternate American, Large-Plus"
|
||||
breaksw
|
||||
case 'altamerxlg':
|
||||
set longname = "Alternate American, Extra-Large"
|
||||
breaksw
|
||||
case 'altamerxlg+':
|
||||
set longname = "Alternate American, Extra-Large-Plus"
|
||||
breaksw
|
||||
case 'american':
|
||||
set longname = "Default American"
|
||||
breaksw
|
||||
case 'americansml':
|
||||
set longname = "American, Small"
|
||||
breaksw
|
||||
case 'americansml+':
|
||||
set longname = "American, Small-Plus"
|
||||
breaksw
|
||||
case 'americanmed':
|
||||
set longname = "American, Medium"
|
||||
breaksw
|
||||
case 'americanmed+':
|
||||
set longname = "American, Medium-Plus"
|
||||
breaksw
|
||||
case 'americanlrg':
|
||||
set longname = "American, Large"
|
||||
breaksw
|
||||
case 'americanlrg+':
|
||||
set longname = "American, Large-Plus"
|
||||
breaksw
|
||||
case 'americanxlg':
|
||||
set longname = "American, Extra-Large"
|
||||
breaksw
|
||||
case 'americanxlg+':
|
||||
set longname = "American, Extra-Large-Plus"
|
||||
breaksw
|
||||
case 'british':
|
||||
set longname = "Default British"
|
||||
breaksw
|
||||
case 'britishsml':
|
||||
set longname = "British, Small"
|
||||
breaksw
|
||||
case 'britishsml+':
|
||||
set longname = "British, Small-Plus"
|
||||
breaksw
|
||||
case 'britishmed':
|
||||
set longname = "British, Medium"
|
||||
breaksw
|
||||
case 'britishmed+':
|
||||
set longname = "British, Medium-Plus"
|
||||
breaksw
|
||||
case 'britishlrg':
|
||||
set longname = "British, Large"
|
||||
breaksw
|
||||
case 'britishlrg+':
|
||||
set longname = "British, Large-Plus"
|
||||
breaksw
|
||||
case 'britishxlg':
|
||||
set longname = "British, Extra-Large"
|
||||
breaksw
|
||||
case 'britishxlg+':
|
||||
set longname = "British, Extra-Large-Plus"
|
||||
breaksw
|
||||
case 'english':
|
||||
set longname = "Default English"
|
||||
breaksw
|
||||
|
||||
case dansk:
|
||||
set longname = "Danish"
|
||||
breaksw
|
||||
case danish:
|
||||
set longname = "Danish"
|
||||
breaksw
|
||||
|
||||
case deutsch:
|
||||
set longname = "German"
|
||||
breaksw
|
||||
case german:
|
||||
set longname = "German"
|
||||
breaksw
|
||||
|
||||
case castellano:
|
||||
set longname = "Spanish"
|
||||
breaksw
|
||||
case espanol:
|
||||
set longname = "Spanish"
|
||||
breaksw
|
||||
case spanish:
|
||||
set longname = "Spanish"
|
||||
breaksw
|
||||
|
||||
case francais:
|
||||
set longname = "French"
|
||||
breaksw
|
||||
case french:
|
||||
set longname = "French"
|
||||
breaksw
|
||||
|
||||
case italiano:
|
||||
set longname = "Italian"
|
||||
breaksw
|
||||
case italian:
|
||||
set longname = "Italian"
|
||||
breaksw
|
||||
|
||||
case nederlands:
|
||||
set longname = "Dutch"
|
||||
breaksw
|
||||
case dutch:
|
||||
set longname = "Dutch"
|
||||
breaksw
|
||||
|
||||
case norsk:
|
||||
set longname = "Norwegian"
|
||||
breaksw
|
||||
case norwegian:
|
||||
set longname = "Norwegian"
|
||||
breaksw
|
||||
|
||||
case portuguese:
|
||||
set longname = "Portuguese"
|
||||
breaksw
|
||||
|
||||
case russkij:
|
||||
set longname = "Russian"
|
||||
breaksw
|
||||
case russian:
|
||||
set longname = "Russian"
|
||||
breaksw
|
||||
|
||||
case svenska:
|
||||
set longname = "Swedish"
|
||||
breaksw
|
||||
case swedish:
|
||||
set longname = "Swedish"
|
||||
breaksw
|
||||
|
||||
default:
|
||||
set longname = "$file:r"
|
||||
echo "$file:r is not a NeXT supported Language"
|
||||
echo "I will do my best to include it into the spell checker anyway"
|
||||
breaksw
|
||||
endsw
|
||||
echo "Making $longname${texsuff} ..."
|
||||
echo "Spell Checker: Ispell${texsuff}" > services
|
||||
echo "Language: $longname" >> services
|
||||
echo "Executable: $name" >> services
|
||||
|
||||
echo '#define VENDOR "ispell'"${texsuff}"'"' > configure.h
|
||||
echo '#define LANGUAGE "'"$longname"'"' >> configure.h
|
||||
echo '#define ISPELL "ispell", "ispell", "-a", "-t", "-T.'"$stringchartype"'", "-d'"$file:r"'"' >> configure.h
|
||||
if ( $?definetex ) echo '#define TEX' >> configure.h
|
||||
make install INSTALLDIR=$INSTALLDIR NAME=$name > /dev/null
|
||||
endif
|
||||
end
|
||||
echo ""
|
||||
echo "Making services ..."
|
||||
make_services
|
||||
echo ""
|
||||
echo "I'm done."
|
||||
echo ""
|
||||
|
3
external/ispell/addons/nextispell/configure.h.template
vendored
Normal file
3
external/ispell/addons/nextispell/configure.h.template
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
#define VENDOR "ispell"
|
||||
#define LANGUAGE "English"
|
||||
#define ISPELL "ispell", "ispell", "-a", "-denglish"
|
14
external/ispell/addons/nextispell/configureTeX
vendored
Executable file
14
external/ispell/addons/nextispell/configureTeX
vendored
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# Moritz Willers
|
||||
# 21. September 1993
|
||||
# Version 0.2
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
USAGE='Usage: configureTeX [-r]'
|
||||
#
|
||||
# configureTeX is the same as running configure with the -t switch.
|
||||
# It is provided solely for backwards compatibility with previous
|
||||
# distributions of nextispell.
|
||||
#
|
||||
./configure -t $*
|
475
external/ispell/addons/nextispell/nextispell.m
vendored
Normal file
475
external/ispell/addons/nextispell/nextispell.m
vendored
Normal file
|
@ -0,0 +1,475 @@
|
|||
/* nextispell.m */
|
||||
/*
|
||||
*
|
||||
* Modify the code anyway you like and report changes
|
||||
* as well as any good ideas to me, willers@butp.unibe.ch
|
||||
*
|
||||
* written by Moritz Willers
|
||||
*
|
||||
*/
|
||||
|
||||
#define DATE "4. Januar 1994\n"
|
||||
#define VERSION "Version 0.4\n"
|
||||
|
||||
#import <appkit/appkit.h>
|
||||
#import "configure.h"
|
||||
|
||||
#define MAXBUFLEN 1024
|
||||
|
||||
struct pipe_with_buf {
|
||||
int fd;
|
||||
char *buf;
|
||||
};
|
||||
|
||||
mutex_t lock;
|
||||
char misspelled[MAXBUFLEN];
|
||||
|
||||
@interface Dictionaire:Object
|
||||
{
|
||||
int fromIspell, toIspell, fromDictionaire, toDictionaire;
|
||||
}
|
||||
|
||||
- init;
|
||||
- free;
|
||||
|
||||
- (BOOL)spellServer:(NXSpellServer *)sender
|
||||
findMisspelledWord:(int *)start
|
||||
length:(int *)length
|
||||
inLanguage:(const char *)language
|
||||
inTextStream:(id <NXReadOnlyTextStream>)textStream
|
||||
startingAt:(int)startPosition
|
||||
wordCount:(int *)number
|
||||
countOnly:(BOOL)flag;
|
||||
- (void)spellServer:(NXSpellServer *)sender
|
||||
suggestGuessesForWord:(const char *)word
|
||||
inLanguage:(const char *)language;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation Dictionaire
|
||||
|
||||
/* ******************** private functions ************************ */
|
||||
|
||||
int makepipe(int *rd, int *wrt)
|
||||
{
|
||||
int piperesult, fildes[2];
|
||||
|
||||
piperesult = pipe(fildes);
|
||||
|
||||
*rd = fildes[0];
|
||||
*wrt = fildes[1];
|
||||
|
||||
return piperesult;
|
||||
}
|
||||
|
||||
int secure_read(int d, char *buf, int nbytes)
|
||||
{
|
||||
|
||||
/* someday I'm going to rewrite this using the select() call instead of a nonblocking fd */
|
||||
|
||||
int ret, reads = 0;
|
||||
do
|
||||
{
|
||||
ret = read(d, buf, nbytes-1);
|
||||
reads++;
|
||||
} while ((ret == -1) && (reads < 100000));
|
||||
if (reads < 100000)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
else
|
||||
fprintf(stderr, "%s: Couldn't read from pipe: %s\n", *NXArgv, strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void empty_pipe(struct pipe_with_buf *pointerTopwb)
|
||||
{
|
||||
int len;
|
||||
int fd = pointerTopwb->fd;
|
||||
char buf[MAXBUFLEN];
|
||||
char *bufptr;
|
||||
|
||||
mutex_lock(lock);
|
||||
|
||||
strcpy(buf, pointerTopwb->buf);
|
||||
|
||||
bufptr = strrchr(buf, '\n');
|
||||
if (bufptr)
|
||||
bufptr--;
|
||||
else
|
||||
bufptr = buf;
|
||||
while (*bufptr != '\n')
|
||||
{
|
||||
len = secure_read(fd, buf, MAXBUFLEN);
|
||||
buf[len] = '\0';
|
||||
bufptr = strrchr(buf, '\n');
|
||||
if (bufptr)
|
||||
bufptr--;
|
||||
else
|
||||
bufptr = buf;
|
||||
}
|
||||
|
||||
mutex_unlock(lock);
|
||||
}
|
||||
|
||||
|
||||
/* ******************************************************************** */
|
||||
|
||||
- init
|
||||
{
|
||||
int fdstate;
|
||||
|
||||
[super init];
|
||||
|
||||
lock = mutex_alloc();
|
||||
*misspelled = '\0';
|
||||
|
||||
if (makepipe(&fromIspell,&toDictionaire))
|
||||
{
|
||||
fprintf(stderr, "%s: Couldn't create pipe: %s\n", *NXArgv, strerror(errno));
|
||||
[self free];
|
||||
return nil; // init wasn't successful
|
||||
}
|
||||
if (makepipe(&fromDictionaire,&toIspell))
|
||||
{
|
||||
fprintf(stderr, "%s: Couldn't create pipe: %s\n", *NXArgv, strerror(errno));
|
||||
[self free];
|
||||
return nil; // init wasn't successful
|
||||
}
|
||||
|
||||
|
||||
switch (fork())
|
||||
{
|
||||
case -1:
|
||||
fprintf(stderr, "%s: Couldn't fork: %s\n", *NXArgv, strerror(errno));
|
||||
[self free];
|
||||
return nil;
|
||||
case 0:
|
||||
close(toIspell);
|
||||
close(fromIspell);
|
||||
|
||||
if ( dup2(fromDictionaire, 0) == -1 )
|
||||
fprintf(stderr, "%s: Error establishing read pipe: %s\n", *NXArgv, strerror(errno));
|
||||
if ( dup2(toDictionaire, 1) == -1 )
|
||||
fprintf(stderr, "%s: Error establishing write pipe: %s\n", *NXArgv, strerror(errno));
|
||||
|
||||
/* change child into ispell */
|
||||
execlp(ISPELL, NULL);
|
||||
fprintf(stderr, "%s: Failed to exec ispellpipe: %s\n", *NXArgv, strerror(errno));
|
||||
exit(1);
|
||||
default:
|
||||
close(fromDictionaire);
|
||||
close(toDictionaire);
|
||||
|
||||
/* set fromIspell fd non blocking: */
|
||||
fdstate = fcntl(fromIspell, F_GETFL, 0);
|
||||
fcntl(fromIspell, F_SETFL, fdstate|O_NDELAY);
|
||||
|
||||
#ifdef TEX
|
||||
write(toIspell, "+\n", 2);
|
||||
#endif
|
||||
|
||||
break;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- free
|
||||
{
|
||||
char eof = EOF;
|
||||
|
||||
if (toIspell)
|
||||
{
|
||||
write(toIspell, &eof, 1);
|
||||
close(toIspell);
|
||||
}
|
||||
if (fromIspell) close(fromIspell);
|
||||
|
||||
return [super free];
|
||||
}
|
||||
|
||||
/* *********************** delegate methods ************************* */
|
||||
|
||||
- (BOOL)spellServer:(NXSpellServer *)sender
|
||||
findMisspelledWord:(int *)start
|
||||
length:(int *)length
|
||||
inLanguage:(const char *)language
|
||||
inTextStream:(id <NXReadOnlyTextStream>)textStream
|
||||
startingAt:(int)startPosition
|
||||
wordCount:(int *)number
|
||||
countOnly:(BOOL)flag
|
||||
{
|
||||
char readbuf[MAXBUFLEN], writebuf[MAXBUFLEN];
|
||||
char *readbufptr, *writebufptr;
|
||||
int otherlen, len;
|
||||
int offset, linelength = 0;
|
||||
char misspelledWord[MAXBUFLEN];
|
||||
BOOL repeatLoop;
|
||||
struct pipe_with_buf pwb;
|
||||
|
||||
if (flag)
|
||||
{
|
||||
*number = -1; /* is not able to do pure wordcounting */
|
||||
return NO;
|
||||
}
|
||||
|
||||
if ([textStream isAtEOTS])
|
||||
return NO;
|
||||
|
||||
mutex_lock(lock); /* to make sure the thread has emptied the pipe */
|
||||
mutex_unlock(lock);
|
||||
|
||||
readbufptr = readbuf;
|
||||
*start = startPosition;
|
||||
|
||||
/* set stream outside a word */
|
||||
[textStream readCharacters:readbufptr count:1];
|
||||
while (!NXIsSpace(*readbufptr) && startPosition && ![textStream isAtEOTS])
|
||||
{
|
||||
[textStream readCharacters:readbufptr count:1];
|
||||
(*start)++;
|
||||
}
|
||||
if (*readbufptr == '\n') *readbufptr = ' ';
|
||||
readbufptr++;
|
||||
len = 1;
|
||||
|
||||
/* main loop */
|
||||
do
|
||||
{
|
||||
/* read the 80 characters form the text stream and complete the last word */
|
||||
len += [textStream readCharacters:readbufptr count:80];
|
||||
readbufptr = readbuf;
|
||||
readbufptr[len] = '\0';
|
||||
while (*readbufptr)
|
||||
{
|
||||
if (*readbufptr == '\n')
|
||||
*readbufptr = ' ';
|
||||
readbufptr++;
|
||||
}
|
||||
|
||||
if (len>=80)
|
||||
while (!(NXIsSpace(*(readbufptr-1)) || [textStream isAtEOTS]))
|
||||
{
|
||||
[textStream readCharacters:readbufptr count:1];
|
||||
len++;
|
||||
if (*readbufptr == '\n')
|
||||
*readbufptr = ' ';
|
||||
readbufptr++;
|
||||
}
|
||||
*readbufptr++ = '\n';
|
||||
*readbufptr = '\0';
|
||||
linelength = len;
|
||||
len = 0;
|
||||
readbufptr = readbuf;
|
||||
|
||||
|
||||
/* send ispell the next ca. 80 chars */
|
||||
write(toIspell, "^", 1);
|
||||
while (*readbufptr)
|
||||
write(toIspell, readbufptr++, 1);
|
||||
|
||||
readbufptr = readbuf;
|
||||
|
||||
repeatLoop = YES;
|
||||
do
|
||||
{
|
||||
otherlen = secure_read(fromIspell, writebuf, MAXBUFLEN);
|
||||
writebuf[otherlen] = '\0';
|
||||
writebufptr = writebuf;
|
||||
while (writebufptr && *writebufptr)
|
||||
{
|
||||
/* make sure a whole line is ready to be processed */
|
||||
while (!strchr(writebufptr, '\n'))
|
||||
{
|
||||
/* add more to the buffer */
|
||||
strcpy(writebuf, writebufptr);
|
||||
writebufptr = strchr(writebuf, '\0');
|
||||
otherlen = secure_read(fromIspell, writebufptr, MAXBUFLEN - strlen(writebuf));
|
||||
writebufptr[otherlen] = '\0';
|
||||
writebufptr = writebuf;
|
||||
}
|
||||
/* then process the line: */
|
||||
switch(*writebufptr)
|
||||
{
|
||||
case '*':
|
||||
case '+':
|
||||
case '-':
|
||||
(*number)++;
|
||||
break;
|
||||
case '&':
|
||||
case '?':
|
||||
strcpy(misspelled, writebufptr);
|
||||
writebufptr += 2;
|
||||
sscanf(writebufptr, "%s %*d %d", misspelledWord, &offset);
|
||||
if ([sender isInUserDictionary:(const char *)misspelledWord caseSensitive:NO])
|
||||
{
|
||||
(*number)++;
|
||||
break;
|
||||
}
|
||||
*length = strlen(misspelledWord);
|
||||
*start += offset - 1;
|
||||
|
||||
pwb.fd = fromIspell;
|
||||
pwb.buf = writebuf;
|
||||
cthread_detach(cthread_fork( (cthread_fn_t)empty_pipe, (any_t)&pwb));
|
||||
return YES;
|
||||
case '#':
|
||||
strcpy(misspelled, writebufptr);
|
||||
writebufptr += 2;
|
||||
sscanf(writebufptr, "%s %d", misspelledWord, &offset);
|
||||
if ([sender isInUserDictionary:(const char *)misspelledWord caseSensitive:NO])
|
||||
{
|
||||
(*number)++;
|
||||
break;
|
||||
}
|
||||
*length = strlen(misspelledWord);
|
||||
*start += offset - 1;
|
||||
pwb.fd = fromIspell;
|
||||
pwb.buf = writebuf;
|
||||
cthread_detach(cthread_fork( (cthread_fn_t)empty_pipe, (any_t)&pwb));
|
||||
return YES;
|
||||
case '\n':
|
||||
*start += linelength;
|
||||
linelength = 0;
|
||||
repeatLoop = NO;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
writebufptr = strchr(writebufptr, '\n');
|
||||
if (writebufptr)
|
||||
writebufptr++;
|
||||
}
|
||||
} while (repeatLoop);
|
||||
}
|
||||
while (![textStream isAtEOTS]);
|
||||
|
||||
|
||||
return NO; /* no misspelled words found */
|
||||
}
|
||||
|
||||
- (void)spellServer:(NXSpellServer *)sender
|
||||
suggestGuessesForWord:(const char *)word
|
||||
inLanguage:(const char *)language
|
||||
{
|
||||
int len, misscount;
|
||||
char buf[MAXBUFLEN];
|
||||
char *bufptr, *guess;
|
||||
|
||||
if (*misspelled)
|
||||
{
|
||||
bufptr = strchr(misspelled, '\n');
|
||||
bufptr++;
|
||||
*bufptr = '\0';
|
||||
switch (*misspelled)
|
||||
{
|
||||
case '&':
|
||||
case '?':
|
||||
bufptr = strchr(misspelled + 2, ' ') + 1;
|
||||
misscount = atoi(bufptr);
|
||||
bufptr = strchr(misspelled, ':');
|
||||
while (bufptr != NULL && misscount > 0)
|
||||
{
|
||||
misscount--;
|
||||
guess = bufptr + 2;
|
||||
if (bufptr = strchr(guess, ','))
|
||||
*bufptr = '\0';
|
||||
else
|
||||
{
|
||||
bufptr = strchr(guess, '\n');
|
||||
*bufptr = '\0';
|
||||
bufptr = NULL;
|
||||
}
|
||||
[sender addGuess:guess];
|
||||
}
|
||||
case '#':
|
||||
; /* no guesses */
|
||||
}
|
||||
*misspelled = '\0';
|
||||
return;
|
||||
} /* else */
|
||||
|
||||
mutex_lock(lock); /* make sure that the pipe has been emptied */
|
||||
mutex_unlock(lock);
|
||||
|
||||
write(toIspell, "^", 1);
|
||||
write(toIspell, word, strlen(word));
|
||||
write(toIspell, "\n", 1);
|
||||
|
||||
bufptr = buf;
|
||||
*buf = '\0';
|
||||
do
|
||||
{
|
||||
len = secure_read(fromIspell, bufptr, MAXBUFLEN - strlen(buf));
|
||||
bufptr[len] = '\0';
|
||||
if (strchr(buf, '\n') == strrchr(buf, '\n'))
|
||||
bufptr = strchr(buf, '\0');
|
||||
else
|
||||
bufptr = buf;
|
||||
} while (!(*bufptr));
|
||||
|
||||
switch (*bufptr)
|
||||
{
|
||||
case '*':
|
||||
case '+':
|
||||
case '-':
|
||||
[sender addGuess:word];
|
||||
break;
|
||||
case '&':
|
||||
case '?':
|
||||
bufptr = strchr(bufptr + 2, ' ') + 1;
|
||||
misscount = atoi(bufptr);
|
||||
bufptr = strchr(bufptr, ':');
|
||||
while (bufptr != NULL && misscount > 0)
|
||||
{
|
||||
misscount--;
|
||||
guess = bufptr + 2;
|
||||
if (bufptr = strchr(guess, ','))
|
||||
*bufptr = '\0';
|
||||
else
|
||||
{
|
||||
bufptr = strchr(guess, '\n');
|
||||
*bufptr = '\0';
|
||||
bufptr = NULL;
|
||||
}
|
||||
[sender addGuess:guess];
|
||||
}
|
||||
case '#':
|
||||
; /* no guesses */
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
/* ************************** main ******************************* */
|
||||
|
||||
void main(int argc, char **argv)
|
||||
{
|
||||
NXSpellServer *aServer;
|
||||
|
||||
if (argc > 1)
|
||||
{
|
||||
if (!strcmp((argv[1]), "-v"))
|
||||
{
|
||||
printf("nextispell by Moritz Willers\n");
|
||||
printf("email: willers@butp.unibe.ch (NeXTMail)\n");
|
||||
printf(VERSION);
|
||||
printf(DATE);
|
||||
exit(0);
|
||||
} else
|
||||
{
|
||||
fprintf(stderr, "Usage: %s [-v]\n", *argv);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
aServer = [[NXSpellServer alloc] init];
|
||||
if ([aServer registerLanguage:LANGUAGE byVendor:VENDOR]) {
|
||||
[aServer setDelegate:[[Dictionaire alloc] init]];
|
||||
[aServer run];
|
||||
fprintf(stderr, "Unexpected death of %s!\n", *argv);
|
||||
} else {
|
||||
fprintf(stderr, "Unable to check in %s.\n", *argv);
|
||||
}
|
||||
}
|
3
external/ispell/addons/nextispell/services.template
vendored
Normal file
3
external/ispell/addons/nextispell/services.template
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
Spell Checker: ispell
|
||||
Language: English
|
||||
Executable: nextispell
|
1955
external/ispell/addons/xspell.shar
vendored
Normal file
1955
external/ispell/addons/xspell.shar
vendored
Normal file
File diff suppressed because it is too large
Load diff
1234
external/ispell/config.X
vendored
Normal file
1234
external/ispell/config.X
vendored
Normal file
File diff suppressed because it is too large
Load diff
1238
external/ispell/config.h
vendored
Normal file
1238
external/ispell/config.h
vendored
Normal file
File diff suppressed because it is too large
Load diff
2016
external/ispell/correct.c
vendored
Normal file
2016
external/ispell/correct.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
11
external/ispell/defhash.h
vendored
Normal file
11
external/ispell/defhash.h
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* This file is generated by the Makefile. Don't edit it! */
|
||||
|
||||
#ifndef MASTERHASH
|
||||
#define MASTERHASH "americanmed.hash"
|
||||
#endif
|
||||
#ifndef DEFHASH
|
||||
#define DEFHASH "english.hash"
|
||||
#endif
|
||||
#ifndef DEFLANG
|
||||
#define DEFLANG "english.aff"
|
||||
#endif
|
1475
external/ispell/defmt.c
vendored
Normal file
1475
external/ispell/defmt.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
5
external/ispell/deformatters/README
vendored
Normal file
5
external/ispell/deformatters/README
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
The enclosed programs are sample deformatters provided primarily to
|
||||
show how to write filters for use with ispell's -F switch. They allow
|
||||
ispell to be used to check C and C++ programs as well as shell scripts
|
||||
(and any other languages that use # for comments and both quote styles
|
||||
for strings).
|
274
external/ispell/deformatters/defmt-c.c
vendored
Normal file
274
external/ispell/deformatters/defmt-c.c
vendored
Normal file
|
@ -0,0 +1,274 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: deformat-c.c,v 1.3 2001/07/25 21:51:48 geoff Exp geoff $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Simple deformatter for C/C++ strings and comments.
|
||||
*
|
||||
* Copyright 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* Since the new ANSI C9X standard supports //-style comments, this
|
||||
* deformatter does not distinguish between the languages. There are
|
||||
* some pathological cases where it might produce the wrong result on
|
||||
* older C programs, but since those programs will become illegal
|
||||
* under C9X, it's not worth supporting them.
|
||||
*
|
||||
* This deformatter is rather stupid; it shouldn't be run on programs
|
||||
* that have syntax errors.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: deformat-c.c,v $
|
||||
* Revision 1.3 2001/07/25 21:51:48 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.2 2001/07/23 20:43:38 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.1 2001/06/07 07:23:54 geoff
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef NO_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#if defined(O_BINARY) && O_BINARY
|
||||
#include <io.h>
|
||||
#define SET_BINARY(fd) do \
|
||||
{ \
|
||||
if (!isatty (fd)) \
|
||||
setmode (fd, O_BINARY); \
|
||||
} while (0)
|
||||
#else
|
||||
#define SET_BINARY(fd) /* Nothing needed */
|
||||
#endif /* O_BINARY */
|
||||
#endif /* NO_FCNTL_H */
|
||||
|
||||
|
||||
int main (); /* Filter to select C/C++ comments */
|
||||
static int igetchar (); /* Read one character from stdin */
|
||||
static int do_slashstar ();
|
||||
/* Handle C-style comments */
|
||||
static int do_slashslash ();
|
||||
/* Handle C++-style comments */
|
||||
static int do_singlequote ();
|
||||
/* Handle single-quoted strings */
|
||||
static int do_doublequote ();
|
||||
/* Handle double-quoted strings */
|
||||
|
||||
int main (argc, argv)
|
||||
int argc; /* Argument count */
|
||||
char * argv[]; /* Argument vector */
|
||||
{
|
||||
int c; /* Next character read from stdin */
|
||||
|
||||
/*
|
||||
* Since the deformatter needs to produce exactly one character
|
||||
* of output for each character of input, we need to preserve
|
||||
* the end-of-line format (Unix Newline or DOS CR-LF) of the
|
||||
* input file. This means we must do binary I/O.
|
||||
*/
|
||||
SET_BINARY (fileno (stdin));
|
||||
SET_BINARY (fileno (stdout));
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
if (c == '/')
|
||||
{
|
||||
putchar (' ');
|
||||
if ((c = igetchar ()) == EOF)
|
||||
break;
|
||||
else if (c == '*')
|
||||
{
|
||||
if (do_slashstar())
|
||||
break;
|
||||
}
|
||||
else if (c == '/')
|
||||
{
|
||||
if (do_slashslash())
|
||||
break;
|
||||
}
|
||||
else
|
||||
putchar (' ');
|
||||
}
|
||||
else if (c == '\'')
|
||||
{
|
||||
if (do_singlequote())
|
||||
break;
|
||||
}
|
||||
else if (c == '"')
|
||||
{
|
||||
if (do_doublequote())
|
||||
break;
|
||||
}
|
||||
else if (c == '\n' || c == '\r')
|
||||
putchar (c);
|
||||
else
|
||||
putchar (' ');
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Like getchar, except on MSDOS, where it knows about ^Z.
|
||||
*/
|
||||
static int igetchar ()
|
||||
{
|
||||
int c = getchar ();
|
||||
#ifdef MSDOS
|
||||
if (c == '\032') /* ^Z is a kind of ``software EOF'' */
|
||||
c = EOF;;
|
||||
#endif
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle C-style comments, passing their contents through unchanged.
|
||||
*/
|
||||
static int do_slashstar ()
|
||||
{
|
||||
int c; /* Next character from stdin */
|
||||
|
||||
putchar (' '); /* Create blank to cover for the star */
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
if (c != '*')
|
||||
putchar (c);
|
||||
else
|
||||
{
|
||||
if ((c = igetchar ()) == EOF)
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
if (c == '/')
|
||||
{
|
||||
putchar (' ');
|
||||
putchar (' ');
|
||||
return 0; /* Done with comment, continue deformatting */
|
||||
}
|
||||
putchar ('*');
|
||||
putchar (c);
|
||||
}
|
||||
}
|
||||
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle C++-style comments, passing their contents through unchanged.
|
||||
*/
|
||||
static int do_slashslash ()
|
||||
{
|
||||
int c; /* Next character from stdin */
|
||||
|
||||
putchar (' '); /* Create blank to cover for 2nd slash */
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
putchar (c);
|
||||
if (c == '\n')
|
||||
return 0; /* End of comment, continue deformatting */
|
||||
}
|
||||
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle single-quoted strings by whiting them out (but not getting confused
|
||||
* if they contain embedded slashes or double quotes).
|
||||
*/
|
||||
static int do_singlequote ()
|
||||
{
|
||||
int c; /* Next character from stdin */
|
||||
|
||||
putchar (' '); /* Create blank to cover for the quote */
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
putchar (' ');
|
||||
if (c == '\'')
|
||||
return 0; /* End of quotes, continue deformatting */
|
||||
else if (c == '\\')
|
||||
{
|
||||
if ((c = igetchar ()) == EOF)
|
||||
return 1;
|
||||
putchar (' ');
|
||||
}
|
||||
}
|
||||
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle double-quoted strings, passing their contents through unchanged.
|
||||
*/
|
||||
static int do_doublequote ()
|
||||
{
|
||||
int c; /* Next character from stdin */
|
||||
|
||||
putchar (' '); /* Create blank to cover for the quote */
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
if (c == '"')
|
||||
{
|
||||
putchar (' ');
|
||||
return 0; /* End of quotes, continue deformatting */
|
||||
}
|
||||
else if (c == '\\')
|
||||
{
|
||||
/*
|
||||
* Backslashed stuff is tricky to handle, because it might
|
||||
* contain a magic nroff or TeX character, but in that case
|
||||
* a doubled backslash would have to be converted to single.
|
||||
* That's too hard, so we'll settle for just passing the double
|
||||
* backslash through. If you want to spell-check that kind of
|
||||
* sequence, you'll have to create a new character-set type in
|
||||
* your affix file.
|
||||
*/
|
||||
putchar ('\\');
|
||||
if ((c = igetchar ()) == EOF)
|
||||
return 1;
|
||||
putchar (c);
|
||||
}
|
||||
else
|
||||
putchar (c);
|
||||
}
|
||||
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
}
|
||||
|
209
external/ispell/deformatters/defmt-sh.c
vendored
Normal file
209
external/ispell/deformatters/defmt-sh.c
vendored
Normal file
|
@ -0,0 +1,209 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: deformat-sh.c,v 1.4 2001/07/25 21:51:48 geoff Exp geoff $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Simple deformatter for sh/bash scripts.
|
||||
*
|
||||
* Copyright 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: deformat-sh.c,v $
|
||||
* Revision 1.4 2001/07/25 21:51:48 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.3 2001/07/23 20:43:38 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.2 2001/06/07 08:03:54 geoff
|
||||
* Don't interpret $# as a comment introduction.
|
||||
*
|
||||
* Revision 1.1 2001/06/07 07:23:54 geoff
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef NO_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#if defined(O_BINARY) && O_BINARY
|
||||
#include <io.h>
|
||||
#define SET_BINARY(fd) do \
|
||||
{ \
|
||||
if (!isatty (fd)) \
|
||||
setmode (fd, O_BINARY); \
|
||||
} while (0)
|
||||
#else
|
||||
#define SET_BINARY(fd) /* Nothing needed */
|
||||
#endif /* O_BINARY */
|
||||
#endif /* NO_FCNTL_H */
|
||||
|
||||
int main (); /* Filter to select sh/bash comments */
|
||||
static int igetchar (); /* Read one character from stdin */
|
||||
static int do_comment (); /* Handle comments */
|
||||
static int do_quote (); /* Handle quoted strings */
|
||||
|
||||
int main (argc, argv)
|
||||
int argc; /* Argument count */
|
||||
char * argv[]; /* Argument vector */
|
||||
{
|
||||
int c; /* Next character read from stdin */
|
||||
|
||||
/*
|
||||
* Since the deformatter needs to produce exactly one character
|
||||
* of output for each character of input, we need to preserve
|
||||
* the end-of-line format (Unix Newline or DOS CR-LF) of the
|
||||
* input file. This means we must do binary I/O.
|
||||
*/
|
||||
SET_BINARY (fileno (stdin));
|
||||
SET_BINARY (fileno (stdout));
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
if (c == '\\')
|
||||
{
|
||||
putchar (' ');
|
||||
if ((c = igetchar ()) == EOF)
|
||||
break;
|
||||
if (c == '\n' || c == '\r')
|
||||
putchar (c);
|
||||
else
|
||||
putchar (' ');
|
||||
}
|
||||
else if (c == '#')
|
||||
{
|
||||
if (do_comment())
|
||||
break;
|
||||
}
|
||||
else if (c == '\'' || c == '"')
|
||||
{
|
||||
if (do_quote(c))
|
||||
break;
|
||||
}
|
||||
else if (c == '$')
|
||||
{
|
||||
/*
|
||||
* $ might be followed by #, in which case it's not a comment
|
||||
* start. So we skip the character immediately after the $.
|
||||
*/
|
||||
putchar (' ');
|
||||
if ((c = igetchar ()) == EOF)
|
||||
break;
|
||||
putchar (' ');
|
||||
}
|
||||
else if (c == '\n' || c == '\r')
|
||||
putchar (c);
|
||||
else
|
||||
putchar (' ');
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Like getchar, except on MSDOS, where it knows about ^Z.
|
||||
*/
|
||||
static int igetchar ()
|
||||
{
|
||||
int c = getchar ();
|
||||
#ifdef MSDOS
|
||||
if (c == '\032') /* ^Z is a kind of ``software EOF'' */
|
||||
c = EOF;;
|
||||
#endif
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle shell comments, passing their contents through unchanged.
|
||||
*/
|
||||
static int do_comment ()
|
||||
{
|
||||
int c; /* Next character from stdin */
|
||||
|
||||
putchar (' '); /* Create blank to cover for pound sign */
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
putchar (c);
|
||||
if (c == '\n')
|
||||
return 0; /* End of comment, continue deformatting */
|
||||
}
|
||||
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle quoted strings, passing their contents through unchanged.
|
||||
*/
|
||||
static int do_quote(qc)
|
||||
int qc; /* Character that started the quote section */
|
||||
{
|
||||
int c; /* Next character from stdin */
|
||||
|
||||
putchar (' '); /* Create blank to cover for the quote */
|
||||
|
||||
while ((c = igetchar ()) != EOF)
|
||||
{
|
||||
if (c == qc)
|
||||
{
|
||||
putchar (' ');
|
||||
return 0; /* End of quotes, continue deformatting */
|
||||
}
|
||||
else if (c == '\\')
|
||||
{
|
||||
/*
|
||||
* Backslashed stuff is tricky to handle, because it might
|
||||
* contain a magic nroff or TeX character, but in that case
|
||||
* a doubled backslash would have to be converted to single.
|
||||
* That's too hard, so we'll settle for just passing the double
|
||||
* backslash through. If you want to spell-check that kind of
|
||||
* sequence, you'll have to create a new character-set type in
|
||||
* your affix file.
|
||||
*/
|
||||
putchar ('\\');
|
||||
if ((c = igetchar ()) == EOF)
|
||||
return 1;
|
||||
putchar (c);
|
||||
}
|
||||
else
|
||||
putchar (c);
|
||||
}
|
||||
|
||||
return 1; /* EOF hit, caller must terminate loop */
|
||||
}
|
||||
|
203
external/ispell/dump.c
vendored
Normal file
203
external/ispell/dump.c
vendored
Normal file
|
@ -0,0 +1,203 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: dump.c,v 1.19 2005/04/14 14:38:23 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* dump.c - Ispell's dump mode
|
||||
*
|
||||
* This code originally resided in ispell.c, but was moved here to keep
|
||||
* file sizes smaller.
|
||||
*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Revision 1.18 2001/07/25 21:51:47 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 1.17 2001/07/23 20:24:03 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 1.16 1999/01/18 03:28:30 geoff
|
||||
* Turn many char declarations into unsigned char, so that we won't have
|
||||
* sign-extension problems.
|
||||
*
|
||||
* Revision 1.15 1999/01/07 01:57:56 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.14 1994/01/25 07:11:27 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
|
||||
void dumpmode P ((void));
|
||||
static void tbldump P ((struct flagent * flagp, int numflags));
|
||||
static void entdump P ((struct flagent * flagp));
|
||||
static void setdump P ((char * setp, int mask));
|
||||
static void subsetdump P ((char * setp, int mask, int dumpval));
|
||||
|
||||
void dumpmode ()
|
||||
{
|
||||
|
||||
if (hashheader.flagmarker == '\\'
|
||||
|| hashheader.flagmarker == '#'
|
||||
|| hashheader.flagmarker == '>'
|
||||
|| hashheader.flagmarker == ':'
|
||||
|| hashheader.flagmarker == '-'
|
||||
|| hashheader.flagmarker == ','
|
||||
|| hashheader.flagmarker == '[') /* ] */
|
||||
(void) printf ("flagmarker \\%c\n", hashheader.flagmarker);
|
||||
else if (hashheader.flagmarker < ' ' || hashheader.flagmarker >= 0177)
|
||||
(void) printf ("flagmarker \\%3.3o\n",
|
||||
(unsigned int) hashheader.flagmarker & 0xFF);
|
||||
else
|
||||
(void) printf ("flagmarker %c\n", hashheader.flagmarker);
|
||||
if (numpflags)
|
||||
{
|
||||
(void) printf ("prefixes\n");
|
||||
tbldump (pflaglist, numpflags);
|
||||
}
|
||||
if (numsflags)
|
||||
{
|
||||
(void) printf ("suffixes\n");
|
||||
tbldump (sflaglist, numsflags);
|
||||
}
|
||||
}
|
||||
|
||||
static void tbldump (flagp, numflags) /* Dump a flag table */
|
||||
register struct flagent * flagp; /* First flag entry to dump */
|
||||
register int numflags; /* Number of flags to dump */
|
||||
{
|
||||
|
||||
while (--numflags >= 0)
|
||||
entdump (flagp++);
|
||||
}
|
||||
|
||||
static void entdump (flagp) /* Dump one flag entry */
|
||||
register struct flagent * flagp; /* Flag entry to dump */
|
||||
{
|
||||
register int cond; /* Condition number */
|
||||
|
||||
(void) printf (" flag %s%c: ",
|
||||
(flagp->flagflags & FF_CROSSPRODUCT) ? "*" : " ",
|
||||
BITTOCHAR (flagp->flagbit));
|
||||
for (cond = 0; cond < flagp->numconds; cond++)
|
||||
{
|
||||
setdump (flagp->conds, 1 << cond);
|
||||
if (cond < flagp->numconds - 1)
|
||||
(void) putc (' ', stdout);
|
||||
}
|
||||
if (cond == 0) /* No conditions at all? */
|
||||
(void) putc ('.', stdout);
|
||||
(void) printf ("\t> ");
|
||||
(void) putc ('\t', stdout);
|
||||
if (flagp->stripl)
|
||||
(void) printf ("-%s,", (char *) ichartosstr (flagp->strip, 1));
|
||||
(void) printf ("%s\n",
|
||||
flagp->affl ? (char*) ichartosstr (flagp->affix, 1) : "-");
|
||||
}
|
||||
|
||||
static void setdump (setp, mask) /* Dump a set specification */
|
||||
register char * setp; /* Set to be dumped */
|
||||
register int mask; /* Mask for bit to be dumped */
|
||||
{
|
||||
register int cnum; /* Next character's number */
|
||||
register int firstnz; /* Number of first NZ character */
|
||||
register int numnz; /* Number of NZ characters */
|
||||
|
||||
firstnz = numnz = 0;
|
||||
for (cnum = SET_SIZE; --cnum >= 0; )
|
||||
{
|
||||
if (setp[cnum] & mask)
|
||||
{
|
||||
numnz++;
|
||||
firstnz = cnum;
|
||||
}
|
||||
}
|
||||
if (numnz == 1)
|
||||
(void) putc (firstnz, stdout);
|
||||
else if (numnz == SET_SIZE)
|
||||
(void) putc ('.', stdout);
|
||||
else if (numnz > SET_SIZE / 2)
|
||||
{
|
||||
(void) printf ("[^");
|
||||
subsetdump (setp, mask, 0);
|
||||
(void) putc (']', stdout);
|
||||
}
|
||||
else
|
||||
{
|
||||
(void) putc ('[', stdout);
|
||||
subsetdump (setp, mask, mask);
|
||||
(void) putc (']', stdout);
|
||||
}
|
||||
}
|
||||
|
||||
static void subsetdump (setp, mask, dumpval) /* Dump part of a set spec */
|
||||
register char * setp; /* Set to be dumped */
|
||||
register int mask; /* Mask for bit to be dumped */
|
||||
register int dumpval; /* Value to be printed */
|
||||
{
|
||||
register int cnum; /* Next character's number */
|
||||
register int rangestart; /* Value starting a range */
|
||||
|
||||
for (cnum = 0; cnum < SET_SIZE; setp++, cnum++)
|
||||
{
|
||||
if (((*setp ^ dumpval) & mask) == 0)
|
||||
{
|
||||
for (rangestart = cnum; cnum < SET_SIZE; setp++, cnum++)
|
||||
{
|
||||
if ((*setp ^ dumpval) & mask)
|
||||
break;
|
||||
}
|
||||
if (cnum == rangestart + 1)
|
||||
(void) putc (rangestart, stdout);
|
||||
else if (cnum <= rangestart + 3)
|
||||
{
|
||||
while (rangestart < cnum)
|
||||
{
|
||||
(void) putc (rangestart, stdout);
|
||||
rangestart++;
|
||||
}
|
||||
}
|
||||
else
|
||||
(void) printf ("%c-%c", rangestart, cnum - 1);
|
||||
}
|
||||
}
|
||||
}
|
157
external/ispell/exp_table.c
vendored
Normal file
157
external/ispell/exp_table.c
vendored
Normal file
|
@ -0,0 +1,157 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: exp_table.c,v 1.4 2005/06/11 22:43:53 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Note: this file was written by Edward Avis. Thus, it is not
|
||||
* distributed under the same license as the rest of ispell.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: exp_table.c,v $
|
||||
* Revision 1.4 2005/06/11 22:43:53 geoff
|
||||
* Don't try to malloc zero elements during initialization.
|
||||
*
|
||||
* Revision 1.3 2005/04/14 15:19:37 geoff
|
||||
* Get rid of a compiler warning.
|
||||
*
|
||||
* Revision 1.2 2005/04/14 14:38:23 geoff
|
||||
* Add RCS keywords. Reformat to be more consistent with ispell style.
|
||||
* This may also include some bug fixes; I unfortunately don't really
|
||||
* remember.
|
||||
*
|
||||
* Revision 1.1 2002/07/02 00:06:50 geoff
|
||||
* Initial revision
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "msgs.h"
|
||||
#include "proto.h"
|
||||
#include "exp_table.h"
|
||||
|
||||
void exp_table_init (e, orig_word)
|
||||
struct exp_table *
|
||||
e;
|
||||
ichar_t * orig_word;
|
||||
{
|
||||
|
||||
e->size = 0;
|
||||
e->max_size = 1;
|
||||
e->exps = malloc (e->max_size * sizeof (*e->exps));
|
||||
e->flags = malloc (e->max_size * sizeof (*e->flags) * MASKSIZE);
|
||||
e->orig_word = orig_word;
|
||||
}
|
||||
|
||||
const ichar_t * get_orig_word (e)
|
||||
const struct exp_table *
|
||||
e;
|
||||
{
|
||||
|
||||
return e->orig_word;
|
||||
}
|
||||
|
||||
const char * get_expansion (e, i)
|
||||
const struct exp_table *
|
||||
e;
|
||||
int i;
|
||||
{
|
||||
|
||||
return e->exps[i];
|
||||
}
|
||||
|
||||
MASKTYPE get_flags (e, i)
|
||||
const struct exp_table *
|
||||
e;
|
||||
int i;
|
||||
{
|
||||
|
||||
return e->flags[i * MASKSIZE];
|
||||
}
|
||||
|
||||
int num_expansions (e)
|
||||
const struct exp_table *
|
||||
e;
|
||||
{
|
||||
return e->size;
|
||||
}
|
||||
|
||||
int add_expansion_copy (e, s, flags)
|
||||
struct exp_table * e;
|
||||
const char * s;
|
||||
MASKTYPE flags[];
|
||||
{
|
||||
char * copy;
|
||||
int copy_size;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Check not already there.
|
||||
*/
|
||||
for (i = 0; i < e->size; i++)
|
||||
{
|
||||
if (strcmp (e->exps[i], s) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Grow the pointer table if necessary.
|
||||
*/
|
||||
if (e->size == e->max_size)
|
||||
{
|
||||
e->max_size *= 2;
|
||||
e->exps = realloc(e->exps, e->max_size * sizeof (*e->exps));
|
||||
e->flags =
|
||||
realloc(e->flags, e->max_size * sizeof (*e->flags) * MASKSIZE);
|
||||
|
||||
if (e->exps == NULL || e->flags == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, TGOOD_C_NO_SPACE);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
copy_size = strlen (s) + 1;
|
||||
copy = malloc (copy_size * sizeof copy[0]);
|
||||
if (copy == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, TGOOD_C_NO_SPACE);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
strncpy (copy, s, copy_size);
|
||||
e->exps[e->size] = copy;
|
||||
BCOPY ((char *) &flags[0], &e->flags[e->size * MASKSIZE],
|
||||
MASKSIZE * sizeof flags[0]);
|
||||
++e->size;
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct exp_table * exp_table_empty (e)
|
||||
struct exp_table * e;
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < e->size; i++)
|
||||
free (e->exps[i]);
|
||||
e->size = 0;
|
||||
return e;
|
||||
}
|
||||
|
||||
void exp_table_dump (e)
|
||||
const struct exp_table *
|
||||
e;
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* BUGS: assumes 32-bit masks; assumes MASKSIZE = 1
|
||||
*/
|
||||
|
||||
fprintf(stderr, "original word: %s\n", ichartosstr(e->orig_word, 0));
|
||||
fprintf(stderr, "%d expansions\n", e->size);
|
||||
for (i = 0; i < e->size; i++)
|
||||
fprintf(stderr, "flags %lx generate expansion %s\n",
|
||||
(long) e->flags[i * MASKSIZE], e->exps[i]);
|
||||
}
|
98
external/ispell/exp_table.h
vendored
Normal file
98
external/ispell/exp_table.h
vendored
Normal file
|
@ -0,0 +1,98 @@
|
|||
#ifndef EXP_TABLE_H_INCLUDED
|
||||
#define EXP_TABLE_H_INCLUDED
|
||||
/*
|
||||
* $Id: exp_table.h,v 1.3 2005/04/26 22:40:07 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note: this header file was written by Edward Avis. Thus, it is not
|
||||
* distributed under the same license as the rest of ispell.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: exp_table.h,v $
|
||||
* Revision 1.3 2005/04/26 22:40:07 geoff
|
||||
* Add double-inclusion protection.
|
||||
*
|
||||
* Revision 1.2 2005/04/14 15:19:37 geoff
|
||||
* Reformat to be more consistent with ispell style.
|
||||
*
|
||||
* Revision 1.1 2002/07/02 00:06:50 geoff
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Provides the exp_table type, which stores the expansions of a word.
|
||||
* Use it like this:
|
||||
*
|
||||
* int i;
|
||||
* struct exp_table t;
|
||||
* exp_table_init (&t, "paint");
|
||||
* add_expansion_copy (&t, "painted", mask0);
|
||||
* add_expansion_copy (&t, "painting", mask1);
|
||||
* add_expansion_copy (&t, "painter", mask2);
|
||||
* for (i = 0; i < num_expansions (&t); i++)
|
||||
* printf("expansion: %s\n", get_expansion (&t, i));
|
||||
* exp_table_empty (&t);
|
||||
*
|
||||
* where mask0 is a MASKTYPE with the flags used to add 'ed' set,
|
||||
* mask1 gives the flags for 'ing', etc.
|
||||
*
|
||||
* Note that allocating the struct itself is up to you, but you
|
||||
* should initialize it with exp_table_init() before use and call
|
||||
* exp_table_empty() before you free it.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The structure itself. Normally, it is better to use the accessors
|
||||
* below rather than access the structure directly.
|
||||
*/
|
||||
struct exp_table
|
||||
{
|
||||
char ** exps; /* Table of expansions */
|
||||
MASKTYPE * flags; /* Flags used to get the expansions */
|
||||
int size; /* Current number of expansions */
|
||||
int max_size; /* Maximum number of expansions */
|
||||
ichar_t * orig_word; /* Root word that flags were applied to */
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize a struct exp_table. After initialization the number of
|
||||
* expansions will be zero. Pass in the original word from which the
|
||||
* expansions are generated - this will be stored by reference.
|
||||
*/
|
||||
extern void exp_table_init (struct exp_table * e, ichar_t * orig_name);
|
||||
|
||||
/* Return the original word in an expansion. */
|
||||
extern const ichar_t * get_orig_word (const struct exp_table * e);
|
||||
|
||||
/* Return expansion number i (numbered from zero). */
|
||||
extern const char *
|
||||
get_expansion (const struct exp_table * e, int i);
|
||||
|
||||
/* Return the flags used to get expansion number i. */
|
||||
extern MASKTYPE get_flags (const struct exp_table * e, int i);
|
||||
|
||||
/* Return number of expansions in the table. */
|
||||
extern int num_expansions (const struct exp_table * e);
|
||||
|
||||
/* Add a new expansion to the list, if it is not already in there.
|
||||
* Returns true iff the expansion was added. Specify the result of
|
||||
* the expansion and the flags that were used. Takes a copy of the
|
||||
* string passed in.
|
||||
*/
|
||||
extern int add_expansion_copy (struct exp_table * e, const char * s,
|
||||
MASKTYPE flags[]);
|
||||
|
||||
/*
|
||||
* Empty the table of expansions, freeing any resources allocated.
|
||||
* Returns a pointer to the now empty struct.
|
||||
*/
|
||||
extern struct exp_table *
|
||||
exp_table_empty (struct exp_table * e);
|
||||
|
||||
/* Dump the contents of a table to stderr, for debugging. */
|
||||
extern void exp_table_dump (const struct exp_table * e);
|
||||
|
||||
#endif /* EXP_TABLE_H_INCLUDED */
|
280
external/ispell/fields.3
vendored
Normal file
280
external/ispell/fields.3
vendored
Normal file
|
@ -0,0 +1,280 @@
|
|||
.\"
|
||||
.\" $Id: fields.3,v 1.5 2021-06-02 16:52:45-07 geoff Exp $
|
||||
.\"
|
||||
.\" $Log: fields.3,v $
|
||||
.\" Revision 1.5 2021-06-02 16:52:45-07 geoff
|
||||
.\" Remove documentation for obsolete features. Note that maxf and
|
||||
.\" nfields are unsigned.
|
||||
.\"
|
||||
.\" Revision 1.4 2021-05-29 22:58:29-07 geoff
|
||||
.\" Fix some minor typos.
|
||||
.\"
|
||||
.\" Revision 1.3 1994/01/05 20:13:43 geoff
|
||||
.\" Add the maxf parameter
|
||||
.\"
|
||||
.\" Revision 1.2 1994/01/04 02:40:16 geoff
|
||||
.\" Add descriptions of field_line_inc, field_field_inc, and the
|
||||
.\" FLD_NOSHRINK flag.
|
||||
.\"
|
||||
.\" Revision 1.1 1993/09/09 01:09:44 geoff
|
||||
.\" Initial revision
|
||||
.\"
|
||||
.\"
|
||||
.TH FIELDS 3 local
|
||||
.SH NAME
|
||||
fieldread, fieldmake, fieldwrite, fieldfree \- field access package
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
#include "fields.h"
|
||||
|
||||
typedef struct {
|
||||
unsigned int nfields;
|
||||
int hadnl;
|
||||
char *linebuf;
|
||||
char **fields;
|
||||
} field_t;
|
||||
|
||||
#define FLD_RUNS 0x0001
|
||||
#define FLD_SNGLQUOTES 0x0002
|
||||
#define FLD_BACKQUOTES 0x0004
|
||||
#define FLD_DBLQUOTES 0x0008
|
||||
#define FLD_SHQUOTES 0x0010
|
||||
#define FLD_STRIPQUOTES 0x0020
|
||||
#define FLD_BACKSLASH 0x0040
|
||||
|
||||
extern field_t *fieldread (FILE * file, char * delims,
|
||||
int flags, unsigned int maxf);
|
||||
extern field_t *fieldmake (char * line, int allocated,
|
||||
char * delims, int flags, unsigned int maxf);
|
||||
extern int fieldwrite (FILE * file, field_t * fieldp,
|
||||
int delim);
|
||||
extern void fieldfree (field_t * fieldp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
The fields-access package eases the common task of parsing and
|
||||
accessing information that is separated into fields by whitespace or
|
||||
other delimiters. Various options can be specified to handle many
|
||||
common cases, including selectable delimiters, runs of delimiters, and
|
||||
quoting.
|
||||
.PP
|
||||
.I fieldread
|
||||
reads one line from a file, parses it into fields as specified by the
|
||||
parameters, and returns a
|
||||
.B field_t
|
||||
structure describing the result.
|
||||
.I fieldmake
|
||||
performs the same process on a buffer already in memory.
|
||||
.I fieldwrite
|
||||
creates an output line from a
|
||||
.B field_t
|
||||
structure and writes it to an output file.
|
||||
.I fieldfree
|
||||
frees a
|
||||
.B field_t
|
||||
structure and any associated memory allocated by the package.
|
||||
.PP
|
||||
The
|
||||
.B field_t
|
||||
structure describes the fields in a parsed line.
|
||||
A well-behaved program should only access the
|
||||
.BR nfields ,
|
||||
.BR fields ,
|
||||
and
|
||||
.B hadnl
|
||||
elements;
|
||||
all other elements are used internally by the package and are not
|
||||
guaranteed to remain the same even though they are documented here.
|
||||
.B Nfields
|
||||
gives the number of fields in the parsed line, just like the
|
||||
.B argc
|
||||
argument to a C program;
|
||||
.B fields
|
||||
is a pointer to an array of string pointers, just like the
|
||||
.B argv
|
||||
argument to a C program.
|
||||
As in C, the last field pointer is followed by a null pointer,
|
||||
although the field count is the preferred method of accessing fields.
|
||||
The user may alter
|
||||
.B nfields
|
||||
by decreasing it, and may replace any pointer in
|
||||
.B fields
|
||||
without harm.
|
||||
This is often useful in replacing a single field with a calculated
|
||||
value preparatory to output.
|
||||
The
|
||||
.B hadnl
|
||||
element is nonzero if the original line was terminated with a newline
|
||||
when it was parsed;
|
||||
this is used to accurately reproduce the input when
|
||||
.I fieldwrite
|
||||
is called.
|
||||
.PP
|
||||
The
|
||||
.B linebuf
|
||||
element contains a pointer to an internal buffer allocated by
|
||||
.I fieldread
|
||||
or provided to
|
||||
.IR fieldmake .
|
||||
This buffer is
|
||||
.I not
|
||||
guaranteed to contain anything sensible, although in the current
|
||||
implementation all of the field contents can be found therein.
|
||||
.PP
|
||||
.I fieldread
|
||||
reads a single line of arbitrary length from
|
||||
.BR file ,
|
||||
allocating as much memory as necessary to hold it, and then parses the
|
||||
line according to its remaining arguments.
|
||||
A pointer to the parsed
|
||||
.B field_t
|
||||
structure is returned, with
|
||||
.B NULL
|
||||
returned if an error occurs or if
|
||||
.B EOF
|
||||
is reached on the input file.
|
||||
Fields in the input line are considered to be separated by any of the
|
||||
delimiters in the
|
||||
.B delims
|
||||
parameter.
|
||||
For example, if delimiters of ":.;" are specified, a line containing
|
||||
"a:b;c.d" would be considered to have four fields.
|
||||
.PP
|
||||
The default parsing of fields considers each delimiter to indicate a
|
||||
separate field, and does not allow any quoting. This is similar to
|
||||
the parsing done by
|
||||
.IR cut (1).
|
||||
This behavior can be modified by specifying flags.
|
||||
Multiple flags may be OR'ed together.
|
||||
The available flags are:
|
||||
.IP \fBFLD_RUNS\fP
|
||||
Consider runs of delimiters to be the same as a single delimiter,
|
||||
suppressing all null fields.
|
||||
This is similar to the way utilities like
|
||||
.IR awk (1)
|
||||
and
|
||||
.IR sort (1)
|
||||
treat whitespace, but it is not limited to whitespace.
|
||||
A run does not have to consist of a single type of delimiter; if both
|
||||
semicolon and colon are delimiters, ";::;" is a run.
|
||||
.IP \fBFLD_SNGLQUOTES\fP
|
||||
Allow field contents to be quoted with single quotes.
|
||||
Delimiters and other quotes appearing within single quotes are ignored.
|
||||
This may appear in combination with other quote options.
|
||||
.IP \fBFLD_BACKQUOTES\fP
|
||||
Allow field contents to be quoted with reverse single quotes.
|
||||
Delimiters and other quotes appearing within reverse single quotes are ignored.
|
||||
This may appear in combination with other quote options.
|
||||
.IP \fBFLD_DBLQUOTES\fP
|
||||
Allow field contents to be quoted with single quotes.
|
||||
Delimiters and other quotes appearing within double quotes are ignored.
|
||||
This may appear in combination with other quote options.
|
||||
.IP \fBFLD_SHQUOTES\fP
|
||||
Allow shell-style quoting.
|
||||
In the absence of this option, quotes are only recognized at the
|
||||
beginning of a field, and characters following the close quote are
|
||||
removed from the field (and are thus lost from the input line).
|
||||
If this option is specified, quotes may appear within a field, in the
|
||||
same way as they are handled by
|
||||
.IR sh (1).
|
||||
Multiple quoting styles may be used in the same field.
|
||||
If none of
|
||||
.BR FLD_SNGLQUOTES ,
|
||||
.BR FLD_BACKQUOTES ,
|
||||
or
|
||||
.B FLD_DBLQUOTES
|
||||
is specified with
|
||||
.BR FLD_SHQUOTES ,
|
||||
all three options are implied.
|
||||
.IP \fBFLD_STRIPQUOTES\fP
|
||||
Remove quotes and backslash sequences from the field while parsing,
|
||||
converting backslash sequences to their proper ASCII equivalent.
|
||||
The C sequences \ea, \eb, \ef, \en, \er, \ev, \ex\fInn\fP, and \e\fInnn\fP are
|
||||
supported.
|
||||
Any other sequence is simply converted to the backslashed character,
|
||||
as in
|
||||
.IR sh (1).
|
||||
.IP \fBFLD_BACKSLASH\fP
|
||||
Accept standard C-style backslash sequences.
|
||||
The sequence will be converted to an ASCII equivalent if
|
||||
.B FLD_STRIPQUOTES
|
||||
is specified (q.v.).
|
||||
.PP
|
||||
The
|
||||
.I maxf
|
||||
parameter, if nonzero, specifies the maximum number of fields to be
|
||||
generated.
|
||||
This may enhance performance if only the first few fields of a long
|
||||
line are of interest to the caller.
|
||||
The actual number of fields returned is one greater than
|
||||
.IR maxf ,
|
||||
because the remainder of the line will be returned as a single
|
||||
contiguous (and uninterpreted,
|
||||
even if
|
||||
.B FLD_STRIPQUOTES
|
||||
or
|
||||
.B FLD_BACKSLASH
|
||||
is specified) field.
|
||||
.PP
|
||||
.I fieldmake
|
||||
operates exactly like
|
||||
.IR fieldread ,
|
||||
except that the line parsed is provided by the caller rather than
|
||||
being read from a file.
|
||||
If the
|
||||
.I allocated
|
||||
parameter is nonzero, the memory pointed to by the
|
||||
.I line
|
||||
parameter will automatically be freed when
|
||||
.I fieldfree
|
||||
is called;
|
||||
otherwise this memory is the caller's responsibility.
|
||||
The memory pointed to by
|
||||
.I line
|
||||
is destroyed by
|
||||
.IR fieldmake .
|
||||
All other parameters are the same as for
|
||||
.IR fieldread.
|
||||
.PP
|
||||
.I fieldwrite
|
||||
writes a set of fields to the specified
|
||||
.IR file ,
|
||||
separating them with the delimiter character
|
||||
.I delim
|
||||
(note that this is a character, not a string), and appending a newline
|
||||
if specified by the
|
||||
.I hadnl
|
||||
element of the structure.
|
||||
The field structure is not freed.
|
||||
.I fieldwrite
|
||||
will return nonzero if an I/O error is detected.
|
||||
.PP
|
||||
.I fieldfree
|
||||
frees the
|
||||
.B field_t
|
||||
structure passed to it, along with any associated auxiliary memory
|
||||
allocated by the package (or passed to
|
||||
.IR fieldmake ).
|
||||
The structure may not be accessed after
|
||||
.I fieldfree
|
||||
is called.
|
||||
.SH RETURN VALUES
|
||||
.I fieldread
|
||||
and
|
||||
.I fieldmake
|
||||
return
|
||||
.B NULL
|
||||
if an error occurs or if
|
||||
.B EOF
|
||||
is reached on the input file.
|
||||
.I fieldwrite
|
||||
returns nonzero if an output error occurs.
|
||||
.SH BUGS
|
||||
Thanks to the vagaries of ANSI C, the
|
||||
.B fields.h
|
||||
header file defines an auxiliary macro named
|
||||
.BR P .
|
||||
If the user needs a similarly-named macro, this macro must be
|
||||
undefined first, and the user's macro must be defined after
|
||||
.B fields.h
|
||||
is included.
|
424
external/ispell/fields.c
vendored
Normal file
424
external/ispell/fields.c
vendored
Normal file
|
@ -0,0 +1,424 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: fields.c,v 1.13 2021-06-02 16:52:07-07 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* $Log: fields.c,v $
|
||||
* Revision 1.13 2021-06-02 16:52:07-07 geoff
|
||||
* When maxf is nonzero, don't truncate the last field. Get rid of
|
||||
* O(N^2) performance when expanding buffers. Remove FLD_NOSHRINK.
|
||||
*
|
||||
* Revision 1.12 2021-05-29 22:53:37-07 geoff
|
||||
* Correctly handle quoted strings in the last field on a line.
|
||||
*
|
||||
* Revision 1.11 2005-04-14 07:38:23-07 geoff
|
||||
* Make maxf unsigned.
|
||||
*
|
||||
* Revision 1.10 1999/01/06 20:57:19 geoff
|
||||
* Include ispell.h so proto.h will work
|
||||
*
|
||||
* Revision 1.9 1999/01/05 20:46:38 geoff
|
||||
* Get declarations from proto.h
|
||||
*
|
||||
* Revision 1.8 1998/07/06 04:56:19 geoff
|
||||
* Make strlen return an unsigned int
|
||||
*
|
||||
* Revision 1.7 1994/01/06 05:26:37 geoff
|
||||
* Get rid of all references to System V string routines, for portability
|
||||
* (sigh).
|
||||
*
|
||||
* Revision 1.6 1994/01/05 20:13:43 geoff
|
||||
* Add the maxf parameter
|
||||
*
|
||||
* Revision 1.5 1994/01/04 02:40:21 geoff
|
||||
* Make the increments settable (field_line_inc and field_field_inc).
|
||||
* Add support for the FLD_NOSHRINK flag.
|
||||
*
|
||||
* Revision 1.4 1993/09/27 17:48:02 geoff
|
||||
* Fix some lint complaints and some parenthesization errors.
|
||||
*
|
||||
* Revision 1.3 1993/09/09 01:11:11 geoff
|
||||
* Add a return value to fieldwrite. Add support for backquotes and for
|
||||
* unstripped backslashes.
|
||||
*
|
||||
* Revision 1.2 1993/08/26 00:02:50 geoff
|
||||
* Fix a stupid null-pointer bug
|
||||
*
|
||||
* Revision 1.1 1993/08/25 21:32:05 geoff
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "fields.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
|
||||
field_t * fieldread P ((FILE * file, char * delims,
|
||||
int flags, unsigned int maxf));
|
||||
/* Read a line with fields from a file */
|
||||
field_t * fieldmake P ((char * line, int allocated, char * delims,
|
||||
int flags, unsigned int maxf));
|
||||
/* Make a field structure from a line */
|
||||
static field_t * fieldparse P ((field_t * fieldp, char * line, char * delims,
|
||||
int flags, unsigned int maxf));
|
||||
/* Parse the fields in a line */
|
||||
static int fieldbackch P ((char * str, char ** out, int strip));
|
||||
/* Process backslash sequences */
|
||||
int fieldwrite P ((FILE * file, field_t * fieldp, int delim));
|
||||
/* Write a line with fields to a file */
|
||||
void fieldfree P ((field_t * fieldp));
|
||||
/* Free a field returned by fieldread */
|
||||
|
||||
#define INIT_FIELDS 8 /* Number of fields to allocate initially */
|
||||
#define INIT_LINE 128 /* Initial size of a line in fieldread */
|
||||
|
||||
#ifndef USG
|
||||
#define strchr index
|
||||
#endif /* USG */
|
||||
|
||||
/*
|
||||
* Read one line of the given file into a buffer, break it up into
|
||||
* fields, and return them to the caller. The field_t structure
|
||||
* returned must eventually be freed with fieldfree.
|
||||
*/
|
||||
field_t * fieldread (file, delims, flags, maxf)
|
||||
FILE * file; /* File to read lines from */
|
||||
char * delims; /* Characters to use for field delimiters */
|
||||
int flags; /* Option flags; see fields.h */
|
||||
unsigned int maxf; /* Maximum number of fields to parse */
|
||||
{
|
||||
register char * linebuf; /* Buffer to hold the line read in */
|
||||
int linemax; /* Maximum line buffer size */
|
||||
int linesize; /* Current line buffer size */
|
||||
|
||||
linebuf = (char *) malloc (INIT_LINE);
|
||||
if (linebuf == NULL)
|
||||
return NULL;
|
||||
linemax = INIT_LINE;
|
||||
linesize = 0;
|
||||
/*
|
||||
* Read in the line.
|
||||
*/
|
||||
while (fgets (&linebuf[linesize], linemax - linesize, file)
|
||||
!= NULL)
|
||||
{
|
||||
linesize += strlen (&linebuf[linesize]);
|
||||
if (linebuf[linesize - 1] == '\n')
|
||||
break;
|
||||
else
|
||||
{
|
||||
linemax *= 2;
|
||||
linebuf = (char *) realloc (linebuf, linemax);
|
||||
if (linebuf == NULL)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
if (linesize == 0)
|
||||
{
|
||||
free (linebuf);
|
||||
return NULL;
|
||||
}
|
||||
return fieldmake (linebuf, 1, delims, flags, maxf);
|
||||
}
|
||||
|
||||
field_t * fieldmake (line, allocated, delims, flags, maxf)
|
||||
char * line; /* Line to make into a field structure */
|
||||
int allocated; /* NZ if line allocated with malloc */
|
||||
char * delims; /* Characters to use for field delimiters */
|
||||
int flags; /* Option flags; see fields.h */
|
||||
unsigned int maxf; /* Maximum number of fields to parse */
|
||||
{
|
||||
register field_t * fieldp; /* Structure describing the fields */
|
||||
int linesize; /* Current line buffer size */
|
||||
|
||||
fieldp = (field_t *) malloc (sizeof (field_t));
|
||||
if (fieldp == NULL)
|
||||
return NULL;
|
||||
fieldp->nfields = 0;
|
||||
fieldp->linebuf = allocated ? line : NULL;
|
||||
fieldp->fields = NULL;
|
||||
fieldp->hadnl = 0;
|
||||
linesize = strlen (line);
|
||||
if (line[linesize - 1] == '\n')
|
||||
{
|
||||
line[--linesize] = '\0';
|
||||
fieldp->hadnl = 1;
|
||||
}
|
||||
return fieldparse (fieldp, line, delims, flags, maxf);
|
||||
}
|
||||
|
||||
static field_t * fieldparse (fieldp, line, delims, flags, maxf)
|
||||
register field_t * fieldp; /* Field structure to parse into */
|
||||
register char * line; /* Line to be parsed */
|
||||
char * delims; /* Characters to use for field delimiters */
|
||||
int flags; /* Option flags; see fields.h */
|
||||
unsigned int maxf; /* Maximum number of fields to parse */
|
||||
{
|
||||
unsigned int fieldmax; /* Max size of fields array */
|
||||
char * lineout; /* Where to store xlated char in line */
|
||||
char quote; /* Quote character in use */
|
||||
|
||||
fieldp->nfields = 0;
|
||||
fieldmax =
|
||||
(maxf != 0 && maxf < INIT_FIELDS) ? maxf + 2 : INIT_FIELDS;
|
||||
fieldp->fields = (char **) malloc (fieldmax * sizeof (char *));
|
||||
if (fieldp->fields == NULL)
|
||||
{
|
||||
fieldfree (fieldp);
|
||||
return NULL;
|
||||
}
|
||||
if ((flags
|
||||
& (FLD_SHQUOTES | FLD_SNGLQUOTES | FLD_BACKQUOTES | FLD_DBLQUOTES))
|
||||
== FLD_SHQUOTES)
|
||||
flags |= FLD_SNGLQUOTES | FLD_BACKQUOTES | FLD_DBLQUOTES;
|
||||
while (1)
|
||||
{
|
||||
if (flags & FLD_RUNS)
|
||||
{
|
||||
while (*line != '\0' && strchr (delims, *line) != NULL)
|
||||
line++; /* Skip runs of delimiters */
|
||||
if (*line == '\0')
|
||||
break;
|
||||
}
|
||||
fieldp->fields[fieldp->nfields] = lineout = line;
|
||||
/*
|
||||
* Skip to the next delimiter. At the end of skipping, "line" will
|
||||
* point to either a delimiter or a null byte.
|
||||
*/
|
||||
if (flags
|
||||
& (FLD_SHQUOTES | FLD_SNGLQUOTES | FLD_BACKQUOTES
|
||||
| FLD_DBLQUOTES | FLD_BACKSLASH))
|
||||
{
|
||||
while (*line != '\0')
|
||||
{
|
||||
if (strchr (delims, *line) != NULL)
|
||||
break;
|
||||
else if (((flags & FLD_SNGLQUOTES) && *line == '\'')
|
||||
|| ((flags & FLD_BACKQUOTES) && *line == '`')
|
||||
|| ((flags & FLD_DBLQUOTES) && *line == '"'))
|
||||
{
|
||||
if ((flags & FLD_SHQUOTES) == 0
|
||||
&& line != fieldp->fields[fieldp->nfields])
|
||||
quote = '\0';
|
||||
else
|
||||
quote = *line;
|
||||
}
|
||||
else
|
||||
quote = '\0';
|
||||
if (quote == '\0')
|
||||
{
|
||||
if (*line == '\\' && (flags & FLD_BACKSLASH))
|
||||
{
|
||||
line++;
|
||||
if (*line == '\0')
|
||||
break;
|
||||
line += fieldbackch (line, &lineout,
|
||||
flags & FLD_STRIPQUOTES);
|
||||
}
|
||||
else
|
||||
*lineout++ = *line++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Process quoted string */
|
||||
if ((flags & FLD_STRIPQUOTES) == 0)
|
||||
*lineout++ = quote;
|
||||
++line;
|
||||
while (*line != '\0')
|
||||
{
|
||||
if (*line == quote)
|
||||
{
|
||||
if ((flags & FLD_STRIPQUOTES) == 0)
|
||||
*lineout++ = quote;
|
||||
line++; /* Go on past quote */
|
||||
if ((flags & FLD_SHQUOTES) == 0)
|
||||
{
|
||||
while (*line != '\0'
|
||||
&& strchr (delims, *line) == NULL)
|
||||
line++; /* Skip to delimiter */
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (*line == '\\')
|
||||
{
|
||||
if (flags & FLD_BACKSLASH)
|
||||
{
|
||||
line++;
|
||||
if (*line == '\0')
|
||||
break;
|
||||
else
|
||||
line += fieldbackch (line, &lineout,
|
||||
flags & FLD_STRIPQUOTES);
|
||||
}
|
||||
else
|
||||
{
|
||||
*lineout++ = '\\';
|
||||
if (*++line == '\0')
|
||||
break;
|
||||
*lineout++ = *line;
|
||||
}
|
||||
}
|
||||
else
|
||||
*lineout++ = *line++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
while (*line != '\0' && strchr (delims, *line) == NULL)
|
||||
line++; /* Skip to delimiter */
|
||||
lineout = line;
|
||||
}
|
||||
fieldp->nfields++;
|
||||
if (*line++ == '\0')
|
||||
{
|
||||
*lineout = '\0';
|
||||
break;
|
||||
}
|
||||
if (maxf != 0 && fieldp->nfields > maxf)
|
||||
break;
|
||||
*lineout = '\0';
|
||||
if (fieldp->nfields >= fieldmax)
|
||||
{
|
||||
fieldmax *= 2;
|
||||
fieldp->fields =
|
||||
(char **) realloc (fieldp->fields, fieldmax * sizeof (char *));
|
||||
if (fieldp->fields == NULL)
|
||||
{
|
||||
fieldfree (fieldp);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
fieldp->fields[fieldp->nfields] = NULL;
|
||||
return fieldp;
|
||||
}
|
||||
|
||||
static int fieldbackch (str, out, strip)
|
||||
register char * str; /* First char of backslash sequence */
|
||||
register char ** out; /* Where to store result */
|
||||
int strip; /* NZ to convert the sequence */
|
||||
{
|
||||
register int ch; /* Character being developed */
|
||||
char * origstr; /* Original value of str */
|
||||
|
||||
if (!strip)
|
||||
{
|
||||
*(*out)++ = '\\';
|
||||
if (*str != 'x' && *str != 'X' && (*str < '0' || *str > '7'))
|
||||
{
|
||||
*(*out)++ = *str;
|
||||
return *str != '\0';
|
||||
}
|
||||
}
|
||||
switch (*str)
|
||||
{
|
||||
case '\0':
|
||||
*(*out)++ = '\0';
|
||||
return 0;
|
||||
case 'a':
|
||||
*(*out)++ = '\007';
|
||||
return 1;
|
||||
case 'b':
|
||||
*(*out)++ = '\b';
|
||||
return 1;
|
||||
case 'f':
|
||||
*(*out)++ = '\f';
|
||||
return 1;
|
||||
case 'n':
|
||||
*(*out)++ = '\n';
|
||||
return 1;
|
||||
case 'r':
|
||||
*(*out)++ = '\r';
|
||||
return 1;
|
||||
case 'v':
|
||||
*(*out)++ = '\v';
|
||||
return 1;
|
||||
case 'X':
|
||||
case 'x':
|
||||
/* Hexadecimal sequence */
|
||||
origstr = str++;
|
||||
ch = 0;
|
||||
if (*str >= '0' && *str <= '9')
|
||||
ch = *str++ - '0';
|
||||
else if (*str >= 'a' && *str <= 'f')
|
||||
ch = *str++ - 'a' + 0xa;
|
||||
else if (*str >= 'A' && *str <= 'F')
|
||||
ch = *str++ - 'A' + 0xa;
|
||||
if (*str >= '0' && *str <= '9')
|
||||
ch = (ch << 4) | (*str++ - '0');
|
||||
else if (*str >= 'a' && *str <= 'f')
|
||||
ch = (ch << 4) | (*str++ - 'a' + 0xa);
|
||||
else if (*str >= 'A' && *str <= 'F')
|
||||
ch = (ch << 4) | (*str++ - 'A' + 0xa);
|
||||
break;
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
/* Octal sequence */
|
||||
origstr = str;
|
||||
ch = *str++ - '0';
|
||||
if (*str >= '0' && *str <= '7')
|
||||
ch = (ch << 3) | (*str++ - '0');
|
||||
if (*str >= '0' && *str <= '7')
|
||||
ch = (ch << 3) | (*str++ - '0');
|
||||
break;
|
||||
default:
|
||||
*(*out)++ = *str;
|
||||
return 1;
|
||||
}
|
||||
if (strip)
|
||||
{
|
||||
*(*out)++ = ch;
|
||||
return str - origstr;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (ch = 0; origstr < str; ch++)
|
||||
*(*out)++ = *origstr++;
|
||||
return ch;
|
||||
}
|
||||
}
|
||||
|
||||
int fieldwrite (file, fieldp, delim)
|
||||
FILE * file; /* File to write to */
|
||||
register field_t * fieldp; /* Field structure to write */
|
||||
int delim; /* Delimiter to place between fields */
|
||||
{
|
||||
int error; /* NZ if an error occurs */
|
||||
register unsigned int
|
||||
fieldno; /* Number of field being written */
|
||||
|
||||
error = 0;
|
||||
for (fieldno = 0; fieldno < fieldp->nfields; fieldno++)
|
||||
{
|
||||
if (fieldno != 0)
|
||||
error |= putc (delim, file) == EOF;
|
||||
error |= fputs (fieldp->fields[fieldno], file) == EOF;
|
||||
}
|
||||
if (fieldp->hadnl)
|
||||
error |= putc ('\n', file) == EOF;
|
||||
return error;
|
||||
}
|
||||
|
||||
void fieldfree (fieldp)
|
||||
register field_t * fieldp; /* Field structure to free */
|
||||
{
|
||||
|
||||
if (fieldp == NULL)
|
||||
return;
|
||||
if (fieldp->linebuf != NULL)
|
||||
free ((char *) fieldp->linebuf);
|
||||
if (fieldp->fields != NULL)
|
||||
free ((char *) fieldp->fields);
|
||||
free ((char *) fieldp);
|
||||
}
|
77
external/ispell/fields.h
vendored
Normal file
77
external/ispell/fields.h
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
#ifndef FIELDS_H_INCLUDED
|
||||
#define FIELDS_H_INCLUDED
|
||||
/*
|
||||
* $Id: fields.h,v 1.7 2021-06-02 16:52:07-07 geoff Exp $
|
||||
*
|
||||
* $Log: fields.h,v $
|
||||
* Revision 1.7 2021-06-02 16:52:07-07 geoff
|
||||
* Document that FLD_NOSHRINK is no longer meaningful.
|
||||
*
|
||||
* Revision 1.6 2005-04-26 15:40:07-07 geoff
|
||||
* Add double-inclusion protection. Include ispell.h for the definition of P.
|
||||
*
|
||||
* Revision 1.5 2005/04/14 14:38:23 geoff
|
||||
* Make maxf unsigned.
|
||||
*
|
||||
* Revision 1.4 1994/01/05 20:13:43 geoff
|
||||
* Add the maxf parameter
|
||||
*
|
||||
* Revision 1.3 1994/01/04 02:40:22 geoff
|
||||
* Add field_line_inc, field_field_inc, and the FLD_NOSHRINK flag.
|
||||
*
|
||||
* Revision 1.2 1993/09/09 01:11:12 geoff
|
||||
* Add a return value to fieldwrite and support for backquotes.
|
||||
*
|
||||
* Revision 1.1 1993/08/25 21:32:05 geoff
|
||||
* Initial revision
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Structures used by the field-access package.
|
||||
*/
|
||||
|
||||
#include "ispell.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int nfields; /* Number of fields in the line */
|
||||
int hadnl; /* NZ if line ended with a newline */
|
||||
char * linebuf; /* Malloc'ed buffer containing the line */
|
||||
char ** fields; /* Malloc'ed array of pointers to fields */
|
||||
}
|
||||
field_t;
|
||||
|
||||
/*
|
||||
* Flags to fieldread and fieldmake
|
||||
*/
|
||||
#define FLD_RUNS 0x0001 /* Consider runs of delimiters same as one */
|
||||
#define FLD_SNGLQUOTES 0x0002 /* Accept single-quoted fields */
|
||||
#define FLD_BACKQUOTES 0x0004 /* Accept back-quoted fields */
|
||||
#define FLD_DBLQUOTES 0x0008 /* Accept double-quoted fields */
|
||||
#define FLD_SHQUOTES 0x0010 /* Use shell-style (embedded) quoting rules */
|
||||
#define FLD_STRIPQUOTES 0x0020 /* Strip quotes from fields */
|
||||
#define FLD_BACKSLASH 0x0040 /* Process C-style backslashes */
|
||||
#define FLD_NOSHRINK 0x0080 /* No longer meaningful */
|
||||
|
||||
#undef P
|
||||
#ifdef __STDC__
|
||||
#define P(x) x
|
||||
#else /* __STDC__ */
|
||||
#define P(x) ()
|
||||
#endif /* __STDC__ */
|
||||
|
||||
extern field_t * fieldread P ((FILE * file, char * delims,
|
||||
int flags, unsigned int maxf));
|
||||
extern field_t * fieldmake P ((char * line, int allocated,
|
||||
char * delims, int flags, unsigned int maxf));
|
||||
extern int fieldwrite P ((FILE * file, field_t * fieldp,
|
||||
int delim));
|
||||
extern void fieldfree P ((field_t * fieldp));
|
||||
|
||||
extern unsigned int field_field_inc;
|
||||
/* Increment for expanding fields */
|
||||
extern unsigned int field_line_inc;
|
||||
/* Increment for expanding lines */
|
||||
|
||||
#endif /* FIELDS */
|
373
external/ispell/findaffix.X
vendored
Executable file
373
external/ispell/findaffix.X
vendored
Executable file
|
@ -0,0 +1,373 @@
|
|||
!!POUNDBANG!!
|
||||
#
|
||||
# $Id: findaffix.X,v 1.23 2015-02-08 00:35:41-08 geoff Exp $
|
||||
#
|
||||
# Copyright 1992, 1993, 1999, 2001, 2005, Geoff Kuenning, Claremont, CA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Find possible affixes for use with ispell
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# findaffix [-p | -s] [-f] [-c] [-m min] [-M max] [-e elim] [-l low] \
|
||||
# [-t tabchar] [files]
|
||||
#
|
||||
# Each common prefix (-p) or suffix (-s, default) is presented, along
|
||||
# with statistics to indicate how useful such an affix might be in
|
||||
# reducing the size of the input file. Only those affixes which
|
||||
# produce a legal root (one found in the original input) are reported.
|
||||
#
|
||||
# If the "-c" option is not given, the output lines are in the
|
||||
# following format:
|
||||
#
|
||||
# strip/add/count/bytes
|
||||
#
|
||||
# where "strip" is the string that should be stripped from a root
|
||||
# word before adding the affix, "add" is the affix to be added, "count"
|
||||
# is a count of the number of times that this "strip/add" combination
|
||||
# appears, and "bytes" is an estimate of the number of bytes that
|
||||
# will be saved in the raw dictionary file if this combination is
|
||||
# added to the affix file. The field separator in the output will
|
||||
# normally be the tab character specified by the "-t" switch; the
|
||||
# default is a slash ("/").
|
||||
#
|
||||
# If the "-c" ("clean output") option is given, the appearance of
|
||||
# the output is made cleaner by changing it to:
|
||||
#
|
||||
# -strip+add<tab>count<tab>bytes
|
||||
#
|
||||
# where "strip," "add," "count," and "bytes" are as before, and "<tab>"
|
||||
# represents the ASCII tab character.
|
||||
#
|
||||
# The method used to generate possible affixes will also generate
|
||||
# longer affixes which have common headers or trailers. For example,
|
||||
# the two words "moth" and "mother" will generate not only the obvious
|
||||
# substition "+er" but also "-h+her" and "-th+ther" (and possibly
|
||||
# even longer ones, depending on the value of "min"). To prevent
|
||||
# cluttering the output with such affixes, any affix pair that shares
|
||||
# a common header (or, for prefixes, trailer) string longer than
|
||||
# "elim" characters (default 1) will be suppressed. You may want to
|
||||
# set "elim" to a value greater than 1 if your language has string
|
||||
# characters; usually the need for this parameter will become obvious
|
||||
# when you examine the output of your findaffix run.
|
||||
#
|
||||
# Normally, the output is sorted on the "bytes" field. If the "-f"
|
||||
# flag is given, the output is sorted according to the "count" field.
|
||||
#
|
||||
# No affix longer than "max" characters (default 8) will be reported.
|
||||
# Smaller values of "max" will make the script run faster.
|
||||
#
|
||||
# Affixes which appear fewer than "low" times (default 10) are
|
||||
# suppressed. This significantly reduces the size of the output file.
|
||||
#
|
||||
# Affixes which generate stems shorter than "min" characters (default 3)
|
||||
# are suppressed. (A stem is the word after the "strip" string has
|
||||
# been removed, and before the "add" string has been added.) This
|
||||
# reduces both the running time and the size of the output file. "Min"
|
||||
# should only be set to 1 if you have a *lot* of free time and disk
|
||||
# space.
|
||||
#
|
||||
# The script requires a non-blank field-separator character for internal
|
||||
# use. Normally, this character is a slash ("/"), but if the slash
|
||||
# appears as a character in the input word list, a different character
|
||||
# can be specified with the "-t" switch.
|
||||
#
|
||||
# If the input files are ispell dictionaries, they should be expanded
|
||||
# before being fed to this script.
|
||||
#
|
||||
# If the input files contains characters other than [A-Za-z], they
|
||||
# should be translated to lowercase before being fed to this script.
|
||||
#
|
||||
# $Log: findaffix.X,v $
|
||||
# Revision 1.23 2015-02-08 00:35:41-08 geoff
|
||||
# Be a bit more paranoid about creating temporary files.
|
||||
#
|
||||
# Revision 1.22 2005/04/27 01:18:34 geoff
|
||||
# Work around idiotic POSIX incompatibilities in sort. Add secure
|
||||
# temp-file handling.
|
||||
#
|
||||
# Revision 1.21 2005/04/14 14:39:33 geoff
|
||||
# Use /tmp as the default temp directory
|
||||
#
|
||||
# Revision 1.20 2005/04/14 14:38:23 geoff
|
||||
# Update license. Protect against modernized (i.e., incompatible) and
|
||||
# internationalized sort commands.
|
||||
#
|
||||
# Revision 1.19 2001/09/06 00:30:28 geoff
|
||||
# Many changes from Eli Zaretskii to support DJGPP compilation.
|
||||
#
|
||||
# Revision 1.18 2001/07/25 21:51:46 geoff
|
||||
# Minor license update.
|
||||
#
|
||||
# Revision 1.17 2001/07/23 20:24:03 geoff
|
||||
# Update the copyright and the license.
|
||||
#
|
||||
# Revision 1.16 1999/01/07 01:22:55 geoff
|
||||
# Update the copyright.
|
||||
#
|
||||
# Revision 1.15 1994/01/25 07:11:29 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
||||
#
|
||||
|
||||
# In one of the most incredibly stupid decisions of all time, some
|
||||
# genius decided to break backwards compatibility by "deprecating" the
|
||||
# old-style sort switches even though it was trivial to recognize both
|
||||
# styles. The result is that that thousands of people (like me) will
|
||||
# have to rewrite shell scripts to tolerate that stupidity. (It's not
|
||||
# that the new syntax is bad--it's definitely easier to understand.
|
||||
# But that doesn't excuse breaking compatibility.)
|
||||
#
|
||||
# Detect whether sort accepts old-style switches.
|
||||
if sort +0 -1 /dev/null >/dev/null 2>&1
|
||||
then
|
||||
CRETIN_SORT=false
|
||||
else
|
||||
CRETIN_SORT=true
|
||||
fi
|
||||
|
||||
#
|
||||
# The following is necessary so that some internationalized versions of
|
||||
# sort(1) don't confuse things by sorting into a nonstandard order.
|
||||
#
|
||||
LANG=C
|
||||
LOCALE=C
|
||||
LC_ALL=C
|
||||
LC_COLLATE=C
|
||||
LC_CTYPE=C
|
||||
export LANG LOCALE LC_COLLATE LC_CTYPE
|
||||
#
|
||||
# The following aren't strictly necessary, but I've been made paranoid
|
||||
# by problems with the stuff above. It can't hurt to set them to a
|
||||
# sensible value.
|
||||
LC_MESSAGES=C
|
||||
LC_MONETARY=C
|
||||
LC_NUMERIC=C
|
||||
LC_TIME=C
|
||||
export LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
|
||||
|
||||
TDIR=${TMPDIR-/tmp}
|
||||
TEMPDIR=`mktemp -d ${TDIR}/faffXXXXXXXXXX 2>/dev/null` || (umask 077; mkdir "$TDIR/faff$$" || (echo "Can't create temp directory: ${TDIR}/faff$$" 1>&2; exit 1); TEMPDIR="$TDIR/faff$$")
|
||||
TMP=${TEMPDIR}/faff.
|
||||
|
||||
SORTTMP="-T ${TDIR}" # !!SORTTMP!!
|
||||
USAGE='Usage: findaffix [-p | -s] [-f] [-c] [-e elim] [-m min] [-M max] [-l low] [-t tabch] [files]'
|
||||
LOOP='
|
||||
i = len - maxlim + 1
|
||||
if (i < minstem + 1)
|
||||
i = minstem + 1
|
||||
for ( ; i <= len; i++)
|
||||
print substr ($0, 1, i - 1) tabch substr ($0, i) tabch len
|
||||
print $0 tabch tabch len'
|
||||
ELIM='$1!=$2 \
|
||||
{
|
||||
if (substr ($1, 1, elimlen) != substr ($2, 1, elimlen))
|
||||
print
|
||||
}'
|
||||
maxlim=8
|
||||
minstem=3
|
||||
elimlen=1
|
||||
lowcount=10
|
||||
cleanout=no
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
finalsortopts='-k 4rn,4 -k 3rn,3 -k 2,2 -k 1,1'
|
||||
else
|
||||
finalsortopts='+3rn -4 +2rn -3 +1 -2 +0 -1'
|
||||
fi
|
||||
tabch=/
|
||||
while :
|
||||
do
|
||||
case "$1" in
|
||||
-p)
|
||||
LOOP='
|
||||
lim = len - minstem
|
||||
if (lim > maxlim)
|
||||
lim = maxlim
|
||||
for (i = 1; i <= lim; i++)
|
||||
print substr ($0, i + 1) tabch substr ($0, 1, i) tabch len
|
||||
print $0 tabch tabch len'
|
||||
ELIM='$1!=$2 \
|
||||
{
|
||||
if (substr ($1, length ($1), elimlen) \
|
||||
!= substr ($2, length ($2), elimlen))
|
||||
print
|
||||
}'
|
||||
shift
|
||||
;;
|
||||
-s)
|
||||
shift
|
||||
;;
|
||||
-f)
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
finalsortopts='-k 3rn,3 -k 4rn,4 -k 2,2 -k 1,1'
|
||||
else
|
||||
finalsortopts='+2rn -3 +3rn -4 +1 -2 +0 -1'
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-c)
|
||||
cleanout=yes
|
||||
shift
|
||||
;;
|
||||
-e)
|
||||
elimlen=$2
|
||||
shift; shift
|
||||
;;
|
||||
-m)
|
||||
minstem=$2
|
||||
shift; shift
|
||||
;;
|
||||
-M)
|
||||
maxlim=$2
|
||||
shift; shift
|
||||
;;
|
||||
-l)
|
||||
lowcount=$2
|
||||
shift; shift
|
||||
;;
|
||||
-t)
|
||||
tabch="$2"
|
||||
shift; shift
|
||||
;;
|
||||
-*)
|
||||
echo "$USAGE" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
trap "rm -rf $TEMPDIR; exit 1" 1 2 15
|
||||
trap "rm -rf $TEMPDIR; exit 0" 13
|
||||
#
|
||||
# We are ready to do the work. First, we collect all input, translate it
|
||||
# to lowercase, sort it (dropping duplications), and save it for later.
|
||||
#
|
||||
if [ $# -ne 0 ]
|
||||
then
|
||||
cat "$@" | tr '[A-Z]' '[a-z]'
|
||||
else
|
||||
tr '[A-Z]' '[a-z]'
|
||||
fi \
|
||||
| sort -u $SORTTMP > ${TMP}a
|
||||
#
|
||||
# Now the monstrous pipeline. The awk command produces several lines for
|
||||
# each input word. Each line contains a possible stem (first field),
|
||||
# a possible affix, and the length of the original word. The loop which
|
||||
# does this was placed into the LOOP variable by the code above (q.v.).
|
||||
#
|
||||
# The first sort puts this output into an order appropriate for feeding
|
||||
# to 'join'. The join command then combines stems and affixes, and for
|
||||
# each puts out an affix to strip, an affix to add, and the length of
|
||||
# the word before and after modification.
|
||||
#
|
||||
# From here on out the job is relatively easy. The second 'awk' gets rid
|
||||
# of lines that have the same strip and add affixes, and also eliminates
|
||||
# lines where the strip and add affix have a common leading (for suffixes)
|
||||
# or trailing (for prefixes) substring, or where the strip affix is longer
|
||||
# than the add affix (this is all done by the $ELIM variable, which is also
|
||||
# set up by the code above. The second sort collects identical affixes;
|
||||
# the third 'awk' functions like 'uniq -c', replacing duplicate affixes
|
||||
# with a count and summing the estimate of bytes saved. It also eliminates
|
||||
# any affixes which appear less frequently than the minimum ("lowcount").
|
||||
# Finally, the third sort ($finalsortopts) rearranges the list in the chosen
|
||||
# sort order.
|
||||
#
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts1='-k 1,1 -k 2'
|
||||
sortopts2='-k 2,2 -k 1,1'
|
||||
else
|
||||
sortopts1='+0 -1 +1'
|
||||
sortopts2='+1 -2 +0 -1'
|
||||
fi
|
||||
awk "BEGIN{minstem=$minstem; maxlim=$maxlim; tabch="'"'"$tabch"'"}
|
||||
{
|
||||
len = length ($0)
|
||||
if (len < 2)
|
||||
next
|
||||
'"$LOOP"'
|
||||
}' < ${TMP}a \
|
||||
| sort "-t$tabch" $sortopts1 $SORTTMP -o ${TMP}a
|
||||
join "-t$tabch" -o 1.2 2.2 2.3 ${TMP}a ${TMP}a \
|
||||
| awk "-F$tabch" "BEGIN{elimlen=$elimlen}$ELIM" \
|
||||
| sort "-t$tabch" $sortopts2 $SORTTMP \
|
||||
| awk "-F$tabch" 'BEGIN{tabch="'"$tabch"'"; lowcount='"$lowcount"'}
|
||||
{
|
||||
if ($1 == last1 && $2 == last2)
|
||||
{
|
||||
count++
|
||||
totchars += $3
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((last1 != "" || last2 != "") && count >= lowcount)
|
||||
print last1 tabch last2 tabch count tabch totchars
|
||||
count = 1
|
||||
last1 = $1
|
||||
last2 = $2
|
||||
totchars = $3
|
||||
}
|
||||
}
|
||||
END {
|
||||
if ((last1 != "" || last2 != "") && count >= lowcount)
|
||||
print last1 tabch last2 tabch count tabch totchars
|
||||
}' \
|
||||
| sort "-t$tabch" $finalsortopts $SORTTMP \
|
||||
| if [ "$cleanout" = "yes" ]
|
||||
then
|
||||
case "$tabch" in
|
||||
/)
|
||||
sedsub=/
|
||||
sedsep=';'
|
||||
;;
|
||||
.|\*|\[|\^|\$|\\)
|
||||
sedsub="\\$tabch"
|
||||
sedsep=/
|
||||
;;
|
||||
*)
|
||||
sedsub="$tabch"
|
||||
sedsep=/
|
||||
;;
|
||||
esac
|
||||
exec sed -e "s$sedsep$sedsub$sedsep ${sedsep}g" \
|
||||
-e 's/ /+/' -e 's/^/-/' \
|
||||
-e 's/^-+/+/' -e 's/+ / /'
|
||||
else
|
||||
exec cat
|
||||
fi
|
||||
rm -rf $TEMPDIR
|
428
external/ispell/good.c
vendored
Normal file
428
external/ispell/good.c
vendored
Normal file
|
@ -0,0 +1,428 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: good.c,v 1.51 2005/04/14 14:38:23 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* good.c - see if a word or its root word
|
||||
* is in the dictionary.
|
||||
*
|
||||
* Pace Willisson, 1983
|
||||
*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: good.c,v $
|
||||
* Revision 1.51 2005/04/14 14:38:23 geoff
|
||||
* Update license.
|
||||
*
|
||||
* Revision 1.50 2001/07/25 21:51:45 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 1.49 2001/07/23 20:24:03 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 1.48 2000/08/22 10:52:25 geoff
|
||||
* Fix some compiler warnings.
|
||||
*
|
||||
* Revision 1.47 1999/01/18 03:28:33 geoff
|
||||
* Turn some char declarations into unsigned char, so that we won't have
|
||||
* sign-extension problems.
|
||||
*
|
||||
* Revision 1.46 1999/01/07 01:22:36 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.45 1997/12/03 06:08:38 geoff
|
||||
* In crunch mode, print the root capitalized if a prefix was stripped
|
||||
* from a capitalized word. For example, if the input word was
|
||||
* "Uncapitalized" in English, print "Capitalized/U".
|
||||
*
|
||||
* Revision 1.44 1997/12/02 06:24:42 geoff
|
||||
* Get rid of some compile options that really shouldn't be optional.
|
||||
*
|
||||
* Revision 1.43 1994/11/02 06:56:05 geoff
|
||||
* Remove the anyword feature, which I've decided is a bad idea.
|
||||
*
|
||||
* Revision 1.42 1994/10/25 05:45:59 geoff
|
||||
* Add support for an affix that will work with any word, even if there's
|
||||
* no explicit flag.
|
||||
*
|
||||
* Revision 1.41 1994/05/24 06:23:06 geoff
|
||||
* Let tgood decide capitalization questions, rather than doing it ourselves.
|
||||
*
|
||||
* Revision 1.40 1994/05/17 06:44:10 geoff
|
||||
* Add support for controlled compound formation and the COMPOUNDONLY
|
||||
* option to affix flags.
|
||||
*
|
||||
* Revision 1.39 1994/01/25 07:11:31 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
|
||||
int good P ((ichar_t * word, int ignoreflagbits, int allhits,
|
||||
int pfxopts, int sfxopts));
|
||||
int cap_ok P ((ichar_t * word, struct success * hit, int len));
|
||||
static int entryhasaffixes P ((struct dent * dent, struct success * hit));
|
||||
void flagpr P ((ichar_t * word, int preflag, int prestrip,
|
||||
int preadd, int sufflag, int sufadd));
|
||||
|
||||
static ichar_t * orig_word;
|
||||
|
||||
int good (w, ignoreflagbits, allhits, pfxopts, sfxopts)
|
||||
ichar_t * w; /* Word to look up */
|
||||
int ignoreflagbits; /* NZ to ignore affix flags in dict */
|
||||
int allhits; /* NZ to ignore case, get every hit */
|
||||
int pfxopts; /* Options to apply to prefixes */
|
||||
int sfxopts; /* Options to apply to suffixes */
|
||||
{
|
||||
ichar_t nword[INPUTWORDLEN + MAXAFFIXLEN];
|
||||
register ichar_t * p;
|
||||
register ichar_t * q;
|
||||
register int n;
|
||||
register struct dent * dp;
|
||||
|
||||
/*
|
||||
** Make an uppercase copy of the word we are checking.
|
||||
*/
|
||||
for (p = w, q = nword; *p; )
|
||||
*q++ = mytoupper (*p++);
|
||||
*q = 0;
|
||||
n = q - nword;
|
||||
|
||||
numhits = 0;
|
||||
|
||||
if (cflag)
|
||||
{
|
||||
(void) printf ("%s", (char *) ichartosstr (w, 0));
|
||||
orig_word = w;
|
||||
}
|
||||
else if ((dp = lookup (nword, 1)) != NULL)
|
||||
{
|
||||
hits[0].dictent = dp;
|
||||
hits[0].prefix = NULL;
|
||||
hits[0].suffix = NULL;
|
||||
if (allhits || cap_ok (w, &hits[0], n))
|
||||
numhits = 1;
|
||||
/*
|
||||
* If we're looking for compounds, and this root doesn't
|
||||
* participate in compound formation, undo the hit.
|
||||
*/
|
||||
if (compoundflag == COMPOUND_CONTROLLED
|
||||
&& ((pfxopts | sfxopts) & FF_COMPOUNDONLY) != 0
|
||||
&& hashheader.compoundbit >= 0
|
||||
&& TSTMASKBIT (dp->mask, hashheader.compoundbit) == 0)
|
||||
numhits = 0;
|
||||
}
|
||||
if (numhits && !allhits)
|
||||
return 1;
|
||||
|
||||
/* try stripping off affixes */
|
||||
|
||||
chk_aff (w, nword, n, ignoreflagbits, allhits, pfxopts, sfxopts);
|
||||
|
||||
if (cflag)
|
||||
(void) putchar ('\n');
|
||||
|
||||
return numhits;
|
||||
}
|
||||
|
||||
int cap_ok (word, hit, len)
|
||||
register ichar_t * word;
|
||||
register struct success * hit;
|
||||
int len;
|
||||
{
|
||||
register ichar_t * dword;
|
||||
register ichar_t * w;
|
||||
register struct dent * dent;
|
||||
ichar_t dentword[INPUTWORDLEN + MAXAFFIXLEN];
|
||||
int preadd;
|
||||
int prestrip;
|
||||
int sufadd;
|
||||
ichar_t * limit;
|
||||
long thiscap;
|
||||
long dentcap;
|
||||
|
||||
thiscap = whatcap (word);
|
||||
/*
|
||||
** All caps is always legal, regardless of affixes.
|
||||
*/
|
||||
preadd = prestrip = sufadd = 0;
|
||||
if (thiscap == ALLCAPS)
|
||||
return 1;
|
||||
else if (thiscap == FOLLOWCASE)
|
||||
{
|
||||
/* Set up some constants for the while(1) loop below */
|
||||
if (hit->prefix)
|
||||
{
|
||||
preadd = hit->prefix->affl;
|
||||
prestrip = hit->prefix->stripl;
|
||||
}
|
||||
else
|
||||
preadd = prestrip = 0;
|
||||
sufadd = hit->suffix ? hit->suffix->affl : 0;
|
||||
}
|
||||
/*
|
||||
** Search the variants for one that matches what we have. Note
|
||||
** that thiscap can't be ALLCAPS, since we already returned
|
||||
** for that case.
|
||||
*/
|
||||
dent = hit->dictent;
|
||||
for ( ; ; )
|
||||
{
|
||||
dentcap = captype (dent->flagfield);
|
||||
if (dentcap != thiscap)
|
||||
{
|
||||
if (dentcap == ANYCASE && thiscap == CAPITALIZED
|
||||
&& entryhasaffixes (dent, hit))
|
||||
return 1;
|
||||
}
|
||||
else /* captypes match */
|
||||
{
|
||||
if (thiscap != FOLLOWCASE)
|
||||
{
|
||||
if (entryhasaffixes (dent, hit))
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
** Make sure followcase matches exactly.
|
||||
** Life is made more difficult by the
|
||||
** possibility of affixes. Start with
|
||||
** the prefix.
|
||||
*/
|
||||
(void) strtoichar (dentword, dent->word, INPUTWORDLEN, 1);
|
||||
dword = dentword;
|
||||
limit = word + preadd;
|
||||
if (myupper (dword[prestrip]))
|
||||
{
|
||||
for (w = word; w < limit; w++)
|
||||
{
|
||||
if (mylower (*w))
|
||||
goto doublecontinue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (w = word; w < limit; w++)
|
||||
{
|
||||
if (myupper (*w))
|
||||
goto doublecontinue;
|
||||
}
|
||||
}
|
||||
dword += prestrip;
|
||||
/* Do root part of word */
|
||||
limit = dword + len - preadd - sufadd;
|
||||
while (dword < limit)
|
||||
{
|
||||
if (*dword++ != *w++)
|
||||
goto doublecontinue;
|
||||
}
|
||||
/* Do suffix */
|
||||
dword = limit - 1;
|
||||
if (myupper (*dword))
|
||||
{
|
||||
for ( ; *w; w++)
|
||||
{
|
||||
if (mylower (*w))
|
||||
goto doublecontinue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ; *w; w++)
|
||||
{
|
||||
if (myupper (*w))
|
||||
goto doublecontinue;
|
||||
}
|
||||
}
|
||||
/*
|
||||
** All failure paths go to "doublecontinue,"
|
||||
** so if we get here it must match.
|
||||
*/
|
||||
if (entryhasaffixes (dent, hit))
|
||||
return 1;
|
||||
doublecontinue: ;
|
||||
}
|
||||
}
|
||||
if ((dent->flagfield & MOREVARIANTS) == 0)
|
||||
break;
|
||||
dent = dent->next;
|
||||
}
|
||||
|
||||
/* No matches found */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
** See if this particular capitalization (dent) is legal with these
|
||||
** particular affixes.
|
||||
*/
|
||||
static int entryhasaffixes (dent, hit)
|
||||
register struct dent * dent;
|
||||
register struct success * hit;
|
||||
{
|
||||
|
||||
if (hit->prefix && !TSTMASKBIT (dent->mask, hit->prefix->flagbit))
|
||||
return 0;
|
||||
if (hit->suffix && !TSTMASKBIT (dent->mask, hit->suffix->flagbit))
|
||||
return 0;
|
||||
return 1; /* Yes, these affixes are legal */
|
||||
}
|
||||
|
||||
/*
|
||||
* Print a word and its flag, making sure the case of the output matches
|
||||
* the case of the original found in "orig_word".
|
||||
*/
|
||||
void flagpr (word, preflag, prestrip, preadd, sufflag, sufadd)
|
||||
register ichar_t * word; /* (Modified) word to print */
|
||||
int preflag; /* Prefix flag (if any) */
|
||||
int prestrip; /* Lth of pfx stripped off orig_word */
|
||||
int preadd; /* Length of prefix added to w */
|
||||
int sufflag; /* Suffix flag (if any) */
|
||||
int sufadd; /* Length of suffix added to w */
|
||||
{
|
||||
register int i; /* Handy loop counter */
|
||||
register ichar_t * origp; /* Pointer into orig_word */
|
||||
int orig_len; /* Length of orig_word */
|
||||
|
||||
orig_len = icharlen (orig_word);
|
||||
/*
|
||||
* We refuse to print if the cases outside the modification
|
||||
* points don't match those just inside. This prevents things
|
||||
* like "OEM's" from being turned into "OEM/S" which expands
|
||||
* only to "OEM'S". But for prefix flags, we ignore the case of
|
||||
* the first character of the word, because capitalization of the
|
||||
* root is legal.
|
||||
*/
|
||||
if (preflag > 0)
|
||||
{
|
||||
origp = orig_word + preadd;
|
||||
if (myupper (*origp))
|
||||
{
|
||||
for (origp = orig_word + 1; origp < orig_word + preadd; origp++)
|
||||
{
|
||||
if (mylower (*origp))
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (origp = orig_word + 1; origp < orig_word + preadd; origp++)
|
||||
{
|
||||
if (myupper (*origp))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sufflag > 0)
|
||||
{
|
||||
origp = orig_word + orig_len - sufadd;
|
||||
if (myupper (origp[-1]))
|
||||
{
|
||||
for ( ; *origp != 0; origp++)
|
||||
{
|
||||
if (mylower (*origp))
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
origp = orig_word + orig_len - sufadd;
|
||||
for ( ; *origp != 0; origp++)
|
||||
{
|
||||
if (myupper (*origp))
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* The cases are ok. Put out the word, being careful that the
|
||||
* prefix/suffix cases match those in the original, and that the
|
||||
* unchanged characters from the original actually match it.
|
||||
*/
|
||||
(void) putchar (' ');
|
||||
origp = orig_word + preadd;
|
||||
if (myupper (*origp))
|
||||
{
|
||||
for (i = prestrip; --i >= 0; )
|
||||
(void) fputs (printichar ((int) *word++), stdout);
|
||||
}
|
||||
else
|
||||
{
|
||||
i = prestrip;
|
||||
if (i > 0 && myupper (orig_word[0]))
|
||||
{
|
||||
--i;
|
||||
(void) fputs (printichar ((int) mytoupper (*word++)), stdout);
|
||||
}
|
||||
while (--i >= 0)
|
||||
(void) fputs (printichar ((int) mytolower (*word++)), stdout);
|
||||
}
|
||||
i = orig_len - preadd - sufadd;
|
||||
if (prestrip == 0 && myupper (orig_word[0]))
|
||||
{
|
||||
--i;
|
||||
(void) fputs (printichar ((int) mytoupper (*origp++)), stdout);
|
||||
word++;
|
||||
}
|
||||
for ( ; --i >= 0; word++)
|
||||
(void) fputs (printichar ((int) *origp++), stdout);
|
||||
if (origp > orig_word)
|
||||
origp--;
|
||||
if (myupper (*origp))
|
||||
(void) fputs ((char *) ichartosstr (word, 0), stdout);
|
||||
else
|
||||
{
|
||||
while (*word)
|
||||
{
|
||||
(void) fputs (printichar ((int) mytolower (*word++)), stdout);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Now put out the flags
|
||||
*/
|
||||
(void) putchar (hashheader.flagmarker);
|
||||
if (preflag > 0)
|
||||
(void) putchar (preflag);
|
||||
if (sufflag > 0)
|
||||
(void) putchar (sufflag);
|
||||
}
|
108
external/ispell/hash.c
vendored
Normal file
108
external/ispell/hash.c
vendored
Normal file
|
@ -0,0 +1,108 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: hash.c,v 1.25 2005/04/14 14:38:23 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* hash.c - a simple hash function for ispell
|
||||
*
|
||||
* Pace Willisson, 1983
|
||||
*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: hash.c,v $
|
||||
* Revision 1.25 2005/04/14 14:38:23 geoff
|
||||
* Update license.
|
||||
*
|
||||
* Revision 1.24 2001/07/25 21:51:45 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 1.23 2001/07/23 20:24:03 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 1.22 1999/01/07 01:22:38 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.21 1997/12/02 06:24:44 geoff
|
||||
* Get rid of some compile options that really shouldn't be optional.
|
||||
*
|
||||
* Revision 1.20 1994/01/25 07:11:34 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
|
||||
int hash P ((ichar_t * word, int hashtblsize));
|
||||
|
||||
/*
|
||||
* The following hash algorithm is due to Ian Dall, with slight modifications
|
||||
* by Geoff Kuenning to reflect the results of testing with the English
|
||||
* dictionaries actually distributed with ispell.
|
||||
*/
|
||||
#define HASHSHIFT 5
|
||||
|
||||
#define HASHUPPER(c) mytoupper(c)
|
||||
|
||||
int hash (s, hashtblsize)
|
||||
register ichar_t * s;
|
||||
register int hashtblsize;
|
||||
{
|
||||
register long h = 0;
|
||||
register int i;
|
||||
|
||||
#ifdef ICHAR_IS_CHAR
|
||||
for (i = 4; i-- && *s != 0; )
|
||||
h = (h << 8) | HASHUPPER (*s++);
|
||||
#else /* ICHAR_IS_CHAR */
|
||||
for (i = 2; i-- && *s != 0; )
|
||||
h = (h << 16) | HASHUPPER (*s++);
|
||||
#endif /* ICHAR_IS_CHAR */
|
||||
while (*s != 0)
|
||||
{
|
||||
/*
|
||||
* We have to do circular shifts the hard way, since C doesn't
|
||||
* have them even though the hardware probably does. Oh, well.
|
||||
*/
|
||||
h = (h << HASHSHIFT)
|
||||
| ((h >> (32 - HASHSHIFT)) & ((1 << HASHSHIFT) - 1));
|
||||
h ^= HASHUPPER (*s++);
|
||||
}
|
||||
return (unsigned long) h % hashtblsize;
|
||||
}
|
302
external/ispell/icombine.c
vendored
Normal file
302
external/ispell/icombine.c
vendored
Normal file
|
@ -0,0 +1,302 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: icombine.c,v 2.33 2005/04/20 23:16:32 geoff Exp $";
|
||||
#endif
|
||||
|
||||
#define MAIN
|
||||
|
||||
/*
|
||||
* icombine: combine multiple ispell dictionary entries into a single
|
||||
* entry with the options of all entries
|
||||
*
|
||||
* The original version of this program was written by Gary Puckering at
|
||||
* Cognos, Inc. The current version is a complete replacement, created by
|
||||
* reducing Pace Willisson's buildhash program. By using routines common
|
||||
* to buildhash and ispell, we can be sure that the rules for combining
|
||||
* capitalizations are compatible.
|
||||
*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: icombine.c,v $
|
||||
* Revision 2.33 2005/04/20 23:16:32 geoff
|
||||
* Rename some variables to make them more meaningful.
|
||||
*
|
||||
* Revision 2.32 2005/04/14 23:11:36 geoff
|
||||
* Add the -w switch.
|
||||
*
|
||||
* Revision 2.31 2005/04/14 14:38:23 geoff
|
||||
* Update license.
|
||||
*
|
||||
* Revision 2.30 2001/07/25 21:51:46 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 2.29 2001/07/23 20:24:03 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 2.28 2000/08/22 10:52:25 geoff
|
||||
* Fix some compiler warnings.
|
||||
*
|
||||
* Revision 2.27 1999/01/07 01:22:44 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 2.26 1999/01/03 01:46:30 geoff
|
||||
* Add support for sgml and plain deformatter types.
|
||||
*
|
||||
* Revision 2.25 1997/12/02 06:24:45 geoff
|
||||
* Get rid of some compile options that really shouldn't be optional.
|
||||
*
|
||||
* Revision 2.24 1994/01/25 07:11:35 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
#include "msgs.h"
|
||||
|
||||
char * Lfile; /* Language-description file */
|
||||
|
||||
int main P ((int argc, char * argv[]));
|
||||
static void usage P ((void));
|
||||
VOID * mymalloc P ((unsigned int size));
|
||||
VOID * myrealloc P ((VOID * ptr, unsigned int size,
|
||||
unsigned int oldsize));
|
||||
void myfree P ((VOID * ptr));
|
||||
static void combinedict P ((void));
|
||||
static void combineout P ((void));
|
||||
|
||||
int main (argc, argv)
|
||||
int argc;
|
||||
char * argv[];
|
||||
{
|
||||
char * argp;
|
||||
char * preftype = NULL;
|
||||
char * wchars = NULL;
|
||||
|
||||
while (argc > 1 && argv[1][0] == '-')
|
||||
{
|
||||
argc--;
|
||||
argv++;
|
||||
switch (argv[0][1])
|
||||
{
|
||||
case 'T':
|
||||
argp = (*argv)+2;
|
||||
if (*argp == '\0')
|
||||
{
|
||||
argv++; argc--;
|
||||
if (argc == 0)
|
||||
usage ();
|
||||
argp = *argv;
|
||||
}
|
||||
preftype = argp;
|
||||
break;
|
||||
case 'w':
|
||||
wchars = (*argv) + 2;
|
||||
if (*wchars == '\0')
|
||||
{
|
||||
argv++;
|
||||
argc--;
|
||||
if (argc == 0)
|
||||
usage ();
|
||||
wchars = *argv;
|
||||
}
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
usage ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (argc > 1) /* Figure out what language to use */
|
||||
Lfile = argv[1];
|
||||
else
|
||||
Lfile = DEFLANG;
|
||||
|
||||
if (yyopen (Lfile)) /* Open the language file */
|
||||
return 1;
|
||||
yyinit (); /* Set up for the parse */
|
||||
if (yyparse ()) /* Parse the language tables */
|
||||
exit (1);
|
||||
|
||||
initckch (wchars);
|
||||
|
||||
if (preftype != NULL)
|
||||
{
|
||||
defstringgroup = findfiletype (preftype, 1, (int *) NULL);
|
||||
if (defstringgroup < 0
|
||||
&& strcmp (preftype, "plain") != 0
|
||||
&& strcmp (preftype, "tex") != 0
|
||||
&& strcmp (preftype, "nroff") != 0
|
||||
&& strcmp (preftype, "sgml") != 0)
|
||||
{
|
||||
(void) fprintf (stderr, ICOMBINE_C_BAD_TYPE, preftype);
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
if (defstringgroup < 0)
|
||||
defstringgroup = 0;
|
||||
|
||||
combinedict (); /* Combine words */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void usage ()
|
||||
{
|
||||
|
||||
(void) fprintf (stderr, ICOMBINE_C_USAGE);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
VOID * mymalloc (size)
|
||||
unsigned int size;
|
||||
{
|
||||
return malloc (size);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
VOID * myrealloc (ptr, size, oldsize)
|
||||
VOID * ptr;
|
||||
unsigned int size;
|
||||
unsigned int oldsize;
|
||||
{
|
||||
|
||||
return realloc (ptr, size);
|
||||
}
|
||||
|
||||
void myfree (ptr)
|
||||
VOID * ptr;
|
||||
{
|
||||
free (ptr);
|
||||
}
|
||||
|
||||
static void combinedict ()
|
||||
{
|
||||
struct dent d;
|
||||
register struct dent * dp;
|
||||
unsigned char lbuf[INPUTWORDLEN + MAXAFFIXLEN + 2 * MASKBITS];
|
||||
ichar_t ucbuf[INPUTWORDLEN + MAXAFFIXLEN + 2 * MASKBITS];
|
||||
ichar_t lastbuf[INPUTWORDLEN + MAXAFFIXLEN + 2 * MASKBITS];
|
||||
|
||||
lastbuf[0] = '\0';
|
||||
hashtbl = (struct dent *) mymalloc (sizeof (struct dent));
|
||||
hashtbl->flagfield = 0;
|
||||
hashtbl->word = 0;
|
||||
while (fgets ((char *) lbuf, sizeof lbuf, stdin) != NULL)
|
||||
{
|
||||
if (ichartostr (lbuf, strtosichar (lbuf, 0), sizeof lbuf, 1))
|
||||
(void) fprintf (stderr, WORD_TOO_LONG (lbuf));
|
||||
if (makedent (ichartosstr (strtosichar (lbuf, 0), 1),
|
||||
ICHARTOSSTR_SIZE, &d)
|
||||
< 0)
|
||||
continue;
|
||||
|
||||
if (strtoichar (ucbuf, d.word, sizeof ucbuf, 1))
|
||||
(void) fprintf (stderr, WORD_TOO_LONG (lbuf));
|
||||
upcase (ucbuf);
|
||||
if (icharcmp (ucbuf, lastbuf) != 0)
|
||||
{
|
||||
/*
|
||||
** We have a new word. Put the old one out.
|
||||
*/
|
||||
combineout ();
|
||||
(void) icharcpy (lastbuf, ucbuf);
|
||||
}
|
||||
|
||||
dp = hashtbl;
|
||||
if ((dp->flagfield & USED) == 0)
|
||||
{
|
||||
*dp = d;
|
||||
/*
|
||||
** If it's a followcase word, we need to make this a
|
||||
** special dummy entry, and add a second with the
|
||||
** correct capitalization.
|
||||
*/
|
||||
if (captype (d.flagfield) == FOLLOWCASE)
|
||||
{
|
||||
if (addvheader (dp))
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
** A different capitalization is already in
|
||||
** the dictionary. Combine capitalizations.
|
||||
*/
|
||||
if (combinecaps (dp, &d) < 0)
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
combineout ();
|
||||
}
|
||||
|
||||
static void combineout ()
|
||||
{
|
||||
register struct dent * ndp;
|
||||
register struct dent * tdp;
|
||||
|
||||
/*
|
||||
** Put out the dictionary entry on stdout in text format,
|
||||
** freeing it as we go.
|
||||
**/
|
||||
if (hashtbl->flagfield & USED)
|
||||
{
|
||||
for (tdp = hashtbl; tdp != NULL; tdp = ndp)
|
||||
{
|
||||
toutent (stdout, tdp, 0);
|
||||
myfree (tdp->word);
|
||||
ndp = tdp->next;
|
||||
while (tdp->flagfield & MOREVARIANTS)
|
||||
{
|
||||
if (tdp != hashtbl)
|
||||
myfree ((char *) tdp);
|
||||
tdp = ndp;
|
||||
if (tdp->word)
|
||||
myfree (tdp->word);
|
||||
ndp = tdp->next;
|
||||
}
|
||||
if (tdp != hashtbl)
|
||||
myfree ((char *) tdp);
|
||||
}
|
||||
}
|
||||
hashtbl->flagfield = 0;
|
||||
hashtbl->word = NULL;
|
||||
}
|
490
external/ispell/ijoin.c
vendored
Normal file
490
external/ispell/ijoin.c
vendored
Normal file
|
@ -0,0 +1,490 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: ijoin.c,v 1.13 2021-06-02 16:52:07-07 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright 1992, 1993, 1999, 2001, 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* "Join" command for ispell.
|
||||
*
|
||||
* This command is a complete reimplementation of the UNIX "join"
|
||||
* command, except that fields cannot be separated by a newline, it
|
||||
* can handle lines of unlimited length, and the preceding sort can
|
||||
* treat characters as either signed or unsigned.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* ijoin [options] file1 file2
|
||||
*
|
||||
* See the UNIX "join" manual page for option descriptions. Only
|
||||
* nonstandard options are described here.
|
||||
*
|
||||
* Either file1 or file2 may be "-", in which case the standard input
|
||||
* is used for that file.
|
||||
*
|
||||
* Normally, ijoin uses "strcmp" to compare fields. This is the
|
||||
* correct thing to do on most systems if you are using the
|
||||
* system-provided "sort" command to sort the input files before
|
||||
* feeding them to ijoin. In some cases, however, the sort command
|
||||
* you use will disagree with strcmp about how to handle characters
|
||||
* with the high bit set. If this is the case, you can specify the
|
||||
* "-s" (signed comparisons) or "-u" (unsigned comparisons) option to
|
||||
* force ijoin to conform to the method used by the sort program.
|
||||
* This is only necessary if one of the input files contains 8-bit
|
||||
* characters in the field that is being joined on.
|
||||
*
|
||||
* On some older machines with non-ANSI compilers, the "-s" option
|
||||
* will be ineffective because characters default to unsigned.
|
||||
* However, this option should be unnecessary on those machines, so no
|
||||
* harm will be done.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: ijoin.c,v $
|
||||
* Revision 1.13 2021-06-02 16:52:07-07 geoff
|
||||
* Remove references to obsolete fields.c features.
|
||||
*
|
||||
* Revision 1.12 2005-04-14 07:38:23-07 geoff
|
||||
* Update license. Integrate Ed Avis's changes (making certain things
|
||||
* unsigned).
|
||||
*
|
||||
* Revision 1.11.1.1 2002/06/21 00:35:54 geoff
|
||||
* Edward Avis's changes
|
||||
*
|
||||
* Revision 1.2 2001/10/05 14:22:25 epa98
|
||||
* Imported 3.2.06.epa1 release. This was previously developed using
|
||||
* sporadic RCS for certain files, but I'm not really bothered about
|
||||
* rolling back beyond this release.
|
||||
*
|
||||
* Revision 1.11 2001/07/25 21:51:47 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 1.10 2001/07/23 20:24:03 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 1.9 2001/06/07 19:06:33 geoff
|
||||
* Add a workaround for the strcmp-as-macro problem found on recent
|
||||
* releases of gcc.
|
||||
*
|
||||
* Revision 1.8 2000/08/22 10:52:25 geoff
|
||||
* Fix some compiler warnings.
|
||||
*
|
||||
* Revision 1.7 1999/01/07 01:58:00 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.6 1994/10/18 04:03:21 geoff
|
||||
* Fix a couple of bugs, one where the last field on a line could be
|
||||
* output incorrectly, and one where fields from the wrong file could be
|
||||
* output.
|
||||
*
|
||||
* Revision 1.5 1994/01/25 07:11:36 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
#include "fields.h"
|
||||
|
||||
#ifdef __STDC__
|
||||
#define SIGNED signed
|
||||
#else /* __STDC */
|
||||
#define SIGNED
|
||||
#endif /* __STDC */
|
||||
|
||||
int main P ((int argc, char * argv[])); /* Join files */
|
||||
static void usage P ((void)); /* Issue a usage message */
|
||||
static void dojoin P ((void)); /* Actually perform the join */
|
||||
static void full_output P ((field_t * line1, field_t * line2));
|
||||
/* Output everything from both lines */
|
||||
static void selected_output P ((field_t * line1, field_t * line2));
|
||||
/* Output selected fields */
|
||||
static int strscmp P ((SIGNED char * a, SIGNED char * b));
|
||||
/* Signed version of strcmp */
|
||||
static int strucmp P ((unsigned char * a, unsigned char * b));
|
||||
/* Unsigned version of strcmp */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int file; /* Number of file to output from */
|
||||
unsigned int field; /* Number of field to output */
|
||||
}
|
||||
outlist_t; /* Output description list */
|
||||
|
||||
/*
|
||||
* Some excessively "smart" compilers (for which you are welcome to
|
||||
* read "stupid compiler implementers") try to get clever about
|
||||
* strcmp, turning it into a macro in some circumstances. That breaks
|
||||
* things, since you then can't take the address of what is supposed
|
||||
* to be a library function. To be safe, we'll #undef any possible
|
||||
* macro here to get around that particular lack of foresight.
|
||||
*/
|
||||
#undef strcmp
|
||||
|
||||
static int (*compare) () = strcmp; /* Comparison function */
|
||||
static char * emptyfield = ""; /* Use this to replace empty fields */
|
||||
static FILE * file1; /* First file to join */
|
||||
static FILE * file2; /* Second file to join */
|
||||
static unsigned int join1field = 0; /* Field to join file 1 on */
|
||||
static unsigned int join2field = 0; /* Field to join file 2 on */
|
||||
static unsigned int maxf[2] = {0, 0}; /* Max field to parse in each file */
|
||||
static outlist_t * outlist = NULL; /* List of fields to write */
|
||||
static int outlistsize; /* Number of elements in outlist */
|
||||
static int runs = FLD_RUNS; /* Set if runs of tabchar same as 1 */
|
||||
static char * tabchar = " \t"; /* Field separator character(s) */
|
||||
static int unpairable1 = 0; /* NZ if -a1 */
|
||||
static int unpairable2 = 0; /* NZ if -a2 */
|
||||
|
||||
extern int strcmp ();
|
||||
|
||||
int main (argc, argv) /* Join files */
|
||||
int argc; /* Argument count */
|
||||
char * argv[]; /* Argument vector */
|
||||
{
|
||||
|
||||
while (argc > 3 && argv[1][0] == '-')
|
||||
{
|
||||
argc--;
|
||||
argv++;
|
||||
switch (argv[0][1])
|
||||
{
|
||||
case 'a': /* produce output for unpairables */
|
||||
if (argv[0][2] == '1')
|
||||
unpairable1 = 1;
|
||||
else if (argv[0][2] == '2')
|
||||
unpairable2 = 1;
|
||||
else if (argv[0][2] == '\0')
|
||||
unpairable1 = unpairable2 = 1;
|
||||
else
|
||||
usage ();
|
||||
break;
|
||||
case 'e': /* Replace empty fields with this */
|
||||
argc--;
|
||||
argv++;
|
||||
emptyfield = *argv;
|
||||
break;
|
||||
case 'j': /* Specify field to join on */
|
||||
if (argv[0][2] == '1')
|
||||
join1field = atoi (argv[1]) - 1;
|
||||
else if (argv[0][2] == '2')
|
||||
join2field = atoi (argv[1]) - 1;
|
||||
else if (argv[0][2] == '\0')
|
||||
join1field = join2field = atoi (argv[1]) - 1;
|
||||
else
|
||||
usage ();
|
||||
argc--;
|
||||
argv++;
|
||||
break;
|
||||
case 'o': /* Specify output list */
|
||||
/*
|
||||
* We will assume that all remaining switch arguments
|
||||
* are used to describe the output list. This will
|
||||
* occasionally result in malloc'ing a few too many
|
||||
* elements, but no real harm will be done.
|
||||
*/
|
||||
outlist =
|
||||
(outlist_t *) malloc ((argc - 3) * sizeof (outlist_t));
|
||||
if (outlist == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, "ijoin: out of memory!\n");
|
||||
return 1;
|
||||
}
|
||||
for (outlistsize = 0, argc--, argv++;
|
||||
argc > 2 && (argv[0][0] == '1' || argv[0][0] == '2')
|
||||
&& argv[0][1] == '.';
|
||||
argc--, argv++, outlistsize++)
|
||||
{
|
||||
outlist[outlistsize].file = argv[0][0] - '0';
|
||||
outlist[outlistsize].field = atoi (&argv[0][2]) - 1;
|
||||
if (maxf[outlist[outlistsize].file - 1]
|
||||
<= outlist[outlistsize].field)
|
||||
maxf[outlist[outlistsize].file - 1] =
|
||||
outlist[outlistsize].field + 1;
|
||||
}
|
||||
argc++; /* Un-do arg that stopped us */
|
||||
argv--;
|
||||
break;
|
||||
case 't':
|
||||
tabchar = &argv[0][2];
|
||||
runs &= ~FLD_RUNS;
|
||||
break;
|
||||
case 's':
|
||||
compare = strscmp;
|
||||
break;
|
||||
case 'u':
|
||||
compare = strucmp;
|
||||
break;
|
||||
default:
|
||||
usage ();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (argc != 3)
|
||||
usage ();
|
||||
if (strcmp (argv[1], "-") == 0)
|
||||
file1 = stdin;
|
||||
else
|
||||
{
|
||||
file1 = fopen (argv[1], "r");
|
||||
if (file1 == NULL)
|
||||
perror (argv[1]);
|
||||
}
|
||||
file2 = fopen (argv[2], "r");
|
||||
if (file2 == NULL)
|
||||
perror (argv[2]);
|
||||
if (file1 == NULL || file2 == NULL)
|
||||
return 1;
|
||||
dojoin ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void usage () /* Issue a usage message */
|
||||
{
|
||||
|
||||
(void) fprintf (stderr,
|
||||
"Usage: ijoin [-an] [-e s] [-jn m] [-o n.m ...] [-tc] file1 file2\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void dojoin () /* Actually perform the join */
|
||||
{
|
||||
int comparison; /* Result of comparing the lines */
|
||||
long file2pos; /* Position file 2 started at */
|
||||
register field_t * line1; /* Line from file 1 */
|
||||
register field_t * line2; /* Line from file 2 */
|
||||
int pairable; /* NZ if lines can be paired */
|
||||
int skip2; /* No. of "unpairable" 2's to skip */
|
||||
|
||||
line1 = fieldread (file1, tabchar, runs, maxf[0]);
|
||||
file2pos = ftell (file2);
|
||||
skip2 = 0;
|
||||
if (file2pos == -1)
|
||||
{
|
||||
(void) fprintf (stderr, "ijoin: Can't seek file ");
|
||||
perror ("2");
|
||||
exit (1);
|
||||
}
|
||||
line2 = fieldread (file2, tabchar, runs, maxf[1]);
|
||||
while (line1 != NULL || line2 != NULL)
|
||||
{
|
||||
/*
|
||||
* Determine if the lines can be paired.
|
||||
*/
|
||||
pairable = 1;
|
||||
if (line1 == NULL)
|
||||
{
|
||||
pairable = 0;
|
||||
comparison = 1; /* This causes file 2 to advance */
|
||||
}
|
||||
else if (join1field >= line1->nfields)
|
||||
{
|
||||
pairable = 0;
|
||||
comparison = -1; /* This causes file 1 to advance */
|
||||
}
|
||||
if (line2 == NULL)
|
||||
{
|
||||
pairable = 0;
|
||||
comparison = -1; /* This causes file 1 to advance */
|
||||
}
|
||||
else if (join2field >= line2->nfields)
|
||||
{
|
||||
pairable = 0;
|
||||
comparison = 1; /* This causes file 2 to advance */
|
||||
}
|
||||
if (pairable)
|
||||
{
|
||||
comparison = (*compare) (line1->fields[join1field],
|
||||
line2->fields[join2field]);
|
||||
pairable = (comparison == 0);
|
||||
}
|
||||
if (pairable)
|
||||
{
|
||||
/*
|
||||
* The two lines can be paired. Produce output.
|
||||
*/
|
||||
if (outlist == NULL)
|
||||
full_output (line1, line2);
|
||||
else
|
||||
selected_output (line1, line2);
|
||||
}
|
||||
/*
|
||||
* Advance through the files
|
||||
*/
|
||||
if (comparison < 0)
|
||||
{
|
||||
if (unpairable1)
|
||||
{
|
||||
if (outlist == NULL)
|
||||
(void) fieldwrite (stdout, line1, tabchar[0]);
|
||||
else
|
||||
selected_output (line1, (field_t *) NULL);
|
||||
}
|
||||
fieldfree (line1);
|
||||
line1 = fieldread (file1, tabchar, runs, maxf[0]);
|
||||
}
|
||||
else if (comparison > 0)
|
||||
{
|
||||
if (skip2 > 0)
|
||||
skip2--;
|
||||
else if (unpairable2)
|
||||
{
|
||||
if (outlist == NULL)
|
||||
(void) fieldwrite (stdout, line2, tabchar[0]);
|
||||
else
|
||||
selected_output ((field_t *) NULL, line2);
|
||||
}
|
||||
fieldfree (line2);
|
||||
file2pos = ftell (file2);
|
||||
line2 = fieldread (file2, tabchar, runs, maxf[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Here's the tricky part. We have to advance file 2
|
||||
* until comparisons fail, and then back it up and advance
|
||||
* file 1.
|
||||
*/
|
||||
skip2++;
|
||||
fieldfree (line2);
|
||||
line2 = fieldread (file2, tabchar, runs, maxf[1]);
|
||||
if (line2 == NULL
|
||||
|| join2field >= line2->nfields
|
||||
|| (*compare) (line1->fields[join1field],
|
||||
line2->fields[join2field])
|
||||
!= 0)
|
||||
{
|
||||
(void) fseek (file2, file2pos, 0);
|
||||
fieldfree (line2);
|
||||
line2 = fieldread (file2, tabchar, runs, maxf[1]);
|
||||
fieldfree (line1);
|
||||
line1 = fieldread (file1, tabchar, runs, maxf[0]);
|
||||
if (line1 != NULL && line2 != NULL
|
||||
&& join1field < line1->nfields
|
||||
&& join2field < line2->nfields
|
||||
&& (*compare) (line1->fields[join1field],
|
||||
line2->fields[join2field])
|
||||
== 0)
|
||||
skip2 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void full_output (line1, line2) /* Output everything from both lines */
|
||||
register field_t * line1; /* Line from file 1 */
|
||||
register field_t * line2; /* Line from file 2 */
|
||||
{
|
||||
register unsigned int
|
||||
fieldno; /* Number of field being handled */
|
||||
|
||||
(void) fputs (line1->fields[join1field], stdout);
|
||||
for (fieldno = 0; fieldno < line1->nfields; fieldno++)
|
||||
{
|
||||
if (fieldno == join1field)
|
||||
continue;
|
||||
(void) putchar (tabchar[0]);
|
||||
if (line1->fields[fieldno][0] == '\0')
|
||||
(void) fputs (emptyfield, stdout);
|
||||
else
|
||||
(void) fputs (line1->fields[fieldno], stdout);
|
||||
}
|
||||
for (fieldno = 0; fieldno < line2->nfields; fieldno++)
|
||||
{
|
||||
if (fieldno == join2field)
|
||||
continue;
|
||||
(void) putchar (tabchar[0]);
|
||||
if (line2->fields[fieldno][0] == '\0')
|
||||
(void) fputs (emptyfield, stdout);
|
||||
else
|
||||
(void) fputs (line2->fields[fieldno], stdout);
|
||||
}
|
||||
(void) putchar ('\n');
|
||||
}
|
||||
|
||||
static void selected_output (line1, line2) /* Output selected fields */
|
||||
field_t * line1; /* Line from file 1 */
|
||||
field_t * line2; /* Line from file 2 */
|
||||
{
|
||||
register field_t * cline; /* Current line being handled */
|
||||
register int listno; /* Number of output list entry */
|
||||
|
||||
for (listno = 0; listno < outlistsize; listno++)
|
||||
{
|
||||
if (listno != 0)
|
||||
(void) putchar (tabchar[0]);
|
||||
if (outlist[listno].file == 1)
|
||||
cline = line1;
|
||||
else
|
||||
cline = line2;
|
||||
if (cline == NULL
|
||||
|| outlist[listno].field >= cline->nfields
|
||||
|| cline->fields[outlist[listno].field][0] == '\0')
|
||||
(void) fputs (emptyfield, stdout);
|
||||
else
|
||||
(void) fputs (cline->fields[outlist[listno].field], stdout);
|
||||
}
|
||||
(void) putchar ('\n');
|
||||
}
|
||||
|
||||
static int strscmp (a, b) /* Compare signed strings */
|
||||
register SIGNED char * a; /* First string to compare */
|
||||
register SIGNED char * b; /* Second string to compare */
|
||||
{
|
||||
|
||||
while (*a != '\0')
|
||||
{
|
||||
if (*a++ != *b++)
|
||||
return *--a - *--b;
|
||||
}
|
||||
return *a - *b;
|
||||
}
|
||||
|
||||
static int strucmp (a, b) /* Compare unsigned strings */
|
||||
register unsigned char * a; /* First string to compare */
|
||||
register unsigned char * b; /* Second string to compare */
|
||||
{
|
||||
|
||||
while (*a != '\0')
|
||||
{
|
||||
if (*a++ != *b++)
|
||||
return *--a - *--b;
|
||||
}
|
||||
return *a - *b;
|
||||
}
|
1645
external/ispell/ispell.1X
vendored
Normal file
1645
external/ispell/ispell.1X
vendored
Normal file
File diff suppressed because it is too large
Load diff
1155
external/ispell/ispell.5X
vendored
Normal file
1155
external/ispell/ispell.5X
vendored
Normal file
File diff suppressed because it is too large
Load diff
1584
external/ispell/ispell.c
vendored
Normal file
1584
external/ispell/ispell.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
763
external/ispell/ispell.h
vendored
Normal file
763
external/ispell/ispell.h
vendored
Normal file
|
@ -0,0 +1,763 @@
|
|||
#ifndef ISPELL_H_INCLUDED
|
||||
#define ISPELL_H_INCLUDED
|
||||
/*
|
||||
* $Id: ispell.h,v 1.85 2020-12-30 22:33:41-08 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: ispell.h,v $
|
||||
* Revision 1.85 2020-12-30 22:33:41-08 geoff
|
||||
* Add support for character-set options.
|
||||
*
|
||||
* Revision 1.84 2005-04-28 07:46:51-07 geoff
|
||||
* Add support for a correction log file.
|
||||
*
|
||||
* Revision 1.83 2005/04/26 22:40:07 geoff
|
||||
* Add double-inclusion protection. Include config.h to be sure it's
|
||||
* available.
|
||||
*
|
||||
* Revision 1.82 2005/04/20 23:16:32 geoff
|
||||
* Rename some variables to make them more meaningful.
|
||||
*
|
||||
* Revision 1.81 2005/04/14 14:38:23 geoff
|
||||
* Update license.
|
||||
*
|
||||
* Revision 1.80 2001/07/25 21:51:46 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 1.79 2001/07/23 20:24:03 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 1.78 2000/08/22 10:52:25 geoff
|
||||
* Fix a whole bunch of signed/unsigned discrepancies.
|
||||
*
|
||||
* Revision 1.77 2000/08/22 00:11:25 geoff
|
||||
* Add support for correct_verbose_mode.
|
||||
*
|
||||
* Revision 1.76 1999/01/18 02:14:09 geoff
|
||||
* Change most char declarations to unsigned char, to avoid
|
||||
* sign-extension problems with 8-bit characters.
|
||||
*
|
||||
* Revision 1.75 1999/01/07 01:23:05 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.74 1999/01/03 01:46:37 geoff
|
||||
* Add support for external deformatters.
|
||||
*
|
||||
* Revision 1.73 1998/07/06 06:55:19 geoff
|
||||
* Add struct kwtable and some new variables, to support the new
|
||||
* generalized keyword-lookup stuff.
|
||||
*
|
||||
* Revision 1.72 1997/12/02 06:24:54 geoff
|
||||
* Get rid of some compile options that really shouldn't be optional.
|
||||
*
|
||||
* Revision 1.71 1997/12/01 00:53:49 geoff
|
||||
* Add HTML support variables.
|
||||
*
|
||||
* Revision 1.70 1995/11/08 05:09:18 geoff
|
||||
* Add the DEFORMAT_xxx constants and askverbose. Improve the stylistic
|
||||
* consistency of the HTML support.
|
||||
*
|
||||
* Revision 1.69 1995/10/25 04:05:26 geoff
|
||||
* Patch by Gerry Tierney <gtierney@nova.ucd.ie> 1995/10/14. Added
|
||||
* variables htmlflag and insidehtml for use in html-mode.
|
||||
*
|
||||
* Revision 1.68 1995/03/06 02:42:41 geoff
|
||||
* Be vastly more paranoid about parenthesizing macro arguments. This
|
||||
* fixes a bug in defmt.c where a complex argument was passed to
|
||||
* isstringch.
|
||||
*
|
||||
* Revision 1.67 1995/01/03 19:24:12 geoff
|
||||
* Get rid of a non-global declaration.
|
||||
*
|
||||
* Revision 1.66 1994/12/27 23:08:49 geoff
|
||||
* Fix a lot of subtly bad assumptions about the widths of ints and longs
|
||||
* which only show up on 64-bit machines like the Cray and the DEC Alpha.
|
||||
*
|
||||
* Revision 1.65 1994/11/02 06:56:10 geoff
|
||||
* Remove the anyword feature, which I've decided is a bad idea.
|
||||
*
|
||||
* Revision 1.64 1994/10/25 05:46:18 geoff
|
||||
* Add the FF_ANYWORD flag for defining an affix that will apply to any
|
||||
* word, even if not explicitly specified. (Good for French.)
|
||||
*
|
||||
* Revision 1.63 1994/09/16 04:48:28 geoff
|
||||
* Make stringdups and laststringch unsigned ints, and dupnos a plain
|
||||
* int, so that we can handle more than 128 stringchars and stringchar
|
||||
* types.
|
||||
*
|
||||
* Revision 1.62 1994/09/01 06:06:39 geoff
|
||||
* Change erasechar/killchar to uerasechar/ukillchar to avoid
|
||||
* shared-library problems on HP systems.
|
||||
*
|
||||
* Revision 1.61 1994/08/31 05:58:35 geoff
|
||||
* Add contextoffset, used in -a mode to handle extremely long lines.
|
||||
*
|
||||
* Revision 1.60 1994/05/17 06:44:15 geoff
|
||||
* Add support for controlled compound formation and the COMPOUNDONLY
|
||||
* option to affix flags.
|
||||
*
|
||||
* Revision 1.59 1994/03/15 06:25:16 geoff
|
||||
* Change deftflag's initialization so we can tell if -t/-n appeared.
|
||||
*
|
||||
* Revision 1.58 1994/02/07 05:53:28 geoff
|
||||
* Add typecasts to the the 7-bit versions of ichar* routines
|
||||
*
|
||||
* Revision 1.57 1994/01/25 07:11:48 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#define P(x) x
|
||||
#define VOID void
|
||||
#else /* __STDC__ */
|
||||
#define P(x) ()
|
||||
#define VOID char
|
||||
#define const
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#define SET_SIZE 256
|
||||
|
||||
#define MASKSIZE (MASKBITS / MASKTYPE_WIDTH)
|
||||
|
||||
#ifdef lint
|
||||
extern void SETMASKBIT P ((MASKTYPE * mask, int bit));
|
||||
extern void CLRMASKBIT P ((MASKTYPE * mask, int bit));
|
||||
extern int TSTMASKBIT P ((MASKTYPE * mask, int bit));
|
||||
#else /* lint */
|
||||
/* The following is really testing for MASKSIZE <= 1, but cpp can't do that */
|
||||
#if MASKBITS <= MASKTYPE_WIDTH
|
||||
#define SETMASKBIT(mask, bit) ((mask)[0] |= (MASKTYPE) 1 << (bit))
|
||||
#define CLRMASKBIT(mask, bit) ((mask)[0] &= (MASKTYPE) ~(1 << (bit)))
|
||||
#define TSTMASKBIT(mask, bit) ((mask)[0] & ((MASKTYPE) 1 << (bit)))
|
||||
#else
|
||||
#define SETMASKBIT(mask, bit) \
|
||||
((mask)[(bit) / MASKTYPE_WIDTH] |= \
|
||||
(MASKTYPE) 1 << ((bit) & (MASKTYPE_WIDTH - 1)))
|
||||
#define CLRMASKBIT(mask, bit) \
|
||||
((mask)[(bit) / MASKTYPE_WIDTH] &= \
|
||||
~((MASKTYPE) 1 << ((bit) & (MASKTYPE_WIDTH - 1))))
|
||||
#define TSTMASKBIT(mask, bit) \
|
||||
((mask)[(bit) / MASKTYPE_WIDTH] & \
|
||||
((MASKTYPE) 1 << ((bit) & (MASKTYPE_WIDTH - 1))))
|
||||
#endif
|
||||
#endif /* lint */
|
||||
|
||||
#if MASKBITS > 64
|
||||
#define FULLMASKSET
|
||||
#endif
|
||||
|
||||
#ifdef lint
|
||||
extern int BITTOCHAR P ((int bit));
|
||||
extern int CHARTOBIT P ((int ch));
|
||||
#endif /* lint */
|
||||
|
||||
#if MASKBITS <= 32
|
||||
# ifndef lint
|
||||
#define BITTOCHAR(bit) ((bit) + 'A')
|
||||
#define CHARTOBIT(ch) ((ch) - 'A')
|
||||
# endif /* lint */
|
||||
#define LARGESTFLAG 26 /* 5 are needed for flagfield below */
|
||||
#define FLAGBASE ((MASKTYPE_WIDTH) - 6)
|
||||
#else
|
||||
# if MASKBITS <= 64
|
||||
# ifndef lint
|
||||
#define BITTOCHAR(bit) ((bit) + 'A')
|
||||
#define CHARTOBIT(ch) ((ch) - 'A')
|
||||
# endif /* lint */
|
||||
#define LARGESTFLAG (64 - 6) /* 5 are needed for flagfield below */
|
||||
#define FLAGBASE ((MASKTYPE_WIDTH) - 6)
|
||||
# else
|
||||
# ifndef lint
|
||||
#define BITTOCHAR(bit) (bit)
|
||||
#define CHARTOBIT(ch) (ch)
|
||||
# endif /* lint */
|
||||
#define LARGESTFLAG MASKBITS /* flagfield is a separate field */
|
||||
#define FLAGBASE 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Data type for internal word storage. If necessary, we use shorts rather
|
||||
** than chars so that string characters can be encoded as a single unit.
|
||||
*/
|
||||
#if (SET_SIZE + MAXSTRINGCHARS) <= 256
|
||||
#ifndef lint
|
||||
#define ICHAR_IS_CHAR
|
||||
#endif /* lint */
|
||||
#endif
|
||||
|
||||
#ifdef ICHAR_IS_CHAR
|
||||
typedef unsigned char ichar_t; /* Internal character */
|
||||
#define icharlen(s) strlen ((char *) (s))
|
||||
#define icharcpy(a, b) strcpy ((char *) (a), (char *) (b))
|
||||
#define icharcmp(a, b) strcmp ((char *) (a), (char *) (b))
|
||||
#define icharncmp(a, b, n) strncmp ((char *) (a), (char *) (b), (n))
|
||||
#define chartoichar(x) ((ichar_t) (x))
|
||||
#else
|
||||
typedef unsigned short ichar_t; /* Internal character */
|
||||
#define chartoichar(x) ((ichar_t) (unsigned char) (x))
|
||||
#endif
|
||||
|
||||
struct dent
|
||||
{
|
||||
struct dent * next;
|
||||
unsigned char * word;
|
||||
MASKTYPE mask[MASKSIZE];
|
||||
#ifdef FULLMASKSET
|
||||
char flags;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
** Flags in the directory entry. If FULLMASKSET is undefined, these are
|
||||
** stored in the highest bits of the last longword of the mask field. If
|
||||
** FULLMASKSET is defined, they are stored in the extra "flags" field.
|
||||
**
|
||||
** If a word has only one capitalization form, and that form is not
|
||||
** FOLLOWCASE, it will have exactly one entry in the dictionary. The
|
||||
** legal capitalizations will be indicated by the 2-bit capitalization
|
||||
** field, as follows:
|
||||
**
|
||||
** ALLCAPS The word must appear in all capitals.
|
||||
** CAPITALIZED The word must be capitalized (e.g., London).
|
||||
** It will also be accepted in all capitals.
|
||||
** ANYCASE The word may appear in lowercase, capitalized,
|
||||
** or all-capitals.
|
||||
**
|
||||
** Regardless of the capitalization flags, the "word" field of the entry
|
||||
** will point to an all-uppercase copy of the word. This is to simplify
|
||||
** the large portion of the code that doesn't care about capitalization.
|
||||
** Ispell will generate the correct version when needed.
|
||||
**
|
||||
** If a word has more than one capitalization, there will be multiple
|
||||
** entries for it, linked together by the "next" field. The initial
|
||||
** entry for such words will be a dummy entry, primarily for use by code
|
||||
** that ignores capitalization. The "word" field of this entry will
|
||||
** again point to an all-uppercase copy of the word. The "mask" field
|
||||
** will contain the logical OR of the mask fields of all variants.
|
||||
** A header entry is indicated by a capitalization type of ALLCAPS,
|
||||
** with the MOREVARIANTS bit set.
|
||||
**
|
||||
** The following entries will define the individual variants. Each
|
||||
** entry except the last has the MOREVARIANTS flag set, and each
|
||||
** contains one of the following capitalization options:
|
||||
**
|
||||
** ALLCAPS The word must appear in all capitals.
|
||||
** CAPITALIZED The word must be capitalized (e.g., London).
|
||||
** It will also be accepted in all capitals.
|
||||
** FOLLOWCASE The word must be capitalized exactly like the
|
||||
** sample in the entry. Prefix (suffix) characters
|
||||
** must be rendered in the case of the first (last)
|
||||
** "alphabetic" character. It will also be accepted
|
||||
** in all capitals. ("Alphabetic" means "mentioned
|
||||
** in a 'casechars' statement".)
|
||||
** ANYCASE The word may appear in lowercase, capitalized,
|
||||
** or all-capitals.
|
||||
**
|
||||
** The "mask" field for the entry contains only the affix flag bits that
|
||||
** are legal for that capitalization. The "word" field will be null
|
||||
** except for FOLLOWCASE entries, where it will point to the
|
||||
** correctly-capitalized spelling of the root word.
|
||||
**
|
||||
** It is worth discussing why the ALLCAPS option is used in
|
||||
** the header entry. The header entry accepts an all-capitals
|
||||
** version of the root plus every affix (this is always legal, since
|
||||
** words get capitalized in headers and so forth). Further, all of
|
||||
** the following variant entries will reject any all-capitals form
|
||||
** that is illegal due to an affix.
|
||||
**
|
||||
** Finally, note that variations in the KEEP flag can cause a multiple-variant
|
||||
** entry as well. For example, if the personal dictionary contains "ALPHA",
|
||||
** (KEEP flag set) and the user adds "alpha" with the KEEP flag clear, a
|
||||
** multiple-variant entry will be created so that "alpha" will be accepted
|
||||
** but only "ALPHA" will actually be kept.
|
||||
*/
|
||||
#ifdef FULLMASKSET
|
||||
#define flagfield flags
|
||||
#else
|
||||
#define flagfield mask[MASKSIZE - 1]
|
||||
#endif
|
||||
#define USED ((MASKTYPE) 1 << (FLAGBASE + 0))
|
||||
#define KEEP ((MASKTYPE) 1 << (FLAGBASE + 1))
|
||||
#define ANYCASE ((MASKTYPE) 0 << (FLAGBASE + 2))
|
||||
#define ALLCAPS ((MASKTYPE) 1 << (FLAGBASE + 2))
|
||||
#define CAPITALIZED ((MASKTYPE) 2 << (FLAGBASE + 2))
|
||||
#define FOLLOWCASE ((MASKTYPE) 3 << (FLAGBASE + 2))
|
||||
#define CAPTYPEMASK ((MASKTYPE) 3 << (FLAGBASE + 2))
|
||||
#define MOREVARIANTS ((MASKTYPE) 1 << (FLAGBASE + 4))
|
||||
#define ALLFLAGS (USED | KEEP | CAPTYPEMASK | MOREVARIANTS)
|
||||
#define captype(x) ((x) & CAPTYPEMASK)
|
||||
|
||||
/*
|
||||
* Language tables used to encode prefix and suffix information.
|
||||
*/
|
||||
struct flagent
|
||||
{
|
||||
ichar_t * strip; /* String to strip off */
|
||||
ichar_t * affix; /* Affix to append */
|
||||
short flagbit; /* Flag bit this ent matches */
|
||||
short stripl; /* Length of strip */
|
||||
short affl; /* Length of affix */
|
||||
short numconds; /* Number of char conditions */
|
||||
short flagflags; /* Modifiers on this flag */
|
||||
char conds[SET_SIZE + MAXSTRINGCHARS]; /* Adj. char conds */
|
||||
};
|
||||
|
||||
/*
|
||||
* Bits in flagflags
|
||||
*/
|
||||
#define FF_CROSSPRODUCT (1 << 0) /* Affix does cross-products */
|
||||
#define FF_COMPOUNDONLY (1 << 1) /* Afx works in compounds */
|
||||
|
||||
union ptr_union /* Aid for building flg ptrs */
|
||||
{
|
||||
struct flagptr * fp; /* Pointer to more indexing */
|
||||
struct flagent * ent; /* First of a list of ents */
|
||||
};
|
||||
typedef struct flagptr flagptr;
|
||||
struct flagptr
|
||||
{
|
||||
union ptr_union pu; /* Ent list or more indexes */
|
||||
int numents; /* If zero, pu.fp is valid */
|
||||
};
|
||||
|
||||
/*
|
||||
* Description of a single string character type.
|
||||
*/
|
||||
struct strchartype
|
||||
{
|
||||
unsigned char * name; /* Name of the type */
|
||||
char * deformatter; /* Deformatter to use */
|
||||
char * suffixes; /* File suffixes, null seps */
|
||||
unsigned char options; /* Options for the type */
|
||||
};
|
||||
|
||||
/*
|
||||
* Options for string character types
|
||||
*/
|
||||
#define RAW_DISPLAY (1 << 0) /* Display raw strchars */
|
||||
#define SQUEEZE_STRINGS (1 << 1) /* Count strchar as 1 byte */
|
||||
|
||||
/*
|
||||
* Header placed at the beginning of the hash file.
|
||||
*/
|
||||
struct hashheader
|
||||
{
|
||||
unsigned short magic; /* Magic number for ID */
|
||||
unsigned short compileoptions; /* How we were compiled */
|
||||
unsigned short maxstringchars; /* Max # strchrs we support */
|
||||
unsigned short maxstringcharlen; /* Max strchr len supported */
|
||||
unsigned short compoundmin; /* Min lth of compound parts */
|
||||
short compoundbit; /* Flag 4 compounding roots */
|
||||
unsigned int stringsize; /* Size of string table */
|
||||
unsigned int lstringsize; /* Size of lang. str tbl */
|
||||
unsigned int tblsize; /* No. entries in hash tbl */
|
||||
unsigned int stblsize; /* No. entries in sfx tbl */
|
||||
unsigned int ptblsize; /* No. entries in pfx tbl */
|
||||
unsigned int sortval; /* Largest sort ID assigned */
|
||||
unsigned int nstrchars; /* No. strchars defined */
|
||||
unsigned int nstrchartype; /* No. strchar types */
|
||||
unsigned int strtypestart; /* Start of strtype table */
|
||||
char nrchars[5]; /* Nroff special characters */
|
||||
char texchars[13]; /* TeX special characters */
|
||||
char compoundflag; /* Compund-word handling */
|
||||
char defhardflag; /* Default tryveryhard flag */
|
||||
char flagmarker; /* "Start-of-flags" char */
|
||||
unsigned short sortorder[SET_SIZE + MAXSTRINGCHARS]; /* Sort ordering */
|
||||
ichar_t lowerconv[SET_SIZE + MAXSTRINGCHARS]; /* Lower-conversion table */
|
||||
ichar_t upperconv[SET_SIZE + MAXSTRINGCHARS]; /* Upper-conversion table */
|
||||
char wordchars[SET_SIZE + MAXSTRINGCHARS]; /* NZ for chars found in wrds */
|
||||
char upperchars[SET_SIZE + MAXSTRINGCHARS]; /* NZ for uppercase chars */
|
||||
char lowerchars[SET_SIZE + MAXSTRINGCHARS]; /* NZ for lowercase chars */
|
||||
char boundarychars[SET_SIZE + MAXSTRINGCHARS]; /* NZ for boundary chars */
|
||||
char stringstarts[SET_SIZE]; /* NZ if char can start str */
|
||||
unsigned char stringchars[MAXSTRINGCHARS][MAXSTRINGCHARLEN + 1];
|
||||
/* String chars */
|
||||
unsigned int stringdups[MAXSTRINGCHARS]; /* No. of "base" char */
|
||||
int groupnos[MAXSTRINGCHARS]; /* Group char is in # */
|
||||
unsigned short magic2; /* Second magic for dbl chk */
|
||||
};
|
||||
|
||||
/* hash table magic number */
|
||||
#define MAGIC 0x9602
|
||||
|
||||
/* compile options, put in the hash header for consistency checking */
|
||||
# define MAGICNOTUSED1 0x01 /* No longer used */
|
||||
# define MAGICNOTUSED2 0x02 /* No longer used */
|
||||
#if MASKBITS <= 32
|
||||
# define MAGICMASKSET 0x00
|
||||
#else
|
||||
# if MASKBITS <= 64
|
||||
# define MAGICMASKSET 0x04
|
||||
# else
|
||||
# if MASKBITS <= 128
|
||||
# define MAGICMASKSET 0x08
|
||||
# else
|
||||
# define MAGICMASKSET 0x0C
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define COMPILEOPTIONS (MAGICNOTUSED1 | MAGICNOTUSED2 | MAGICMASKSET)
|
||||
|
||||
/*
|
||||
* Structure used to record data about successful lookups; these values
|
||||
* are used in the ins_root_cap routine to produce correct capitalizations.
|
||||
*/
|
||||
struct success
|
||||
{
|
||||
struct dent * dictent; /* Header of dict entry chain for wd */
|
||||
struct flagent * prefix; /* Prefix flag used, or NULL */
|
||||
struct flagent * suffix; /* Suffix flag used, or NULL */
|
||||
};
|
||||
|
||||
/*
|
||||
* Structure used to describe keyword-lookup tables. The lookup
|
||||
* routine uses binary search on the keyword array. Maxlen and minlen
|
||||
* are just optimizations: if the string length isn't in this range,
|
||||
* the lookup routine can fail immediately.
|
||||
*/
|
||||
struct kwtable
|
||||
{
|
||||
unsigned char ** kwlist; /* Sorted array of keywords */
|
||||
unsigned int numkw; /* Number of keywords in array */
|
||||
unsigned int minlen; /* Length of shortest keyword */
|
||||
unsigned int maxlen; /* Length of longest keyword */
|
||||
int forceupper; /* NZ to force uppercase in match */
|
||||
};
|
||||
|
||||
/*
|
||||
** Offsets into the nroff special-character array
|
||||
*/
|
||||
#define NRLEFTPAREN hashheader.nrchars[0]
|
||||
#define NRRIGHTPAREN hashheader.nrchars[1]
|
||||
#define NRDOT hashheader.nrchars[2]
|
||||
#define NRBACKSLASH hashheader.nrchars[3]
|
||||
#define NRSTAR hashheader.nrchars[4]
|
||||
|
||||
/*
|
||||
** Offsets into the TeX special-character array
|
||||
*/
|
||||
#define TEXLEFTPAREN hashheader.texchars[0]
|
||||
#define TEXRIGHTPAREN hashheader.texchars[1]
|
||||
#define TEXLEFTSQUARE hashheader.texchars[2]
|
||||
#define TEXRIGHTSQUARE hashheader.texchars[3]
|
||||
#define TEXLEFTCURLY hashheader.texchars[4]
|
||||
#define TEXRIGHTCURLY hashheader.texchars[5]
|
||||
#define TEXLEFTANGLE hashheader.texchars[6]
|
||||
#define TEXRIGHTANGLE hashheader.texchars[7]
|
||||
#define TEXBACKSLASH hashheader.texchars[8]
|
||||
#define TEXDOLLAR hashheader.texchars[9]
|
||||
#define TEXSTAR hashheader.texchars[10]
|
||||
#define TEXDOT hashheader.texchars[11]
|
||||
#define TEXPERCENT hashheader.texchars[12]
|
||||
|
||||
#define HTMLTAGSTART '<'
|
||||
#define HTMLTAGEND '>'
|
||||
#define HTMLSLASH '/'
|
||||
#define HTMLSPECSTART '&'
|
||||
#define HTMLSPECEND ';'
|
||||
#define HTMLQUOTE '"'
|
||||
|
||||
/*
|
||||
** Values for compoundflag
|
||||
*/
|
||||
#define COMPOUND_NEVER 0 /* Compound words are never good */
|
||||
#define COMPOUND_ANYTIME 1 /* Accept run-together words */
|
||||
#define COMPOUND_CONTROLLED 2 /* Compounds controlled by afx flags */
|
||||
|
||||
/*
|
||||
** Values for deftflag and tflag (deformatting style)
|
||||
*/
|
||||
#define DEFORMAT_NONE 0 /* No deformatting (or external) */
|
||||
#define DEFORMAT_NROFF 1 /* Nroff/troff-style deformatting */
|
||||
#define DEFORMAT_TEX 2 /* TeX/LaTeX-style deformatting */
|
||||
#define DEFORMAT_SGML 3 /* SGML/HTML-style deformatting */
|
||||
|
||||
/*
|
||||
** The isXXXX macros normally only check ASCII range, and don't support
|
||||
** the character sets of other languages. These private versions handle
|
||||
** whatever character sets have been defined in the affix files.
|
||||
*/
|
||||
#ifdef lint
|
||||
extern int myupper P ((unsigned int ch));
|
||||
extern int mylower P ((unsigned int ch));
|
||||
extern int myspace P ((unsigned int ch));
|
||||
extern int iswordch P ((unsigned int ch));
|
||||
extern int isboundarych P ((unsigned int ch));
|
||||
extern int isstringstart P ((unsigned int ch));
|
||||
extern ichar_t mytolower P ((unsigned int ch));
|
||||
extern ichar_t mytoupper P ((unsigned int ch));
|
||||
#else /* lint */
|
||||
#define myupper(X) (hashheader.upperchars[(X)])
|
||||
#define mylower(X) (hashheader.lowerchars[(X)])
|
||||
#define myspace(X) (((X) > 0) && ((X) < 0x80) \
|
||||
&& isspace((unsigned char) (X)))
|
||||
#define iswordch(X) (hashheader.wordchars[(X)])
|
||||
#define isboundarych(X) (hashheader.boundarychars[(X)])
|
||||
#define isstringstart(X) (hashheader.stringstarts[(unsigned char) (X)])
|
||||
#define mytolower(X) (hashheader.lowerconv[(X)])
|
||||
#define mytoupper(X) (hashheader.upperconv[(X)])
|
||||
#endif /* lint */
|
||||
|
||||
/*
|
||||
** These macros are similar to the ones above, but they take into account
|
||||
** the possibility of string characters. Note well that they take a POINTER,
|
||||
** not a character.
|
||||
**
|
||||
** The "l_" versions set "len" to the length of the string character as a
|
||||
** handy side effect. (Note that the global "laststringch" is also set,
|
||||
** and sometimes used, by these macros.)
|
||||
**
|
||||
** The "l1_" versions go one step further and guarantee that the "len"
|
||||
** field is valid for *all* characters, being set to 1 even if the macro
|
||||
** returns false. This macro is a great example of how NOT to write
|
||||
** readable C.
|
||||
*/
|
||||
#define isstringch(ptr, canon) (isstringstart (*(ptr)) \
|
||||
&& stringcharlen ((ptr), (canon)) > 0)
|
||||
#define l_isstringch(ptr, len, canon) \
|
||||
(isstringstart (*(ptr)) \
|
||||
&& (len = stringcharlen ((ptr), (canon))) \
|
||||
> 0)
|
||||
#define l1_isstringch(ptr, len, canon) \
|
||||
(len = 1, \
|
||||
isstringstart (*(ptr)) \
|
||||
&& ((len = \
|
||||
stringcharlen ((ptr), (canon))) \
|
||||
> 0 \
|
||||
? 1 : (len = 1, 0)))
|
||||
|
||||
/*
|
||||
* Sizes of buffers returned by ichartosstr/strtosichar.
|
||||
*/
|
||||
#define ICHARTOSSTR_SIZE (INPUTWORDLEN + 4 * MAXAFFIXLEN + 4)
|
||||
#define STRTOSICHAR_SIZE ((INPUTWORDLEN + 4 * MAXAFFIXLEN + 4) \
|
||||
* sizeof (ichar_t))
|
||||
|
||||
/*
|
||||
* termcap variables
|
||||
*/
|
||||
#ifdef MAIN
|
||||
# define EXTERN /* nothing */
|
||||
#else
|
||||
# define EXTERN extern
|
||||
#endif
|
||||
|
||||
EXTERN char * BC; /* backspace if not ^H */
|
||||
EXTERN char * cd; /* clear to end of display */
|
||||
EXTERN char * cl; /* clear display */
|
||||
EXTERN char * cm; /* cursor movement */
|
||||
EXTERN char * ho; /* home */
|
||||
EXTERN char * nd; /* non-destructive space */
|
||||
EXTERN char * so; /* standout */
|
||||
EXTERN char * se; /* standout end */
|
||||
EXTERN int sg; /* space taken by so/se */
|
||||
EXTERN char * ti; /* terminal initialization sequence */
|
||||
EXTERN char * te; /* terminal termination sequence */
|
||||
EXTERN int li; /* lines */
|
||||
EXTERN int co; /* columns */
|
||||
|
||||
EXTERN int contextsize; /* number of lines of context to show */
|
||||
EXTERN unsigned char
|
||||
contextbufs[MAXCONTEXT][BUFSIZ]; /* Context of current line */
|
||||
EXTERN int contextoffset; /* Offset of line start in contextbufs[0] */
|
||||
EXTERN unsigned char
|
||||
ctoken[INPUTWORDLEN + MAXAFFIXLEN]; /* Current token as char */
|
||||
EXTERN unsigned char
|
||||
filteredbuf[BUFSIZ]; /* Filtered line */
|
||||
EXTERN ichar_t itoken[INPUTWORDLEN + MAXAFFIXLEN]; /* Ctoken as ichar_t str */
|
||||
|
||||
EXTERN char termcap[2048]; /* termcap entry */
|
||||
EXTERN char termstr[2048]; /* for string values */
|
||||
EXTERN char * termptr; /* pointer into termcap, used by tgetstr */
|
||||
|
||||
EXTERN int numhits; /* number of hits in dictionary lookups */
|
||||
EXTERN struct success
|
||||
hits[MAX_HITS]; /* table of hits gotten in lookup */
|
||||
|
||||
EXTERN unsigned char *
|
||||
hashstrings; /* Strings in hash table */
|
||||
EXTERN struct hashheader
|
||||
hashheader; /* Header of hash table */
|
||||
EXTERN struct dent *
|
||||
hashtbl; /* Main hash table, for dictionary */
|
||||
EXTERN unsigned int
|
||||
hashsize; /* Size of main hash table */
|
||||
|
||||
EXTERN char hashname[MAXPATHLEN]; /* Name of hash table file */
|
||||
|
||||
EXTERN int aflag; /* NZ if -a or -A option specified */
|
||||
EXTERN int cflag; /* NZ if -c (crunch) option */
|
||||
EXTERN int lflag; /* NZ if -l (list) option */
|
||||
EXTERN int incfileflag; /* whether xgets() acts exactly like gets() */
|
||||
EXTERN int nodictflag; /* NZ if dictionary not needed */
|
||||
|
||||
EXTERN int uerasechar; /* User's erase character, from stty */
|
||||
EXTERN int ukillchar; /* User's kill character */
|
||||
|
||||
EXTERN unsigned int laststringch; /* Number of last string character */
|
||||
EXTERN int defstringgroup; /* Default string character group type */
|
||||
|
||||
EXTERN unsigned int
|
||||
numpflags; /* Number of prefix flags in table */
|
||||
EXTERN unsigned int
|
||||
numsflags; /* Number of suffix flags in table */
|
||||
EXTERN struct flagptr * pflagindex;
|
||||
/* Fast index to pflaglist */
|
||||
EXTERN struct flagent * pflaglist; /* Prefix flag control list */
|
||||
EXTERN struct flagptr * sflagindex;
|
||||
/* Fast index to sflaglist */
|
||||
EXTERN struct flagent * sflaglist; /* Suffix flag control list */
|
||||
|
||||
EXTERN struct strchartype * /* String character type collection */
|
||||
chartypes;
|
||||
|
||||
EXTERN FILE * infile; /* File being corrected */
|
||||
EXTERN FILE * outfile; /* Corrected copy of infile */
|
||||
EXTERN FILE * sourcefile; /* File with full input data */
|
||||
EXTERN FILE * logfile; /* File for logging corrections */
|
||||
|
||||
EXTERN char * askfilename; /* File specified in -f option */
|
||||
|
||||
EXTERN int changes; /* NZ if changes made to cur. file */
|
||||
EXTERN int readonly; /* NZ if current file is readonly */
|
||||
EXTERN int quit; /* NZ if we're done with this file */
|
||||
|
||||
#define MAXPOSSIBLE 100 /* Max no. of possibilities to generate */
|
||||
|
||||
EXTERN char possibilities[MAXPOSSIBLE][INPUTWORDLEN + MAXAFFIXLEN];
|
||||
/* Table of possible corrections */
|
||||
EXTERN int pcount; /* Count of possibilities generated */
|
||||
EXTERN int maxposslen; /* Length of longest possibility */
|
||||
EXTERN int easypossibilities; /* Number of "easy" corrections found */
|
||||
/* ..(defined as those using legal affixes) */
|
||||
|
||||
/*
|
||||
* The following array contains a list of characters that should be tried
|
||||
* in "missingletter." Note that lowercase characters are omitted.
|
||||
*/
|
||||
EXTERN int Trynum; /* Size of "Try" array */
|
||||
EXTERN ichar_t Try[SET_SIZE + MAXSTRINGCHARS];
|
||||
|
||||
/*
|
||||
* Tables of keywords, used in defmt.c
|
||||
*/
|
||||
EXTERN struct kwtable htmlchecklist; /* List of HTML tags to always check */
|
||||
EXTERN struct kwtable htmlignorelist; /* List of HTML tags to be ignored */
|
||||
EXTERN struct kwtable texskip1list; /* List of TEX tags to skip 1 arg */
|
||||
EXTERN struct kwtable texskip2list; /* List of TEX tags to skip 2 args */
|
||||
|
||||
/*
|
||||
* Initialized variables. These are generated using macros so that they
|
||||
* may be consistently declared in all programs. Numerous examples of
|
||||
* usage are given below.
|
||||
*/
|
||||
#ifdef MAIN
|
||||
#define INIT(decl, init) decl = init
|
||||
#else
|
||||
#define INIT(decl, init) extern decl
|
||||
#endif
|
||||
|
||||
#ifdef MINIMENU
|
||||
INIT (int minimenusize, 2); /* MUST be either 2 or zero */
|
||||
#else /* MINIMENU */
|
||||
INIT (int minimenusize, 0); /* MUST be either 2 or zero */
|
||||
#endif /* MINIMENU */
|
||||
|
||||
INIT (int askverbose, 0); /* NZ for verbose ask mode */
|
||||
INIT (int eflag, 0); /* NZ for expand mode */
|
||||
INIT (char * defmtpgm, NULL); /* Filter to use for deformatting */
|
||||
INIT (int dumpflag, 0); /* NZ to do dump mode */
|
||||
INIT (int fflag, 0); /* NZ if -f specified */
|
||||
#ifndef USG
|
||||
INIT (int sflag, 0); /* NZ to stop self after EOF */
|
||||
#endif
|
||||
INIT (int vflag, 0); /* NZ to display characters as M-xxx */
|
||||
INIT (int xflag, DEFNOBACKUPFLAG); /* NZ to suppress backups */
|
||||
INIT (int deftflag, -1); /* Default deformatting mode, chosen */
|
||||
/* ..from DEFORMAT_* values */
|
||||
INIT (int tflag, DEFTEXFLAG); /* Deformatting for current file */
|
||||
INIT (int prefstringchar, -1); /* Preferred string character type */
|
||||
|
||||
INIT (int insidehtml, 0); /* Flag to indicate we're amid HTML */
|
||||
/* 0 = normal text */
|
||||
#define HTML_IN_TAG 0x01 /* in <...> tag */
|
||||
#define HTML_IN_ENDTAG 0x02 /* in </...> tag */
|
||||
#define HTML_IN_SPEC 0x04 /* in &...; special-char sequence */
|
||||
#define HTML_IN_QUOTE 0x08 /* in quoted text within tag */
|
||||
#define HTML_CHECKING_QUOTE 0x10 /* checking quoted text within tag */
|
||||
#define HTML_IGNORE 0x20 /* in text to be ignored */
|
||||
/* ...must be last, because we use */
|
||||
/* ...the higher bits as a nesting */
|
||||
/* ...counter */
|
||||
#define HTML_ISIGNORED (~(HTML_IGNORE - 1)) /* Mask for testing ignore bits */
|
||||
|
||||
INIT (int terse, 0); /* NZ for "terse" mode */
|
||||
INIT (int correct_verbose_mode, 0); /* NZ for "verbose" -a mode */
|
||||
|
||||
INIT (char tempfile[MAXPATHLEN], ""); /* Name of file we're spelling into */
|
||||
|
||||
INIT (int minword, MINWORD); /* Longest always-legal word */
|
||||
INIT (int sortit, 1); /* Sort suggestions alphabetically */
|
||||
INIT (int compoundflag, -1); /* How to treat compounds: see above */
|
||||
INIT (int tryhardflag, -1); /* Always call tryveryhard */
|
||||
|
||||
INIT (char * currentfile, NULL); /* Name of current input file */
|
||||
|
||||
/* Odd numbers for math mode in LaTeX; even for LR or paragraph mode */
|
||||
INIT (int math_mode, 0);
|
||||
/* P -- paragraph or LR mode
|
||||
* b -- parsing a \begin statement
|
||||
* e -- parsing an \end statement
|
||||
* r -- parsing a \ref type of argument.
|
||||
* m -- looking for a \begin{minipage} argument.
|
||||
*/
|
||||
INIT (char LaTeX_Mode, 'P');
|
||||
|
||||
// BC Read/Write from/to file descriptors
|
||||
EXTERN int _read_fd;
|
||||
EXTERN int _write_fd;
|
||||
|
||||
#endif /* ISPELL_H_INCLUDED */
|
1
external/ispell/ispell_dictionaries/en
vendored
Normal file
1
external/ispell/ispell_dictionaries/en
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
waterfowl
|
BIN
external/ispell/ispell_dictionaries/en.hash
vendored
Normal file
BIN
external/ispell/ispell_dictionaries/en.hash
vendored
Normal file
Binary file not shown.
16
external/ispell/ispell_dictionaries/fr
vendored
Normal file
16
external/ispell/ispell_dictionaries/fr
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
allais
|
||||
allait
|
||||
allons
|
||||
allez
|
||||
allaient
|
||||
eût
|
||||
grivelé
|
||||
calèche
|
||||
pût
|
||||
entendît
|
||||
ultra
|
||||
traînard
|
||||
canonniers
|
||||
visio-conférence
|
||||
allées
|
||||
domotique
|
BIN
external/ispell/ispell_dictionaries/fr.hash
vendored
Normal file
BIN
external/ispell/ispell_dictionaries/fr.hash
vendored
Normal file
Binary file not shown.
77
external/ispell/iwhich
vendored
Executable file
77
external/ispell/iwhich
vendored
Executable file
|
@ -0,0 +1,77 @@
|
|||
: Use /bin/sh
|
||||
#
|
||||
# $Id: iwhich,v 1.2 1995/10/11 02:31:58 geoff Exp $
|
||||
#
|
||||
# Report which version of a command is in use. This version of
|
||||
# "which" doesn't handle shell aliases, but it makes up for that with
|
||||
# the "-a" (report all copies) switch and the fact that it returns a
|
||||
# nonzero shell status if the command isn't found.
|
||||
#
|
||||
USAGE='Usage: which [-a] command[s]'
|
||||
#
|
||||
# For each command, the full pathname of the version that will be
|
||||
# selected from $PATH is reported. If the -a switch is given,
|
||||
# versions in $PATH that are overridden by earlier $PATH entries will
|
||||
# also be reported. The exit status is nonzero if none of the
|
||||
# commands are found anywhere in $PATH.
|
||||
#
|
||||
# $Log: iwhich,v $
|
||||
# Revision 1.2 1995/10/11 02:31:58 geoff
|
||||
# Work around a buggy version of Ultrix test
|
||||
#
|
||||
# Revision 1.1 1995/01/15 00:13:54 geoff
|
||||
# Initial revision
|
||||
#
|
||||
#
|
||||
opath=$PATH
|
||||
PATH=/bin:/usr/bin
|
||||
all=no
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-a)
|
||||
all=yes
|
||||
shift
|
||||
;;
|
||||
-*)
|
||||
echo "$USAGE" 1>&2
|
||||
exit 2
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
case $# in
|
||||
0)
|
||||
echo "$USAGE" 1>&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
opath=`echo "$opath" | sed 's/^:/.:/
|
||||
s/::/:.:/g
|
||||
s/:$/:./
|
||||
s/:/ /g'`
|
||||
found=false
|
||||
for file
|
||||
do
|
||||
for i in $opath
|
||||
do
|
||||
if [ \( -x $i/$file \) -a \( ! -d $i/$file \) ]
|
||||
then
|
||||
echo $i/$file
|
||||
found=true
|
||||
case "$all" in
|
||||
no)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
done
|
||||
if $found
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
24
external/ispell/languages/Where
vendored
Normal file
24
external/ispell/languages/Where
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
Ispell is distributed with dictionaries and affix files for the
|
||||
British and American variants of the English language. For other
|
||||
languages, you will need to download a dictionary and affix file for
|
||||
each language. (Affix files for languages other than English are no
|
||||
longer distributed with ispell, due to the difficulty of keeping them
|
||||
up to date.)
|
||||
|
||||
If you install your dictionaries and affix files into the proper
|
||||
directories with correct Makefiles, you can add extra languages to the
|
||||
"LANGUAGES" variable in local.h and your extra dictionaries will be
|
||||
created automatically. To help you with this task, ispell is
|
||||
distributed with sample Makefiles for several common languages.
|
||||
|
||||
To find dictionaries and affix files, visit the ispell dictionaries
|
||||
web page at:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell-dictionaries.html
|
||||
|
||||
This page is expected to move in the future, but a forwarding page
|
||||
will remain.
|
||||
|
||||
More ispell information can be found at the ispell home page:
|
||||
|
||||
http://www.lasr.cs.ucla.edu/geoff/ispell.html
|
171
external/ispell/languages/english/altamer.0
vendored
Normal file
171
external/ispell/languages/english/altamer.0
vendored
Normal file
|
@ -0,0 +1,171 @@
|
|||
abridgement
|
||||
acknowledgement/AMS
|
||||
analogue/MS
|
||||
appal/S
|
||||
apparelled
|
||||
archeological/Y
|
||||
archeologist/MS
|
||||
archeology
|
||||
autodialler/S
|
||||
barrelled
|
||||
barrelling
|
||||
bevelled
|
||||
bevelling/S
|
||||
canalled
|
||||
canalling
|
||||
cancelled/U
|
||||
canceller
|
||||
cancelling
|
||||
channelled
|
||||
channeller/MS
|
||||
channelling
|
||||
chiselled
|
||||
chiseller/S
|
||||
councilor/MS
|
||||
counselled
|
||||
counselling
|
||||
counsellor/MS
|
||||
crystaline
|
||||
crystalize/DGRSZ
|
||||
crystalized/AU
|
||||
crystalizes/A
|
||||
crystalizing/A
|
||||
dialled/A
|
||||
dialler/AS
|
||||
dialling/AS
|
||||
draught/MS
|
||||
duelled
|
||||
dueller/S
|
||||
duelling/S
|
||||
enamelled
|
||||
enameller/S
|
||||
enamelling/S
|
||||
enrol/S
|
||||
equalled/U
|
||||
equalling
|
||||
eviller
|
||||
evillest
|
||||
focussable
|
||||
focussed/AU
|
||||
focusser
|
||||
focusses/A
|
||||
focussing/A
|
||||
fuelled/A
|
||||
fueller/S
|
||||
fuelling/A
|
||||
fulfil/S
|
||||
funnelled
|
||||
funnelling
|
||||
glamor/DGS
|
||||
glamourize/DGRSZ
|
||||
gospeller/S
|
||||
gravelled
|
||||
gravelling
|
||||
grovelled
|
||||
groveller/S
|
||||
grovelling/Y
|
||||
imperilled
|
||||
initialled
|
||||
initialler
|
||||
initialling
|
||||
jewelled
|
||||
jeweller/S
|
||||
jewelling
|
||||
judgement/MS
|
||||
kidnapped
|
||||
kidnapper/MS
|
||||
kidnapping/MS
|
||||
labelled/AU
|
||||
labeller/MS
|
||||
labellers/A
|
||||
labelling/A
|
||||
laurelled
|
||||
levelled/U
|
||||
leveller/S
|
||||
levellest
|
||||
levelling/U
|
||||
marshalled
|
||||
marshaller
|
||||
marshalling
|
||||
marvelled
|
||||
marvelling
|
||||
marvellous/PY
|
||||
medalled
|
||||
medalling
|
||||
metalled
|
||||
metalling
|
||||
misjudgement/MS
|
||||
modelled/A
|
||||
modeller/S
|
||||
modelling/S
|
||||
multilevelled
|
||||
nickelled
|
||||
nickelling
|
||||
panelled
|
||||
panelling
|
||||
panellist/MS
|
||||
parametrizable
|
||||
parametrization/MS
|
||||
parametrize/DGS
|
||||
parametrized/U
|
||||
parcelled/U
|
||||
parcelling
|
||||
pencilled
|
||||
pencilling/S
|
||||
petalled
|
||||
pretence/NSVX
|
||||
quarrelled
|
||||
quarreller/S
|
||||
quarrelling
|
||||
queueing
|
||||
relabeller/S
|
||||
remodelling
|
||||
revelled
|
||||
reveller/S
|
||||
revelling/S
|
||||
rivalled/U
|
||||
rivalling
|
||||
shovelled
|
||||
shoveller/S
|
||||
shovelling
|
||||
shrivelled
|
||||
shrivelling
|
||||
signalled
|
||||
signaller/S
|
||||
signalling
|
||||
spiralled
|
||||
spiralling
|
||||
squirrelled
|
||||
squirrelling
|
||||
stencilled
|
||||
stenciller/S
|
||||
stencilling
|
||||
symbolled
|
||||
symbolling
|
||||
syphon/DGMS
|
||||
syphons/U
|
||||
totalled
|
||||
totaller/MS
|
||||
totalling
|
||||
towelled
|
||||
towelling/S
|
||||
tranquillity
|
||||
tranquillize/ADGJRSZ
|
||||
tranquillized/AU
|
||||
tranquillizer/AMS
|
||||
tranquillizing/AMSY
|
||||
travelled
|
||||
traveller/MS
|
||||
travelling/S
|
||||
troweller/S
|
||||
tunnelled
|
||||
tunneller/S
|
||||
tunnelling/S
|
||||
unravelled
|
||||
unravelling
|
||||
victualler/S
|
||||
woollen/S
|
||||
woolly/PRS
|
||||
worshipped
|
||||
worshipper/MS
|
||||
worshipping
|
49
external/ispell/languages/english/altamer.1
vendored
Normal file
49
external/ispell/languages/english/altamer.1
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
autofocussed
|
||||
autofocusser
|
||||
autofocusses
|
||||
autofocussing
|
||||
cancellate/D
|
||||
caviller/S
|
||||
cigaret
|
||||
crystalization/AMS
|
||||
defocussing
|
||||
dishevelled
|
||||
dislodgement
|
||||
dowelling
|
||||
downdraught
|
||||
draughty/PRY
|
||||
duellist/S
|
||||
enthral/S
|
||||
gimballed
|
||||
glamourous/PY
|
||||
gruelling/Y
|
||||
libeller/S
|
||||
libellous/Y
|
||||
lodgement
|
||||
nonprogramer/MS
|
||||
pedalled
|
||||
pedalling
|
||||
polycrystaline
|
||||
programability
|
||||
programable
|
||||
programed/A
|
||||
programer/AMS
|
||||
programing/A
|
||||
pummelled
|
||||
recrystalize/R
|
||||
snivelled
|
||||
sniveller/S
|
||||
snivelling/S
|
||||
swivelled
|
||||
swivelling
|
||||
teaselled
|
||||
teaselling
|
||||
teetotaller
|
||||
tinselled
|
||||
tinselling
|
||||
travelogue/MS
|
||||
untrammelled
|
||||
updraught
|
||||
yodelled
|
||||
yodeller
|
||||
yodelling
|
99
external/ispell/languages/english/altamer.2
vendored
Normal file
99
external/ispell/languages/english/altamer.2
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
asafoetida
|
||||
bejewelled
|
||||
bejewelling
|
||||
bemedalled
|
||||
bimetallist
|
||||
bimetallistic
|
||||
calliper/S
|
||||
cancellable
|
||||
cancellous
|
||||
chiselling/S
|
||||
corbelling/S
|
||||
councilorship
|
||||
counsellee
|
||||
counsellorship
|
||||
cryptocrystaline
|
||||
crystalizability/MSU
|
||||
crystalizable/MSU
|
||||
crystalographical/Y
|
||||
cupellation
|
||||
cupeller/S
|
||||
disenthral/S
|
||||
driveller/S
|
||||
empanelled
|
||||
enamellist/S
|
||||
forejudgement/MS
|
||||
frivolled
|
||||
frivoller
|
||||
frivolling
|
||||
gambolled
|
||||
gambolling
|
||||
gavelled
|
||||
glamorless
|
||||
gruelled
|
||||
hiccupped
|
||||
hiccupping
|
||||
houselled/U
|
||||
hovelled
|
||||
impanelled
|
||||
indraught
|
||||
intercrystalization/MS
|
||||
intercrystalize/S
|
||||
interjudgement/MS
|
||||
jewellery/S
|
||||
judgemental
|
||||
judgementalism
|
||||
kennelled/U
|
||||
kernelled
|
||||
labellable
|
||||
lapelled
|
||||
libellant/S
|
||||
libelled
|
||||
libellee/S
|
||||
libelling
|
||||
libellist
|
||||
marshall/S
|
||||
medallist/S
|
||||
metallization/MS
|
||||
metallize/DGS
|
||||
microcrystaline
|
||||
microcrystalinity
|
||||
miocrystaline
|
||||
mislabelled
|
||||
monometallism
|
||||
monometallist
|
||||
nonacknowledgement/MS
|
||||
noncrystalizable/MS
|
||||
noncrystalized/MS
|
||||
noncrystalizing/MS
|
||||
overjudgement/MS
|
||||
penciller/S
|
||||
perilled
|
||||
phanerocrystaline
|
||||
photolabelled
|
||||
photolabeller
|
||||
photolabelling
|
||||
preacknowledgement/MS
|
||||
precancellation
|
||||
prejudgement/MS
|
||||
programmist/MS
|
||||
programmistic/S
|
||||
raveller/SU
|
||||
ravelling
|
||||
semicrystaline
|
||||
snobsnivelling
|
||||
subtotalled
|
||||
subtotalling
|
||||
superacknowledgement/MS
|
||||
teazelling
|
||||
tendrilled
|
||||
trammelled
|
||||
trammelling
|
||||
tranquillization/AMS
|
||||
trowelled
|
||||
trowelling
|
||||
weevilled
|
||||
woollenization/MS
|
||||
woollenize/S
|
||||
woollie
|
||||
woollybutt
|
667
external/ispell/languages/english/american.0
vendored
Normal file
667
external/ispell/languages/english/american.0
vendored
Normal file
|
@ -0,0 +1,667 @@
|
|||
acclimatization/AMS
|
||||
acclimatized/U
|
||||
accouterment/MS
|
||||
actualization/AMS
|
||||
aerosolize/DGS
|
||||
agonize/DGRSZ
|
||||
agonized/Y
|
||||
agonizing/Y
|
||||
alphabetize/DGRSZ
|
||||
aluminum/MS
|
||||
amenorrhea
|
||||
amortize/DGS
|
||||
amortized/U
|
||||
amphitheater/MS
|
||||
analog/MS
|
||||
analyzable/U
|
||||
analyze/ADGRSZ
|
||||
analyzed/AU
|
||||
anemia/MS
|
||||
anemic/S
|
||||
anesthesia/MS
|
||||
anesthetic/MS
|
||||
anesthetically
|
||||
anesthetize/DGRSZ
|
||||
anesthetizer/MS
|
||||
anodize/DGS
|
||||
anonymize/DGS
|
||||
antagonize/DGRSZ
|
||||
antagonized/U
|
||||
antagonizing/U
|
||||
apologize/DGRSZ
|
||||
apologizes/A
|
||||
apologizing/U
|
||||
appall/S
|
||||
appareled
|
||||
appetizer
|
||||
appetizing/UY
|
||||
arbor/DMS
|
||||
archaize/DGRSZ
|
||||
ardor/MS
|
||||
arithmetize/DS
|
||||
armor/DGMRSZ
|
||||
armored/U
|
||||
armorer/MS
|
||||
armory/DMS
|
||||
atomization/MS
|
||||
atomize/DGRSZ
|
||||
authorization/AMS
|
||||
authorize/DGRSZ
|
||||
authorizes/AU
|
||||
autodialer/S
|
||||
axiomatization/MS
|
||||
axiomatize/DGS
|
||||
Balkanize/DGS
|
||||
baptize/DGRSZ
|
||||
baptized/U
|
||||
baptizes/U
|
||||
barreled
|
||||
barreling
|
||||
bastardize/DGS
|
||||
bastardized/U
|
||||
bedeviled
|
||||
bedeviling
|
||||
behavior/DMS
|
||||
behavioral/Y
|
||||
behaviorism/MS
|
||||
behavioristic/S
|
||||
behoove/DGJMS
|
||||
behooving/MSY
|
||||
belabor/DGMS
|
||||
beveled
|
||||
beveling/S
|
||||
bowdlerize/DGRS
|
||||
brutalize/DGS
|
||||
brutalized/U
|
||||
brutalizes/AU
|
||||
burglarize/DGS
|
||||
busheled
|
||||
busheling/S
|
||||
caliber/S
|
||||
canaled
|
||||
canaling
|
||||
canceled/U
|
||||
canceler
|
||||
canceling
|
||||
candor/MS
|
||||
cannibalize/DGS
|
||||
canonicalization
|
||||
canonicalize/DGS
|
||||
capitalization/AMS
|
||||
capitalize/DGRSZ
|
||||
capitalized/AU
|
||||
capitalizes/A
|
||||
carbonization/AMS
|
||||
carbonize/DGRSZ
|
||||
carbonizer/AS
|
||||
carbonizes/A
|
||||
catalog/DGMRS
|
||||
categorization/MS
|
||||
categorize/DGRSZ
|
||||
categorized/AU
|
||||
center/DGJMRSZ
|
||||
centerpiece/MS
|
||||
centimeter/MS
|
||||
centralization/AMS
|
||||
centralize/DGRSZ
|
||||
centralizes/A
|
||||
channeled
|
||||
channeler/MS
|
||||
channeling
|
||||
characterizable/MS
|
||||
characterization/MS
|
||||
characterize/DGRSZ
|
||||
characterized/U
|
||||
checkbook/MS
|
||||
chiseled
|
||||
chiseler/S
|
||||
civilization/AMS
|
||||
civilize/DGRSZ
|
||||
civilized/PU
|
||||
civilizes/AU
|
||||
clamor/DGRSZ
|
||||
clamorer/MS
|
||||
cognizance/AI
|
||||
cognizant/I
|
||||
colonization/AMS
|
||||
colonize/DGRSZ
|
||||
colonized/U
|
||||
colonizes/AU
|
||||
color/DGJMRSZ
|
||||
colored/AU
|
||||
coloreds/U
|
||||
colorer/MS
|
||||
colorful/PY
|
||||
colorless/PY
|
||||
colors/A
|
||||
columnize/DGS
|
||||
compartmentalize/DGS
|
||||
computerize/DGS
|
||||
conceptualization/MS
|
||||
conceptualize/DGRS
|
||||
conceptualizing/A
|
||||
counseled
|
||||
counseling
|
||||
counselor/MS
|
||||
criticize/DGRSZ
|
||||
criticized/U
|
||||
criticizes/A
|
||||
criticizing/UY
|
||||
criticizingly/S
|
||||
crystallize/DGRSZ
|
||||
crystallized/AU
|
||||
crystallizes/A
|
||||
customizable
|
||||
customization/MS
|
||||
customize/DGRSZ
|
||||
decentralization/MS
|
||||
decentralized
|
||||
defense/MSU
|
||||
defenseless/PY
|
||||
demeanor/MS
|
||||
demoralize/DGRSZ
|
||||
demoralizing/Y
|
||||
dialed/A
|
||||
dialer/MS
|
||||
dialers/A
|
||||
dialing/AS
|
||||
dichotomize/DGS
|
||||
digitize/DGRSZ
|
||||
digitizer/MS
|
||||
dishonor/DGRSZ
|
||||
dishonored/U
|
||||
dishonorer/MS
|
||||
disorganized/U
|
||||
draftsman
|
||||
dueled
|
||||
dueler/S
|
||||
dueling/S
|
||||
economize/DGRSZ
|
||||
economizing/U
|
||||
editorialize/DGRS
|
||||
enameled
|
||||
enameler/S
|
||||
enameling/S
|
||||
endeavor/DGMRSZ
|
||||
endeavored/U
|
||||
endeavorer/MS
|
||||
enroll/S
|
||||
enrollment/MS
|
||||
epitomize/DGRSZ
|
||||
epitomized/U
|
||||
equaled/U
|
||||
equaling
|
||||
equalization/MS
|
||||
equalize/DGJRSZ
|
||||
equalized/U
|
||||
equalizer/MS
|
||||
equalizes/U
|
||||
esthetic/MS
|
||||
esthetically
|
||||
eviler
|
||||
evilest
|
||||
factorization/MS
|
||||
familiarization/MS
|
||||
familiarize/DGRSZ
|
||||
familiarized/U
|
||||
familiarizing/Y
|
||||
fantasize/DGRS
|
||||
favor/DGJMRSZ
|
||||
favorable/MPSU
|
||||
favorably/U
|
||||
favored/MPSY
|
||||
favored's/U
|
||||
favorer/MS
|
||||
favoring/MSY
|
||||
favorings/U
|
||||
favorite/MSU
|
||||
favors/A
|
||||
fertilization/AMS
|
||||
fertilize/DGRSZ
|
||||
fertilized/U
|
||||
fertilizes/A
|
||||
fervor/MS
|
||||
fiber/DMS
|
||||
fiberglass
|
||||
finalization/S
|
||||
finalize/DGS
|
||||
flavor/DGJMRSZ
|
||||
flavored/U
|
||||
flavorer/MS
|
||||
formalization/MS
|
||||
formalize/DGRSZ
|
||||
formalized/U
|
||||
formalizes/I
|
||||
fueled/A
|
||||
fueler/S
|
||||
fueling/A
|
||||
fulfill/S
|
||||
fulfillment/MS
|
||||
funneled
|
||||
funneling
|
||||
generalization/MS
|
||||
generalize/DGRSZ
|
||||
generalized/U
|
||||
glamorize/DGRSZ
|
||||
glamorized/U
|
||||
gospeler/S
|
||||
graveled
|
||||
graveling
|
||||
groveled
|
||||
groveler/S
|
||||
groveling/Y
|
||||
harbor/DGMRSZ
|
||||
harborer/MS
|
||||
harmonize/DGRSZ
|
||||
harmonized/U
|
||||
harmonizes/AU
|
||||
honor/DGRSZ
|
||||
honorable/MPS
|
||||
honorables/U
|
||||
honorably/SU
|
||||
honored/U
|
||||
honorer/MS
|
||||
honors/A
|
||||
hospitalize/DGS
|
||||
humor/DGMRSZ
|
||||
humored/U
|
||||
hypothesize/DGRSZ
|
||||
idealization/MS
|
||||
idealize/DGRSZ
|
||||
idealized/U
|
||||
imperiled
|
||||
individualize/DGRSZ
|
||||
individualized/U
|
||||
individualizes/U
|
||||
individualizing/Y
|
||||
industrialization/MS
|
||||
industrialization's/A
|
||||
initialed
|
||||
initialer
|
||||
initialing
|
||||
initialization/MS
|
||||
initialize/DGRSZ
|
||||
initialized/AU
|
||||
initializer/MS
|
||||
institutionalize/DGS
|
||||
internalization/MS
|
||||
internalize/DGS
|
||||
italicize/DGS
|
||||
italicized/U
|
||||
itemization/MS
|
||||
itemize/DGRSZ
|
||||
itemized/U
|
||||
itemizes/A
|
||||
jeopardize/DGS
|
||||
jeweled
|
||||
jeweling
|
||||
jewelry/MS
|
||||
journalize/DGRSZ
|
||||
journalized/U
|
||||
kidnaped
|
||||
kidnaper/MS
|
||||
kidnaping/MS
|
||||
kilometer/MS
|
||||
labeled/AU
|
||||
labeler/MS
|
||||
labelers/A
|
||||
labeling/A
|
||||
labor/DGJRSZ
|
||||
labored/MPY
|
||||
labored's/U
|
||||
laborer/MS
|
||||
laboring/MSY
|
||||
laborings/U
|
||||
laureled
|
||||
legalization/MS
|
||||
legalize/DGS
|
||||
legalized/U
|
||||
leveled/U
|
||||
leveler/S
|
||||
levelest
|
||||
leveling/U
|
||||
liberalize/DGRSZ
|
||||
liberalized/U
|
||||
license's
|
||||
linearizable
|
||||
linearize/DGNS
|
||||
liter/S
|
||||
localization/MS
|
||||
localize/DGRSZ
|
||||
localized/U
|
||||
localizes/U
|
||||
luster/DGS
|
||||
magnetization/AMS
|
||||
maneuver/DGRS
|
||||
marshaled
|
||||
marshaler
|
||||
marshaling
|
||||
marveled
|
||||
marveling
|
||||
marvelous/PY
|
||||
materialize/DGRSZ
|
||||
materializes/A
|
||||
maximize/DGRSZ
|
||||
mechanization/MS
|
||||
mechanize/DGRSZ
|
||||
mechanized/U
|
||||
mechanizes/U
|
||||
medaled
|
||||
medaling
|
||||
memorization/MS
|
||||
memorize/DGRSZ
|
||||
memorized/U
|
||||
memorizes/A
|
||||
metaled
|
||||
metaling
|
||||
millimeter/MS
|
||||
miniaturization/S
|
||||
miniaturize/DGS
|
||||
minimization/MS
|
||||
minimize/DGRSZ
|
||||
minimized/U
|
||||
miter/DGR
|
||||
modeled/A
|
||||
modeler/S
|
||||
modeling/S
|
||||
modernize/DGRSZ
|
||||
modernized/U
|
||||
modernizes/U
|
||||
modularization/M
|
||||
modularize/DGS
|
||||
motorize/DGS
|
||||
motorized/U
|
||||
multileveled
|
||||
nationalization/MS
|
||||
nationalize/ADGRSZ
|
||||
nationalized/AU
|
||||
naturalization/MS
|
||||
neighbor/DGJMRSYZ
|
||||
neighbored/U
|
||||
neighborer/MS
|
||||
neighborhood/MS
|
||||
neighborly/PU
|
||||
neutralize/DGRSZ
|
||||
neutralized/U
|
||||
nickeled
|
||||
nickeling
|
||||
normalization/MS
|
||||
normalize/DGRSZ
|
||||
normalized/AU
|
||||
normalizes/AU
|
||||
notarize/DGS
|
||||
odor/DMS
|
||||
offense/MS
|
||||
optimization/MS
|
||||
optimize/DGRSZ
|
||||
optimized/U
|
||||
optimizer/MS
|
||||
optimizes/U
|
||||
organizable/MSU
|
||||
organization/AMS
|
||||
organizational/MSY
|
||||
organize/ADGRSZ
|
||||
oxidize/DGJRSZ
|
||||
oxidized/U
|
||||
oxidizes/A
|
||||
pajama/S
|
||||
paneled
|
||||
paneling/S
|
||||
panelist/MS
|
||||
paralleled/U
|
||||
paralleling
|
||||
parallelization/MS
|
||||
parallelize/DGRSZ
|
||||
paralyze/DGRSZ
|
||||
paralyzed/Y
|
||||
paralyzedly/S
|
||||
paralyzer/MS
|
||||
paralyzing/Y
|
||||
paralyzingly/S
|
||||
parameterizable
|
||||
parameterization/MS
|
||||
parameterize/DGS
|
||||
parameterized/U
|
||||
parceled/U
|
||||
parceling
|
||||
parenthesized
|
||||
parlor/MS
|
||||
patronize/DGJRSZ
|
||||
patronized/U
|
||||
patronizes/A
|
||||
patronizing/MSY
|
||||
penalize/DGS
|
||||
penalized/U
|
||||
penciled
|
||||
penciling/S
|
||||
personalization/MS
|
||||
personalize/DGS
|
||||
petaled
|
||||
philosophize/DGRSZ
|
||||
philosophized/U
|
||||
philosophizes/U
|
||||
plow/DGRS
|
||||
plowed/U
|
||||
plowman
|
||||
pluralization/MS
|
||||
pluralize/DGRSZ
|
||||
polarization/MS
|
||||
polarization's/A
|
||||
popularization/MS
|
||||
popularize/DGRSZ
|
||||
popularizes/U
|
||||
practiced/U
|
||||
practicer
|
||||
practicing
|
||||
preinitialize/DGS
|
||||
pressurize/DGRSZ
|
||||
pretense/NSVX
|
||||
prioritize/DGJRSZ
|
||||
productize/DGRSZ
|
||||
proselytize/DGRSZ
|
||||
publicize/DGS
|
||||
pulverize/DGRSZ
|
||||
pulverized/U
|
||||
pulverizes/AU
|
||||
quantization/MS
|
||||
quantize/DGRSZ
|
||||
quantizer/MS
|
||||
quarreled
|
||||
quarreler/S
|
||||
quarreling
|
||||
queuing
|
||||
randomize/DGRS
|
||||
rationalize/DGRSZ
|
||||
realizable/MPS
|
||||
realizably/S
|
||||
realization/MS
|
||||
realize/DGJRSZ
|
||||
realized/U
|
||||
realizing/MSY
|
||||
recognizability
|
||||
recognizable/U
|
||||
recognizably
|
||||
recognize/DGRSZ
|
||||
recognized/Y
|
||||
recognizedly/S
|
||||
recognizing/UY
|
||||
recognizingly/S
|
||||
redialer/S
|
||||
reinitialize/DGS
|
||||
relabeler/S
|
||||
remodeling
|
||||
reorganized/U
|
||||
reprogram/S
|
||||
reveled
|
||||
reveler/S
|
||||
reveling/S
|
||||
revolutionize/DGRSZ
|
||||
rigor/MS
|
||||
rivaled/U
|
||||
rivaling
|
||||
ruble/MS
|
||||
rumor/DGMRSZ
|
||||
rumored/U
|
||||
rumorer/MS
|
||||
saber/DGMS
|
||||
sabered/U
|
||||
sanitize/DGRS
|
||||
savior/MS
|
||||
savor/DGRSZ
|
||||
savorer/MS
|
||||
savorily/SU
|
||||
savoring/Y
|
||||
savoringly/S
|
||||
savory/MPRSTY
|
||||
scepter/DGMS
|
||||
scepters/U
|
||||
scrutinize/DGRSZ
|
||||
scrutinized/U
|
||||
scrutinizing/UY
|
||||
scrutinizingly/S
|
||||
sepulcher/DMS
|
||||
sepulchers/AU
|
||||
sequentialize/DGS
|
||||
serialization/MS
|
||||
serialize/DGRSZ
|
||||
serializer/MS
|
||||
shoveled
|
||||
shoveler/S
|
||||
shoveling
|
||||
shriveled
|
||||
shriveling
|
||||
signaled
|
||||
signaler/S
|
||||
signaling
|
||||
socialize/DGRS
|
||||
socialized/U
|
||||
specialization/MS
|
||||
specialize/DGRSZ
|
||||
specialized/U
|
||||
specializing/U
|
||||
specter/DMS
|
||||
spiraled
|
||||
spiraling
|
||||
splendor/MS
|
||||
squirreled
|
||||
squirreling
|
||||
stabilize/DGRSZ
|
||||
standardization/AMS
|
||||
standardize/DGRSZ
|
||||
standardized/U
|
||||
standardizes/A
|
||||
stenciled
|
||||
stenciler/S
|
||||
stenciling
|
||||
sterilization/MS
|
||||
sterilize/DGRSZ
|
||||
sterilized/U
|
||||
sterilizes/A
|
||||
stylized
|
||||
subsidize/DGRSZ
|
||||
subsidized/U
|
||||
succor/DGRSZ
|
||||
succored/U
|
||||
succorer/MS
|
||||
sulfate/DGS
|
||||
sulfur/DG
|
||||
sulfuric
|
||||
summarization/MS
|
||||
summarize/DGRSZ
|
||||
summarized/U
|
||||
symboled
|
||||
symboling
|
||||
symbolization/AMS
|
||||
symbolize/DGRSZ
|
||||
symbolized/U
|
||||
symbolizes/A
|
||||
sympathize/DGJRSZ
|
||||
sympathized/U
|
||||
sympathizing/MSUY
|
||||
synchronization/MS
|
||||
synchronizations/A
|
||||
synchronize/DGRSZ
|
||||
synchronized/AU
|
||||
synchronizer/MS
|
||||
synchronizes/A
|
||||
synthesize/DGRSZ
|
||||
synthesized/U
|
||||
synthesizes/A
|
||||
systematize/DGRSZ
|
||||
systematized/U
|
||||
systematizing/U
|
||||
tantalize/DGRSZ
|
||||
tantalized/U
|
||||
tantalizing/PY
|
||||
tantalizingly/S
|
||||
tantalizingness/S
|
||||
terrorize/DGRSZ
|
||||
terrorized/U
|
||||
theater/MS
|
||||
theorization/MS
|
||||
theorize/DGRSZ
|
||||
tire's
|
||||
titer/S
|
||||
totaled
|
||||
totaler/MS
|
||||
totaling
|
||||
toweled
|
||||
toweling/S
|
||||
tranquility
|
||||
tranquilize/ADGJRSZ
|
||||
tranquilized/AU
|
||||
tranquilizer/AMS
|
||||
tranquilizing/AMSY
|
||||
transistorize/DGS
|
||||
traveled
|
||||
traveler/MS
|
||||
traveling/S
|
||||
trivialize/DGS
|
||||
troweler/S
|
||||
tumor/DMS
|
||||
tunneled
|
||||
tunneler/S
|
||||
tunneling/S
|
||||
unauthorized/PY
|
||||
uncivilized/PY
|
||||
uncolored/PSY
|
||||
unfavored/M
|
||||
unionization
|
||||
unionize/DGRSZ
|
||||
unlabored/M
|
||||
unorganized/PY
|
||||
unpatronizing/MY
|
||||
unraveled
|
||||
unraveling
|
||||
unrecognized
|
||||
unsavored/PY
|
||||
unsystematized/Y
|
||||
utilization/A
|
||||
utilize/DGRSZ
|
||||
utilizes/A
|
||||
valor/MS
|
||||
vandalize/DGS
|
||||
vapor/DGJMRSZ
|
||||
vaporer/MS
|
||||
vaporing/MSY
|
||||
vectorization
|
||||
vectorizing
|
||||
verbalize/DGRSZ
|
||||
verbalized/U
|
||||
victimize/DGRSZ
|
||||
victimized/U
|
||||
victualer/S
|
||||
vigor/MS
|
||||
visualize/DGRSZ
|
||||
visualized/U
|
||||
visualizes/A
|
||||
weaseled
|
||||
weaseling
|
||||
womanize/DGRSZ
|
||||
womanized/U
|
||||
womanizes/U
|
||||
woolen/S
|
||||
wooly/PRS
|
||||
worshiped
|
||||
worshiper/MS
|
||||
worshiping
|
347
external/ispell/languages/english/american.1
vendored
Normal file
347
external/ispell/languages/english/american.1
vendored
Normal file
|
@ -0,0 +1,347 @@
|
|||
acclimatize/GRSZ
|
||||
acclimatizes/A
|
||||
actualize/DGS
|
||||
actualizes/A
|
||||
aggrandizement/MS
|
||||
airbrake/MS
|
||||
americanize/DGS
|
||||
amortization/MSU
|
||||
animized
|
||||
annualize/DGS
|
||||
anonymization
|
||||
Balkanization/MS
|
||||
biosynthesize/DGRS
|
||||
bureaucratization/MS
|
||||
caliper/S
|
||||
cancelate/D
|
||||
canonized/U
|
||||
cauterize/DGS
|
||||
caviler/S
|
||||
centerline/S
|
||||
cesium
|
||||
Christianizing
|
||||
civilizational/MS
|
||||
cognizable
|
||||
commercialization/MS
|
||||
communize/DGS
|
||||
computerization
|
||||
conditionalize/DGS
|
||||
conventionalized
|
||||
criminalize/DGS
|
||||
crystallite/S
|
||||
crystallization/AMS
|
||||
crystallographer/S
|
||||
crystallographic
|
||||
crystallography/M
|
||||
decentralizing
|
||||
decontextualization/M
|
||||
decontextualize/DGRS
|
||||
deemphasize/DGRSZ
|
||||
deglycerolized
|
||||
dehumanize/DGS
|
||||
demineralization/MS
|
||||
democratization/MS
|
||||
democratize/DGRS
|
||||
democratizes/U
|
||||
demonize/DGS
|
||||
demoralization/MS
|
||||
demythologization
|
||||
demythologize/DGRS
|
||||
depersonalization/MS
|
||||
depersonalized
|
||||
deputized
|
||||
destabilize/DGS
|
||||
destigmatization
|
||||
desynchronize/DGS
|
||||
detribalize/DGS
|
||||
diagonalizable
|
||||
dialyzed/U
|
||||
diarrhea/MS
|
||||
diarrheal
|
||||
dichotomization
|
||||
digitalization/MS
|
||||
digitization
|
||||
diopter/MS
|
||||
discolored/MPS
|
||||
discoloreds/U
|
||||
discolors
|
||||
disfavor/DGRSZ
|
||||
disfavorer/MS
|
||||
disheveled
|
||||
disincentivize/DGRS
|
||||
disorganization/MS
|
||||
disulfide
|
||||
doweling
|
||||
downdraft
|
||||
draftsperson/MS
|
||||
drafty/PRY
|
||||
dramatization/MS
|
||||
dramatize/DGRSZ
|
||||
duelist/S
|
||||
dynamized
|
||||
edema/MS
|
||||
edematous
|
||||
emphasize/ADGRSZ
|
||||
energized/U
|
||||
energizes
|
||||
enthrall/S
|
||||
epicenter/MS
|
||||
esthete/S
|
||||
eulogize/DGRSZ
|
||||
Europeanization/MS
|
||||
Europeanized
|
||||
exorcize/DGS
|
||||
extemporize/DGRSZ
|
||||
externalization/MS
|
||||
favoritism/MS
|
||||
federalize/DGS
|
||||
fetid/PY
|
||||
fetus/MS
|
||||
fiberboard
|
||||
fossilized/U
|
||||
fraternize/DGRSZ
|
||||
galvanization/AMS
|
||||
galvanize/DGRSZ
|
||||
galvanizes/A
|
||||
generalizable/MS
|
||||
germanized
|
||||
gimbaled
|
||||
glottalization
|
||||
glycerolized
|
||||
grueling/Y
|
||||
gynecological/MS
|
||||
gynecologist/MS
|
||||
harmonization/MS
|
||||
homeomorph
|
||||
homeopath
|
||||
homogenization/MS
|
||||
homogenize/DGRSZ
|
||||
honoree/MS
|
||||
hospitalization/MS
|
||||
humanize/DGRSZ
|
||||
humanizes/AI
|
||||
hydrolyzed/U
|
||||
hypnotize/DGRSZ
|
||||
hypnotizer/MS
|
||||
hypnotizes/U
|
||||
hypophysectomized
|
||||
idolize/DGRSZ
|
||||
immobilize/DGRS
|
||||
immortalized/U
|
||||
immunization/MS
|
||||
impersonalized
|
||||
incentivization/DGMS
|
||||
incentivize/DGRS
|
||||
industrialized/AU
|
||||
industrializing
|
||||
institutionalization/MS
|
||||
institutionalization's/A
|
||||
internationalization/MS
|
||||
internationalized
|
||||
ionize/DGJNRSXZ
|
||||
kinesthesis
|
||||
kinesthetic/S
|
||||
kinesthetically
|
||||
lackluster
|
||||
legitimize/DGRS
|
||||
libeler/S
|
||||
libelous/Y
|
||||
liberalization/MS
|
||||
lionize/DGRSZ
|
||||
magnetized/U
|
||||
maneuverability
|
||||
maneuverable
|
||||
marbleized
|
||||
marbleizing
|
||||
marginalize/DGS
|
||||
maximization/MS
|
||||
mazurka/MS
|
||||
memorialized/U
|
||||
mesmerized/U
|
||||
metabolized
|
||||
metalization/MS
|
||||
metropolitanization
|
||||
milliliter/MS
|
||||
mineralized/U
|
||||
misbehavior/MS
|
||||
mischaracterization/MS
|
||||
mischaracterize/DGS
|
||||
misdemeanor/MS
|
||||
mobilization/AMS
|
||||
mobilize/DGRS
|
||||
mobilizes/A
|
||||
modernization/MS
|
||||
monetization/M
|
||||
monetize/ADGS
|
||||
monopolization/MS
|
||||
monopolize/DGRSZ
|
||||
monopolized/U
|
||||
monopolizes/U
|
||||
multicolor/DMS
|
||||
narcotizes
|
||||
nasalization/MS
|
||||
nasalized
|
||||
naturalized/U
|
||||
neutralization/MS
|
||||
nominalized
|
||||
novelized
|
||||
ocher/MS
|
||||
operationalization/S
|
||||
operationalize/D
|
||||
orthogonalization/M
|
||||
orthogonalized
|
||||
orthopedic/S
|
||||
ostracized
|
||||
outmaneuver/DGS
|
||||
overemphasize/DGRSZ
|
||||
packetize/DGRSZ
|
||||
packetizer/MS
|
||||
palatalization
|
||||
palatalize/DGS
|
||||
palletized
|
||||
panelization
|
||||
panelized
|
||||
parenthesize/GS
|
||||
particularize/DGS
|
||||
pasteurization/S
|
||||
pedaled
|
||||
pedaling
|
||||
peptizing
|
||||
plagiarize/DGRSZ
|
||||
platinize/DGS
|
||||
plowshare/MS
|
||||
polarize/DGRSZ
|
||||
polarized/AU
|
||||
politicized
|
||||
polymerizations
|
||||
preprogram/S
|
||||
prioritization/M
|
||||
proletarianization
|
||||
proletarianized
|
||||
pronominalization
|
||||
pronominalize
|
||||
pummeled
|
||||
pyorrhea/MS
|
||||
pyrolyze/MRS
|
||||
radiopasteurization
|
||||
radiosterilization
|
||||
radiosterilized
|
||||
rancor/MS
|
||||
randomization/MS
|
||||
rationalization/MS
|
||||
realizability/MS
|
||||
reconceptualization
|
||||
recrystallize/GR
|
||||
regularizing
|
||||
reharmonization
|
||||
remonetization
|
||||
repopularize
|
||||
revitalization
|
||||
revitalize/DGRSZ
|
||||
ritualized
|
||||
romanticize/GS
|
||||
rubberized
|
||||
sanitization/M
|
||||
Sanskritize
|
||||
satirize/DGRSZ
|
||||
satirizes/U
|
||||
scandalized/U
|
||||
scandalizing
|
||||
sectionalized
|
||||
secularization/MS
|
||||
secularized/U
|
||||
sensationalize/DGS
|
||||
sensitized/U
|
||||
sentimentalize/DGRSZ
|
||||
sentimentalizes/U
|
||||
serializability/M
|
||||
serializable
|
||||
sexualized
|
||||
signalizes
|
||||
sniveled
|
||||
sniveler/S
|
||||
sniveling/S
|
||||
snowplow/MS
|
||||
socialization/MS
|
||||
stabilization/MS
|
||||
stigmatization/MS
|
||||
stigmatized/U
|
||||
stylization/MS
|
||||
subcategorizing
|
||||
subsidization/MS
|
||||
substerilization
|
||||
suburbanization/MS
|
||||
suburbanized
|
||||
suburbanizing
|
||||
sulfaquinoxaline
|
||||
sulfide
|
||||
sulfite
|
||||
sulfonamide/S
|
||||
sulfurous/PY
|
||||
swiveled
|
||||
swiveling
|
||||
synergize/DGS
|
||||
systematization/MS
|
||||
systemization/MS
|
||||
teaseled
|
||||
teaseling
|
||||
teetotaler
|
||||
temporize/DGJRSZ
|
||||
temporizer/MS
|
||||
temporizing/MSY
|
||||
temporizings/U
|
||||
theatergoer/MS
|
||||
theatergoing/MS
|
||||
thru
|
||||
tine's
|
||||
tinseled
|
||||
tinseling
|
||||
traditionalized
|
||||
travelog/MS
|
||||
trialization
|
||||
triangularization/S
|
||||
tricolor/DMS
|
||||
tyrannize/DGJRSZ
|
||||
tyrannizing/MSY
|
||||
uncauterized/MS
|
||||
underutilization/M
|
||||
underutilized
|
||||
undialyzed/MS
|
||||
undramatized/MS
|
||||
unenergized/MS
|
||||
uneulogized/MS
|
||||
unfossilized/MS
|
||||
unfraternizing/MS
|
||||
unhydrolyzed/MS
|
||||
unidolized/MS
|
||||
unindustrialized/MS
|
||||
unitized
|
||||
universalize/DGRSZ
|
||||
unmagnetized/MS
|
||||
unmemorialized/MS
|
||||
unmineralized/MS
|
||||
unmobilized/MS
|
||||
unpolarized/MS
|
||||
unpreemphasized
|
||||
unsavory/MPS
|
||||
unstigmatized/MS
|
||||
untrammeled
|
||||
unvocalized/MS
|
||||
unvulcanized/MS
|
||||
updraft/MS
|
||||
urbanization/MS
|
||||
urbanized
|
||||
vacuolization/MS
|
||||
vaporization/AMS
|
||||
varicolored/MS
|
||||
velarize/DGS
|
||||
visualization/AMS
|
||||
vocalization/MS
|
||||
vocalize/DGRSZ
|
||||
volatilization/MS
|
||||
vulcanized/U
|
||||
watercolor/DGMS
|
||||
watercolorist/S
|
||||
yodeled
|
||||
yodeler
|
||||
yodeling
|
2808
external/ispell/languages/english/american.2
vendored
Normal file
2808
external/ispell/languages/english/american.2
vendored
Normal file
File diff suppressed because it is too large
Load diff
696
external/ispell/languages/english/british.0
vendored
Normal file
696
external/ispell/languages/english/british.0
vendored
Normal file
|
@ -0,0 +1,696 @@
|
|||
abridgement
|
||||
acclimatisation/AMS
|
||||
acclimatised/U
|
||||
accoutrement/MS
|
||||
acknowledgement/AMS
|
||||
actualisation/AMS
|
||||
aerosolise/DGS
|
||||
aesthetic/MS
|
||||
aesthetically/U
|
||||
agonise/DGRSZ
|
||||
agonised/Y
|
||||
agonising/Y
|
||||
alphabetise/DGRSZ
|
||||
aluminium/MS
|
||||
amenorrhoea
|
||||
amortise/DGS
|
||||
amortised/U
|
||||
amphitheatre/MS
|
||||
anaemia/MS
|
||||
anaemic/S
|
||||
anaesthesia/MS
|
||||
anaesthetic/MS
|
||||
anaesthetically
|
||||
anaesthetise/DGRSZ
|
||||
analogue/MS
|
||||
analysable/U
|
||||
analyse/ADGRZ
|
||||
analysed/AU
|
||||
anodise/DGS
|
||||
anonymise/DGS
|
||||
antagonise/DGRSZ
|
||||
antagonised/U
|
||||
antagonising/U
|
||||
apologise/DGRSZ
|
||||
apologises/A
|
||||
apologising/U
|
||||
appal/S
|
||||
apparelled
|
||||
appetiser
|
||||
appetising/UY
|
||||
arbour/DMS
|
||||
archaise/DGRSZ
|
||||
ardour/MS
|
||||
arithmetise/DS
|
||||
armour/DGMRSZ
|
||||
armoured/U
|
||||
armourer/MS
|
||||
armoury/DMS
|
||||
atomisation/MS
|
||||
atomise/DGRSZ
|
||||
authorisation/AMS
|
||||
authorise/DGRSZ
|
||||
authorises/AU
|
||||
autodialler
|
||||
axiomatisation/MS
|
||||
axiomatise/DGS
|
||||
Balkanise/DGS
|
||||
baptise/DGRSZ
|
||||
baptised/U
|
||||
baptises/U
|
||||
barrelled
|
||||
barrelling
|
||||
bastardise/DGS
|
||||
bastardised/U
|
||||
bedevilled
|
||||
bedevilling
|
||||
behaviour/DMS
|
||||
behavioural/Y
|
||||
behaviourism/MS
|
||||
behaviouristic/S
|
||||
behove/DGJS
|
||||
behoving/MSY
|
||||
belabour/DGMS
|
||||
bevelled
|
||||
bevelling/S
|
||||
bowdlerise/DGRS
|
||||
brutalise/DGS
|
||||
brutalised/U
|
||||
brutalises/AU
|
||||
burglarise/DGS
|
||||
bushelled
|
||||
bushelling/S
|
||||
calibre/S
|
||||
canalled
|
||||
canalling
|
||||
cancelled/U
|
||||
canceller
|
||||
cancelling
|
||||
candour/MS
|
||||
cannibalise/DGS
|
||||
canonicalisation
|
||||
canonicalise/DGS
|
||||
capitalisation/AMS
|
||||
capitalise/DGRSZ
|
||||
capitalised/AU
|
||||
capitalises/A
|
||||
carbonisation/AMS
|
||||
carbonise/DGRSZ
|
||||
carboniser/AS
|
||||
carbonises/A
|
||||
catalogue/DGMRS
|
||||
categorisation/MS
|
||||
categorise/DGRSZ
|
||||
categorised/AU
|
||||
centimetre/MS
|
||||
centralisation/AMS
|
||||
centralise/DGRSZ
|
||||
centralises/A
|
||||
centre/DGJMRSZ
|
||||
centrepiece/MS
|
||||
channelled
|
||||
channeller/MS
|
||||
channelling
|
||||
characterisable/MS
|
||||
characterisation/MS
|
||||
characterise/DGRSZ
|
||||
characterised/U
|
||||
cheque/MRSZ
|
||||
chequebook/MS
|
||||
chequer/DS
|
||||
chiselled
|
||||
chiseller/S
|
||||
civilisation/AMS
|
||||
civilise/DGRSZ
|
||||
civilised/PU
|
||||
civilises/AU
|
||||
clamour/DGRSZ
|
||||
clamourer/MS
|
||||
cognisance/AI
|
||||
cognisant/I
|
||||
colonisation/AMS
|
||||
colonise/DGRSZ
|
||||
colonised/U
|
||||
colonises/AU
|
||||
colour/DGJMRSZ
|
||||
coloured/AU
|
||||
coloureds/U
|
||||
colourer/MS
|
||||
colourful/PY
|
||||
colourless/PY
|
||||
colours/A
|
||||
columnise/DGS
|
||||
compartmentalise/DGS
|
||||
computerise/DGS
|
||||
conceptualisation/MS
|
||||
conceptualise/DGRS
|
||||
conceptualising/A
|
||||
counselled
|
||||
counselling
|
||||
counsellor/MS
|
||||
criticise/DGRSZ
|
||||
criticised/U
|
||||
criticises/A
|
||||
criticising/UY
|
||||
criticisingly/S
|
||||
crystallise/DGRSZ
|
||||
crystallised/AU
|
||||
crystallises/A
|
||||
customisable
|
||||
customisation/MS
|
||||
customise/DGRSZ
|
||||
decentralisation/MS
|
||||
decentralised
|
||||
defence/DGMSV
|
||||
defenceless/PY
|
||||
defences/U
|
||||
demeanour/MS
|
||||
demoralise/DGRSZ
|
||||
demoralising/Y
|
||||
dialled/A
|
||||
dialler/AMS
|
||||
dialling/AS
|
||||
dichotomise/DGS
|
||||
digitise/DGRSZ
|
||||
digitiser/MS
|
||||
dishonour/DGRSZ
|
||||
dishonoured/U
|
||||
dishonourer/MS
|
||||
disorganised/U
|
||||
draught/MS
|
||||
draughtsman
|
||||
duelled
|
||||
dueller/S
|
||||
duelling/S
|
||||
economise/DGRSZ
|
||||
economising/U
|
||||
editorialise/DGRS
|
||||
enamelled
|
||||
enameller/S
|
||||
enamelling/S
|
||||
encyclopaedia/MS
|
||||
endeavour/DGMRSZ
|
||||
endeavoured/U
|
||||
endeavourer/MS
|
||||
enrol/S
|
||||
enrolment/MS
|
||||
epitomise/DGRSZ
|
||||
epitomised/U
|
||||
equalisation/MS
|
||||
equalise/DGJRSZ
|
||||
equalised/U
|
||||
equaliser/MS
|
||||
equalises/U
|
||||
equalled/U
|
||||
equalling
|
||||
eviller
|
||||
evillest
|
||||
factorisation/MS
|
||||
familiarisation/MS
|
||||
familiarise/DGRSZ
|
||||
familiarised/U
|
||||
familiarising/Y
|
||||
fantasise/DGRS
|
||||
favour/DGJRSZ
|
||||
favourable/PSU
|
||||
favourably/U
|
||||
favoured/MPSY
|
||||
favoured's/U
|
||||
favourer/MS
|
||||
favouring/MSY
|
||||
favourings/U
|
||||
favourite/MSU
|
||||
favours/A
|
||||
fertilisation/AMS
|
||||
fertilise/DGRSZ
|
||||
fertilised/U
|
||||
fertilises/A
|
||||
fervour/MS
|
||||
fibre/DMS
|
||||
fibreglass
|
||||
finalisation/S
|
||||
finalise/DGS
|
||||
flavour/DGJMRSZ
|
||||
flavoured/U
|
||||
flavourer/MS
|
||||
formalisation/MS
|
||||
formalise/DGRSZ
|
||||
formalised/U
|
||||
formalises/I
|
||||
fuelled/A
|
||||
fueller/S
|
||||
fuelling/A
|
||||
fulfil/S
|
||||
fulfilment/MS
|
||||
funnelled
|
||||
funnelling
|
||||
gaol
|
||||
generalisation/MS
|
||||
generalise/DGRSZ
|
||||
generalised/U
|
||||
glamorise/DGRSZ
|
||||
glamorised/U
|
||||
gospeller/S
|
||||
gramme/MS
|
||||
gravelled
|
||||
gravelling
|
||||
grovelled
|
||||
groveller/S
|
||||
grovelling/Y
|
||||
harbour/DGMRSZ
|
||||
harbourer/MS
|
||||
harmonise/DGRSZ
|
||||
harmonised/U
|
||||
harmonises/AU
|
||||
honour/DGRSZ
|
||||
honourable/MPS
|
||||
honourables/U
|
||||
honourably/SU
|
||||
honoured/U
|
||||
honourer/MS
|
||||
honours/A
|
||||
hospitalise/DGS
|
||||
humour/DGMRSZ
|
||||
humoured/U
|
||||
hypothesise/DGRSZ
|
||||
idealisation/MS
|
||||
idealise/DGRSZ
|
||||
idealised/U
|
||||
imperilled
|
||||
individualise/DGRSZ
|
||||
individualised/U
|
||||
individualises/U
|
||||
individualising/Y
|
||||
industrialisation/MS
|
||||
industrialisation's/A
|
||||
initialisation/MS
|
||||
initialise/DGRSZ
|
||||
initialised/AU
|
||||
initialiser/MS
|
||||
initialled
|
||||
initialler
|
||||
initialling
|
||||
institutionalise/DGS
|
||||
internalisation/MS
|
||||
internalise/DGS
|
||||
italicise/DGS
|
||||
italicised/U
|
||||
itemisation/MS
|
||||
itemise/DGRSZ
|
||||
itemised/U
|
||||
itemises/A
|
||||
jeopardise/DGS
|
||||
jewelled
|
||||
jeweller/S
|
||||
jewelling
|
||||
journalise/DGRSZ
|
||||
journalised/U
|
||||
judgement/MS
|
||||
kidnapped
|
||||
kidnapper/MS
|
||||
kidnapping/MS
|
||||
kilogramme/MS
|
||||
kilometre/MS
|
||||
labelled/AU
|
||||
labeller/MS
|
||||
labellers/A
|
||||
labelling/A
|
||||
labour/DGJRSZ
|
||||
laboured/MPY
|
||||
laboured's/U
|
||||
labourer/MS
|
||||
labouring/MSY
|
||||
labourings/U
|
||||
laurelled
|
||||
legalisation/MS
|
||||
legalise/DGS
|
||||
legalised/U
|
||||
levelled/U
|
||||
leveller/S
|
||||
levellest
|
||||
levelling/U
|
||||
liberalise/DGRSZ
|
||||
liberalised/U
|
||||
licence/MS
|
||||
linearisable
|
||||
linearise/DGNS
|
||||
litre/S
|
||||
localisation/MS
|
||||
localise/DGRSZ
|
||||
localised/U
|
||||
localises/U
|
||||
lustre/DGS
|
||||
magnetisation/AMS
|
||||
manoeuvre/DGRS
|
||||
marshalled
|
||||
marshaller
|
||||
marshalling
|
||||
marvelled
|
||||
marvelling
|
||||
marvellous/PY
|
||||
materialise/DGRSZ
|
||||
materialises/A
|
||||
maximise/DGRSZ
|
||||
mechanisation/MS
|
||||
mechanise/DGRSZ
|
||||
mechanised/U
|
||||
mechanises/U
|
||||
medalled
|
||||
medalling
|
||||
mediaeval/MSY
|
||||
memorisation/MS
|
||||
memorise/DGRSZ
|
||||
memorised/U
|
||||
memorises/A
|
||||
metalled
|
||||
metalling
|
||||
metallisation/MS
|
||||
metre/MS
|
||||
millimetre/MS
|
||||
miniaturisation/S
|
||||
miniaturise/DGS
|
||||
minimisation/MS
|
||||
minimise/DGRSZ
|
||||
minimised/U
|
||||
misjudgement/MS
|
||||
mitre/DGR
|
||||
modelled/A
|
||||
modeller/S
|
||||
modelling/S
|
||||
modernise/DGRSZ
|
||||
modernised/U
|
||||
modernises/U
|
||||
modularisation/M
|
||||
modularise/DGS
|
||||
motorise/DGS
|
||||
motorised/U
|
||||
moustache/DS
|
||||
multilevelled
|
||||
nationalisation/MS
|
||||
nationalise/ADGRSZ
|
||||
nationalised/AU
|
||||
naturalisation/MS
|
||||
neighbour/DGJMRSYZ
|
||||
neighboured/U
|
||||
neighbourer/MS
|
||||
neighbourhood/MS
|
||||
neighbourly/PU
|
||||
neutralise/DGRSZ
|
||||
neutralised/U
|
||||
nickelled
|
||||
nickelling
|
||||
normalisation/MS
|
||||
normalise/DGRSZ
|
||||
normalised/AU
|
||||
normalises/AU
|
||||
notarise/DGS
|
||||
nought/S
|
||||
odour/DMS
|
||||
offence/MS
|
||||
optimisation/MS
|
||||
optimise/DGRSZ
|
||||
optimised/U
|
||||
optimiser/MS
|
||||
optimises/U
|
||||
organisable/MSU
|
||||
organisation/AMS
|
||||
organisational/MSY
|
||||
organise/ADGRSZ
|
||||
organised/AU
|
||||
oxidise/DGJRSZ
|
||||
oxidised/U
|
||||
oxidises/A
|
||||
panelled
|
||||
panelling/S
|
||||
panellist/MS
|
||||
parallelisation/MS
|
||||
parallelise/DGRSZ
|
||||
parallelled/U
|
||||
parallelling
|
||||
paralyse/DGRSZ
|
||||
paralysed/Y
|
||||
paralysedly/S
|
||||
paralyser/MS
|
||||
paralysing/Y
|
||||
paralysingly/S
|
||||
parameterisable
|
||||
parameterisation/MS
|
||||
parameterise/DGS
|
||||
parameterised/U
|
||||
parametrisable
|
||||
parametrisation/MS
|
||||
parametrise/DGS
|
||||
parametrised/U
|
||||
parcelled/U
|
||||
parcelling
|
||||
parenthesised
|
||||
parlour/MS
|
||||
patronise/DGJRSZ
|
||||
patronised/U
|
||||
patronises/A
|
||||
patronising/MSY
|
||||
penalise/DGS
|
||||
penalised/U
|
||||
pencilled
|
||||
pencilling/S
|
||||
personalisation/MS
|
||||
personalise/DGS
|
||||
petalled
|
||||
philosophise/DGRSZ
|
||||
philosophised/U
|
||||
philosophises/U
|
||||
plough/DGRS
|
||||
ploughed/U
|
||||
ploughman
|
||||
pluralisation/MS
|
||||
pluralise/DGRSZ
|
||||
polarisation/MS
|
||||
polarisation's/A
|
||||
popularisation/MS
|
||||
popularise/DGRSZ
|
||||
popularises/U
|
||||
practise/DGRS
|
||||
practised/U
|
||||
preinitialise/DGS
|
||||
pressurise/DGRSZ
|
||||
pretence/NSVX
|
||||
prioritise/DGJRSZ
|
||||
productise/DGRSZ
|
||||
programme/MS
|
||||
programmes/A
|
||||
proselytise/DGRSZ
|
||||
publicise/DGS
|
||||
pulverise/DGRSZ
|
||||
pulverised/U
|
||||
pulverises/AU
|
||||
pyjama/S
|
||||
quantisation/MS
|
||||
quantise/DGRSZ
|
||||
quantiser/MS
|
||||
quarrelled
|
||||
quarreller/S
|
||||
quarrelling
|
||||
queueing
|
||||
randomise/DGRS
|
||||
rationalise/DGRSZ
|
||||
realisable/MPS
|
||||
realisables/U
|
||||
realisably/S
|
||||
realisation/MS
|
||||
realise/DGJRSZ
|
||||
realised/U
|
||||
realising/MSY
|
||||
recognisability
|
||||
recognisable/U
|
||||
recognisably
|
||||
recognise/DGRSZ
|
||||
recognised/Y
|
||||
recognisedly/S
|
||||
recognising/UY
|
||||
recognisingly/S
|
||||
reinitialise/DGS
|
||||
relabeller/S
|
||||
remodelling
|
||||
reorganised/U
|
||||
reprogramme/S
|
||||
revelled
|
||||
reveller/S
|
||||
revelling/S
|
||||
revolutionise/DGRSZ
|
||||
rigour/MS
|
||||
rivalled/U
|
||||
rivalling
|
||||
rouble/MS
|
||||
routeing
|
||||
rumour/DGMRSZ
|
||||
rumoured/U
|
||||
rumourer/MS
|
||||
sabre/DGMS
|
||||
sabred/U
|
||||
sanitise/DGRS
|
||||
saviour/MS
|
||||
savour/DGRSZ
|
||||
savourer/MS
|
||||
savourily/SU
|
||||
savouring/Y
|
||||
savouringly/S
|
||||
savoury/MPRSTY
|
||||
sceptre/DGMS
|
||||
sceptred/U
|
||||
sceptres/U
|
||||
scrutinise/DGRSZ
|
||||
scrutinised/U
|
||||
scrutinising/UY
|
||||
scrutinisingly/S
|
||||
sepulchre/DMS
|
||||
sepulchred/U
|
||||
sepulchres/AU
|
||||
sequentialise/DGS
|
||||
serialisation/MS
|
||||
serialise/DGRSZ
|
||||
serialiser/MS
|
||||
shovelled
|
||||
shoveller/S
|
||||
shovelling
|
||||
shrivelled
|
||||
shrivelling
|
||||
signalled
|
||||
signaller/S
|
||||
signalling
|
||||
socialise/DGRS
|
||||
socialised/U
|
||||
specialisation/MS
|
||||
specialise/DGRSZ
|
||||
specialised/U
|
||||
specialising/U
|
||||
speciality/MS
|
||||
spectre/DMS
|
||||
spiralled
|
||||
spiralling
|
||||
splendour/MS
|
||||
squirrelled
|
||||
squirrelling
|
||||
stabilise/DGRSZ
|
||||
standardisation/AMS
|
||||
standardise/DGRSZ
|
||||
standardised/U
|
||||
standardises/A
|
||||
stencilled
|
||||
stenciller/S
|
||||
stencilling
|
||||
sterilisation/MS
|
||||
sterilise/DGRSZ
|
||||
sterilised/U
|
||||
sterilises/A
|
||||
stylised
|
||||
subsidise/DGRSZ
|
||||
subsidised/U
|
||||
succour/DGRSZ
|
||||
succoured/U
|
||||
succourer/MS
|
||||
sulphate/DGS
|
||||
sulphured
|
||||
sulphuric
|
||||
sulphuring
|
||||
summarisation/MS
|
||||
summarise/DGRSZ
|
||||
summarised/U
|
||||
symbolisation/AMS
|
||||
symbolise/DGRSZ
|
||||
symbolised/U
|
||||
symbolises/A
|
||||
symbolled
|
||||
symbolling
|
||||
sympathise/DGJRSZ
|
||||
sympathised/U
|
||||
sympathising/MSUY
|
||||
synchronisation/MS
|
||||
synchronisations/A
|
||||
synchronise/DGRSZ
|
||||
synchronised/AU
|
||||
synchroniser/MS
|
||||
synchronises/A
|
||||
synthesise/DGRSZ
|
||||
synthesised/U
|
||||
synthesises/A
|
||||
syphon/DGMS
|
||||
syphons/U
|
||||
systematise/DGRSZ
|
||||
systematised/U
|
||||
systematising/U
|
||||
tantalise/DGRSZ
|
||||
tantalised/U
|
||||
tantalising/PY
|
||||
tantalisingly/S
|
||||
tantalisingness/S
|
||||
terrorise/DGRSZ
|
||||
terrorised/U
|
||||
theatre/MS
|
||||
theorisation/MS
|
||||
theorise/DGRSZ
|
||||
titre/S
|
||||
totalled
|
||||
totaller/MS
|
||||
totalling
|
||||
towelled
|
||||
towelling/S
|
||||
tranquillise/ADGJRSZ
|
||||
tranquillised/AU
|
||||
tranquilliser/AMS
|
||||
tranquillising/AMSY
|
||||
tranquillity
|
||||
transistorise/DGS
|
||||
travelled
|
||||
traveller/MS
|
||||
travelling/S
|
||||
trivialise/DGS
|
||||
troweller/S
|
||||
tumour/DMS
|
||||
tunnelled
|
||||
tunneller/S
|
||||
tunnelling/S
|
||||
tyre/MS
|
||||
unauthorised/PY
|
||||
uncivilised/PY
|
||||
uncoloured/PSY
|
||||
unfavoured/M
|
||||
unionisation
|
||||
unionise/DGRSZ
|
||||
unlaboured/M
|
||||
unpatronising/MY
|
||||
unravelled
|
||||
unravelling
|
||||
unrecognised
|
||||
unsavoured/PY
|
||||
unsystematised/Y
|
||||
utilisation/A
|
||||
utilise/DGRSZ
|
||||
utilises/A
|
||||
valour/MS
|
||||
vandalise/DGS
|
||||
vapour/DGJMRSZ
|
||||
vapouring/SY
|
||||
vectorisation
|
||||
vectorising
|
||||
verbalise/DGRSZ
|
||||
verbalised/U
|
||||
victimise/DGRSZ
|
||||
victimised/U
|
||||
victualler/S
|
||||
vigour/MS
|
||||
visualise/DGRSZ
|
||||
visualised/U
|
||||
visualises/A
|
||||
waggon/MRSZ
|
||||
waggoner/MS
|
||||
weaselled
|
||||
weaselling
|
||||
whisky/MS
|
||||
womanise/DGRSZ
|
||||
womanised/U
|
||||
womanises/U
|
||||
woollen/S
|
||||
woolly/PRS
|
||||
worshipped
|
||||
worshipper/MS
|
||||
worshipping
|
354
external/ispell/languages/english/british.1
vendored
Normal file
354
external/ispell/languages/english/british.1
vendored
Normal file
|
@ -0,0 +1,354 @@
|
|||
acclimatise/GRSZ
|
||||
acclimatises/A
|
||||
actualise/DGS
|
||||
actualises/A
|
||||
aerobrake/MS
|
||||
aesthete/S
|
||||
aggrandisement/MS
|
||||
americanise/DGS
|
||||
amortisation/MSU
|
||||
animised
|
||||
annualise/DGS
|
||||
anonymisation/M
|
||||
arsehole/MS
|
||||
Balkanisation/MS
|
||||
biosynthesise/DGRS
|
||||
bureaucratisation/MS
|
||||
caesium
|
||||
calliper/S
|
||||
cancellate/D
|
||||
canonised/U
|
||||
cauterise/DGS
|
||||
caviller/S
|
||||
centreline/S
|
||||
Christianising
|
||||
civilisational/MS
|
||||
cognisable
|
||||
commercialisation/MS
|
||||
communise/DGS
|
||||
computerisation
|
||||
conditionalise/DGS
|
||||
conventionalised
|
||||
criminalise/DGS
|
||||
crystalise/DGS
|
||||
crystalite/S
|
||||
crystallisation/AMS
|
||||
crystalographer/S
|
||||
crystalographic
|
||||
crystalography/M
|
||||
decentralising
|
||||
decontextualisation/M
|
||||
decontextualise/DGRS
|
||||
deemphasise/DGRSZ
|
||||
deglycerolised
|
||||
dehumanise/DGS
|
||||
demineralisation/MS
|
||||
democratisation/MS
|
||||
democratise/DGRS
|
||||
democratises/U
|
||||
demonise/DGS
|
||||
demoralisation/MS
|
||||
demythologisation
|
||||
demythologise/DGRS
|
||||
depersonalisation/MS
|
||||
depersonalised
|
||||
deputised
|
||||
destabilise/DGS
|
||||
destigmatisation
|
||||
desynchronise/DGS
|
||||
detribalise/DGS
|
||||
diagonalisable
|
||||
dialysed/U
|
||||
diarrhoea/MS
|
||||
diarrhoeal
|
||||
dichotomisation
|
||||
digitalisation/MS
|
||||
digitisation
|
||||
dioptre/MS
|
||||
discoloured/MPS
|
||||
discoloureds/U
|
||||
discolours
|
||||
disfavour/DGRSZ
|
||||
disfavourer/MS
|
||||
dishevelled
|
||||
disincentivise/DGRS
|
||||
dislodgement
|
||||
disorganisation/MS
|
||||
disulphide
|
||||
dowelling
|
||||
downdraught
|
||||
dramatisation/MS
|
||||
dramatise/DGRSZ
|
||||
draughtsperson/MS
|
||||
draughty/PRY
|
||||
duellist/S
|
||||
dynamised
|
||||
emphasise/ADGRSZ
|
||||
energised/U
|
||||
energises
|
||||
enthral/S
|
||||
epicentre/MS
|
||||
eulogise/DGRSZ
|
||||
Europeanisation/MS
|
||||
Europeanised
|
||||
exorcise/DGS
|
||||
extemporise/DGRSZ
|
||||
externalisation/MS
|
||||
favouritism/MS
|
||||
federalise/DGS
|
||||
fibreboard
|
||||
foetid/PY
|
||||
foetus/MS
|
||||
fossilised/U
|
||||
fraternise/DGRSZ
|
||||
galvanisation/AMS
|
||||
galvanise/DGRSZ
|
||||
galvanises/A
|
||||
generalisable/MS
|
||||
germanised
|
||||
gimballed
|
||||
glottalisation
|
||||
glycerolised
|
||||
gruelling/Y
|
||||
gynaecological/MS
|
||||
gynaecologist/MS
|
||||
harmonisation/MS
|
||||
homoeomorph
|
||||
homoeopath
|
||||
homogenisation/MS
|
||||
homogenise/DGRSZ
|
||||
honouree/MS
|
||||
hospitalisation/MS
|
||||
humanise/DGRSZ
|
||||
humanises/AI
|
||||
hydrolysed/U
|
||||
hypnotise/DGRSZ
|
||||
hypnotiser/MS
|
||||
hypnotises/U
|
||||
hypophysectomised
|
||||
idolise/DGRSZ
|
||||
immobilise/DGRS
|
||||
immortalised/U
|
||||
immunisation/MS
|
||||
impersonalised
|
||||
incentivisation/DGMS
|
||||
incentivise/DGRS
|
||||
industrialised/AU
|
||||
industrialising
|
||||
institutionalisation/MS
|
||||
institutionalisation's/A
|
||||
internationalisation/MS
|
||||
internationalised
|
||||
ionise/DGJNRSXZ
|
||||
kinaesthesis
|
||||
kinaesthetic/S
|
||||
kinaesthetically
|
||||
lacklustre
|
||||
learnt/U
|
||||
legitimise/DGRS
|
||||
libeller/S
|
||||
libellous/Y
|
||||
liberalisation/MS
|
||||
lionise/DGRSZ
|
||||
lodgement
|
||||
magnetised/U
|
||||
manoeuvrability
|
||||
manoeuvrable
|
||||
marbleised
|
||||
marbleising
|
||||
marginalise/DGS
|
||||
maximisation/MS
|
||||
mazourka/MS
|
||||
mediaevalist/MS
|
||||
memorialised/U
|
||||
mesmerised/U
|
||||
metabolised
|
||||
metropolitanisation
|
||||
milligramme/MS
|
||||
millilitre/MS
|
||||
mineralised/U
|
||||
misbehaviour/MS
|
||||
mischaracterisation/MS
|
||||
mischaracterise/DGS
|
||||
misdemeanour/MS
|
||||
misrouteing
|
||||
mobilisation/AMS
|
||||
mobilise/DGRS
|
||||
mobilises/A
|
||||
modernisation/MS
|
||||
monetisation/M
|
||||
monetise/ADGS
|
||||
monopolisation/MS
|
||||
monopolise/DGRSZ
|
||||
monopolised/U
|
||||
monopolises/U
|
||||
multicolour/DMS
|
||||
narcotises
|
||||
nasalisation/MS
|
||||
nasalised
|
||||
naturalised/U
|
||||
neutralisation/MS
|
||||
nominalised
|
||||
novelised
|
||||
ochre/MS
|
||||
oedema/MS
|
||||
oedematous
|
||||
operationalisation/S
|
||||
operationalise/D
|
||||
orthogonalisation/M
|
||||
orthogonalised
|
||||
orthopaedic/S
|
||||
ostracised
|
||||
outmanoeuvre/DGS
|
||||
overemphasise/DGRSZ
|
||||
packetisation
|
||||
packetise/DGRSZ
|
||||
packetiser/MS
|
||||
palatalisation
|
||||
palatalise/DGS
|
||||
palletised
|
||||
panelisation
|
||||
panelised
|
||||
parenthesise/GS
|
||||
particularise/DGS
|
||||
pasteurisation/S
|
||||
pedalled
|
||||
pedalling
|
||||
peptising
|
||||
plagiarise/DGRSZ
|
||||
platinise/DGS
|
||||
ploughshare/MS
|
||||
polarise/DGRSZ
|
||||
polarised/AU
|
||||
politicised
|
||||
polymerisations
|
||||
preprogramme/S
|
||||
prioritisation/M
|
||||
proletarianisation
|
||||
proletarianised
|
||||
pronominalisation
|
||||
pronominalise
|
||||
pummelled
|
||||
pyorrhoea/MS
|
||||
pyrolyse/MRS
|
||||
radiopasteurisation
|
||||
radiosterilisation
|
||||
radiosterilised
|
||||
rancour/MS
|
||||
randomisation/MS
|
||||
rationalisation/MS
|
||||
realisability/MS
|
||||
reconceptualisation
|
||||
recrystallise/G
|
||||
regularising
|
||||
reharmonisation
|
||||
remonetisation
|
||||
repopularise
|
||||
revitalisation
|
||||
revitalise/DGRSZ
|
||||
ritualised
|
||||
romanticise/GS
|
||||
rubberised
|
||||
sanitisation/M
|
||||
Sanskritise
|
||||
satirise/DGRSZ
|
||||
satirises/U
|
||||
scandalised/U
|
||||
scandalising
|
||||
sectionalised
|
||||
secularisation/MS
|
||||
secularised/U
|
||||
sensationalise/DGS
|
||||
sensitised/U
|
||||
sentimentalise/DGRSZ
|
||||
sentimentalises/U
|
||||
serialisability/M
|
||||
serialisable
|
||||
sexualised
|
||||
signalises
|
||||
snivelled
|
||||
sniveller/S
|
||||
snivelling/S
|
||||
snowplough/MS
|
||||
socialisation/MS
|
||||
stabilisation/MS
|
||||
stigmatisation/MS
|
||||
stigmatised/U
|
||||
stylisation/MS
|
||||
subcategorising
|
||||
subsidisation/MS
|
||||
substerilisation
|
||||
suburbanisation/MS
|
||||
suburbanised
|
||||
suburbanising
|
||||
sulphaquinoxaline
|
||||
sulphide
|
||||
sulphite
|
||||
sulphonamide/S
|
||||
sulphurous/PY
|
||||
swivelled
|
||||
swivelling
|
||||
synergise/DGS
|
||||
systematisation/MS
|
||||
systemisation/MS
|
||||
teaselled
|
||||
teaselling
|
||||
teetotaller
|
||||
temporise/DGJRSZ
|
||||
temporiser/MS
|
||||
temporising/MSY
|
||||
temporisings/U
|
||||
theatregoer/MS
|
||||
theatregoing
|
||||
tinselled
|
||||
tinselling
|
||||
traditionalised
|
||||
travelogue/MS
|
||||
trialisation
|
||||
triangularisation/S
|
||||
tricolour/DMS
|
||||
tyrannise/DGJRSZ
|
||||
tyrannising/MSY
|
||||
uncauterised/MS
|
||||
underutilisation/M
|
||||
underutilised
|
||||
undialysed/MS
|
||||
undramatised/MS
|
||||
unenergised/MS
|
||||
uneulogised/MS
|
||||
unfossilised/MS
|
||||
unfraternising/MS
|
||||
unhydrolysed/MS
|
||||
unidolised/MS
|
||||
unindustrialised/MS
|
||||
unitised
|
||||
universalise/DGRSZ
|
||||
unmagnetised/MS
|
||||
unmemorialised/MS
|
||||
unmineralised/MS
|
||||
unmobilised/MS
|
||||
unpolarised/MS
|
||||
unpreemphasised
|
||||
unsavoury/MPS
|
||||
unstigmatised/MS
|
||||
untrammelled
|
||||
unvocalised/MS
|
||||
unvulcanised/MS
|
||||
updraught/MS
|
||||
urbanisation/MS
|
||||
urbanised
|
||||
vacuolisation/MS
|
||||
vaporisation/AMS
|
||||
varicoloured/MS
|
||||
velarise/DGS
|
||||
visualisation/AMS
|
||||
vocalisation/MS
|
||||
vocalise/DGRSZ
|
||||
volatilisation/MS
|
||||
vulcanised/U
|
||||
waggoneer
|
||||
watercolour/DGMS
|
||||
watercolourist/S
|
||||
yodelled
|
||||
yodeller
|
||||
yodelling
|
2842
external/ispell/languages/english/british.2
vendored
Normal file
2842
external/ispell/languages/english/british.2
vendored
Normal file
File diff suppressed because it is too large
Load diff
16644
external/ispell/languages/english/english.0
vendored
Normal file
16644
external/ispell/languages/english/english.0
vendored
Normal file
File diff suppressed because it is too large
Load diff
14973
external/ispell/languages/english/english.1
vendored
Normal file
14973
external/ispell/languages/english/english.1
vendored
Normal file
File diff suppressed because it is too large
Load diff
33856
external/ispell/languages/english/english.2
vendored
Normal file
33856
external/ispell/languages/english/english.2
vendored
Normal file
File diff suppressed because it is too large
Load diff
18605
external/ispell/languages/english/english.3
vendored
Normal file
18605
external/ispell/languages/english/english.3
vendored
Normal file
File diff suppressed because it is too large
Load diff
612
external/ispell/languages/english/english.aff
vendored
Normal file
612
external/ispell/languages/english/english.aff
vendored
Normal file
|
@ -0,0 +1,612 @@
|
|||
#
|
||||
# $Id: english.aff,v 1.26 2020-12-30 22:20:19-08 geoff Exp $
|
||||
#
|
||||
# Copyright 1992, 1993, 1999, 2000, 2001, 2005, Geoff Kuenning, Claremont, CA
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Affix table for English
|
||||
#
|
||||
|
||||
nroffchars ().\\*
|
||||
texchars ()\[]{}<\>\\$*.%
|
||||
|
||||
# First we declare the character set. Since it's English, it would be
|
||||
# easy, except that English likes to borrow accents (notably
|
||||
# acute/grave) from other languages. To be safe, we'll declare a majority
|
||||
# of ISO Latin-1. However, we do not declare the German "eszett"
|
||||
# (sharp S) in capitalized form, because ispell can't handle a capital
|
||||
# letter that has a different length than a lowercase one (the capital
|
||||
# sharp s was only added to German orthography in 2017).
|
||||
#
|
||||
# In keeping with the march of progress, UTF-8 is the default
|
||||
# encoding. This helps us avoid some of the more obviously difficult
|
||||
# problems involving encoding acute and grave accents as apostrophes.
|
||||
#
|
||||
# We also declare the apostrophe, so that possessives can
|
||||
# be handled. We declare it as a boundary character, so that quoting with
|
||||
# single quotes doesn't confuse things. The apostrophe is the only
|
||||
# character that gets such treatment.
|
||||
#
|
||||
# We declare the apostrophe first so that "Jon's" collates before "Jonas".
|
||||
# (This is the way ASCII does it).
|
||||
|
||||
#
|
||||
# UTF-8
|
||||
#
|
||||
defstringtype "utf8" "nroff" ".txt"
|
||||
|
||||
options raw_display squeeze_strings
|
||||
|
||||
boundarychars '
|
||||
|
||||
wordchars a A
|
||||
stringchar \xC3\xA0 \xC3\x80 # àÀ Latin letter A with grave
|
||||
stringchar \xC3\xA1 \xC3\x81 # áÁ Latin letter A with acute
|
||||
stringchar \xC3\xA2 \xC3\x82 # â Latin letter A with circumflex
|
||||
stringchar \xC3\xA3 \xC3\x83 # ãà Latin letter A with tilde
|
||||
stringchar \xC3\xA4 \xC3\x84 # äÄ Latin letter A with diaeresis
|
||||
stringchar \xC3\xA5 \xC3\x85 # åÅ Latin letter A with ring above
|
||||
stringchar \xC3\xA6 \xC3\x86 # æÆ Latin letter AE
|
||||
wordchars [bc] [BC]
|
||||
stringchar \xC3\xA7 \xC3\x87 # çÇ Latin letter C with cedilla
|
||||
wordchars [de] [DE]
|
||||
stringchar \xC3\xA8 \xC3\x88 # èÈ Latin letter E with grave
|
||||
stringchar \xC3\xA9 \xC3\x89 # éÉ Latin letter E with acute
|
||||
stringchar \xC3\xAA \xC3\x8A # êÊ Latin letter E with circumflex
|
||||
stringchar \xC3\xAB \xC3\x8B # ëË Latin letter E with diaeresis
|
||||
wordchars [f-i] [F-I]
|
||||
stringchar \xC3\xAC \xC3\x8C # ìÌ Latin letter I with grave
|
||||
stringchar \xC3\xAD \xC3\x8D # íÍ Latin letter I with acute
|
||||
stringchar \xC3\xAE \xC3\x8E # îÎ Latin letter I with circumflex
|
||||
stringchar \xC3\xAF \xC3\x8F # ïÏ Latin letter I with diaeresis
|
||||
stringchar \xC3\xB0 \xC3\x90 # ðÐ Latin letter eth
|
||||
wordchars [j-n] [J-N]
|
||||
stringchar \xC3\xB1 \xC3\x91 # ñÑ Latin letter N with tilde
|
||||
wordchars o O
|
||||
stringchar \xC3\xB2 \xC3\x92 # òÒ Latin letter O with grave
|
||||
stringchar \xC3\xB3 \xC3\x93 # óÓ Latin letter O with acute
|
||||
stringchar \xC3\xB4 \xC3\x94 # ôÔ Latin letter O with circumflex
|
||||
stringchar \xC3\xB5 \xC3\x95 # õÕ Latin letter O with tilde
|
||||
stringchar \xC3\xB6 \xC3\x96 # öÖ Latin letter O with diaeresis
|
||||
stringchar \xC3\xB8 \xC3\x98 # øØ Latin letter O with stroke
|
||||
wordchars [p-s] [P-S]
|
||||
# See comments about eszett above
|
||||
# stringchar \xC3\x9F SS # ß Latin small letter sharp s
|
||||
# stringchar \xC3\x9F \xE1\xBA\x9E # ß Latin letter sharp S
|
||||
stringchar \xC3\x9F # ß Latin letter sharp S
|
||||
wordchars [tu] [TU]
|
||||
stringchar \xC3\xB9 \xC3\x99 # ùÙ Latin letter U with grave
|
||||
stringchar \xC3\xBA \xC3\x9A # úÚ Latin letter U with acute
|
||||
stringchar \xC3\xBB \xC3\x9B # ûÛ Latin letter U with circumflex
|
||||
stringchar \xC3\xBC \xC3\x9C # üÜ Latin letter U with diaeresis
|
||||
wordchars [v-y] [V-Y]
|
||||
stringchar \xC3\xBD \xC3\x9D # ýÝ Latin letter Y with acute
|
||||
stringchar \xC3\xBF \xC5\xB8 # ÿŸ Latin letter Y with diaeresis
|
||||
wordchars z Z
|
||||
stringchar \xC3\xBE \xC3\x9E # þÞ Latin letter Thorn
|
||||
|
||||
altstringtype "latin1" "nroff" ".list" ".txt"
|
||||
|
||||
altstringchar \xE0 \xC3\xA0 # à Latin letter a with grave
|
||||
altstringchar \xC0 \xC3\x80 # À Latin letter A with grave
|
||||
altstringchar \xE1 \xC3\xA1 # á Latin letter a with acute
|
||||
altstringchar \xC1 \xC3\x81 # Á Latin letter A with acute
|
||||
altstringchar \xE2 \xC3\xA2 # â Latin letter a with circumflex
|
||||
altstringchar \xC2 \xC3\x82 # Â Latin letter A with circumflex
|
||||
altstringchar \xE3 \xC3\xA3 # ã Latin letter a with tilde
|
||||
altstringchar \xC3 \xC3\x83 # Ã Latin letter A with tilde
|
||||
altstringchar \xE4 \xC3\xA4 # ä Latin letter a with diaeresis
|
||||
altstringchar \xC4 \xC3\x84 # Ä Latin letter A with diaeresis
|
||||
altstringchar \xE5 \xC3\xA5 # å Latin letter a with ring above
|
||||
altstringchar \xC5 \xC3\x85 # Å Latin letter A with ring above
|
||||
altstringchar \xE6 \xC3\xA6 # æ Latin letter ae
|
||||
altstringchar \xC6 \xC3\x86 # Æ Latin letter AE
|
||||
altstringchar \xE7 \xC3\xA7 # ç Latin letter c with cedilla
|
||||
altstringchar \xC7 \xC3\x87 # Ç Latin letter C with cedilla
|
||||
altstringchar \xE8 \xC3\xA8 # è Latin letter e with grave
|
||||
altstringchar \xC8 \xC3\x88 # È Latin letter E with grave
|
||||
altstringchar \xE9 \xC3\xA9 # é Latin letter e with acute
|
||||
altstringchar \xC9 \xC3\x89 # É Latin letter E with acute
|
||||
altstringchar \xEA \xC3\xAA # ê Latin letter e with circumflex
|
||||
altstringchar \xCA \xC3\x8A # Ê Latin letter E with circumflex
|
||||
altstringchar \xEB \xC3\xAB # ë Latin letter e with diaeresis
|
||||
altstringchar \xCB \xC3\x8B # Ë Latin letter E with diaeresis
|
||||
altstringchar \xEC \xC3\xAC # ì Latin letter i with grave
|
||||
altstringchar \xCC \xC3\x8C # Ì Latin letter I with grave
|
||||
altstringchar \xED \xC3\xAD # í Latin letter i with acute
|
||||
altstringchar \xCD \xC3\x8D # Í Latin letter I with acute
|
||||
altstringchar \xEE \xC3\xAE # î Latin letter i with circumflex
|
||||
altstringchar \xCE \xC3\x8E # Î Latin letter I with circumflex
|
||||
altstringchar \xEF \xC3\xAF # ï Latin letter i with diaeresis
|
||||
altstringchar \xCF \xC3\x8F # Ï Latin letter I with diaeresis
|
||||
altstringchar \xF0 \xC3\xB0 # ð Latin letter eth
|
||||
altstringchar \xD0 \xC3\x90 # Ð Latin letter Eth
|
||||
altstringchar \xF1 \xC3\xB1 # ñ Latin letter n with tilde
|
||||
altstringchar \xD1 \xC3\x91 # Ñ Latin letter N with tilde
|
||||
altstringchar \xF2 \xC3\xB2 # ò Latin letter o with grave
|
||||
altstringchar \xD2 \xC3\x92 # Ò Latin letter O with grave
|
||||
altstringchar \xF3 \xC3\xB3 # ó Latin letter o with acute
|
||||
altstringchar \xD3 \xC3\x93 # Ó Latin letter O with acute
|
||||
altstringchar \xF4 \xC3\xB4 # ô Latin letter o with circumflex
|
||||
altstringchar \xD4 \xC3\x94 # Ô Latin letter O with circumflex
|
||||
altstringchar \xF5 \xC3\xB5 # õ Latin letter o with tilde
|
||||
altstringchar \xD5 \xC3\x95 # Õ Latin letter O with tilde
|
||||
altstringchar \xF6 \xC3\xB6 # ö Latin letter o with diaeresis
|
||||
altstringchar \xD6 \xC3\x96 # Ö Latin letter O with diaeresis
|
||||
altstringchar \xF8 \xC3\xB8 # ø Latin letter o with stroke
|
||||
altstringchar \xD8 \xC3\x98 # Ø Latin letter O with stroke
|
||||
altstringchar \xDF \xC3\x9F # ß Latin small letter sharp s
|
||||
altstringchar \xF9 \xC3\xB9 # ù Latin letter u with grave
|
||||
altstringchar \xD9 \xC3\x99 # Ù Latin letter U with grave
|
||||
altstringchar \xFA \xC3\xBA # ú Latin letter u with acute
|
||||
altstringchar \xDA \xC3\x9A # Ú Latin letter U with acute
|
||||
altstringchar \xFB \xC3\xBB # û Latin letter u with circumflex
|
||||
altstringchar \xDB \xC3\x9B # Û Latin letter U with circumflex
|
||||
altstringchar \xFC \xC3\xBC # ü Latin letter u with diaeresis
|
||||
altstringchar \xDC \xC3\x9C # Ü Latin letter U with diaeresis
|
||||
altstringchar \xFD \xC3\xBD # ý Latin letter y with acute
|
||||
altstringchar \xDD \xC3\x9D # Ý Latin letter Y with acute
|
||||
altstringchar \xFF \xC3\xBF # ÿ Latin letter y with diaeresis
|
||||
altstringchar Y \xC5\xB8 # Ÿ Latin letter Y with diaeresis
|
||||
altstringchar \xFE \xC3\xBE # þ latin letter thorn
|
||||
altstringchar \xDE \xC3\x9E # Þ Latin letter Thorn
|
||||
|
||||
#
|
||||
# TeX/LaTeX
|
||||
#
|
||||
altstringtype "tex" "TeX" ".tex" ".bib"
|
||||
|
||||
altstringchar \\`a \xC3\xA0
|
||||
altstringchar \\`A \xC3\x80 # àÀ Latin letter A with grave
|
||||
altstringchar \\'a \xC3\xA1
|
||||
altstringchar \\'A \xC3\x81 # áÁ Latin letter A with acute
|
||||
altstringchar \\^a \xC3\xA2
|
||||
altstringchar \\^A \xC3\x82 # â Latin letter A with circumflex
|
||||
altstringchar \\~a \xC3\xA3
|
||||
altstringchar \\~A \xC3\x83 # ãà Latin letter A with tilde
|
||||
altstringchar \\\"a \xC3\xA4
|
||||
altstringchar \\\"A \xC3\x84 # äÄ Latin letter A with diaeresis
|
||||
altstringchar {\\aa} \xC3\xA5
|
||||
altstringchar {\\AA} \xC3\x85 # åÅ Latin letter A with ring above
|
||||
altstringchar {\\ae} \xC3\xA6
|
||||
altstringchar {\\AE} \xC3\x86 # æÆ Latin letter AE
|
||||
altstringchar \\c{c} \xC3\xA7
|
||||
altstringchar \\c{C} \xC3\x87 # çÇ Latin letter C with cedilla
|
||||
altstringchar \\`e \xC3\xA8
|
||||
altstringchar \\`E \xC3\x88 # èÈ Latin letter E with grave
|
||||
altstringchar \\'e \xC3\xA9
|
||||
altstringchar \\'E \xC3\x89 # éÉ Latin letter E with acute
|
||||
altstringchar \\^e \xC3\xAA
|
||||
altstringchar \\^E \xC3\x8A # êÊ Latin letter E with circumflex
|
||||
altstringchar \\\"e \xC3\xAB
|
||||
altstringchar \\\"E \xC3\x8B # ëË Latin letter E with diaeresis
|
||||
altstringchar \\`{\\i} \xC3\xAC
|
||||
altstringchar \\`I \xC3\x8C # ìÌ Latin letter I with grave
|
||||
altstringchar \\'{\\i} \xC3\xAD
|
||||
altstringchar \\'I \xC3\x8D # íÍ Latin letter I with acute
|
||||
altstringchar \\^{\\i} \xC3\xAE
|
||||
altstringchar \\^I \xC3\x8E # îÎ Latin letter I with circumflex
|
||||
altstringchar \\\"{\\i} \xC3\xAF
|
||||
altstringchar \\\"I \xC3\x8F # ïÏ Latin letter I with diaeresis
|
||||
# (not listed) Latin letter eth
|
||||
# TeX doesn't define it, but ispell requires us to provide *something*.
|
||||
altstringchar {\\eth} \xC3\xB0
|
||||
altstringchar {\\Eth} \xC3\x90 # ðÐ Latin letter eth
|
||||
altstringchar \\~n \xC3\xB1
|
||||
altstringchar \\~N \xC3\x91 # ñÑ Latin letter N with tilde
|
||||
altstringchar \\`o \xC3\xB2
|
||||
altstringchar \\`O \xC3\x92 # òÒ Latin letter O with grave
|
||||
altstringchar \\'o \xC3\xB3
|
||||
altstringchar \\'O \xC3\x93 # óÓ Latin letter O with acute
|
||||
altstringchar \\^o \xC3\xB4
|
||||
altstringchar \\^O \xC3\x94 # ôÔ Latin letter O with circumflex
|
||||
altstringchar \\~o \xC3\xB5
|
||||
altstringchar \\~O \xC3\x95 # õÕ Latin letter O with tilde
|
||||
altstringchar \\\"o \xC3\xB6
|
||||
altstringchar \\\"O \xC3\x96 # öÖ Latin letter O with diaeresis
|
||||
altstringchar {\\o} \xC3\xB8
|
||||
altstringchar {\\O} \xC3\x98 # øØ Latin letter O with stroke
|
||||
altstringchar {\\ss} \xC3\x9F # ß Latin small letter sharp s
|
||||
altstringchar \\`u \xC3\xB9
|
||||
altstringchar \\`U \xC3\x99 # ùÙ Latin letter U with grave
|
||||
altstringchar \\'u \xC3\xBA
|
||||
altstringchar \\'U \xC3\x9A # úÚ Latin letter U with acute
|
||||
altstringchar \\^u \xC3\xBB
|
||||
altstringchar \\^U \xC3\x9B # ûÛ Latin letter U with circumflex
|
||||
altstringchar \\\"u \xC3\xBC
|
||||
altstringchar \\\"U \xC3\x9C # üÜ Latin letter U with diaeresis
|
||||
altstringchar \\'y \xC3\xBD
|
||||
altstringchar \\'Y \xC3\x9D # ýÝ Latin letter Y with acute
|
||||
altstringchar \\\"y \xC3\xBF
|
||||
altstringchar \\\"Y \xC3\xB8 # ÿŸ Latin letter Y with diaeresis
|
||||
# (not listed) Latin letter thorn
|
||||
# TeX doesn't define it, but ispell requires us to provide *something*.
|
||||
altstringchar {\\thorn} \xC3\xBE
|
||||
altstringchar {\\Thorn} \xC3\x9E # þÞ Latin letter Thorn
|
||||
|
||||
#
|
||||
# N/Troff with -ms/-me/man macro packages. Some of these are only
|
||||
# supported by the FSF versions of the packages.
|
||||
#
|
||||
altstringtype "nroff" "nroff" ".nr" ".ms" ".me" ".man"
|
||||
|
||||
altstringchar a\\*` \xC3\xA0
|
||||
altstringchar A\\*` \xC3\x80 # àÀ Latin letter A with grave
|
||||
altstringchar a\\*' \xC3\xA1
|
||||
altstringchar A\\*' \xC3\x81 # áÁ Latin letter A with acute
|
||||
altstringchar a\\*^ \xC3\xA2
|
||||
altstringchar A\\*^ \xC3\x82 # â Latin letter A with circumflex
|
||||
altstringchar a\\*~ \xC3\xA3
|
||||
altstringchar A\\*~ \xC3\x83 # ãà Latin letter A with tilde
|
||||
altstringchar a\\*\: \xC3\xA4
|
||||
altstringchar A\\*\: \xC3\x84 # äÄ Latin letter A with diaeresis
|
||||
altstringchar a\\*o \xC3\xA5
|
||||
altstringchar A\\*o \xC3\x85 # åÅ Latin letter A with ring above
|
||||
altstringchar \\(ae \xC3\xA6
|
||||
altstringchar \\(AE \xC3\x86 # æÆ Latin letter AE
|
||||
altstringchar c\\*\, \xC3\xA7
|
||||
altstringchar C\\*\, \xC3\x87 # çÇ Latin letter C with cedilla
|
||||
altstringchar e\\*` \xC3\xA8
|
||||
altstringchar E\\*` \xC3\x88 # èÈ Latin letter E with grave
|
||||
altstringchar e\\*' \xC3\xA9
|
||||
altstringchar E\\*' \xC3\x89 # éÉ Latin letter E with acute
|
||||
altstringchar e\\*^ \xC3\xAA
|
||||
altstringchar E\\*^ \xC3\x8A # êÊ Latin letter E with circumflex
|
||||
altstringchar e\\*\: \xC3\xAB
|
||||
altstringchar E\\*\: \xC3\x8B # ëË Latin letter E with diaeresis
|
||||
altstringchar i\\*` \xC3\xAC
|
||||
altstringchar I\\*` \xC3\x8C # ìÌ Latin letter I with grave
|
||||
altstringchar i\\*' \xC3\xAD
|
||||
altstringchar I\\*' \xC3\x8D # íÍ Latin letter I with acute
|
||||
altstringchar i\\*^ \xC3\xAE
|
||||
altstringchar I\\*^ \xC3\x8E # îÎ Latin letter I with circumflex
|
||||
altstringchar i\\*\: \xC3\xAF
|
||||
altstringchar I\\*\: \xC3\x8F # ïÏ Latin letter I with diaeresis
|
||||
# (not listed) Latin letter eth
|
||||
# nroff doesn't define it, but ispell requires us to provide *something*.
|
||||
altstringchar \*(et \xC3\xB0
|
||||
altstringchar \*(ET \xC3\x90 # ðÐ Latin letter eth
|
||||
altstringchar n\\*~ \xC3\xB1
|
||||
altstringchar N\\*~ \xC3\x91 # ñÑ Latin letter N with tilde
|
||||
altstringchar o\\*` \xC3\xB2
|
||||
altstringchar O\\*` \xC3\x92 # òÒ Latin letter O with grave
|
||||
altstringchar o\\*' \xC3\xB3
|
||||
altstringchar O\\*' \xC3\x93 # óÓ Latin letter O with acute
|
||||
altstringchar o\\*^ \xC3\xB4
|
||||
altstringchar O\\*^ \xC3\x94 # ôÔ Latin letter O with circumflex
|
||||
altstringchar o\\*~ \xC3\xB5
|
||||
altstringchar O\\*~ \xC3\x95 # õÕ Latin letter O with tilde
|
||||
altstringchar o\\*\: \xC3\xB6
|
||||
altstringchar O\\*\: \xC3\x96 # öÖ Latin letter O with diaeresis
|
||||
altstringchar o\\*/ \xC3\xB8
|
||||
altstringchar O\\*/ \xC3\x98 # øØ Latin letter O with stroke
|
||||
altstringchar \\*8 \xC3\x9F # ß Latin small letter sharp s
|
||||
altstringchar u\\*` \xC3\xB9
|
||||
altstringchar U\\*` \xC3\x99 # ùÙ Latin letter U with grave
|
||||
altstringchar u\\*' \xC3\xBA
|
||||
altstringchar U\\*' \xC3\x9A # úÚ Latin letter U with acute
|
||||
altstringchar u\\*^ \xC3\xBB
|
||||
altstringchar U\\*^ \xC3\x9B # ûÛ Latin letter U with circumflex
|
||||
altstringchar u\\*\: \xC3\xBC
|
||||
altstringchar U\\*\: \xC3\x9C # üÜ Latin letter U with diaeresis
|
||||
altstringchar y\\*' \xC3\xBD
|
||||
altstringchar Y\\*' \xC3\x9D # ýÝ Latin letter Y with acute
|
||||
altstringchar y\\*\: \xC3\xBF
|
||||
altstringchar Y\\*\: \xC3\xB8 # ÿŸ Latin letter Y with diaeresis
|
||||
# (not listed) Latin letter thorn
|
||||
# nroff doesn't define it, but ispell requires us to provide *something*.
|
||||
altstringchar \*(th \xC3\xBE
|
||||
altstringchar \*(TH \xC3\x9E # þÞ Latin letter Thorn
|
||||
|
||||
#
|
||||
# N/Troff with -mm macros. Some of these are not actually supported
|
||||
# by nroff.
|
||||
#
|
||||
altstringtype "-mm" "nroff" ".mm"
|
||||
|
||||
altstringchar a\\*` \xC3\xA0
|
||||
altstringchar A\\*` \xC3\x80 # àÀ Latin letter A with grave
|
||||
altstringchar a\\*' \xC3\xA1
|
||||
altstringchar A\\*' \xC3\x81 # áÁ Latin letter A with acute
|
||||
altstringchar a\\*^ \xC3\xA2
|
||||
altstringchar A\\*^ \xC3\x82 # â Latin letter A with circumflex
|
||||
altstringchar a\\*~ \xC3\xA3
|
||||
altstringchar A\\*~ \xC3\x83 # ãà Latin letter A with tilde
|
||||
altstringchar a\\*\: \xC3\xA4
|
||||
altstringchar A\\*; \xC3\x84 # äÄ Latin letter A with diaeresis
|
||||
altstringchar a\\*o \xC3\xA5
|
||||
altstringchar A\\*o \xC3\x85 # åÅ Latin letter A with ring above
|
||||
altstringchar \\(ae \xC3\xA6
|
||||
altstringchar \\(AE \xC3\x86 # æÆ Latin letter AE
|
||||
altstringchar c\\*\, \xC3\xA7
|
||||
altstringchar C\\*\, \xC3\x87 # çÇ Latin letter C with cedilla
|
||||
altstringchar e\\*` \xC3\xA8
|
||||
altstringchar E\\*` \xC3\x88 # èÈ Latin letter E with grave
|
||||
altstringchar e\\*' \xC3\xA9
|
||||
altstringchar E\\*' \xC3\x89 # éÉ Latin letter E with acute
|
||||
altstringchar e\\*^ \xC3\xAA
|
||||
altstringchar E\\*^ \xC3\x8A # êÊ Latin letter E with circumflex
|
||||
altstringchar e\\*\: \xC3\xAB
|
||||
altstringchar E\\*; \xC3\x8B # ëË Latin letter E with diaeresis
|
||||
altstringchar i\\*` \xC3\xAC
|
||||
altstringchar I\\*` \xC3\x8C # ìÌ Latin letter I with grave
|
||||
altstringchar i\\*' \xC3\xAD
|
||||
altstringchar I\\*' \xC3\x8D # íÍ Latin letter I with acute
|
||||
altstringchar i\\*^ \xC3\xAE
|
||||
altstringchar I\\*^ \xC3\x8E # îÎ Latin letter I with circumflex
|
||||
altstringchar i\\*\: \xC3\xAF
|
||||
altstringchar I\\*; \xC3\x8F # ïÏ Latin letter I with diaeresis
|
||||
# (not listed) Latin letter eth
|
||||
# nroff doesn't define it, but ispell requires us to provide *something*.
|
||||
altstringchar \*(et \xC3\xB0
|
||||
altstringchar \*(ET \xC3\x90 # ðÐ Latin letter eth
|
||||
altstringchar n\\*~ \xC3\xB1
|
||||
altstringchar N\\*~ \xC3\x91 # ñÑ Latin letter N with tilde
|
||||
altstringchar o\\*` \xC3\xB2
|
||||
altstringchar O\\*` \xC3\x92 # òÒ Latin letter O with grave
|
||||
altstringchar o\\*' \xC3\xB3
|
||||
altstringchar O\\*' \xC3\x93 # óÓ Latin letter O with acute
|
||||
altstringchar o\\*^ \xC3\xB4
|
||||
altstringchar O\\*^ \xC3\x94 # ôÔ Latin letter O with circumflex
|
||||
altstringchar o\\*~ \xC3\xB5
|
||||
altstringchar O\\*~ \xC3\x95 # õÕ Latin letter O with tilde
|
||||
altstringchar o\\*\: \xC3\xB6
|
||||
altstringchar O\\*; \xC3\x96 # öÖ Latin letter O with diaeresis
|
||||
altstringchar o\\*/ \xC3\xB8
|
||||
altstringchar O\\*/ \xC3\x98 # øØ Latin letter O with stroke
|
||||
altstringchar \\*(ss \xC3\x9F # ß Latin small letter sharp s
|
||||
altstringchar u\\*` \xC3\xB9
|
||||
altstringchar U\\*` \xC3\x99 # ùÙ Latin letter U with grave
|
||||
altstringchar u\\*' \xC3\xBA
|
||||
altstringchar U\\*' \xC3\x9A # úÚ Latin letter U with acute
|
||||
altstringchar u\\*^ \xC3\xBB
|
||||
altstringchar U\\*^ \xC3\x9B # ûÛ Latin letter U with circumflex
|
||||
altstringchar u\\*\: \xC3\xBC
|
||||
altstringchar U\\*; \xC3\x9C # üÜ Latin letter U with diaeresis
|
||||
altstringchar y\\*' \xC3\xBD
|
||||
altstringchar Y\\*' \xC3\x9D # ýÝ Latin letter Y with acute
|
||||
altstringchar y\\*\: \xC3\xBF
|
||||
altstringchar Y\\*\: \xC3\xB8 # ÿŸ Latin letter Y with diaeresis
|
||||
# (not listed) Latin letter thorn
|
||||
# nroff doesn't define it, but ispell requires us to provide *something*.
|
||||
altstringchar \*(th \xC3\xBE
|
||||
altstringchar \*(TH \xC3\x9E # þÞ Latin letter Thorn
|
||||
|
||||
#
|
||||
# HTML/SGML/XML
|
||||
#
|
||||
altstringtype "html" "html" ".html" ".htm" ".shtml" ".xml"
|
||||
|
||||
altstringchar à \xC3\xA0
|
||||
altstringchar À \xC3\x80 # àÀ Latin letter A with grave
|
||||
altstringchar á \xC3\xA1
|
||||
altstringchar Á \xC3\x81 # áÁ Latin letter A with acute
|
||||
altstringchar â \xC3\xA2
|
||||
altstringchar  \xC3\x82 # â Latin letter A with circumflex
|
||||
altstringchar ã \xC3\xA3
|
||||
altstringchar à \xC3\x83 # ãà Latin letter A with tilde
|
||||
altstringchar ä \xC3\xA4
|
||||
altstringchar Ä \xC3\x84 # äÄ Latin letter A with diaeresis
|
||||
altstringchar â \xC3\xA5
|
||||
altstringchar  \xC3\x85 # åÅ Latin letter A with ring above
|
||||
altstringchar æ \xC3\xA6
|
||||
altstringchar Æ \xC3\x86 # æÆ Latin letter AE
|
||||
altstringchar ç \xC3\xA7
|
||||
altstringchar Ç \xC3\x87 # çÇ Latin letter C with cedilla
|
||||
altstringchar è \xC3\xA8
|
||||
altstringchar È \xC3\x88 # èÈ Latin letter E with grave
|
||||
altstringchar é \xC3\xA9
|
||||
altstringchar É \xC3\x89 # éÉ Latin letter E with acute
|
||||
altstringchar ê \xC3\xAA
|
||||
altstringchar Ê \xC3\x8A # êÊ Latin letter E with circumflex
|
||||
altstringchar ë \xC3\xAB
|
||||
altstringchar Ë \xC3\x8B # ëË Latin letter E with diaeresis
|
||||
altstringchar ì \xC3\xAC
|
||||
altstringchar Ì \xC3\x8C # ìÌ Latin letter I with grave
|
||||
altstringchar í \xC3\xAD
|
||||
altstringchar Í \xC3\x8D # íÍ Latin letter I with acute
|
||||
altstringchar î \xC3\xAE
|
||||
altstringchar Î \xC3\x8E # îÎ Latin letter I with circumflex
|
||||
altstringchar ï \xC3\xAF
|
||||
altstringchar Ï \xC3\x8F # ïÏ Latin letter I with diaeresis
|
||||
altstringchar ð \xC3\xB0
|
||||
altstringchar Ð \xC3\x90 # ðÐ Latin letter eth
|
||||
altstringchar ñ \xC3\xB1
|
||||
altstringchar Ñ \xC3\x91 # ñÑ Latin letter N with tilde
|
||||
altstringchar ò \xC3\xB2
|
||||
altstringchar Ò \xC3\x92 # òÒ Latin letter O with grave
|
||||
altstringchar ó \xC3\xB3
|
||||
altstringchar Ó \xC3\x93 # óÓ Latin letter O with acute
|
||||
altstringchar ô \xC3\xB4
|
||||
altstringchar Ô \xC3\x94 # ôÔ Latin letter O with circumflex
|
||||
altstringchar õ \xC3\xB5
|
||||
altstringchar Õ \xC3\x95 # õÕ Latin letter O with tilde
|
||||
altstringchar ö \xC3\xB6
|
||||
altstringchar Ö \xC3\x96 # öÖ Latin letter O with diaeresis
|
||||
altstringchar ø \xC3\xB8
|
||||
altstringchar Ø \xC3\x98 # øØ Latin letter O with stroke
|
||||
altstringchar ß \xC3\x9F # ß Latin small letter sharp s
|
||||
altstringchar ù \xC3\xB9
|
||||
altstringchar Ù \xC3\x99 # ùÙ Latin letter U with grave
|
||||
altstringchar ú \xC3\xBA
|
||||
altstringchar Ú \xC3\x9A # úÚ Latin letter U with acute
|
||||
altstringchar û \xC3\xBB
|
||||
altstringchar Û \xC3\x9B # ûÛ Latin letter U with circumflex
|
||||
altstringchar ü \xC3\xBC
|
||||
altstringchar Ü \xC3\x9C # üÜ Latin letter U with diaeresis
|
||||
altstringchar ý \xC3\xBD
|
||||
altstringchar Ý \xC3\x9D # ýÝ Latin letter Y with acute
|
||||
altstringchar ÿ \xC3\xBF
|
||||
altstringchar Ÿ \xC3\xB8 # ÿŸ Latin letter Y with diaeresis
|
||||
altstringchar þ \xC3\xBE
|
||||
altstringchar Þ \xC3\x9E # þÞ Latin letter thorn
|
||||
|
||||
# Here's a record of flags used, in case you want to add new ones.
|
||||
# Right now, we fit within the minimal MASKBITS definition.
|
||||
#
|
||||
# ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
# Used: * * **** ** * ***** ***
|
||||
# A D GHIJ MN P RSTUV XYZ
|
||||
# Available: -- -- -- - - -
|
||||
# BC EF KL O Q W
|
||||
|
||||
# Now the prefix table. There are only three prefixes that are truly
|
||||
# frequent in English, and none of them seem to need conditional variations.
|
||||
#
|
||||
prefixes
|
||||
|
||||
flag *A:
|
||||
. > RE # As in enter > reenter
|
||||
|
||||
flag *I:
|
||||
. > IN # As in disposed > indisposed
|
||||
|
||||
flag *U:
|
||||
. > UN # As in natural > unnatural
|
||||
|
||||
# Finally, the suffixes. These are exactly the suffixes that came out
|
||||
# with the original "ispell"; I haven't tried to improve them. The only
|
||||
# thing I did besides translate them was to add selected cross-product flags.
|
||||
#
|
||||
suffixes
|
||||
|
||||
flag V:
|
||||
E > -E,IVE # As in create > creative
|
||||
[^E] > IVE # As in prevent > preventive
|
||||
|
||||
flag *N:
|
||||
E > -E,ION # As in create > creation
|
||||
Y > -Y,ICATION # As in multiply > multiplication
|
||||
[^EY] > EN # As in fall > fallen
|
||||
|
||||
flag *X:
|
||||
E > -E,IONS # As in create > creations
|
||||
Y > -Y,ICATIONS # As in multiply > multiplications
|
||||
[^EY] > ENS # As in weak > weakens
|
||||
|
||||
flag H:
|
||||
Y > -Y,IETH # As in twenty > twentieth
|
||||
[^Y] > TH # As in hundred > hundredth
|
||||
|
||||
flag *Y:
|
||||
Y > -Y,ILY # As in messy > messily
|
||||
[^Y] > LY # As in quick > quickly
|
||||
|
||||
flag *G:
|
||||
E > -E,ING # As in file > filing
|
||||
[^E] > ING # As in cross > crossing
|
||||
|
||||
flag *J:
|
||||
E > -E,INGS # As in file > filings
|
||||
[^E] > INGS # As in cross > crossings
|
||||
|
||||
flag *D:
|
||||
E > D # As in create > created
|
||||
[^AEIOU]Y > -Y,IED # As in imply > implied
|
||||
[^EY] > ED # As in cross > crossed
|
||||
[AEIOU]Y > ED # As in convey > conveyed
|
||||
|
||||
flag T:
|
||||
E > ST # As in late > latest
|
||||
[^AEIOU]Y > -Y,IEST # As in dirty > dirtiest
|
||||
[AEIOU]Y > EST # As in gray > grayest
|
||||
[^EY] > EST # As in small > smallest
|
||||
|
||||
flag *R:
|
||||
E > R # As in skate > skater
|
||||
[^AEIOU]Y > -Y,IER # As in multiply > multiplier
|
||||
[AEIOU]Y > ER # As in convey > conveyer
|
||||
[^EY] > ER # As in build > builder
|
||||
|
||||
flag *Z:
|
||||
E > RS # As in skate > skaters
|
||||
[^AEIOU]Y > -Y,IERS # As in multiply > multipliers
|
||||
[AEIOU]Y > ERS # As in convey > conveyers
|
||||
[^EY] > ERS # As in build > builders
|
||||
|
||||
flag *S:
|
||||
[^AEIOU]Y > -Y,IES # As in imply > implies
|
||||
[AEIOU]Y > S # As in convey > conveys
|
||||
[CS]H > ES # As in lash > lashes
|
||||
[^CS]H > S # As in cough > coughs
|
||||
[SXZ] > ES # As in fix > fixes
|
||||
[^SXZHY] > S # As in bat > bats
|
||||
|
||||
flag *P:
|
||||
[^AEIOU]Y > -Y,INESS # As in cloudy > cloudiness
|
||||
[AEIOU]Y > NESS # As in gray > grayness
|
||||
[^Y] > NESS # As in late > lateness
|
||||
|
||||
flag *M:
|
||||
. > 'S # As in dog > dog's
|
||||
|
||||
# $Log: english.aff,v $
|
||||
# Revision 1.26 2020-12-30 22:20:19-08 geoff
|
||||
# Add UTF-8 options to the default character set.
|
||||
#
|
||||
# Revision 1.25 2020-12-23 16:26:37-08 geoff
|
||||
# Switch to UTF-8 as the default character encoding.
|
||||
#
|
||||
# Revision 1.24 2015-02-07 23:59:51-08 geoff
|
||||
# Correct the suffix generation for words ending in TH.
|
||||
#
|
||||
# Revision 1.23 2005/04/21 14:06:40 geoff
|
||||
# Add UTF-8 as an encoding option.
|
||||
#
|
||||
# Revision 1.22 2005/04/13 22:52:37 geoff
|
||||
# Update the license. Add expanded rules for LY and ES.
|
||||
#
|
||||
# Revision 1.21 2001/07/25 21:51:47 geoff
|
||||
# *** empty log message ***
|
||||
#
|
||||
# Revision 1.20 2001/07/23 20:43:37 geoff
|
||||
# *** empty log message ***
|
||||
#
|
||||
# Revision 1.19 2000/08/22 11:03:59 geoff
|
||||
# Fix a typo in the previous checkin. Provide dummy definitions for eth
|
||||
# and thorn for tex/nroff, since ispell insists on having them.
|
||||
#
|
||||
# Revision 1.18 2000/08/22 10:52:25 geoff
|
||||
# *** empty log message ***
|
||||
#
|
||||
# Revision 1.17 1999/01/07 01:58:15 geoff
|
||||
# Update the copyright.
|
||||
#
|
||||
# Revision 1.16 1995/01/08 23:23:59 geoff
|
||||
# Add a NeXT to the defstringtype statement so that nextispell can
|
||||
# select it.
|
||||
#
|
||||
# Revision 1.15 1994/01/25 07:12:40 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
350
external/ispell/languages/english/msgs.h
vendored
Normal file
350
external/ispell/languages/english/msgs.h
vendored
Normal file
|
@ -0,0 +1,350 @@
|
|||
#ifndef MSGS_H_INCLUDED
|
||||
#define MSGS_H_INCLUDED
|
||||
/*
|
||||
* $Id: msgs.h,v 1.48 2021-01-08 16:44:27-08 geoff Exp $
|
||||
*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Messages header file.
|
||||
*
|
||||
* This file contains all text strings that are written by any of the
|
||||
* C programs in the ispell package. The strings are collected here so that
|
||||
* you can have the option of translating them into your local language for
|
||||
* the benefit of your users.
|
||||
*
|
||||
* Anyone who goes to the effort of making a translation may wish to return
|
||||
* the translated strings to me, geoff@ITcorp.com, so that I can include
|
||||
* them in a later distribution under #ifdef control.
|
||||
*
|
||||
* Besides the strings in this header file, you may also want to translate
|
||||
* the strings in version.h, which give the version and copyright information.
|
||||
* However, any translation of these strings MUST accurately preserve the
|
||||
* legal rights under international law; you may wish to consult a lawyer
|
||||
* about this since you will be responsible for the results of any
|
||||
* incorrect translation.
|
||||
*
|
||||
* Most of the strings below are simple printf format strings. If the printf
|
||||
* takes more than one parameter, the string is given as a parameterized
|
||||
* macro in case your local language needs a different word order.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: msgs.h,v $
|
||||
* Revision 1.48 2021-01-08 16:44:27-08 geoff
|
||||
* Conditionalize the help messages so that warnings in correct.c go away.
|
||||
*
|
||||
* Revision 1.47 2020-12-30 22:20:19-08 geoff
|
||||
* Add the illegal-option message.
|
||||
*
|
||||
* Revision 1.46 2008-02-21 22:19:19-08 geoff
|
||||
* Improve the hash overflow message.
|
||||
*
|
||||
* Revision 1.45 2005/04/28 00:19:48 geoff
|
||||
* Remove obsolete messages related to the count file.
|
||||
*
|
||||
* Revision 1.44 2005/04/26 23:57:22 geoff
|
||||
* Add double-inclusion protection
|
||||
*
|
||||
* Revision 1.43 2005/04/20 23:06:32 geoff
|
||||
* Add a new message and tweak an old one.
|
||||
*
|
||||
* Revision 1.42 2005/04/13 22:52:37 geoff
|
||||
* Update the license. Improve a couple of messages.
|
||||
*
|
||||
* Revision 1.41 2001/09/06 00:34:38 geoff
|
||||
* Many changes from Eli Zaretskii to support DJGPP compilation.
|
||||
*
|
||||
* Revision 1.40 2001/07/25 21:51:47 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.39 2001/07/23 22:11:08 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.38 2001/07/23 20:43:37 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.37 2000/11/14 07:27:04 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.36 1999/01/07 01:58:14 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.35 1999/01/03 01:51:19 geoff
|
||||
* Document the -F switch, and add messages needed in support of it. Also
|
||||
* fix the text of PARSE_Y_BAD_DEFORMATTER.
|
||||
*
|
||||
* Revision 1.34 1999/01/02 23:22:18 geoff
|
||||
* Add the -k switch
|
||||
*
|
||||
* Revision 1.33 1998/07/06 07:04:07 geoff
|
||||
* Clean up some minor problems in messages. Add DEFMT_C_NO_SPACE, and remove
|
||||
* PARSE_Y_8_BIT.
|
||||
*
|
||||
* Revision 1.32 1995/11/08 05:09:32 geoff
|
||||
* Fix the usage message to document the -h flag, and to document (mostly
|
||||
* by implication) the new interactive mode.
|
||||
*
|
||||
* Revision 1.31 1994/12/27 23:08:57 geoff
|
||||
* Add a message to be issued if a word contains illegal characters.
|
||||
*
|
||||
* Revision 1.30 1994/10/25 05:46:40 geoff
|
||||
* Improve a couple of error messages relating to affix flags.
|
||||
*
|
||||
* Revision 1.29 1994/10/04 03:46:23 geoff
|
||||
* Add a missing carriage return in the help message
|
||||
*
|
||||
* Revision 1.28 1994/09/16 05:07:00 geoff
|
||||
* Add the BAD_FLAG message, and start a sentence in another message with
|
||||
* an uppercase letter.
|
||||
*
|
||||
* Revision 1.27 1994/07/28 05:11:38 geoff
|
||||
* Log message for previous revision: add BHASH_C_ZERO_COUNT.
|
||||
*
|
||||
* Revision 1.26 1994/07/28 04:53:49 geoff
|
||||
*
|
||||
* Revision 1.25 1994/05/24 04:54:36 geoff
|
||||
* Add error messages for affix-flag checking.
|
||||
*
|
||||
* Revision 1.24 1994/01/25 07:12:42 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Produce either a CR or an empty string, depending on whether
|
||||
* stderr is a terminal device or not. Used when the message
|
||||
* could be printed to a redirected stream, to avoid the pesky ^M.
|
||||
*/
|
||||
#define MAYBE_CR(stream) (isatty (fileno (stream)) ? "\r" : "")
|
||||
|
||||
/*
|
||||
* The following strings are used in numerous places:
|
||||
*/
|
||||
#define BAD_FLAG "%s\nIllegal affix flag character '%c'%s\n"
|
||||
#define CANT_OPEN "Can't open %s%s\n"
|
||||
#define CANT_CREATE "Can't create %s%s\n"
|
||||
#define WORD_TOO_LONG(w) "%s\nWord '%s' too long at line %d of %s, truncated%s\n", \
|
||||
MAYBE_CR (stderr), w, __LINE__, __FILE__, \
|
||||
MAYBE_CR (stderr)
|
||||
|
||||
/*
|
||||
* The following strings are used in buildhash.c:
|
||||
*/
|
||||
#define BHASH_C_NO_DICT "No dictionary (%s)\n"
|
||||
#define BHASH_C_ZERO_COUNT "No words in dictionary\n"
|
||||
/* I think this message looks better when it's nearly 80 characters wide,
|
||||
* thus the ugly formatting in the next two defines. GK 9-87 */
|
||||
#define BHASH_C_BAFF_1(max, excess) \
|
||||
" Warning: this language table may exceed the maximum total affix length\nof %d by up to %d bytes. You should either increase MAXAFFIXLEN in local.h\nor shorten your largest affix/strip string difference. (This is the\n", \
|
||||
max, excess
|
||||
#define BHASH_C_BAFF_2 \
|
||||
"difference between the affix length and the strip length in a given\nreplacement rule, or the affix length if there is no strip string\nin that rule.)\n"
|
||||
#define BHASH_C_OVERFLOW "Hash table overflowed by %d word(s).\nYou probably need to run your dictionary through munchlist.\n"
|
||||
#define BHASH_C_CANT_OPEN_DICT "Can't open dictionary\n"
|
||||
#define BHASH_C_NO_SPACE "Couldn't allocate hash table\n"
|
||||
#define BHASH_C_COLLISION_SPACE "\ncouldn't allocate space for collision\n"
|
||||
#define BHASH_C_COUNTING "Counting words in dictionary ...\n"
|
||||
#define BHASH_C_WORD_COUNT "\n%d words\n"
|
||||
#define BHASH_C_USAGE "Usage: buildhash [-s] dict-file aff-file hash-file\n\tbuildhash -c count aff-file\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in correct.c:
|
||||
*/
|
||||
#define CORR_C_HELP_1 "Whenever a word is found that is not in the dictionary,%s\n"
|
||||
#define CORR_C_HELP_2 "it is printed on the first line of the screen. If the dictionary%s\n"
|
||||
#define CORR_C_HELP_3 "contains any similar words, they are listed with a number%s\n"
|
||||
#define CORR_C_HELP_4 "next to each one. You have the option of replacing the word%s\n"
|
||||
#define CORR_C_HELP_5 "completely, or choosing one of the suggested words.%s\n"
|
||||
/* You may add HELP_6 through HELP_9 if your language needs more lines */
|
||||
#if 0
|
||||
#define CORR_C_HELP_6 ""
|
||||
#define CORR_C_HELP_7 ""
|
||||
#define CORR_C_HELP_8 ""
|
||||
#define CORR_C_HELP_9 ""
|
||||
#endif
|
||||
#define CORR_C_HELP_COMMANDS "%s\nCommands are:%s\n%s\n"
|
||||
#define CORR_C_HELP_R_CMD "R Replace the misspelled word completely.%s\n"
|
||||
#define CORR_C_HELP_BLANK "Space Accept the word this time only.%s\n"
|
||||
#define CORR_C_HELP_A_CMD "A Accept the word for the rest of this session.%s\n"
|
||||
#define CORR_C_HELP_I_CMD "I Accept the word, and put it in your private dictionary.%s\n"
|
||||
#define CORR_C_HELP_U_CMD "U Accept and add lowercase version to private dictionary.%s\n"
|
||||
#define CORR_C_HELP_0_CMD "0-n Replace with one of the suggested words.%s\n"
|
||||
#define CORR_C_HELP_L_CMD "L Look up words in system dictionary.%s\n"
|
||||
#define CORR_C_HELP_X_CMD "X Write the rest of this file, ignoring misspellings,%s\n and start next file.%s\n"
|
||||
#define CORR_C_HELP_Q_CMD "Q Quit immediately. Asks for confirmation.%s\n Leaves file unchanged.%s\n"
|
||||
#define CORR_C_HELP_BANG "! Shell escape.%s\n"
|
||||
#define CORR_C_HELP_REDRAW "^L Redraw screen.%s\n"
|
||||
#define CORR_C_HELP_SUSPEND "^Z Suspend program.%s\n"
|
||||
#define CORR_C_HELP_HELP "? Show this help screen.%s\n"
|
||||
#define CORR_C_HELP_TYPE_SPACE "-- Type space to continue --"
|
||||
|
||||
#define CORR_C_FILE_LABEL " File: %s"
|
||||
#define CORR_C_READONLY "[READONLY]"
|
||||
#define CORR_C_MINI_MENU "[SP] <number> R)epl A)ccept I)nsert L)ookup U)ncap Q)uit e(X)it or ? for help\r\n"
|
||||
#define CORR_C_CONFIRM_QUIT "Are you sure you want to throw away your changes? "
|
||||
#define CORR_C_REPLACE_WITH "Replace with: "
|
||||
#define CORR_C_LOOKUP_PROMPT "Lookup string ('*' is wildcard): "
|
||||
#define CORR_C_MORE_PROMPT "-- more --"
|
||||
#define CORR_C_BLANK_MORE "\r \r"
|
||||
#define CORR_C_END_LOOK "--end--"
|
||||
#define CORR_C_SHORT_SOURCE "ispell: unexpected EOF on unfiltered version of input%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in defmt.c:
|
||||
*/
|
||||
#define DEFMT_C_TEX_MATH_ERROR "***ERROR in parsing TeX math mode!%s\n"
|
||||
#define DEFMT_C_LR_MATH_ERROR "***ERROR in LR to math-mode switch.%s\n"
|
||||
#define DEFMT_C_NO_SPACE "Ran out of space building keyword list%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in icombine.c:
|
||||
*/
|
||||
#define ICOMBINE_C_BAD_TYPE "icombine: unrecognized formatter type '%s'\n"
|
||||
#define ICOMBINE_C_USAGE "Usage: icombine [-T suffix] [aff-file] < wordlist\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in ispell.c:
|
||||
*/
|
||||
#define ISPELL_C_USAGE1 "Usage: %s [-dfile | -pfile | -wchars | -Wn | -t | -n | -H | -x | -b | -S | -B | -C | -P | -m | -Lcontext | -M | -N | -Ttype | -ktype kws | -Fpgm | -V] file .....\n"
|
||||
#define ISPELL_C_USAGE2 " %s [-dfile | -pfile | -wchars | -Wn | -t | -n | -H | -Ttype | -ktype kws | -Fpgm] -l\n"
|
||||
#ifndef USG
|
||||
#define ISPELL_C_USAGE3 " %s [-dfile | -pfile | -ffile | -Wn | -t | -n | -H | -s | -B | -C | -P | -m | -Ttype | -ktype kws | -Fpgm] [-a | -A]\n"
|
||||
#else
|
||||
#define ISPELL_C_USAGE3 " %s [-dfile | -pfile | -ffile | -Wn | -t | -n | -H | -B | -C | -P | -m | -Ttype | -ktype kws | -Fpgm] [-a | -A]\n"
|
||||
#endif
|
||||
#define ISPELL_C_USAGE4 " %s [-dfile] [-wchars | -Wn] -c\n"
|
||||
#define ISPELL_C_USAGE5 " %s [-dfile] [-wchars] -e[1-4]\n"
|
||||
#define ISPELL_C_USAGE6 " %s [-dfile] [-wchars] -D\n"
|
||||
#define ISPELL_C_USAGE7 " %s -v\n"
|
||||
#define ISPELL_C_TEMP_DISAPPEARED "temporary file disappeared or is unreadable (%s)%s\n"
|
||||
#define ISPELL_C_BAD_TYPE "ispell: unrecognized formatter type '%s'\n"
|
||||
#define ISPELL_C_NO_FILE "ispell: specified file does not exist\n"
|
||||
#define ISPELL_C_NO_FILES "ispell: specified files do not exist\n"
|
||||
#define ISPELL_C_CANT_WRITE "Warning: Can't write to %s%s\n"
|
||||
#define ISPELL_C_OPTIONS_ARE "Compiled-in options:\n"
|
||||
#define ISPELL_C_UNEXPECTED_FD "ispell: unexpected fd while opening '%s'%s\n"
|
||||
#define ISPELL_C_NO_OPTIONS_SPACE "ispell: no memory to read default options\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in lookup.c:
|
||||
*/
|
||||
#define LOOKUP_C_CANT_READ "Trouble reading hash table %s%s\n"
|
||||
#define LOOKUP_C_NULL_HASH "Null hash table %s%s\n"
|
||||
#define LOOKUP_C_SHORT_HASH(name, gotten, wanted) \
|
||||
"Truncated hash table %s: got %d bytes, expected %d%s\n", \
|
||||
name, gotten, wanted
|
||||
#define LOOKUP_C_BAD_MAGIC(name, wanted, gotten) \
|
||||
"Illegal format hash table %s - expected magic 0x%x, got 0x%x%s\n", \
|
||||
name, wanted, gotten
|
||||
#define LOOKUP_C_BAD_MAGIC2(name, wanted, gotten) \
|
||||
"Illegal format hash table %s - expected magic2 0x%x, got 0x%x%s\n", \
|
||||
name, wanted, gotten
|
||||
#define LOOKUP_C_BAD_OPTIONS(gotopts, gotchars, gotlen, wantedopts, wantedchars, wantedlen) \
|
||||
"Hash table options don't agree with buildhash - 0x%x/%d/%d vs. 0x%x/%d/%d%s\n", \
|
||||
gotopts, gotchars, gotlen, \
|
||||
wantedopts, wantedchars, wantedlen
|
||||
#define LOOKUP_C_NO_HASH_SPACE "Couldn't allocate space for hash table%s\n"
|
||||
#define LOOKUP_C_BAD_FORMAT "Illegal format hash table%s\n"
|
||||
#define LOOKUP_C_NO_LANG_SPACE "Couldn't allocate space for language tables%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in makedent.c:
|
||||
*/
|
||||
#define MAKEDENT_C_NO_WORD_SPACE "%s\nCouldn't allocate space for word '%s'%s\n"
|
||||
#define MAKEDENT_C_BAD_WORD_CHAR "%s\nWord '%s' contains illegal characters%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in parse.y:
|
||||
*/
|
||||
#define PARSE_Y_NO_WORD_STRINGS "wordchars statement may not specify string characters"
|
||||
#define PARSE_Y_UNMATCHED "Unmatched charset lengths"
|
||||
#define PARSE_Y_NO_BOUNDARY_STRINGS "boundarychars statement may not specify string characters"
|
||||
#define PARSE_Y_LONG_STRING "String character is too long"
|
||||
#define PARSE_Y_NULL_STRING "String character must have nonzero length"
|
||||
#define PARSE_Y_MANY_STRINGS "Too many string characters"
|
||||
#define PARSE_Y_NO_SUCH_STRING "No such string character"
|
||||
#define PARSE_Y_MULTIPLE_STRINGS "Alternate string character is already defined"
|
||||
#define PARSE_Y_WRONG_STRING_COUNT \
|
||||
"Alternate string characters must map one-to-one to base string characters"
|
||||
#define PARSE_Y_LENGTH_MISMATCH "Upper and lower versions of string character must be same length"
|
||||
#define PARSE_Y_WRONG_NROFF "Incorrect character count in nroffchars statement"
|
||||
#define PARSE_Y_WRONG_TEX "Incorrect character count in TeXchars statement"
|
||||
#define PARSE_Y_DOUBLE_COMPOUND "Compoundwords option may only appear once"
|
||||
#define PARSE_Y_LONG_FLAG "Flag must be single character"
|
||||
#define PARSE_Y_BAD_FLAG "Flag must be alphabetic"
|
||||
#define PARSE_Y_DUP_FLAG "Duplicate flag"
|
||||
#define PARSE_Y_BAD_OPTION "Illegal option"
|
||||
#define PARSE_Y_NO_SPACE "Out of memory"
|
||||
#define PARSE_Y_NEED_BLANK "Single characters must be separated by a blank"
|
||||
#define PARSE_Y_MANY_CONDS "Too many conditions; 8 maximum"
|
||||
#define PARSE_Y_EOF "Unexpected EOF in quoted string"
|
||||
#define PARSE_Y_LONG_QUOTE "Quoted string too long, max 256 characters"
|
||||
#define PARSE_Y_ERROR_FORMAT(file, lineno, error) \
|
||||
"%s line %d: %s\n", file, lineno, error
|
||||
#define PARSE_Y_MALLOC_TROUBLE "yyopen: trouble allocating memory\n"
|
||||
#define PARSE_Y_UNGRAB_PROBLEM "Internal error: ungrab buffer overflow"
|
||||
#define PARSE_Y_BAD_DEFORMATTER "Deformatter must be 'plain', 'nroff', 'tex', or 'sgml'"
|
||||
#define PARSE_Y_BAD_NUMBER "Illegal digit in number"
|
||||
|
||||
/*
|
||||
* The following strings are used in term.c:
|
||||
*/
|
||||
#define TERM_C_SMALL_SCREEN "Screen too small: need at least %d lines\n"
|
||||
#define TERM_C_NO_BATCH "Can't deal with non-interactive use yet.\n"
|
||||
#define TERM_C_CANT_FORK "Couldn't fork, try later.%s\n"
|
||||
#define TERM_C_TYPE_SPACE "\n-- Type space to continue --"
|
||||
|
||||
/*
|
||||
* The following strings are used in tgood.c:
|
||||
*/
|
||||
#define TGOOD_C_NO_SPACE "Out of memory while generating expansions"
|
||||
|
||||
/*
|
||||
* The following strings are used in tree.c:
|
||||
*/
|
||||
#define TREE_C_CANT_UPDATE "Warning: Cannot update personal dictionary (%s)%s\n"
|
||||
#define TREE_C_NO_SPACE "Ran out of space for personal dictionary%s\n"
|
||||
#define TREE_C_TRY_ANYWAY "Continuing anyway (with reduced performance).%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in unsq.c:
|
||||
*/
|
||||
#define UNSQ_C_BAD_COUNT "Illegal count character 0x%x\n"
|
||||
#define UNSQ_C_SURPRISE_EOF "Unexpected EOF\n"
|
||||
|
||||
#endif /* MSGS_H_INCLUDED */
|
379
external/ispell/languages/fix8bit.c
vendored
Normal file
379
external/ispell/languages/fix8bit.c
vendored
Normal file
|
@ -0,0 +1,379 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: fix8bit.c,v 1.8 2005/04/13 23:52:42 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This is a stupid little program that can be used to convert 8-bit
|
||||
* characters to and from backslashed escape sequences. It is usually
|
||||
* more efficient to do this to affix files than to uuencode them for
|
||||
* transport. Ispell will read affix files in either format, so it is
|
||||
* merely personal preference as to which form to use.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* fix8bit {-7 | -8} < infile > outfile
|
||||
*
|
||||
* One of -7 and -8 must be specified. If -7 is given, any character
|
||||
* sequence that is not standard printable ASCII will be converted
|
||||
* into a backslashed octal sequence. If -8 is given, any backslashed
|
||||
* octal or hex sequence will be converted into the equivalent 8-bit
|
||||
* character.
|
||||
*
|
||||
* This program is not very smart. In particular, it makes no attempt
|
||||
* to understand comments, quoted strings, or similar constructs in
|
||||
* which you might not want conversion to take place. I suggest that
|
||||
* you "diff" the input against the output, and if you don't like the
|
||||
* result, correct it by hand.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: fix8bit.c,v $
|
||||
* Revision 1.8 2005/04/13 23:52:42 geoff
|
||||
* Clean up a bit of style, fix push_back to be tolerant of pushes while
|
||||
* there is still stuff on the queue, and make the octal coding conform
|
||||
* to C standards (i.e., don't require 3 digits), ill-advised though that
|
||||
* may be.
|
||||
*
|
||||
* Revision 1.7 2005/04/13 23:08:18 geoff
|
||||
* Ed Avis's improvements
|
||||
*
|
||||
* Revision 1.3 2001/11/07 18:59:26 epa98
|
||||
* Rewrite of fix8bit.c prompted by SuSE's ispell-3.2.06-languages.patch.
|
||||
* I wanted to make sure the patch wouldn't break anything, so I wrote a
|
||||
* test suite, but doing that I found lots of other things that were
|
||||
* wrong, so I started trying to fix those...
|
||||
*
|
||||
* Makefile: fixed dependencies for fix8bit, added 'test' target. The
|
||||
* test suite checks fix8bit's pushback routines, runs test_fix8bit (see
|
||||
* below) and checks a couple of additional properties: fix8bit -8 |
|
||||
* fix8bit -7 == cat; fix8bit -7 | fix8bit -7 == fix8bit -7.
|
||||
*
|
||||
* fix8bit.c: rewrote to8bit() to better handle cases when the
|
||||
* backslashed sequence turns out to be illegal. The initial backslash
|
||||
* is printed and the remaining characters are pushed back to be read
|
||||
* again. This means that for example \\x41 will print as \A, in the
|
||||
* same way that !\x41 produces !A. It also handles escape sequences
|
||||
* cut off by EOF properly (again they are printed unchanged). This uses
|
||||
* a mini pushback library which has a test suite if you give main() the
|
||||
* argument --test-pushback. Also fixed the original problem with hex
|
||||
* sequences being miscomputed, which SuSE wrote the patch for. Added a
|
||||
* warning if the input already contains 8-bit chars (that would stop
|
||||
* -8 | -7 being identity).
|
||||
*
|
||||
* test_fix8bit: new file. This is a Perl script to run fix8bit -7 and
|
||||
* fix8bit -8 on every input file in test_data/ and check the results
|
||||
* against the expected results also in that directory.
|
||||
*
|
||||
* test_data/: new directory. Contains test cases, some written by hand
|
||||
* and some randomly generated by rand_gen. rand_gen tries to make 'well
|
||||
* behaved' input that doesn't muck up fix8bit -8 | fix8bit -7 or other
|
||||
* commands - but there are three flags you can use to tell it not to.
|
||||
* The random test cases have not been checked by hand, so they should be
|
||||
* used in addition to human-written ones.
|
||||
*
|
||||
* Revision 1.2 2001/10/05 14:22:30 epa98
|
||||
* Imported 3.2.06.epa1 release. This was previously developed using
|
||||
* sporadic RCS for certain files, but I'm not really bothered about
|
||||
* rolling back beyond this release.
|
||||
*
|
||||
* Revision 1.6 2001/07/25 21:51:47 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.5 2001/07/23 20:43:38 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.4 1999/01/07 06:07:52 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.3 1994/01/25 07:12:26 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main (); /* Convert to/from 8-bit sequences */
|
||||
static void usage (); /* Issue a usage message */
|
||||
static void to7bit (); /* Convert from 8-bit sequences */
|
||||
static void to8bit (); /* Convert to 8-bit sequences */
|
||||
static int get_char (); /* Get char with pushback */
|
||||
static void push_back (); /* Push back character */
|
||||
static void warn_not_8bit (); /* Warn if input isn't 8-bit */
|
||||
|
||||
extern void exit (); /* Terminate program */
|
||||
|
||||
/*
|
||||
* Maximum number of characters that get_char can push back
|
||||
*/
|
||||
#define MAX_PUSHED_BACK 3
|
||||
|
||||
static int num_pushed_back = 0;
|
||||
/* Amount of data in pushed_back */
|
||||
static int pushed_back[MAX_PUSHED_BACK];
|
||||
/* Characters that get_char has pushed back */
|
||||
|
||||
int main (argc, argv) /* Convert to/from 8-bit sequences */
|
||||
int argc; /* Argument count */
|
||||
char * argv[]; /* Argument vector */
|
||||
{
|
||||
|
||||
if (argc != 2)
|
||||
usage ();
|
||||
if (strcmp (argv[1], "-7") == 0)
|
||||
to7bit ();
|
||||
else if (strcmp (argv[1], "-8") == 0)
|
||||
to8bit ();
|
||||
else
|
||||
usage ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void usage () /* Issue a usage message */
|
||||
{
|
||||
|
||||
(void) fprintf (stderr, "Usage: fix8bit {-7 | -8} < infile > outfile\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
static void to7bit () /* Convert from 8-bit sequences */
|
||||
{
|
||||
int ch; /* Next character read from input */
|
||||
|
||||
while ((ch = getchar ()) != EOF)
|
||||
{
|
||||
ch &= 0xFF;
|
||||
if (ch >= 0x80)
|
||||
(void) printf ("\\%3.3o", (unsigned) ch);
|
||||
else
|
||||
(void) putchar (ch);
|
||||
}
|
||||
}
|
||||
|
||||
static void to8bit () /* Convert to 8-bit sequences */
|
||||
{
|
||||
int backch; /* Backslashed character being built */
|
||||
int ch; /* Next character read from input */
|
||||
int ch_1; /* First character after backslash */
|
||||
int ch_2; /* Second character after backslash */
|
||||
int ch_3; /* Third character after backslash */
|
||||
|
||||
while ((ch = get_char ()) != EOF)
|
||||
{
|
||||
ch &= 0xFF;
|
||||
if (ch != '\\')
|
||||
{
|
||||
/* Not a backslashed sequence */
|
||||
if (ch >= 0x80)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"warning: passing through 8-bit character unchanged: 0x%x\n",
|
||||
ch);
|
||||
}
|
||||
(void) putchar (ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Collect a backslashed character. If we have to abandon
|
||||
* our reading because we got a bad character or EOF,
|
||||
* then we output the backslash (since it doesn't start a
|
||||
* legal escape sequence) and push back the remaining
|
||||
* characters for use next time. This is so that
|
||||
* \\x60 will become \` , for example.
|
||||
*/
|
||||
ch_1 = get_char ();
|
||||
switch (ch_1)
|
||||
{
|
||||
case 'x':
|
||||
case 'X':
|
||||
/* \x.. hex sequence. Check following character... */
|
||||
ch_2 = get_char ();
|
||||
if (ch_2 >= '0' && ch_2 <= '9')
|
||||
backch = ch_2 - '0';
|
||||
else if (ch_2 >= 'a' && ch_2 <= 'f')
|
||||
backch = ch_2 - 'a' + 0xA;
|
||||
else if (ch_2 >= 'A' && ch_2 <= 'F')
|
||||
backch = ch_2 - 'A' + 0xA;
|
||||
else
|
||||
{
|
||||
/*
|
||||
* \x not followed by valid hex digit. Put
|
||||
* out the backslash, and push the rest back.
|
||||
* (We could output the x right now, but it's
|
||||
* safer for future refinements to push it
|
||||
* back, and the computational cost is
|
||||
* negligible.)
|
||||
*/
|
||||
(void) putchar ('\\');
|
||||
if (ch_2 != EOF)
|
||||
(void) push_back (ch_2);
|
||||
(void) push_back (ch_1);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Third character after the backslash. */
|
||||
ch_3 = get_char ();
|
||||
if (ch_3 >= '0' && ch_3 <= '9')
|
||||
backch = (backch << 4) | (ch_3 - '0');
|
||||
else if (ch_3 >= 'a' && ch_3 <= 'f')
|
||||
backch = (backch << 4) | (ch_3 - 'a' + 0xA);
|
||||
else if (ch_3 >= 'A' && ch_3 <= 'F')
|
||||
backch = (backch << 4) | (ch_3 - 'A' + 0xA);
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Not a hex digit. The rules require \x to
|
||||
* be followed by exactly two hex digits, so
|
||||
* we'll reject the entire sequence. Again,
|
||||
* we push back everything after the backslash
|
||||
* so that future modifications will be safer.
|
||||
*/
|
||||
(void) putchar ('\\');
|
||||
if (ch_3 != EOF)
|
||||
(void) push_back (ch_3);
|
||||
(void) push_back (ch_2);
|
||||
(void) push_back (ch_1);
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* All OK. Warn if necessary, and the output the
|
||||
* converted character.
|
||||
*/
|
||||
warn_not_8bit (backch);
|
||||
(void) putchar (backch);
|
||||
break;
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
/*
|
||||
* We're starting a backslashed octal sequence.
|
||||
* We just got the first character, so do the second.
|
||||
* Octal is a bit more fun because the rules allow
|
||||
* variable-length sequences: \7a is the same as
|
||||
* \007a: a 7 (BEL) character followed by "a" (but
|
||||
* note that \10a is NOT the same as \0010a: the
|
||||
* first is a hex 8 (BS) followed by "A" while the
|
||||
* second is hex 1 (SOH) followed by "0a").
|
||||
*/
|
||||
backch = ch_1 - '0';
|
||||
ch_2 = get_char ();
|
||||
if (ch_2 >= '0' && ch_2 <= '7')
|
||||
backch = (backch << 3) | (ch_2 - '0');
|
||||
else
|
||||
{
|
||||
(void) putchar (backch);
|
||||
if (ch_2 != EOF)
|
||||
(void) push_back (ch_2);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Third character. */
|
||||
ch_3 = get_char ();
|
||||
if (ch_3 >= '0' && ch_3 <= '7')
|
||||
backch = (backch << 3) | (ch_3 - '0');
|
||||
else
|
||||
{
|
||||
(void) putchar (backch);
|
||||
if (ch_3 != EOF)
|
||||
(void) push_back (ch_3);
|
||||
break;
|
||||
}
|
||||
|
||||
/* All OK. */
|
||||
warn_not_8bit (backch);
|
||||
(void) putchar (backch);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* A backslash was followed by something that's
|
||||
* not a valid hex or octal code. Put out the
|
||||
* backslash, and push back the following
|
||||
* character.
|
||||
*/
|
||||
(void) putchar ('\\');
|
||||
if (ch_1 != EOF)
|
||||
(void) push_back (ch_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple character input with limited-length pushback.
|
||||
* Unfortunately, ungetc() handles only a single character of
|
||||
* pushback, and we may need several.
|
||||
*/
|
||||
static int get_char ()
|
||||
{
|
||||
if (num_pushed_back > 0)
|
||||
return pushed_back[--num_pushed_back];
|
||||
else
|
||||
return getchar();
|
||||
}
|
||||
|
||||
/*
|
||||
* Push a character onto the push-back queue.
|
||||
*/
|
||||
static void push_back (ch)
|
||||
int ch; /* Character to push back */
|
||||
{
|
||||
assert (num_pushed_back < MAX_PUSHED_BACK);
|
||||
|
||||
pushed_back[num_pushed_back++] = ch;
|
||||
}
|
||||
|
||||
/*
|
||||
* If a character isn't 8-bit, put out a warning.
|
||||
*/
|
||||
static void warn_not_8bit (ch)
|
||||
int ch; /* Character to test */
|
||||
{
|
||||
if (ch < 0x80)
|
||||
fprintf(stderr, "warning: converted an escape sequence to "
|
||||
"a 7-bit character: 0x%x\n", ch);
|
||||
}
|
5
external/ispell/libispell.h
vendored
Normal file
5
external/ispell/libispell.h
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "ispell.h"
|
||||
|
||||
extern "C" {
|
||||
int bc_spell_checker (const char * dicts_folder, const char * locale, int read_fd, int write_fd);
|
||||
}
|
90
external/ispell/local.h
vendored
Normal file
90
external/ispell/local.h
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.linux,v 1.3 2011-04-19 17:58:54+12 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#define USG /* Define on System V or if term.c won't compile */
|
||||
#define GENERATE_LIBRARY_PROTOS
|
||||
#define EGREPCMD "grep -Ei"
|
||||
#define HAS_RENAME
|
||||
#define YACC "bison -y" /* Not all linuxes have yacc, but all have bison */
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/home/data/workspace/build/linux-x86_64/linphone-desktop-5.2.6/OUTPUT/share/linphone/bin"
|
||||
#define LIBDIR "/home/data/workspace/build/linux-x86_64/linphone-desktop-5.2.6/OUTPUT/share/linphone/ispell_dictionaries"
|
||||
#define MAN1DIR "/home/data/workspace/build/linux-x86_64/linphone-desktop-5.2.6/OUTPUT/share/linphone/man/man1"
|
||||
#define MAN45DIR "/home/data/workspace/build/linux-x86_64/linphone-desktop-5.2.6/OUTPUT/share/linphone/man/man5"
|
||||
#define MAN45EXT ".5"
|
||||
#define DEFHASH "en.hash"
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
87
external/ispell/local.h.bsd
vendored
Normal file
87
external/ispell/local.h.bsd
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.bsd,v 1.1 2005/04/27 00:17:46 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#define GENERATE_LIBRARY_PROTOS
|
||||
#define EGREPCMD "egrep -i"
|
||||
#define HAS_RENAME
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/usr/local/bin"
|
||||
#define LIBDIR "/usr/local/lib"
|
||||
#define MAN1DIR "/usr/local/man/man1"
|
||||
#define MAN45DIR "/usr/local/man/man5"
|
||||
#define MAN45EXT ".5"
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
88
external/ispell/local.h.cygwin
vendored
Normal file
88
external/ispell/local.h.cygwin
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.cygwin,v 1.1 2005/05/25 16:15:12 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 1992, 1993, 1999, 2001, 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#define USG /* Define on System V or if term.c won't compile */
|
||||
#undef NO_FCNTL_H /* Define if you get compile errors on fcntl.h */
|
||||
#undef NO_MKSTEMP /* Define if you get compile or link errors */
|
||||
#define EXEEXT ".exe"
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/usr/local/bin"
|
||||
#define LIBDIR "/usr/local/lib"
|
||||
#define MAN1DIR "/usr/local/man/man1"
|
||||
#define MAN45DIR "/usr/local/man/man5"
|
||||
/* Also define MAN45EXT if you don't like section 5 for file formats. */
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
87
external/ispell/local.h.generic
vendored
Normal file
87
external/ispell/local.h.generic
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.generic,v 1.24 2005/04/26 22:40:08 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 1992, 1993, 1999, 2001, 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#undef USG /* Define on System V or if term.c won't compile */
|
||||
#undef NO_FCNTL_H /* Define if you get compile errors on fcntl.h */
|
||||
#undef NO_MKSTEMP /* Define if you get compile or link errors */
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/usr/local/bin"
|
||||
#define LIBDIR "/usr/local/lib"
|
||||
#define MAN1DIR "/usr/local/man/man1"
|
||||
#define MAN45DIR "/usr/local/man/man5"
|
||||
/* Also define MAN45EXT if you don't like section 5 for file formats. */
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
90
external/ispell/local.h.linux
vendored
Normal file
90
external/ispell/local.h.linux
vendored
Normal file
|
@ -0,0 +1,90 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.linux,v 1.3 2011-04-19 17:58:54+12 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#define USG /* Define on System V or if term.c won't compile */
|
||||
#define GENERATE_LIBRARY_PROTOS
|
||||
#define EGREPCMD "grep -Ei"
|
||||
#define HAS_RENAME
|
||||
#define YACC "bison -y" /* Not all linuxes have yacc, but all have bison */
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/usr/local/bin"
|
||||
#define LIBDIR "/usr/local/ispell_dictionaries"
|
||||
#define MAN1DIR "/usr/local/man/man1"
|
||||
#define MAN45DIR "/usr/local/man/man5"
|
||||
#define MAN45EXT ".5"
|
||||
#define DEFHASH "en.hash"
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
88
external/ispell/local.h.macos
vendored
Normal file
88
external/ispell/local.h.macos
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.macos,v 1.3 2005/05/25 14:13:53 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#define HAS_RENAME
|
||||
#define TERMLIB "-lcurses"
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/usr/local/bin"
|
||||
#define LIBDIR "/usr/local/ispell_dictionaries"
|
||||
#define MAN1DIR "/usr/local/man/man1"
|
||||
#define MAN45DIR "/usr/local/man/man4"
|
||||
#define MAN45EXT ".4"
|
||||
#define CFLAGS "-mmacosx-version-min=10.9"
|
||||
#define DEFHASH "en.hash"
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
86
external/ispell/local.h.solaris
vendored
Normal file
86
external/ispell/local.h.solaris
vendored
Normal file
|
@ -0,0 +1,86 @@
|
|||
#ifndef LOCAL_H_INCLUDED
|
||||
#define LOCAL_H_INCLUDED
|
||||
/*
|
||||
* $Id: local.h.solaris,v 1.2 2005/04/26 22:40:08 geoff Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 2005, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file is a sample local.h file. It shows what I believe nearly every
|
||||
* site will want to include in their local.h. You will probably want to
|
||||
* expand this file; see "config.X" to learn of #defines that you might
|
||||
* like to add to.
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
#define MINIMENU /* Display a mini-menu at the bottom of the screen */
|
||||
#define USG /* Define on System V or if term.c won't compile */
|
||||
#define HAS_RENAME
|
||||
|
||||
/*
|
||||
* Important directory paths. If you change MAN45DIR from man5 to
|
||||
* something else, you probably also want to set MAN45SECT and
|
||||
* MAN45EXT (but not if you keep the man pages in section 5 and just
|
||||
* store them in a different place).
|
||||
*/
|
||||
#define BINDIR "/usr/local/bin"
|
||||
#define LIBDIR "/usr/local/lib"
|
||||
#define MAN1DIR "/usr/local/man/man1"
|
||||
#define MAN45DIR "/usr/local/man/man4"
|
||||
#define MAN45EXT ".4"
|
||||
|
||||
/*
|
||||
* Place any locally-required #include statements here
|
||||
*/
|
||||
|
||||
#endif /* LOCAL_H_INCLUDED */
|
548
external/ispell/lookup.c
vendored
Normal file
548
external/ispell/lookup.c
vendored
Normal file
|
@ -0,0 +1,548 @@
|
|||
#ifndef lint
|
||||
static char Rcs_Id[] =
|
||||
"$Id: lookup.c,v 1.55 2022-02-05 23:23:17-08 geoff Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* lookup.c - see if a word appears in the dictionary
|
||||
*
|
||||
* Pace Willisson, 1983
|
||||
*
|
||||
* Copyright 1987, 1988, 1989, 1992, 1993, 1999, 2001, 2005, Geoff Kuenning,
|
||||
* Claremont, CA.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: lookup.c,v $
|
||||
* Revision 1.55 2022-02-05 23:23:17-08 geoff
|
||||
* If no default string type is given, use a built-in default instead of
|
||||
* setting chartypes to a null pointer. Doing so simplifies other code
|
||||
* by not requiring it to do a null check.
|
||||
*
|
||||
* Revision 1.54 2020-12-30 22:33:41-08 geoff
|
||||
* Recover character-set options from the hash file when loading.
|
||||
*
|
||||
* Revision 1.53 2020-10-26 11:39:55-07 geoff
|
||||
* Include header files needed for C99 function declarations. This probably
|
||||
* breaks backwards compatibility but I don't have time to research it and
|
||||
* add appropriate config.X options. Sigh.
|
||||
*
|
||||
* Revision 1.52 2005-04-14 14:25:52-07 geoff
|
||||
* Fix a couple of tiny formatting inconsistencies.
|
||||
*
|
||||
* Revision 1.51 2005/04/14 14:38:23 geoff
|
||||
* Update license. Improve some typecasting.
|
||||
*
|
||||
* Revision 1.50 2001/09/06 00:30:28 geoff
|
||||
* Many changes from Eli Zaretskii to support DJGPP compilation.
|
||||
*
|
||||
* Revision 1.49 2001/07/25 21:51:46 geoff
|
||||
* Minor license update.
|
||||
*
|
||||
* Revision 1.48 2001/07/23 20:24:04 geoff
|
||||
* Update the copyright and the license.
|
||||
*
|
||||
* Revision 1.47 2000/08/22 10:52:25 geoff
|
||||
* Fix a whole bunch of signed/unsigned discrepancies.
|
||||
*
|
||||
* Revision 1.46 1999/01/18 03:28:35 geoff
|
||||
* Turn some char declarations into unsigned char, so that we won't have
|
||||
* sign-extension problems.
|
||||
*
|
||||
* Revision 1.45 1999/01/07 01:22:51 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.44 1998/07/06 05:44:47 geoff
|
||||
* Use off_t in lseeks, for 64-bit and NetBSD machines
|
||||
*
|
||||
* Revision 1.43 1997/12/02 06:24:56 geoff
|
||||
* Get rid of some compile options that really shouldn't be optional.
|
||||
*
|
||||
* Revision 1.42 1995/01/08 23:23:42 geoff
|
||||
* Support MSDOS_BINARY_OPEN when opening the hash file to read it in.
|
||||
*
|
||||
* Revision 1.41 1994/01/25 07:11:51 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "ispell.h"
|
||||
#include "proto.h"
|
||||
#include "msgs.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
int linit P ((void));
|
||||
#ifdef INDEXDUMP
|
||||
static void dumpindex P ((struct flagptr * indexp, int depth));
|
||||
#endif /* INDEXDUMP */
|
||||
struct dent * lookup P ((ichar_t * word, int dotree));
|
||||
|
||||
static int inited = 0;
|
||||
|
||||
/*
|
||||
* Default character type if no type is given
|
||||
*/
|
||||
static struct strchartype deftype =
|
||||
{
|
||||
"default", /* Name */
|
||||
"nroff", /* Deformatter */
|
||||
".txt\0.list\0", /* Suffixes */
|
||||
RAW_DISPLAY /* Show string characters as-is */
|
||||
};
|
||||
|
||||
int linit ()
|
||||
{
|
||||
int hashfd;
|
||||
register int i;
|
||||
register struct dent * dp;
|
||||
struct flagent * entry;
|
||||
struct flagptr * ind;
|
||||
int nextchar;
|
||||
int viazero;
|
||||
register ichar_t * cp;
|
||||
|
||||
// BC - needs to run anyhow when switching language, and moved to dynamically allocation for indexes.
|
||||
//if (inited)
|
||||
//return 0;
|
||||
sflagindex = calloc(SET_SIZE + MAXSTRINGCHARS, sizeof (flagptr));
|
||||
pflagindex = calloc(SET_SIZE + MAXSTRINGCHARS, sizeof (flagptr));
|
||||
// end
|
||||
|
||||
if ((hashfd = open (hashname, 0 | MSDOS_BINARY_OPEN)) < 0)
|
||||
{
|
||||
(void) fprintf (stderr, CANT_OPEN, hashname, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
|
||||
hashsize = read (hashfd, (char *) &hashheader, sizeof hashheader);
|
||||
if (hashsize < sizeof hashheader)
|
||||
{
|
||||
if (hashsize == (unsigned int) -1)
|
||||
(void) fprintf (stderr, LOOKUP_C_CANT_READ, hashname,
|
||||
MAYBE_CR (stderr));
|
||||
else if (hashsize == 0)
|
||||
(void) fprintf (stderr, LOOKUP_C_NULL_HASH, hashname,
|
||||
MAYBE_CR (stderr));
|
||||
else
|
||||
(void) fprintf (stderr,
|
||||
LOOKUP_C_SHORT_HASH (hashname, hashsize,
|
||||
(int) sizeof hashheader), MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
else if (hashheader.magic != MAGIC)
|
||||
{
|
||||
(void) fprintf (stderr,
|
||||
LOOKUP_C_BAD_MAGIC (hashname, (unsigned int) MAGIC,
|
||||
(unsigned int) hashheader.magic), MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
else if (hashheader.magic2 != MAGIC)
|
||||
{
|
||||
(void) fprintf (stderr,
|
||||
LOOKUP_C_BAD_MAGIC2 (hashname, (unsigned int) MAGIC,
|
||||
(unsigned int) hashheader.magic2), MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
else if (hashheader.compileoptions != COMPILEOPTIONS
|
||||
|| hashheader.maxstringchars != MAXSTRINGCHARS
|
||||
|| hashheader.maxstringcharlen != MAXSTRINGCHARLEN)
|
||||
{
|
||||
(void) fprintf (stderr,
|
||||
LOOKUP_C_BAD_OPTIONS ((unsigned int) hashheader.compileoptions,
|
||||
hashheader.maxstringchars, hashheader.maxstringcharlen,
|
||||
(unsigned int) COMPILEOPTIONS, MAXSTRINGCHARS, MAXSTRINGCHARLEN),
|
||||
MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
if (nodictflag)
|
||||
{
|
||||
/*
|
||||
* Dictionary is not needed - create an empty dummy table. We
|
||||
* actually have to have one entry since the hash
|
||||
* algorithm involves a divide by the table size
|
||||
* (actually modulo, but zero is still unacceptable).
|
||||
* So we create an empty entry.
|
||||
*/
|
||||
hashsize = 1; /* This prevents divides by zero */
|
||||
hashtbl = (struct dent *) calloc (1, sizeof (struct dent));
|
||||
if (hashtbl == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_NO_HASH_SPACE, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
hashtbl[0].word = NULL;
|
||||
hashtbl[0].next = NULL;
|
||||
hashtbl[0].flagfield &= ~(USED | KEEP);
|
||||
/* The flag bits don't matter, but calloc cleared them. */
|
||||
hashstrings =
|
||||
(unsigned char *) malloc ((unsigned) hashheader.lstringsize);
|
||||
}
|
||||
else
|
||||
{
|
||||
hashtbl =
|
||||
(struct dent *)
|
||||
malloc ((unsigned) hashheader.tblsize * sizeof (struct dent));
|
||||
hashsize = hashheader.tblsize;
|
||||
hashstrings =
|
||||
(unsigned char *) malloc ((unsigned) hashheader.stringsize);
|
||||
}
|
||||
numsflags = hashheader.stblsize;
|
||||
numpflags = hashheader.ptblsize;
|
||||
sflaglist = (struct flagent *)
|
||||
malloc ((numsflags + numpflags) * sizeof (struct flagent));
|
||||
if (hashtbl == NULL || hashstrings == NULL || sflaglist == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_NO_HASH_SPACE, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
pflaglist = sflaglist + numsflags;
|
||||
|
||||
if (nodictflag)
|
||||
{
|
||||
/*
|
||||
* Read just the strings for the language table, and
|
||||
* skip over the rest of the strings and all of the
|
||||
* hash table.
|
||||
*/
|
||||
if (read (hashfd, hashstrings, (unsigned) hashheader.lstringsize)
|
||||
!= (int) hashheader.lstringsize)
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_BAD_FORMAT, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
(void) lseek (hashfd,
|
||||
(off_t) hashheader.stringsize - (off_t) hashheader.lstringsize
|
||||
+ (off_t) hashheader.tblsize * (off_t) sizeof (struct dent),
|
||||
1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (read (hashfd, hashstrings, (unsigned) hashheader.stringsize)
|
||||
!= (int) hashheader.stringsize
|
||||
|| read (hashfd, (char *) hashtbl,
|
||||
(unsigned) hashheader.tblsize * sizeof (struct dent))
|
||||
!= (int) (hashheader.tblsize * sizeof (struct dent)))
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_BAD_FORMAT, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
if ((unsigned) read (hashfd, (char *) sflaglist,
|
||||
(unsigned) (numsflags + numpflags) * sizeof (struct flagent))
|
||||
!= (numsflags + numpflags) * sizeof (struct flagent))
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_BAD_FORMAT, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
(void) close (hashfd);
|
||||
|
||||
if (!nodictflag)
|
||||
{
|
||||
for (i = hashsize, dp = hashtbl; --i >= 0; dp++)
|
||||
{
|
||||
if (dp->word == (unsigned char *) -1)
|
||||
dp->word = NULL;
|
||||
else
|
||||
dp->word = &hashstrings[(unsigned long) dp->word];
|
||||
if (dp->next == (struct dent *) -1)
|
||||
dp->next = NULL;
|
||||
else
|
||||
dp->next = &hashtbl[(unsigned long) dp->next];
|
||||
}
|
||||
}
|
||||
|
||||
for (i = numsflags + numpflags, entry = sflaglist; --i >= 0; entry++)
|
||||
{
|
||||
if (entry->stripl)
|
||||
entry->strip =
|
||||
(ichar_t *) &hashstrings[(unsigned long) entry->strip];
|
||||
else
|
||||
entry->strip = NULL;
|
||||
if (entry->affl)
|
||||
entry->affix =
|
||||
(ichar_t *) &hashstrings[(unsigned long) entry->affix];
|
||||
else
|
||||
entry->affix = NULL;
|
||||
}
|
||||
/*
|
||||
** Warning - 'entry' and 'i' are reset in the body of the loop
|
||||
** below. Don't try to optimize it by (e.g.) moving the decrement
|
||||
** of i into the loop condition.
|
||||
*/
|
||||
for (i = numsflags, entry = sflaglist; i > 0; i--, entry++)
|
||||
{
|
||||
if (entry->affl == 0)
|
||||
{
|
||||
cp = NULL;
|
||||
ind = &sflagindex[0];
|
||||
viazero = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cp = entry->affix + entry->affl - 1;
|
||||
ind = &sflagindex[*cp];
|
||||
viazero = 0;
|
||||
while (ind->numents == 0 && ind->pu.fp != NULL)
|
||||
{
|
||||
if (cp == entry->affix)
|
||||
{
|
||||
ind = &ind->pu.fp[0];
|
||||
viazero = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ind = &ind->pu.fp[*--cp];
|
||||
viazero = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ind->numents == 0)
|
||||
ind->pu.ent = entry;
|
||||
ind->numents++;
|
||||
/*
|
||||
** If this index entry has more than MAXSEARCH flags in
|
||||
** it, we will split it into subentries to reduce the
|
||||
** searching. However, the split doesn't make sense in
|
||||
** two cases: (a) if we are already at the end of the
|
||||
** current affix, or (b) if all the entries in the list
|
||||
** have identical affixes. Since the list is sorted, (b)
|
||||
** is true if the first and last affixes in the list
|
||||
** are identical.
|
||||
*/
|
||||
if (!viazero && ind->numents >= MAXSEARCH
|
||||
&& icharcmp (entry->affix, ind->pu.ent->affix) != 0)
|
||||
{
|
||||
/* Sneaky trick: back up and reprocess */
|
||||
entry = ind->pu.ent - 1; /* -1 is for entry++ in loop */
|
||||
i = numsflags - (entry - sflaglist);
|
||||
ind->pu.fp =
|
||||
(struct flagptr *)
|
||||
calloc ((unsigned) (SET_SIZE + hashheader.nstrchars),
|
||||
sizeof (struct flagptr));
|
||||
if (ind->pu.fp == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE,
|
||||
MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
ind->numents = 0;
|
||||
}
|
||||
}
|
||||
/*
|
||||
** Warning - 'entry' and 'i' are reset in the body of the loop
|
||||
** below. Don't try to optimize it by (e.g.) moving the decrement
|
||||
** of i into the loop condition.
|
||||
*/
|
||||
for (i = numpflags, entry = pflaglist; i > 0; i--, entry++)
|
||||
{
|
||||
if (entry->affl == 0)
|
||||
{
|
||||
cp = NULL;
|
||||
ind = &pflagindex[0];
|
||||
viazero = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
cp = entry->affix;
|
||||
ind = &pflagindex[*cp++];
|
||||
viazero = 0;
|
||||
while (ind->numents == 0 && ind->pu.fp != NULL)
|
||||
{
|
||||
if (*cp == 0)
|
||||
{
|
||||
ind = &ind->pu.fp[0];
|
||||
viazero = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ind = &ind->pu.fp[*cp++];
|
||||
viazero = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ind->numents == 0)
|
||||
ind->pu.ent = entry;
|
||||
ind->numents++;
|
||||
/*
|
||||
** If this index entry has more than MAXSEARCH flags in
|
||||
** it, we will split it into subentries to reduce the
|
||||
** searching. However, the split doesn't make sense in
|
||||
** two cases: (a) if we are already at the end of the
|
||||
** current affix, or (b) if all the entries in the list
|
||||
** have identical affixes. Since the list is sorted, (b)
|
||||
** is true if the first and last affixes in the list
|
||||
** are identical.
|
||||
*/
|
||||
if (!viazero && ind->numents >= MAXSEARCH
|
||||
&& icharcmp (entry->affix, ind->pu.ent->affix) != 0)
|
||||
{
|
||||
/* Sneaky trick: back up and reprocess */
|
||||
entry = ind->pu.ent - 1; /* -1 is for entry++ in loop */
|
||||
i = numpflags - (entry - pflaglist);
|
||||
ind->pu.fp =
|
||||
(struct flagptr *) calloc (SET_SIZE + hashheader.nstrchars,
|
||||
sizeof (struct flagptr));
|
||||
if (ind->pu.fp == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE,
|
||||
MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
ind->numents = 0;
|
||||
}
|
||||
}
|
||||
#ifdef INDEXDUMP
|
||||
(void) fprintf (stderr, "Prefix index table:\n");
|
||||
dumpindex (pflagindex, 0);
|
||||
(void) fprintf (stderr, "Suffix index table:\n");
|
||||
dumpindex (sflagindex, 0);
|
||||
#endif
|
||||
if (hashheader.nstrchartype == 0)
|
||||
chartypes = &deftype;
|
||||
else
|
||||
{
|
||||
chartypes = (struct strchartype *)
|
||||
malloc (hashheader.nstrchartype * sizeof (struct strchartype));
|
||||
if (chartypes == NULL)
|
||||
{
|
||||
(void) fprintf (stderr, LOOKUP_C_NO_LANG_SPACE, MAYBE_CR (stderr));
|
||||
return (-1);
|
||||
}
|
||||
for (i = 0, nextchar = hashheader.strtypestart;
|
||||
i < (int) hashheader.nstrchartype;
|
||||
i++)
|
||||
{
|
||||
chartypes[i].name = &hashstrings[nextchar];
|
||||
nextchar += strlen ((char *) chartypes[i].name) + 1;
|
||||
chartypes[i].deformatter = (char *) &hashstrings[nextchar];
|
||||
nextchar += strlen (chartypes[i].deformatter) + 1;
|
||||
chartypes[i].suffixes = (char *) &hashstrings[nextchar];
|
||||
while (hashstrings[nextchar] != '\0')
|
||||
nextchar += strlen ((char *) &hashstrings[nextchar]) + 1;
|
||||
nextchar++;
|
||||
chartypes[i].options = hashstrings[nextchar++];
|
||||
}
|
||||
}
|
||||
inited = 1;
|
||||
return (0);
|
||||
}
|
||||
|
||||
#ifdef INDEXDUMP
|
||||
static void dumpindex (indexp, depth)
|
||||
register struct flagptr * indexp;
|
||||
register int depth;
|
||||
{
|
||||
register int i;
|
||||
int j;
|
||||
int k;
|
||||
char stripbuf[INPUTWORDLEN + 4 * MAXAFFIXLEN + 4];
|
||||
|
||||
for (i = 0; i < SET_SIZE + hashheader.nstrchars; i++, indexp++)
|
||||
{
|
||||
if (indexp->numents == 0 && indexp->pu.fp != NULL)
|
||||
{
|
||||
for (j = depth; --j >= 0; )
|
||||
(void) putc (' ', stderr);
|
||||
if (i >= ' ' && i <= '~')
|
||||
(void) putc (i, stderr);
|
||||
else
|
||||
(void) fprintf (stderr, "0x%x", i);
|
||||
(void) putc ('\n', stderr);
|
||||
dumpindex (indexp->pu.fp, depth + 1);
|
||||
}
|
||||
else if (indexp->numents)
|
||||
{
|
||||
for (j = depth; --j >= 0; )
|
||||
(void) putc (' ', stderr);
|
||||
if (i >= ' ' && i <= '~')
|
||||
(void) putc (i, stderr);
|
||||
else
|
||||
(void) fprintf (stderr, "0x%x", i);
|
||||
(void) fprintf (stderr, " -> %d entries\n", indexp->numents);
|
||||
for (k = 0; k < indexp->numents; k++)
|
||||
{
|
||||
for (j = depth; --j >= 0; )
|
||||
(void) putc (' ', stderr);
|
||||
if (indexp->pu.ent[k].stripl)
|
||||
{
|
||||
(void) ichartostr (stripbuf, indexp->pu.ent[k].strip,
|
||||
sizeof stripbuf, 1);
|
||||
(void) fprintf (stderr, " entry %d (-%s,%s)\n",
|
||||
&indexp->pu.ent[k] - sflaglist,
|
||||
stripbuf,
|
||||
indexp->pu.ent[k].affl
|
||||
? ichartosstr (indexp->pu.ent[k].affix, 1) : "-");
|
||||
}
|
||||
else
|
||||
(void) fprintf (stderr, " entry %d (%s)\n",
|
||||
&indexp->pu.ent[k] - sflaglist,
|
||||
ichartosstr (indexp->pu.ent[k].affix, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* n is length of s */
|
||||
struct dent * lookup (s, dotree)
|
||||
register ichar_t * s;
|
||||
int dotree;
|
||||
{
|
||||
register struct dent * dp;
|
||||
register unsigned char * s1;
|
||||
unsigned char schar[INPUTWORDLEN + MAXAFFIXLEN];
|
||||
|
||||
dp = &hashtbl[hash (s, hashsize)];
|
||||
if (ichartostr (schar, s, sizeof schar, 1))
|
||||
(void) fprintf (stderr, WORD_TOO_LONG (schar));
|
||||
for ( ; dp != NULL; dp = dp->next)
|
||||
{
|
||||
/* quick strcmp, but only for equality */
|
||||
s1 = dp->word;
|
||||
if (s1 && s1[0] == schar[0]
|
||||
&& strcmp ((char *) s1 + 1, (char *) schar + 1) == 0)
|
||||
return dp;
|
||||
while (dp->flagfield & MOREVARIANTS) /* Skip variations */
|
||||
dp = dp->next;
|
||||
}
|
||||
if (dotree)
|
||||
{
|
||||
dp = treelookup (s);
|
||||
return dp;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
1251
external/ispell/makedent.c
vendored
Normal file
1251
external/ispell/makedent.c
vendored
Normal file
File diff suppressed because it is too large
Load diff
90
external/ispell/makedict.sh
vendored
Executable file
90
external/ispell/makedict.sh
vendored
Executable file
|
@ -0,0 +1,90 @@
|
|||
: Use /bin/sh
|
||||
#
|
||||
# $Id: makedict.sh,v 1.13 2005/04/14 14:38:23 geoff Exp $
|
||||
#
|
||||
# Copyright 1987, 1988, 1989, 1992, 1993, 1999, 2001, Geoff Kuenning,
|
||||
# Claremont, CA.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Make a beginning dictionary file for ispell, using an existing
|
||||
# speller.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# makedict file-list
|
||||
#
|
||||
# The specified files are collected, split into words, and run through
|
||||
# the system speller (usually spell(1)). Any words that the speller
|
||||
# accepts will be written to the standard output for use in making
|
||||
# an ispell dictionary. Usually, you will want to run the output
|
||||
# of this script through "munchlist" to get a final dictionary.
|
||||
#
|
||||
# $Log: makedict.sh,v $
|
||||
# Revision 1.13 2005/04/14 14:38:23 geoff
|
||||
# Update license.
|
||||
#
|
||||
# Revision 1.12 2001/07/25 21:51:46 geoff
|
||||
# Minor license update.
|
||||
#
|
||||
# Revision 1.11 2001/07/23 20:24:04 geoff
|
||||
# Update the copyright and the license.
|
||||
#
|
||||
# Revision 1.10 1999/01/07 01:22:58 geoff
|
||||
# Update the copyright.
|
||||
#
|
||||
# Revision 1.9 1994/01/25 07:11:53 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
||||
#
|
||||
|
||||
# This program must produce a list of INCORRECTLY spelled words on standard
|
||||
# output, given a list of words on standard input. If you don't have a
|
||||
# speller, but do have a lot of correctly-spelled files, try /bin/true.
|
||||
#
|
||||
SPELLPROG="${SPELLPROG-spell}"
|
||||
|
||||
TMP=${TMPDIR-/tmp}/mkdict$$
|
||||
|
||||
case "$#" in
|
||||
0)
|
||||
set X -
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
|
||||
trap "/bin/rm ${TMP}; exit 1" 1 2 15
|
||||
|
||||
cat "$@" | deroff | tr -cs "[A-Z][a-z]'" '[\012*]' | sort -uf -o ${TMP}
|
||||
$SPELLPROG < ${TMP} | comm -13 - ${TMP}
|
||||
/bin/rm ${TMP}
|
350
external/ispell/msgs.h
vendored
Normal file
350
external/ispell/msgs.h
vendored
Normal file
|
@ -0,0 +1,350 @@
|
|||
#ifndef MSGS_H_INCLUDED
|
||||
#define MSGS_H_INCLUDED
|
||||
/*
|
||||
* $Id: msgs.h,v 1.48 2021-01-08 16:44:27-08 geoff Exp $
|
||||
*
|
||||
* Copyright 1992, 1993, 1999, 2001, Geoff Kuenning, Claremont, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Messages header file.
|
||||
*
|
||||
* This file contains all text strings that are written by any of the
|
||||
* C programs in the ispell package. The strings are collected here so that
|
||||
* you can have the option of translating them into your local language for
|
||||
* the benefit of your users.
|
||||
*
|
||||
* Anyone who goes to the effort of making a translation may wish to return
|
||||
* the translated strings to me, geoff@ITcorp.com, so that I can include
|
||||
* them in a later distribution under #ifdef control.
|
||||
*
|
||||
* Besides the strings in this header file, you may also want to translate
|
||||
* the strings in version.h, which give the version and copyright information.
|
||||
* However, any translation of these strings MUST accurately preserve the
|
||||
* legal rights under international law; you may wish to consult a lawyer
|
||||
* about this since you will be responsible for the results of any
|
||||
* incorrect translation.
|
||||
*
|
||||
* Most of the strings below are simple printf format strings. If the printf
|
||||
* takes more than one parameter, the string is given as a parameterized
|
||||
* macro in case your local language needs a different word order.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: msgs.h,v $
|
||||
* Revision 1.48 2021-01-08 16:44:27-08 geoff
|
||||
* Conditionalize the help messages so that warnings in correct.c go away.
|
||||
*
|
||||
* Revision 1.47 2020-12-30 22:20:19-08 geoff
|
||||
* Add the illegal-option message.
|
||||
*
|
||||
* Revision 1.46 2008-02-21 22:19:19-08 geoff
|
||||
* Improve the hash overflow message.
|
||||
*
|
||||
* Revision 1.45 2005/04/28 00:19:48 geoff
|
||||
* Remove obsolete messages related to the count file.
|
||||
*
|
||||
* Revision 1.44 2005/04/26 23:57:22 geoff
|
||||
* Add double-inclusion protection
|
||||
*
|
||||
* Revision 1.43 2005/04/20 23:06:32 geoff
|
||||
* Add a new message and tweak an old one.
|
||||
*
|
||||
* Revision 1.42 2005/04/13 22:52:37 geoff
|
||||
* Update the license. Improve a couple of messages.
|
||||
*
|
||||
* Revision 1.41 2001/09/06 00:34:38 geoff
|
||||
* Many changes from Eli Zaretskii to support DJGPP compilation.
|
||||
*
|
||||
* Revision 1.40 2001/07/25 21:51:47 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.39 2001/07/23 22:11:08 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.38 2001/07/23 20:43:37 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.37 2000/11/14 07:27:04 geoff
|
||||
* *** empty log message ***
|
||||
*
|
||||
* Revision 1.36 1999/01/07 01:58:14 geoff
|
||||
* Update the copyright.
|
||||
*
|
||||
* Revision 1.35 1999/01/03 01:51:19 geoff
|
||||
* Document the -F switch, and add messages needed in support of it. Also
|
||||
* fix the text of PARSE_Y_BAD_DEFORMATTER.
|
||||
*
|
||||
* Revision 1.34 1999/01/02 23:22:18 geoff
|
||||
* Add the -k switch
|
||||
*
|
||||
* Revision 1.33 1998/07/06 07:04:07 geoff
|
||||
* Clean up some minor problems in messages. Add DEFMT_C_NO_SPACE, and remove
|
||||
* PARSE_Y_8_BIT.
|
||||
*
|
||||
* Revision 1.32 1995/11/08 05:09:32 geoff
|
||||
* Fix the usage message to document the -h flag, and to document (mostly
|
||||
* by implication) the new interactive mode.
|
||||
*
|
||||
* Revision 1.31 1994/12/27 23:08:57 geoff
|
||||
* Add a message to be issued if a word contains illegal characters.
|
||||
*
|
||||
* Revision 1.30 1994/10/25 05:46:40 geoff
|
||||
* Improve a couple of error messages relating to affix flags.
|
||||
*
|
||||
* Revision 1.29 1994/10/04 03:46:23 geoff
|
||||
* Add a missing carriage return in the help message
|
||||
*
|
||||
* Revision 1.28 1994/09/16 05:07:00 geoff
|
||||
* Add the BAD_FLAG message, and start a sentence in another message with
|
||||
* an uppercase letter.
|
||||
*
|
||||
* Revision 1.27 1994/07/28 05:11:38 geoff
|
||||
* Log message for previous revision: add BHASH_C_ZERO_COUNT.
|
||||
*
|
||||
* Revision 1.26 1994/07/28 04:53:49 geoff
|
||||
*
|
||||
* Revision 1.25 1994/05/24 04:54:36 geoff
|
||||
* Add error messages for affix-flag checking.
|
||||
*
|
||||
* Revision 1.24 1994/01/25 07:12:42 geoff
|
||||
* Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Produce either a CR or an empty string, depending on whether
|
||||
* stderr is a terminal device or not. Used when the message
|
||||
* could be printed to a redirected stream, to avoid the pesky ^M.
|
||||
*/
|
||||
#define MAYBE_CR(stream) (isatty (fileno (stream)) ? "\r" : "")
|
||||
|
||||
/*
|
||||
* The following strings are used in numerous places:
|
||||
*/
|
||||
#define BAD_FLAG "%s\nIllegal affix flag character '%c'%s\n"
|
||||
#define CANT_OPEN "Can't open %s%s\n"
|
||||
#define CANT_CREATE "Can't create %s%s\n"
|
||||
#define WORD_TOO_LONG(w) "%s\nWord '%s' too long at line %d of %s, truncated%s\n", \
|
||||
MAYBE_CR (stderr), w, __LINE__, __FILE__, \
|
||||
MAYBE_CR (stderr)
|
||||
|
||||
/*
|
||||
* The following strings are used in buildhash.c:
|
||||
*/
|
||||
#define BHASH_C_NO_DICT "No dictionary (%s)\n"
|
||||
#define BHASH_C_ZERO_COUNT "No words in dictionary\n"
|
||||
/* I think this message looks better when it's nearly 80 characters wide,
|
||||
* thus the ugly formatting in the next two defines. GK 9-87 */
|
||||
#define BHASH_C_BAFF_1(max, excess) \
|
||||
" Warning: this language table may exceed the maximum total affix length\nof %d by up to %d bytes. You should either increase MAXAFFIXLEN in local.h\nor shorten your largest affix/strip string difference. (This is the\n", \
|
||||
max, excess
|
||||
#define BHASH_C_BAFF_2 \
|
||||
"difference between the affix length and the strip length in a given\nreplacement rule, or the affix length if there is no strip string\nin that rule.)\n"
|
||||
#define BHASH_C_OVERFLOW "Hash table overflowed by %d word(s).\nYou probably need to run your dictionary through munchlist.\n"
|
||||
#define BHASH_C_CANT_OPEN_DICT "Can't open dictionary\n"
|
||||
#define BHASH_C_NO_SPACE "Couldn't allocate hash table\n"
|
||||
#define BHASH_C_COLLISION_SPACE "\ncouldn't allocate space for collision\n"
|
||||
#define BHASH_C_COUNTING "Counting words in dictionary ...\n"
|
||||
#define BHASH_C_WORD_COUNT "\n%d words\n"
|
||||
#define BHASH_C_USAGE "Usage: buildhash [-s] dict-file aff-file hash-file\n\tbuildhash -c count aff-file\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in correct.c:
|
||||
*/
|
||||
#define CORR_C_HELP_1 "Whenever a word is found that is not in the dictionary,%s\n"
|
||||
#define CORR_C_HELP_2 "it is printed on the first line of the screen. If the dictionary%s\n"
|
||||
#define CORR_C_HELP_3 "contains any similar words, they are listed with a number%s\n"
|
||||
#define CORR_C_HELP_4 "next to each one. You have the option of replacing the word%s\n"
|
||||
#define CORR_C_HELP_5 "completely, or choosing one of the suggested words.%s\n"
|
||||
/* You may add HELP_6 through HELP_9 if your language needs more lines */
|
||||
#if 0
|
||||
#define CORR_C_HELP_6 ""
|
||||
#define CORR_C_HELP_7 ""
|
||||
#define CORR_C_HELP_8 ""
|
||||
#define CORR_C_HELP_9 ""
|
||||
#endif
|
||||
#define CORR_C_HELP_COMMANDS "%s\nCommands are:%s\n%s\n"
|
||||
#define CORR_C_HELP_R_CMD "R Replace the misspelled word completely.%s\n"
|
||||
#define CORR_C_HELP_BLANK "Space Accept the word this time only.%s\n"
|
||||
#define CORR_C_HELP_A_CMD "A Accept the word for the rest of this session.%s\n"
|
||||
#define CORR_C_HELP_I_CMD "I Accept the word, and put it in your private dictionary.%s\n"
|
||||
#define CORR_C_HELP_U_CMD "U Accept and add lowercase version to private dictionary.%s\n"
|
||||
#define CORR_C_HELP_0_CMD "0-n Replace with one of the suggested words.%s\n"
|
||||
#define CORR_C_HELP_L_CMD "L Look up words in system dictionary.%s\n"
|
||||
#define CORR_C_HELP_X_CMD "X Write the rest of this file, ignoring misspellings,%s\n and start next file.%s\n"
|
||||
#define CORR_C_HELP_Q_CMD "Q Quit immediately. Asks for confirmation.%s\n Leaves file unchanged.%s\n"
|
||||
#define CORR_C_HELP_BANG "! Shell escape.%s\n"
|
||||
#define CORR_C_HELP_REDRAW "^L Redraw screen.%s\n"
|
||||
#define CORR_C_HELP_SUSPEND "^Z Suspend program.%s\n"
|
||||
#define CORR_C_HELP_HELP "? Show this help screen.%s\n"
|
||||
#define CORR_C_HELP_TYPE_SPACE "-- Type space to continue --"
|
||||
|
||||
#define CORR_C_FILE_LABEL " File: %s"
|
||||
#define CORR_C_READONLY "[READONLY]"
|
||||
#define CORR_C_MINI_MENU "[SP] <number> R)epl A)ccept I)nsert L)ookup U)ncap Q)uit e(X)it or ? for help\r\n"
|
||||
#define CORR_C_CONFIRM_QUIT "Are you sure you want to throw away your changes? "
|
||||
#define CORR_C_REPLACE_WITH "Replace with: "
|
||||
#define CORR_C_LOOKUP_PROMPT "Lookup string ('*' is wildcard): "
|
||||
#define CORR_C_MORE_PROMPT "-- more --"
|
||||
#define CORR_C_BLANK_MORE "\r \r"
|
||||
#define CORR_C_END_LOOK "--end--"
|
||||
#define CORR_C_SHORT_SOURCE "ispell: unexpected EOF on unfiltered version of input%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in defmt.c:
|
||||
*/
|
||||
#define DEFMT_C_TEX_MATH_ERROR "***ERROR in parsing TeX math mode!%s\n"
|
||||
#define DEFMT_C_LR_MATH_ERROR "***ERROR in LR to math-mode switch.%s\n"
|
||||
#define DEFMT_C_NO_SPACE "Ran out of space building keyword list%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in icombine.c:
|
||||
*/
|
||||
#define ICOMBINE_C_BAD_TYPE "icombine: unrecognized formatter type '%s'\n"
|
||||
#define ICOMBINE_C_USAGE "Usage: icombine [-T suffix] [aff-file] < wordlist\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in ispell.c:
|
||||
*/
|
||||
#define ISPELL_C_USAGE1 "Usage: %s [-dfile | -pfile | -wchars | -Wn | -t | -n | -H | -x | -b | -S | -B | -C | -P | -m | -Lcontext | -M | -N | -Ttype | -ktype kws | -Fpgm | -V] file .....\n"
|
||||
#define ISPELL_C_USAGE2 " %s [-dfile | -pfile | -wchars | -Wn | -t | -n | -H | -Ttype | -ktype kws | -Fpgm] -l\n"
|
||||
#ifndef USG
|
||||
#define ISPELL_C_USAGE3 " %s [-dfile | -pfile | -ffile | -Wn | -t | -n | -H | -s | -B | -C | -P | -m | -Ttype | -ktype kws | -Fpgm] [-a | -A]\n"
|
||||
#else
|
||||
#define ISPELL_C_USAGE3 " %s [-dfile | -pfile | -ffile | -Wn | -t | -n | -H | -B | -C | -P | -m | -Ttype | -ktype kws | -Fpgm] [-a | -A]\n"
|
||||
#endif
|
||||
#define ISPELL_C_USAGE4 " %s [-dfile] [-wchars | -Wn] -c\n"
|
||||
#define ISPELL_C_USAGE5 " %s [-dfile] [-wchars] -e[1-4]\n"
|
||||
#define ISPELL_C_USAGE6 " %s [-dfile] [-wchars] -D\n"
|
||||
#define ISPELL_C_USAGE7 " %s -v\n"
|
||||
#define ISPELL_C_TEMP_DISAPPEARED "temporary file disappeared or is unreadable (%s)%s\n"
|
||||
#define ISPELL_C_BAD_TYPE "ispell: unrecognized formatter type '%s'\n"
|
||||
#define ISPELL_C_NO_FILE "ispell: specified file does not exist\n"
|
||||
#define ISPELL_C_NO_FILES "ispell: specified files do not exist\n"
|
||||
#define ISPELL_C_CANT_WRITE "Warning: Can't write to %s%s\n"
|
||||
#define ISPELL_C_OPTIONS_ARE "Compiled-in options:\n"
|
||||
#define ISPELL_C_UNEXPECTED_FD "ispell: unexpected fd while opening '%s'%s\n"
|
||||
#define ISPELL_C_NO_OPTIONS_SPACE "ispell: no memory to read default options\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in lookup.c:
|
||||
*/
|
||||
#define LOOKUP_C_CANT_READ "Trouble reading hash table %s%s\n"
|
||||
#define LOOKUP_C_NULL_HASH "Null hash table %s%s\n"
|
||||
#define LOOKUP_C_SHORT_HASH(name, gotten, wanted) \
|
||||
"Truncated hash table %s: got %d bytes, expected %d%s\n", \
|
||||
name, gotten, wanted
|
||||
#define LOOKUP_C_BAD_MAGIC(name, wanted, gotten) \
|
||||
"Illegal format hash table %s - expected magic 0x%x, got 0x%x%s\n", \
|
||||
name, wanted, gotten
|
||||
#define LOOKUP_C_BAD_MAGIC2(name, wanted, gotten) \
|
||||
"Illegal format hash table %s - expected magic2 0x%x, got 0x%x%s\n", \
|
||||
name, wanted, gotten
|
||||
#define LOOKUP_C_BAD_OPTIONS(gotopts, gotchars, gotlen, wantedopts, wantedchars, wantedlen) \
|
||||
"Hash table options don't agree with buildhash - 0x%x/%d/%d vs. 0x%x/%d/%d%s\n", \
|
||||
gotopts, gotchars, gotlen, \
|
||||
wantedopts, wantedchars, wantedlen
|
||||
#define LOOKUP_C_NO_HASH_SPACE "Couldn't allocate space for hash table%s\n"
|
||||
#define LOOKUP_C_BAD_FORMAT "Illegal format hash table%s\n"
|
||||
#define LOOKUP_C_NO_LANG_SPACE "Couldn't allocate space for language tables%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in makedent.c:
|
||||
*/
|
||||
#define MAKEDENT_C_NO_WORD_SPACE "%s\nCouldn't allocate space for word '%s'%s\n"
|
||||
#define MAKEDENT_C_BAD_WORD_CHAR "%s\nWord '%s' contains illegal characters%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in parse.y:
|
||||
*/
|
||||
#define PARSE_Y_NO_WORD_STRINGS "wordchars statement may not specify string characters"
|
||||
#define PARSE_Y_UNMATCHED "Unmatched charset lengths"
|
||||
#define PARSE_Y_NO_BOUNDARY_STRINGS "boundarychars statement may not specify string characters"
|
||||
#define PARSE_Y_LONG_STRING "String character is too long"
|
||||
#define PARSE_Y_NULL_STRING "String character must have nonzero length"
|
||||
#define PARSE_Y_MANY_STRINGS "Too many string characters"
|
||||
#define PARSE_Y_NO_SUCH_STRING "No such string character"
|
||||
#define PARSE_Y_MULTIPLE_STRINGS "Alternate string character is already defined"
|
||||
#define PARSE_Y_WRONG_STRING_COUNT \
|
||||
"Alternate string characters must map one-to-one to base string characters"
|
||||
#define PARSE_Y_LENGTH_MISMATCH "Upper and lower versions of string character must be same length"
|
||||
#define PARSE_Y_WRONG_NROFF "Incorrect character count in nroffchars statement"
|
||||
#define PARSE_Y_WRONG_TEX "Incorrect character count in TeXchars statement"
|
||||
#define PARSE_Y_DOUBLE_COMPOUND "Compoundwords option may only appear once"
|
||||
#define PARSE_Y_LONG_FLAG "Flag must be single character"
|
||||
#define PARSE_Y_BAD_FLAG "Flag must be alphabetic"
|
||||
#define PARSE_Y_DUP_FLAG "Duplicate flag"
|
||||
#define PARSE_Y_BAD_OPTION "Illegal option"
|
||||
#define PARSE_Y_NO_SPACE "Out of memory"
|
||||
#define PARSE_Y_NEED_BLANK "Single characters must be separated by a blank"
|
||||
#define PARSE_Y_MANY_CONDS "Too many conditions; 8 maximum"
|
||||
#define PARSE_Y_EOF "Unexpected EOF in quoted string"
|
||||
#define PARSE_Y_LONG_QUOTE "Quoted string too long, max 256 characters"
|
||||
#define PARSE_Y_ERROR_FORMAT(file, lineno, error) \
|
||||
"%s line %d: %s\n", file, lineno, error
|
||||
#define PARSE_Y_MALLOC_TROUBLE "yyopen: trouble allocating memory\n"
|
||||
#define PARSE_Y_UNGRAB_PROBLEM "Internal error: ungrab buffer overflow"
|
||||
#define PARSE_Y_BAD_DEFORMATTER "Deformatter must be 'plain', 'nroff', 'tex', or 'sgml'"
|
||||
#define PARSE_Y_BAD_NUMBER "Illegal digit in number"
|
||||
|
||||
/*
|
||||
* The following strings are used in term.c:
|
||||
*/
|
||||
#define TERM_C_SMALL_SCREEN "Screen too small: need at least %d lines\n"
|
||||
#define TERM_C_NO_BATCH "Can't deal with non-interactive use yet.\n"
|
||||
#define TERM_C_CANT_FORK "Couldn't fork, try later.%s\n"
|
||||
#define TERM_C_TYPE_SPACE "\n-- Type space to continue --"
|
||||
|
||||
/*
|
||||
* The following strings are used in tgood.c:
|
||||
*/
|
||||
#define TGOOD_C_NO_SPACE "Out of memory while generating expansions"
|
||||
|
||||
/*
|
||||
* The following strings are used in tree.c:
|
||||
*/
|
||||
#define TREE_C_CANT_UPDATE "Warning: Cannot update personal dictionary (%s)%s\n"
|
||||
#define TREE_C_NO_SPACE "Ran out of space for personal dictionary%s\n"
|
||||
#define TREE_C_TRY_ANYWAY "Continuing anyway (with reduced performance).%s\n"
|
||||
|
||||
/*
|
||||
* The following strings are used in unsq.c:
|
||||
*/
|
||||
#define UNSQ_C_BAD_COUNT "Illegal count character 0x%x\n"
|
||||
#define UNSQ_C_SURPRISE_EOF "Unexpected EOF\n"
|
||||
|
||||
#endif /* MSGS_H_INCLUDED */
|
975
external/ispell/munchlist.X
vendored
Executable file
975
external/ispell/munchlist.X
vendored
Executable file
|
@ -0,0 +1,975 @@
|
|||
!!POUNDBANG!!
|
||||
#
|
||||
# $Id: munchlist.X,v 1.70 2015-02-08 00:35:41-08 geoff Exp $
|
||||
#
|
||||
# Copyright 1987, 1988, 1989, 1992, 1993, 1999, 2001, 2005, Geoff Kuenning,
|
||||
# Claremont, CA.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# 3. All modifications to the source code must be clearly marked as
|
||||
# such. Binary redistributions based on modified source code
|
||||
# must be clearly marked as modified versions in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
# 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
# link to the official ispell Web site may not be removed.
|
||||
# 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
# products derived from this software without specific prior
|
||||
# written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# Given a list of words for ispell, generate a reduced list
|
||||
# in which all possible affixes have been collapsed. The reduced
|
||||
# list will match the same list as the original.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# munchlist [-l lang] [-c lang] [-s hashfile] [-D] [-w chars] [-v] \
|
||||
# [file] ...
|
||||
#
|
||||
# Options:
|
||||
#
|
||||
# -l lang Specifies the language table to be used. The default
|
||||
# is "$LIBDIR/!!DEFLANG!!".
|
||||
# -c lang Specifies "conversion" language table. If this option is
|
||||
# given, the input file(s) will be assumed to be described by
|
||||
# this table, rather than the table given in the -l option.
|
||||
# This may be used to convert between incompatible language
|
||||
# tables. (When in doubt, use this option -- it doesn't
|
||||
# hurt, and it may save you from creating a dictionary that has
|
||||
# illegal words in it). The default is no conversion.
|
||||
# -T suff Specifies that the source word lists are in the format
|
||||
# of a "suff"-suffixed file, rather than in the
|
||||
# canonical form. For example, "-T tex" specifies that
|
||||
# string characters in the word lists are in TeX format.
|
||||
# The string character conversions are taken from the language
|
||||
# table specified by the "-l" switch.
|
||||
# -s Remove any words that are already covered by the
|
||||
# dictionary in 'hashfile'. The words will be removed
|
||||
# only if all affixes are covered. This option should not be
|
||||
# specified when the main dictionary is being munched.
|
||||
# 'Hashfile' must have been created with the language
|
||||
# table given in the -l option, but this is not checked.
|
||||
# -D Leave temporary files for debugging purposes
|
||||
# -w Passed on to ispell (specify chars that are part of a word)
|
||||
# Unfortunately, special characters must be quoted twice
|
||||
# rather than once when invoking this script. Also, since
|
||||
# buildhash doesn't accept this option, the final ispell -l
|
||||
# step ignores it, making it somewhat less than useful.
|
||||
# -v Report progress to stderr.
|
||||
#
|
||||
# The given input files are merged, then processed by 'ispell -c'
|
||||
# to generate possible affix lists; these are then combined
|
||||
# and reduced. The final result is written to standard output.
|
||||
#
|
||||
# For portability to older systems, I have avoided getopt.
|
||||
#
|
||||
# Geoff Kuenning
|
||||
# 2/28/87
|
||||
#
|
||||
# $Log: munchlist.X,v $
|
||||
# Revision 1.70 2015-02-08 00:35:41-08 geoff
|
||||
# Be a bit more paranoid about creating temporary files. Fix a problem
|
||||
# with detecting a new-style sort that refuses to be backwards
|
||||
# compatible (and yes, it's still cretinism to break backwards
|
||||
# compatibility--but I have to put up with the cretins).
|
||||
#
|
||||
# Revision 1.69 2005/04/28 14:46:51 geoff
|
||||
# Remove references to the now-obsolete count file.
|
||||
#
|
||||
# Revision 1.68 2005/04/27 01:18:34 geoff
|
||||
# Work around idiotic POSIX incompatibilities in sort. Add secure
|
||||
# temp-file handling.
|
||||
#
|
||||
# Revision 1.67 2005/04/14 23:11:36 geoff
|
||||
# Pass the -w switch to icombine.
|
||||
#
|
||||
# Revision 1.66 2005/04/14 21:25:52 geoff
|
||||
# Make the temporary-file handling safer (using mktemp, if it exists).
|
||||
#
|
||||
# Revision 1.65 2005/04/14 14:39:33 geoff
|
||||
# Use /tmp as the default temp directory
|
||||
#
|
||||
# Revision 1.64 2005/04/14 14:38:23 geoff
|
||||
# Update license. Protect against modernized (i.e., incompatible) and
|
||||
# internationalized sort commands. Change the debugging names of the
|
||||
# minimal-affixes count and stat files.
|
||||
#
|
||||
# Revision 1.63 2002/06/20 23:46:16 geoff
|
||||
# Add yet more locale definitions so that we won't run into bugs caused
|
||||
# by sorting inconsistencies.
|
||||
#
|
||||
# Revision 1.62 2001/09/06 00:30:28 geoff
|
||||
# Many changes from Eli Zaretskii to support DJGPP compilation.
|
||||
#
|
||||
# Revision 1.61 2001/07/25 21:51:46 geoff
|
||||
# Minor license update.
|
||||
#
|
||||
# Revision 1.60 2001/07/23 20:24:04 geoff
|
||||
# Update the copyright and the license.
|
||||
#
|
||||
# Revision 1.59 2001/06/07 08:02:18 geoff
|
||||
# Fix a copule of typos in comments.
|
||||
#
|
||||
# Revision 1.58 2000/11/14 07:27:04 geoff
|
||||
# Don't generate an extra dot when attempting to preserve the count
|
||||
# files in -D mode.
|
||||
#
|
||||
# Revision 1.57 2000/10/06 23:59:48 geoff
|
||||
# Don't assume dot is in the path
|
||||
#
|
||||
# Revision 1.56 1999/01/07 01:22:42 geoff
|
||||
# Update the copyright.
|
||||
#
|
||||
# Revision 1.55 1997/12/02 06:25:01 geoff
|
||||
# Start the cross-expansions loop count at 1, not zero.
|
||||
#
|
||||
# Revision 1.54 1997/12/01 00:53:52 geoff
|
||||
# Abort the munchlist cross-product loop if it goes over 100 passes.
|
||||
#
|
||||
# Revision 1.53 1995/01/08 23:23:36 geoff
|
||||
# Support variable hashfile suffixes for DOS purposes.
|
||||
#
|
||||
# Revision 1.52 1994/12/27 23:08:46 geoff
|
||||
# Dynamically determine how to pass backslashes to 'tr' so that it'll
|
||||
# work on any machine. Define LC_CTYPE to work around yet more
|
||||
# internationalized sort programs. Work around a bug in GNU uniq that
|
||||
# uses the wrong separator between counts and duplicated lines.
|
||||
#
|
||||
# Revision 1.51 1994/11/21 07:02:54 geoff
|
||||
# Correctly quote the arguments to 'tr' when detecting systems with
|
||||
# unsigned sorts. Be sure to provide a zero exit status on all systems,
|
||||
# even if MUNCHDEBUG is not set.
|
||||
#
|
||||
# Revision 1.50 1994/10/25 05:46:05 geoff
|
||||
# Export values for LANG and LOCALE in an attempt to override some
|
||||
# stupidly-internationalized sort programs.
|
||||
#
|
||||
# Revision 1.49 1994/10/04 03:51:30 geoff
|
||||
# Add the MUNCHMAIL feature. If the MUNCHMAIL environment variable is
|
||||
# set to an email address, debugging information about the munchlist run
|
||||
# will automatically be collected and mailed to that address.
|
||||
#
|
||||
# Revision 1.48 1994/05/17 06:32:06 geoff
|
||||
# Don't look for affix tables in LIBDIR if the name contains a slash
|
||||
#
|
||||
# Revision 1.47 1994/04/27 02:50:48 geoff
|
||||
# Fix some cosmetic flaws in the verbose-mode messages.
|
||||
#
|
||||
# Revision 1.46 1994/01/25 07:11:59 geoff
|
||||
# Get rid of all old RCS log lines in preparation for the 3.1 release.
|
||||
#
|
||||
#
|
||||
|
||||
LIBDIR=!!LIBDIR!!
|
||||
TDIR=${TMPDIR-/tmp}
|
||||
MUNCHDIR=`mktemp -d ${TDIR}/munchXXXXXXXXXX 2>/dev/null` || (umask 077; mkdir "$TDIR/munch$$" || (echo "Can't create temp directory: ${TDIR}/munch$$" 1>&2; exit 1); MUNCHDIR="$TDIR/munch$$")
|
||||
TMP=${MUNCHDIR}/munch.
|
||||
MAILDEBUGDIR=${MUNCHDIR-/tmp}
|
||||
if [ "X$MUNCHMAIL" != X ]
|
||||
then
|
||||
exec 2> ${MAILDEBUGDIR}/munchlist.mail
|
||||
echo "munchlist $*" 1>&2
|
||||
set -vx
|
||||
fi
|
||||
SORTTMP="-T ${TDIR}" # !!SORTTMP!!
|
||||
|
||||
DBDIR=${MUNCHDEBUGDIR-$MAILDEBUGDIR}
|
||||
|
||||
# Detect MS-DOS systems and arrange to use their silly suffix system
|
||||
if [ -z "$COMSPEC$ComSpec" ]
|
||||
then
|
||||
EXE=""
|
||||
else
|
||||
EXE=".exe"
|
||||
fi
|
||||
|
||||
#
|
||||
# Set up some program names. This prefers the versions that are in
|
||||
# the same directory as munchlist was run from; if that can't be
|
||||
# figured out, it prefers local versions and finally ones chosen from
|
||||
# $PATH.
|
||||
#
|
||||
# This code could be simplified by using the dirname command, but it's
|
||||
# not available everywhere. For the same reason, we use -r rather than
|
||||
# -x to test for executable files.
|
||||
#
|
||||
case "$0" in
|
||||
*/*)
|
||||
bindir=`expr "$0" : '\(.*\)/[^/]*'`
|
||||
;;
|
||||
*)
|
||||
bindir='.'
|
||||
;;
|
||||
esac
|
||||
if [ -r $bindir/buildhash$EXE ]
|
||||
then
|
||||
BUILDHASH=$bindir/buildhash$EXE
|
||||
elif [ -r ./buildhash$EXE ]
|
||||
then
|
||||
BUILDHASH=./buildhash$EXE
|
||||
else
|
||||
BUILDHASH=buildhash
|
||||
fi
|
||||
if [ -r $bindir/icombine$EXE ]
|
||||
then
|
||||
COMBINE=$bindir/icombine$EXE
|
||||
elif [ -r ./icombine$EXE ]
|
||||
then
|
||||
COMBINE=./icombine$EXE
|
||||
else
|
||||
COMBINE=icombine
|
||||
fi
|
||||
if [ -r $bindir/ijoin$EXE ]
|
||||
then
|
||||
JOIN=$bindir/ijoin$EXE
|
||||
elif [ -r ./ijoin$EXE ]
|
||||
then
|
||||
JOIN=./ijoin$EXE
|
||||
else
|
||||
JOIN=ijoin
|
||||
fi
|
||||
if [ -r $bindir/ispell$EXE ]
|
||||
then
|
||||
ISPELL=$bindir/ispell$EXE
|
||||
elif [ -r ./ispell$EXE ]
|
||||
then
|
||||
ISPELL=./ispell$EXE
|
||||
else
|
||||
ISPELL=ispell
|
||||
fi
|
||||
|
||||
# In one of the most incredibly stupid decisions of all time, some
|
||||
# genius decided to break backwards compatibility by "deprecating" the
|
||||
# old-style sort switches even though it was trivial to recognize both
|
||||
# styles. The result is that that thousands of people (like me) will
|
||||
# have to rewrite shell scripts to tolerate that stupidity. (It's not
|
||||
# that the new syntax is bad--it's definitely easier to understand.
|
||||
# But that doesn't excuse breaking compatibility.)
|
||||
#
|
||||
# Detect whether sort accepts old-style switches.
|
||||
if sort +0 /dev/null >/dev/null 2>&1
|
||||
then
|
||||
CRETIN_SORT=false
|
||||
else
|
||||
CRETIN_SORT=true
|
||||
fi
|
||||
|
||||
#
|
||||
# The following is necessary so that some internationalized versions of
|
||||
# sort(1) don't confuse things by sorting into a nonstandard order.
|
||||
#
|
||||
LANG=C
|
||||
LOCALE=C
|
||||
LC_ALL=C
|
||||
LC_COLLATE=C
|
||||
LC_CTYPE=C
|
||||
export LANG LOCALE LC_COLLATE LC_CTYPE
|
||||
#
|
||||
# The following aren't strictly necessary, but I've been made paranoid
|
||||
# by problems with the stuff above. It can't hurt to set them to a
|
||||
# sensible value.
|
||||
LC_MESSAGES=C
|
||||
LC_MONETARY=C
|
||||
LC_NUMERIC=C
|
||||
LC_TIME=C
|
||||
export LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME
|
||||
|
||||
debug=no
|
||||
dictopt=
|
||||
langtabs=${LIBDIR}/!!DEFLANG!!
|
||||
convtabs=
|
||||
strip=no
|
||||
icflags=
|
||||
verbose=false
|
||||
# The following value of "wchars" is necessary to prevent ispell from
|
||||
# receiving a null argument if -w is not specified. As long as "A" is
|
||||
# a member of the existing character set, ispell will ignore the argument.
|
||||
wchars=-wA
|
||||
while [ $# != 0 ]
|
||||
do
|
||||
case "$1" in
|
||||
-l)
|
||||
case "$2" in
|
||||
*/*)
|
||||
langtabs=$2
|
||||
;;
|
||||
*)
|
||||
if [ -r "$2" ]
|
||||
then
|
||||
langtabs="$2"
|
||||
else
|
||||
langtabs="${LIBDIR}/$2"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if [ ! -r "$langtabs" ]
|
||||
then
|
||||
echo "Can't open language table '$2'" 1>&2
|
||||
rm -rf $MUNCHDIR
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-c)
|
||||
if [ -r "$2" ]
|
||||
then
|
||||
convtabs="$2"
|
||||
elif [ -r "${LIBDIR}/$2" ]
|
||||
then
|
||||
convtabs="${LIBDIR}/$2"
|
||||
else
|
||||
echo "Can't open conversion language table '$2'" 1>&2
|
||||
rm -rf $MUNCHDIR
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-s)
|
||||
dictopt="-d $2"
|
||||
strip=yes
|
||||
shift
|
||||
;;
|
||||
-D)
|
||||
debug=yes
|
||||
;;
|
||||
-T)
|
||||
icflags="-T $2"
|
||||
shift
|
||||
;;
|
||||
-v)
|
||||
verbose=true
|
||||
;;
|
||||
-w)
|
||||
wchars="-w$2"
|
||||
shift
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
-)
|
||||
break
|
||||
;;
|
||||
-*)
|
||||
echo 'Usage: munchlist [-l lang] [-c lang] [-T suff] [-s hashfile] [-D] [-w chars] [-v] [file] ...' \
|
||||
1>&2
|
||||
rm -rf $MUNCHDIR
|
||||
exit 2
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
if [ "X$MUNCHMAIL" != X ]
|
||||
then
|
||||
verbose=true
|
||||
debug=yes
|
||||
fi
|
||||
trap "rm -rf $MUNCHDIR; exit 1" 1 2 13 15
|
||||
#
|
||||
# Names of temporary files. This is just to make the code a little easier
|
||||
# to read.
|
||||
#
|
||||
EXPANDEDINPUT=${TMP}a
|
||||
STRIPPEDINPUT=${TMP}b
|
||||
CRUNCHEDINPUT=${TMP}c
|
||||
PRODUCTLIST=${TMP}d
|
||||
EXPANDEDPAIRS=${TMP}e
|
||||
LEGALFLAGLIST=${TMP}f
|
||||
JOINEDPAIRS=${TMP}g
|
||||
MINIMALAFFIXES=${TMP}h
|
||||
CROSSROOTS=${TMP}i
|
||||
CROSSEXPANDED=${TMP}j
|
||||
CROSSPAIRS=${TMP}k
|
||||
CROSSILLEGAL=${TMP}l
|
||||
ILLEGALCOMBOS=${TMP}m
|
||||
FAKEDICT=${TMP}n
|
||||
# Ispell insists that hash files have a "!!HASHSUFFIX!!" suffix
|
||||
FAKEHASH=${TMP}o!!HASHSUFFIX!!
|
||||
AWKSCRIPT=${TMP}p
|
||||
if [ "$debug" = yes ]
|
||||
then
|
||||
touch $EXPANDEDINPUT $STRIPPEDINPUT $CRUNCHEDINPUT $PRODUCTLIST \
|
||||
$EXPANDEDPAIRS $LEGALFLAGLIST $JOINEDPAIRS $MINIMALAFFIXES \
|
||||
$CROSSROOTS $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL $ILLEGALCOMBOS \
|
||||
$FAKEDICT $FAKEHASH $AWKSCRIPT
|
||||
rm -f ${DBDIR}/EXPANDEDINPUT ${DBDIR}/STRIPPEDINPUT \
|
||||
${DBDIR}/CRUNCHEDINPUT ${DBDIR}/PRODUCTLIST ${DBDIR}/EXPANDEDPAIRS \
|
||||
${DBDIR}/LEGALFLAGLIST ${DBDIR}/JOINEDPAIRS ${DBDIR}/MINIMALAFFIXES \
|
||||
${DBDIR}/CROSSROOTS ${DBDIR}/CROSSEXPANDED ${DBDIR}/CROSSPAIRS \
|
||||
${DBDIR}/CROSSILLEGAL ${DBDIR}/ILLEGALCOMBOS ${DBDIR}/FAKEDICT \
|
||||
${DBDIR}/FAKEHASH!!HASHSUFFIX!! ${DBDIR}/AWKSCRIPT \
|
||||
${DBDIR}/CROSSROOTS.[0-9]* ${DBDIR}/CROSSEXP.[0-9]* \
|
||||
${DBDIR}/CROSSPAIRS.[0-9]* ${DBDIR}/CROSSILLEGAL.[0-9]*
|
||||
ln $EXPANDEDINPUT ${DBDIR}/EXPANDEDINPUT
|
||||
ln $STRIPPEDINPUT ${DBDIR}/STRIPPEDINPUT
|
||||
ln $CRUNCHEDINPUT ${DBDIR}/CRUNCHEDINPUT
|
||||
ln $PRODUCTLIST ${DBDIR}/PRODUCTLIST
|
||||
ln $EXPANDEDPAIRS ${DBDIR}/EXPANDEDPAIRS
|
||||
ln $LEGALFLAGLIST ${DBDIR}/LEGALFLAGLIST
|
||||
ln $JOINEDPAIRS ${DBDIR}/JOINEDPAIRS
|
||||
ln $MINIMALAFFIXES ${DBDIR}/MINIMALAFFIXES
|
||||
ln $CROSSROOTS ${DBDIR}/CROSSROOTS
|
||||
ln $CROSSEXPANDED ${DBDIR}/CROSSEXPANDED
|
||||
ln $CROSSPAIRS ${DBDIR}/CROSSPAIRS
|
||||
ln $CROSSILLEGAL ${DBDIR}/CROSSILLEGAL
|
||||
ln $ILLEGALCOMBOS ${DBDIR}/ILLEGALCOMBOS
|
||||
ln $FAKEDICT ${DBDIR}/FAKEDICT
|
||||
ln $FAKEHASH ${DBDIR}/FAKEHASH!!HASHSUFFIX!!
|
||||
ln $AWKSCRIPT ${DBDIR}/AWKSCRIPT
|
||||
fi
|
||||
#
|
||||
# Create a dummy dictionary to hold a compiled copy of the language
|
||||
# table. Initially, it holds the conversion table, if it exists.
|
||||
#
|
||||
case "X$convtabs" in
|
||||
X)
|
||||
convtabs="$langtabs"
|
||||
;;
|
||||
esac
|
||||
echo 'QQQQQQQQ' > $FAKEDICT
|
||||
$BUILDHASH -s $FAKEDICT $convtabs $FAKEHASH \
|
||||
|| (echo "Couldn't create fake hash file" 1>&2; rm -rf $MUNCHDIR; exit 1) \
|
||||
|| exit 1
|
||||
#
|
||||
# Figure out how 'sort' sorts signed fields, for arguments to ijoin.
|
||||
# This is a little bit of a tricky pipe, but the result is that SIGNED
|
||||
# is set to "-s" if characters with the top bit set sort before those
|
||||
# without, and "-u" if the reverse is true. How does it work? The
|
||||
# first "tr" step generates two lines, one containing "-u", the other
|
||||
# with the same but with the high-order bit set. The second "tr"
|
||||
# changes the high-bit "-u" back to "-s". If the high-bit "-u" was
|
||||
# sorted first, the sed step will select "-s" for SIGNED; otherwise
|
||||
# it'll pick "-u". We have to be careful about backslash quoting
|
||||
# conventions, because some systems differ.
|
||||
#
|
||||
backslash=\\
|
||||
for i in 0 1 2 3
|
||||
do
|
||||
if [ `echo a | tr "${backslash}141" b` = b ]
|
||||
then
|
||||
break
|
||||
fi
|
||||
backslash="$backslash$backslash"
|
||||
done
|
||||
SIGNED=`echo '-s
|
||||
-u' | tr s "${backslash}365" | sort | tr "${backslash}365" s | sed -e 1q`
|
||||
#
|
||||
# Collect all the input and expand all the affix options ($ISPELL -e),
|
||||
# and preserve (sorted) for later joining in EXPANDEDINPUT. The icombine
|
||||
# step is to make sure that unneeded capitalizations (e.g., Farmer and farmer)
|
||||
# are weeded out. The first sort must be folded for icombine; the second
|
||||
# must be unfolded for join.
|
||||
#
|
||||
$verbose && echo "Collecting input." 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 1f,1 -k 1'
|
||||
else
|
||||
sortopts='+0f -1 +0'
|
||||
fi
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
$ISPELL "$wchars" -e1 -d $FAKEHASH -p /dev/null | tr " " '
|
||||
'
|
||||
else
|
||||
cat "$@" | $ISPELL "$wchars" -e1 -d $FAKEHASH -p /dev/null | tr " " '
|
||||
'
|
||||
fi \
|
||||
| sort $SORTTMP -u $sortopts \
|
||||
| $COMBINE $icflags "$wchars" $langtabs \
|
||||
| sort $SORTTMP -u > $EXPANDEDINPUT
|
||||
#
|
||||
# If a conversion table existed, recreate the fake hash file with the
|
||||
# "real" language table.
|
||||
#
|
||||
case "$convtabs" in
|
||||
$langtabs)
|
||||
;;
|
||||
*)
|
||||
$BUILDHASH -s $FAKEDICT $langtabs $FAKEHASH \
|
||||
|| (echo "Couldn't create fake hash file" 1>&2; \
|
||||
rm -rf $MUNCHDIR; exit 1) \
|
||||
|| exit 1
|
||||
;;
|
||||
esac
|
||||
rm -f ${FAKEDICT}*
|
||||
#
|
||||
# If the -s (strip) option was specified, remove all
|
||||
# expanded words that are covered by the dictionary. This produces
|
||||
# the final list of expanded words that this dictionary must cover.
|
||||
# Leave the list in STRIPPEDINPUT.
|
||||
#
|
||||
if [ "X$strip" = "Xno" ]
|
||||
then
|
||||
rm -f $STRIPPEDINPUT
|
||||
ln $EXPANDEDINPUT $STRIPPEDINPUT
|
||||
if [ "$debug" = yes ]
|
||||
then
|
||||
rm -f ${DBDIR}/STRIPPEDINPUT
|
||||
ln $STRIPPEDINPUT ${DBDIR}/STRIPPEDINPUT
|
||||
fi
|
||||
else
|
||||
$verbose && echo "Stripping words already in the dictionary." 1>&2
|
||||
$ISPELL "$wchars" -l $dictopt -p /dev/null < $EXPANDEDINPUT \
|
||||
> $STRIPPEDINPUT
|
||||
fi
|
||||
#
|
||||
# Figure out what the flag-marking character is.
|
||||
#
|
||||
$verbose && echo "Finding flag marker." 1>&2
|
||||
flagmarker=`$ISPELL -D -d $FAKEHASH \
|
||||
| sed -n -e '/^flagmarker/s/flagmarker //p'`
|
||||
case "$flagmarker" in
|
||||
\\*)
|
||||
flagmarker=`expr "$flagmarker" : '.\(.\)'`
|
||||
;;
|
||||
esac
|
||||
#
|
||||
# Munch the input to generate roots and affixes ($ISPELL -c). We are
|
||||
# only interested in words that have at least one affix (egrep $flagmarker);
|
||||
# the next step will pick up the rest. Some of the roots are illegal. We
|
||||
# use join to restrict the output to those root words that are found
|
||||
# in the original dictionary.
|
||||
#
|
||||
$verbose && echo "Generating roots and affixes." 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 1,1 -k 2'
|
||||
else
|
||||
sortopts='+0 -1 +1'
|
||||
fi
|
||||
$ISPELL "$wchars" -c -W0 -d $FAKEHASH -p /dev/null < $STRIPPEDINPUT \
|
||||
| tr " " '
|
||||
' \
|
||||
| egrep "$flagmarker" | sort $SORTTMP -u "-t$flagmarker" $sortopts \
|
||||
| $JOIN $SIGNED "-t$flagmarker" - $EXPANDEDINPUT > $CRUNCHEDINPUT
|
||||
#
|
||||
# We now have a list of legal roots, and of affixes that apply to the
|
||||
# root words. However, it is possible for some affix flags to generate more
|
||||
# than one output word. For example, with the flag table entry
|
||||
#
|
||||
# flag R: . > ER
|
||||
# . > ERS
|
||||
#
|
||||
# the input "BOTHER" will generate an entry "BOTH/R" in CRUNCHEDINPUT. But
|
||||
# this will accept "BOTHER" and "BOTHERS" in the dictionary, which is
|
||||
# wrong (in this case, though it's good English).
|
||||
#
|
||||
# To cure this problem, we first have to know which flags generate which
|
||||
# expansions. We use $ISPELL -e3 to expand the flags (the second e causes
|
||||
# the root and flag to be included in the output), and get pairs
|
||||
# suitable for joining. In the example above, we would get
|
||||
#
|
||||
# BOTH/R BOTHER
|
||||
# BOTH/R BOTHERS
|
||||
#
|
||||
# We save this in EXPANDEDPAIRS for the next step.
|
||||
#
|
||||
$verbose && echo 'Expanding dictionary into EXPANDEDPAIRS.' 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 2'
|
||||
else
|
||||
sortopts='+1'
|
||||
fi
|
||||
$ISPELL "$wchars" -e3 -d $FAKEHASH -p /dev/null < $CRUNCHEDINPUT \
|
||||
| sort $SORTTMP $sortopts > $EXPANDEDPAIRS
|
||||
#
|
||||
# Now we want to extract the lines in EXPANDEDPAIRS in which the second field
|
||||
# is *not* listed in the original dictionary EXPANDEDINPUT; these illegal
|
||||
# lines contain the flags we cannot include without accepting illegal words.
|
||||
# It is somewhat easier to extract those which actually are listed (with
|
||||
# join), and then use comm to strip these from EXPANDEDPAIRS to get the
|
||||
# illegal expansions, together with the flags that generate them (we must
|
||||
# re-sort EXPANDEDPAIRS before running comm). Sed
|
||||
# gets rid of the expansion and uniq gets rid of duplicates. Comm then
|
||||
# selects the remainder of the list from CRUNCHEDINPUT and puts it in
|
||||
# LEGALFLAGLIST. The final step is to use a sort and icombine to put
|
||||
# the list into a one-entry-per-root format.
|
||||
#
|
||||
# BTW, I thought of using cut for the sed step (on systems that have it),
|
||||
# but it turns out that sed is faster!
|
||||
#
|
||||
$JOIN -j1 2 -o 1.1 1.2 $SIGNED $EXPANDEDPAIRS $EXPANDEDINPUT \
|
||||
| sort $SORTTMP -u > $JOINEDPAIRS
|
||||
|
||||
sort $SORTTMP -o $EXPANDEDPAIRS $EXPANDEDPAIRS
|
||||
sort $SORTTMP -o $CRUNCHEDINPUT $CRUNCHEDINPUT
|
||||
|
||||
$verbose && echo 'Creating list of legal roots/flags.' 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 1f,1 -k 1'
|
||||
else
|
||||
sortopts='+0f -1 +0'
|
||||
fi
|
||||
comm -13 $JOINEDPAIRS $EXPANDEDPAIRS \
|
||||
| (sed -e 's; .*$;;' ; rm -f $JOINEDPAIRS $EXPANDEDPAIRS) \
|
||||
| uniq \
|
||||
| (comm -13 - $CRUNCHEDINPUT ; rm -f $CRUNCHEDINPUT) \
|
||||
| sort $SORTTMP -u "-t$flagmarker" $sortopts \
|
||||
| $COMBINE "$wchars" $langtabs > $LEGALFLAGLIST
|
||||
|
||||
#
|
||||
# LEGALFLAGLIST now contains root/flag combinations that, when expanded,
|
||||
# produce only words from EXPANDEDPAIRS. However, there is still a
|
||||
# problem if the language tables have any cross-product flags. A legal
|
||||
# root may appear in LEGALFLAGLIST with two flags that participate
|
||||
# in cross-products. When such a dictionary entry is expanded,
|
||||
# the cross-products will generate some extra words that may not
|
||||
# be in EXPANDEDPAIRS. We need to remove these from LEGALFLAGLIST.
|
||||
#
|
||||
# The first step is to collect the names of the flags that participate
|
||||
# in cross-products. Ispell will dump the language tables for us, and
|
||||
# sed is a pretty handy way to strip out extra information. We use
|
||||
# uniq -c and a numerical sort to put the flags in approximate order of how
|
||||
# "productive" they are (in terms of how likely they are to generate a lot
|
||||
# of output words). The least-productive flags are given last and will
|
||||
# be removed first.
|
||||
#
|
||||
$verbose \
|
||||
&& echo 'Creating list of flags that participate in cross-products.' 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 1rn,1 -k 3'
|
||||
else
|
||||
sortopts='+0rn -1 +2'
|
||||
fi
|
||||
$ISPELL -D -d $FAKEHASH \
|
||||
| sed -n -e '1,$s/:.*$//
|
||||
/^flagmarker/d
|
||||
/^prefixes/,/^suffixes/s/^ flag \*/p /p
|
||||
/^suffixes/,$s/^ flag \*/s /p' \
|
||||
| sort $SORTTMP \
|
||||
| uniq -c \
|
||||
| tr ' ' ' ' \
|
||||
| sort $SORTTMP $sortopts > $PRODUCTLIST
|
||||
|
||||
if [ `egrep ' p ' $PRODUCTLIST | wc -l` -gt 0 \
|
||||
-a `egrep ' s ' $PRODUCTLIST | wc -l` -gt 0 ]
|
||||
then
|
||||
#
|
||||
# The language tables allow cross products. See if LEGALFLAGLIST has
|
||||
# any roots with multiple cross-product flags. Put them in CROSSROOTS.
|
||||
#
|
||||
$verbose && echo 'Finding prefix and suffix flags.' 1>&2
|
||||
preflags=`sed -n -e 's/^[ 0-9]*p //p' $PRODUCTLIST | tr -d '
|
||||
'`
|
||||
sufflags=`sed -n -e 's/^[ 0-9]*s //p' $PRODUCTLIST | tr -d '
|
||||
'`
|
||||
egrep "$flagmarker.*[$preflags].*[$sufflags]|$flagmarker.*[$sufflags].*[$preflags]" \
|
||||
$LEGALFLAGLIST \
|
||||
> $CROSSROOTS
|
||||
|
||||
#
|
||||
# We will need an awk script; it's so big that it core-dumps my shell
|
||||
# under certain conditions. The rationale behind the script is commented
|
||||
# where the script is used. Note that you may want to change this
|
||||
# script for languages other than English.
|
||||
#
|
||||
case "$flagmarker" in
|
||||
/)
|
||||
sedchar=:
|
||||
;;
|
||||
*)
|
||||
sedchar=/
|
||||
;;
|
||||
esac
|
||||
$verbose && echo 'Creating awk script.' 1>&2
|
||||
sed -e "s/PREFLAGS/$preflags/" -e "s/SUFFLAGS/$sufflags/" \
|
||||
-e "s;ILLEGALCOMBOS;$ILLEGALCOMBOS;" \
|
||||
-e "s${sedchar}FLAGMARKER${sedchar}$flagmarker${sedchar}" \
|
||||
> $AWKSCRIPT << 'ENDOFAWKSCRIPT'
|
||||
BEGIN \
|
||||
{
|
||||
preflags = "PREFLAGS"
|
||||
sufflags = "SUFFLAGS"
|
||||
illegalcombos = "ILLEGALCOMBOS"
|
||||
flagmarker = "FLAGMARKER"
|
||||
pflaglen = length (preflags)
|
||||
for (i = 1; i <= pflaglen; i++)
|
||||
pflags[i] = substr (preflags, i, 1);
|
||||
sflaglen = length (sufflags)
|
||||
for (i = 1; i <= sflaglen; i++)
|
||||
sflags[i] = substr (sufflags, i, 1);
|
||||
}
|
||||
{
|
||||
len = length ($2)
|
||||
pnew2 = ""
|
||||
snew2 = ""
|
||||
pbad = ""
|
||||
sbad = ""
|
||||
sufs = 0
|
||||
pres = 0
|
||||
for (i = 1; i <= len; i++)
|
||||
{
|
||||
curflag = substr ($2, i, 1)
|
||||
for (j = 1; j <= pflaglen; j++)
|
||||
{
|
||||
if (pflags[j] == curflag)
|
||||
{
|
||||
pres++
|
||||
pnew2 = substr ($2, 1, i - 1) substr ($2, i + 1)
|
||||
pbad = curflag
|
||||
}
|
||||
}
|
||||
for (j = 1; j <= sflaglen; j++)
|
||||
{
|
||||
if (sflags[j] == curflag)
|
||||
{
|
||||
sufs++
|
||||
snew2 = substr ($2, 1, i - 1) substr ($2, i + 1)
|
||||
sbad = curflag
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pres == 1)
|
||||
{
|
||||
print $1 flagmarker pnew2
|
||||
print $1 flagmarker pbad >> illegalcombos
|
||||
}
|
||||
else if (sufs == 1)
|
||||
{
|
||||
print $1 flagmarker snew2
|
||||
print $1 flagmarker sbad >> illegalcombos
|
||||
}
|
||||
else if (pres > 0)
|
||||
{
|
||||
print $1 flagmarker pnew2
|
||||
print $1 flagmarker pbad >> illegalcombos
|
||||
}
|
||||
else
|
||||
{
|
||||
print $1 flagmarker snew2
|
||||
print $1 flagmarker sbad >> illegalcombos
|
||||
}
|
||||
}
|
||||
ENDOFAWKSCRIPT
|
||||
: > $ILLEGALCOMBOS
|
||||
dbnum=1
|
||||
while [ -s $CROSSROOTS ]
|
||||
do
|
||||
#
|
||||
# CROSSROOTS contains the roots whose cross-product expansions
|
||||
# might be illegal. We now need to locate the actual illegal ones.
|
||||
# We do this in much the same way we created LEGALFLAGLIST from
|
||||
# CRUNCHEDINPUT. First we make CROSSEXPANDED, which is analogous
|
||||
# to EXPANDEDPAIRS.
|
||||
#
|
||||
$verbose && echo "Creating cross expansions (pass $dbnum)." 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 2'
|
||||
else
|
||||
sortopts='+1'
|
||||
fi
|
||||
$ISPELL "$wchars" -e3 -d $FAKEHASH -p /dev/null < $CROSSROOTS \
|
||||
| sort $SORTTMP $sortopts > $CROSSEXPANDED
|
||||
#
|
||||
# Now we join CROSSEXPANDED against EXPANDEDINPUT to produce
|
||||
# CROSSPAIRS, and then comm that against CROSSEXPANDED to
|
||||
# get CROSSILLEGAL, the list of illegal cross-product flag
|
||||
# combinations.
|
||||
#
|
||||
$JOIN -j1 2 -o 1.1 1.2 $SIGNED $CROSSEXPANDED $EXPANDEDINPUT \
|
||||
| sort $SORTTMP -u > $CROSSPAIRS
|
||||
|
||||
sort $SORTTMP -u -o $CROSSEXPANDED $CROSSEXPANDED
|
||||
|
||||
$verbose \
|
||||
&& echo "Finding illegal cross expansions (pass $dbnum)." 1>&2
|
||||
comm -13 $CROSSPAIRS $CROSSEXPANDED \
|
||||
| sed -e 's; .*$;;' \
|
||||
| uniq > $CROSSILLEGAL
|
||||
|
||||
if [ "$debug" = yes ]
|
||||
then
|
||||
mv $CROSSROOTS $DBDIR/CROSSROOTS.$dbnum
|
||||
ln $CROSSEXPANDED $DBDIR/CROSSEXP.$dbnum
|
||||
ln $CROSSPAIRS $DBDIR/CROSSPAIRS.$dbnum
|
||||
ln $CROSSILLEGAL $DBDIR/CROSSILLEGAL.$dbnum
|
||||
fi
|
||||
#
|
||||
# Now it is time to try to clear up the illegalities. For
|
||||
# each word in the illegal list, remove one of the cross-product
|
||||
# flags. The flag chosen is selected in an attempt to cure the
|
||||
# problem quickly, as follows: (1) if there is only one suffix
|
||||
# flag or only one prefix flag, we remove that. (2) If there is
|
||||
# a prefix flag, we remove the "least desirable" (according to
|
||||
# the order of preflags). (This may be pro-English prejudice,
|
||||
# and you might want to change this if your language is prefix-heavy).
|
||||
# (3) Otherwise we remove the least-desirable suffix flag
|
||||
#
|
||||
# The output of the awk script becomes the new CROSSROOTS. In
|
||||
# addition, we add the rejected flags to ILLEGALCOMBOS (this is done
|
||||
# inside the awk script) so they can be removed from LEGALFLAGLIST
|
||||
# later.
|
||||
#
|
||||
awk "-F$flagmarker" -f $AWKSCRIPT $CROSSILLEGAL > $CROSSROOTS
|
||||
if [ "$debug" = yes ]
|
||||
then
|
||||
rm -f $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL
|
||||
fi
|
||||
dbnum=`expr $dbnum + 1`
|
||||
if [ $dbnum -gt 100 ]
|
||||
then
|
||||
echo "Too many passes, aborting cross-product loop. Munchlist failed." 1>&2
|
||||
if [ "X$MUNCHMAIL" != X ]
|
||||
then
|
||||
(
|
||||
ls -ld ${DBDIR}/[A-Z]*
|
||||
cat ${MAILDEBUGDIR}/munchlist.mail
|
||||
) | mail -s 'Munchlist debug output' "$MUNCHMAIL"
|
||||
rm -f ${MAILDEBUGDIR}/munchlist.mail
|
||||
fi
|
||||
rm -rf $MUNCHDIR
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
rm -f $CROSSEXPANDED $CROSSPAIRS $CROSSILLEGAL $AWKSCRIPT
|
||||
#
|
||||
# Now we have, in ILLEGALCOMBOS, a list of root/flag combinations
|
||||
# that must be removed from LEGALFLAGLIST to get the final list
|
||||
# of truly legal flags. ILLEGALCOMBOS has one flag per line, so
|
||||
# by turning LEGALFLAGLIST into this form (sed), it's an
|
||||
# easy task for comm. We have to recombine flags again after the
|
||||
# extraction, to get all flags for a given root on the same line so that
|
||||
# cross-products will come out right.
|
||||
#
|
||||
if [ -s $ILLEGALCOMBOS ]
|
||||
then
|
||||
sort $SORTTMP -u -o $ILLEGALCOMBOS $ILLEGALCOMBOS
|
||||
$verbose && echo 'Finding roots of cross expansions.' 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 1f,1 -k 1'
|
||||
else
|
||||
sortopts='+0f -1 +0'
|
||||
fi
|
||||
sort $SORTTMP $LEGALFLAGLIST \
|
||||
| sed -e '/\/../{
|
||||
s;^\(.*\)/\(.\)\(.*\);\1/\2\
|
||||
\1/\3;
|
||||
P
|
||||
D
|
||||
}' \
|
||||
| comm -23 - $ILLEGALCOMBOS \
|
||||
| sort $SORTTMP -u "-t$flagmarker" $sortopts \
|
||||
| $COMBINE "$wchars" $langtabs > $CROSSROOTS
|
||||
mv $CROSSROOTS $LEGALFLAGLIST
|
||||
if [ "$debug" = yes ]
|
||||
then
|
||||
rm -f ${DBDIR}/LEGALFLAGLIST1
|
||||
ln $LEGALFLAGLIST ${DBDIR}/LEGALFLAGLIST1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f $PRODUCTLIST $CROSSROOTS $ILLEGALCOMBOS $EXPANDEDINPUT
|
||||
#
|
||||
|
||||
# We now have (in LEGALFLAGLIST) a list of roots and flags which will
|
||||
# accept words taken from EXPANDEDINPUT and no others (though some of
|
||||
# EXPANDEDINPUT is not covered by this list). However, many of the
|
||||
# expanded words can be generated in more than one way. For example,
|
||||
# "bather" can be generated from "bath/R" and "bathe/R". This wastes
|
||||
# unnecessary space in the raw dictionary and, in some cases, in the
|
||||
# hash file as well. The solution is to list the various ways of
|
||||
# getting a given word and choose exactly one. All other things being
|
||||
# equal, we want to choose the one with the highest expansion length
|
||||
# to root length ratio. The $ISPELL -e4 option takes care of this by
|
||||
# providing us with a field to sort on.
|
||||
#
|
||||
# The ispell/awk combination is similar to the ispell/sed pipe used to
|
||||
# generate EXPANDEDPAIRS, except that ispell adds an extra field
|
||||
# giving the sort order. The first sort gets things in order so the
|
||||
# first root listed is the one we want, and the second sort (-um) then
|
||||
# selects that first root. Sed strips the expansion from the root,
|
||||
# and a final sort -u generates MINIMALAFFIXES, the final list of
|
||||
# affixes that (more or less) minimally covers what it can from
|
||||
# EXPANDEDINPUT.
|
||||
#
|
||||
$verbose && echo 'Eliminating non-optimal affixes.' 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts1='-k 2,2 -k 2rn,3 -k 1,1'
|
||||
sortopts2='-k 2,2'
|
||||
sortopts3='-k 1f,1 -k 1'
|
||||
else
|
||||
sortopts1='+1 -2 +2rn -3 +0 -1'
|
||||
sortopts2='+1 -2'
|
||||
sortopts3='+0f -1 +0'
|
||||
fi
|
||||
$ISPELL "$wchars" -e4 -d $FAKEHASH -p /dev/null < $LEGALFLAGLIST \
|
||||
| sort $SORTTMP $sortopts1 \
|
||||
| sort $SORTTMP -um $sortopts2 \
|
||||
| sed -e 's; .*$;;' \
|
||||
| sort $SORTTMP -u "-t$flagmarker" $sortopts3 > $MINIMALAFFIXES
|
||||
rm -f $LEGALFLAGLIST
|
||||
#
|
||||
# Now we're almost done. MINIMALAFFIXES covers some (with luck, most)
|
||||
# of the words in STRIPPEDINPUT. Now we must create a list of the remaining
|
||||
# words (those omitted by MINIMALAFFIXES) and add it to MINIMALAFFIXES.
|
||||
# The best way to do this is to actually build a partial dictionary from
|
||||
# MINIMALAFFIXES in FAKEHASH, and then use $ISPELL -l to list the words that
|
||||
# are not covered by this dictionary. This must then be combined with the
|
||||
# reduced version of MINIMALAFFIXES and sorted to produce the final result.
|
||||
#
|
||||
$verbose && echo "Generating output word list." 1>&2
|
||||
if $CRETIN_SORT
|
||||
then
|
||||
sortopts='-k 1f,1 -k 1'
|
||||
else
|
||||
sortopts='+0f -1 +0'
|
||||
fi
|
||||
if [ -s $MINIMALAFFIXES ]
|
||||
then
|
||||
$BUILDHASH -s $MINIMALAFFIXES $langtabs $FAKEHASH > /dev/null \
|
||||
|| (echo "Couldn't create intermediate hash file" 1>&2;
|
||||
rm -rf $MUNCHDIR;
|
||||
exit 1) \
|
||||
|| exit 1
|
||||
if [ "$debug" = yes ]
|
||||
then
|
||||
rm -f ${DBDIR}/MINIMALAFFIXES!!STATSUFFIX!!
|
||||
ln $MINIMALAFFIXES!!STATSUFFIX!! ${DBDIR}/MINIMALAFFIXES.!!STATSUFFIX!!
|
||||
fi
|
||||
($ISPELL "$wchars" -l -d $FAKEHASH -p /dev/null < $STRIPPEDINPUT; \
|
||||
$COMBINE "$wchars" $langtabs < $MINIMALAFFIXES) \
|
||||
| sort $SORTTMP "-t$flagmarker" -u $sortopts
|
||||
else
|
||||
# MINIMALAFFIXES is empty; just produce a sorted version of STRIPPEDINPUT
|
||||
sort $SORTTMP "-t$flagmarker" -u $sortopts $STRIPPEDINPUT
|
||||
fi
|
||||
if [ "X$MUNCHMAIL" != X ]
|
||||
then
|
||||
(
|
||||
ls -ld ${DBDIR}/[A-Z]*
|
||||
cat ${MAILDEBUGDIR}/munchlist.mail
|
||||
) | mail -s 'Munchlist debug output' "$MUNCHMAIL"
|
||||
rm -f ${MAILDEBUGDIR}/munchlist.mail
|
||||
fi
|
||||
rm -rf $MUNCHDIR
|
||||
exit 0
|
2118
external/ispell/parse.y
vendored
Normal file
2118
external/ispell/parse.y
vendored
Normal file
File diff suppressed because it is too large
Load diff
329
external/ispell/pc/README
vendored
Normal file
329
external/ispell/pc/README
vendored
Normal file
|
@ -0,0 +1,329 @@
|
|||
How to build Ispell on MS-DOS
|
||||
-----------------------------
|
||||
|
||||
This directory includes files necessary to build Ispell on MS-DOS and
|
||||
MS-Windows systems. Two environments are supported: EMX/GCC and
|
||||
DJGPP; they both generate 32-bit protected-mode programs and therefore
|
||||
aren't afflicted by most of the MS-DOS memory-related limitations.
|
||||
The EMX setup does not currently support building the dictionaries, so
|
||||
you will need to either build the dictionaries with DJGPP tools or get
|
||||
them elsewhere. The DJGPP executables will also run on all versions
|
||||
of MS-Windows (3.x, 9x, ME, W2K, XP, and NT4) as DOS console applications.
|
||||
|
||||
|
||||
1. Building Ispell with EMX/GCC
|
||||
----------------------------
|
||||
|
||||
You will only need the basic EMX development tools to compile
|
||||
Ispell. After unzipping the source archive, invoke the
|
||||
MAKEEMX.BAT batch file, like so:
|
||||
|
||||
pc\makeemx
|
||||
|
||||
This generates ispell.exe and the following auxiliary programs:
|
||||
|
||||
buildhas.exe icombine.exe ijoin.exe
|
||||
|
||||
Install the programs anywhere along your PATH. See the section
|
||||
named "Environment Variables" for information on environment
|
||||
variables used by the MS-DOS port of Ispell.
|
||||
|
||||
|
||||
2. Building Ispell (no dictionaries) with DJGPP
|
||||
--------------------------------------------
|
||||
|
||||
If you only need to compile Ispell without building the
|
||||
dictionaries, use the MAKE-DJ.BAT batch file:
|
||||
|
||||
pc\make-dj
|
||||
|
||||
You will need the standard DJGPP development environment
|
||||
(djdevNNN.zip, gccNNNNb.zip, bnuNNNb.zip) and the DJGPP port of
|
||||
GNU Bison (bsnNNNb.zip) for the above to work. After the build is
|
||||
finished, read the section below about environment variables and
|
||||
install the executables and the dictionaries as you see fit.
|
||||
|
||||
|
||||
3. Building Ispell and the dictionaries with DJGPP
|
||||
-----------------------------------------------
|
||||
|
||||
In addition to the standard development environment, you will need
|
||||
additional tools to build Ispell and the dictionaries. If you are
|
||||
building on Windows 2000 or XP, make sure to download and install
|
||||
the latest djdevNNN.zip and the latest ports of all the utilities
|
||||
mentioned below; old binaries might be incompatible with the DOS
|
||||
emulation that is part of Windows 2K/XP.
|
||||
|
||||
Here's the list of packages you will need:
|
||||
|
||||
a. A port of Unix-like shell. The only shell that was used
|
||||
successfully to build Ispell on MS-DOS is the port of Bash,
|
||||
which should be available from DJGPP archives:
|
||||
|
||||
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/bshNNNb.zip
|
||||
|
||||
If you are thinking about using Stewartson's `ms_sh', don't:
|
||||
its method of passing long command lines is incompatible with
|
||||
DJGPP, and it will crash and burn on complex shell scripts.
|
||||
|
||||
b. A DJGPP port of GNU Make 3.79 or later.
|
||||
This is available from DJGPP archives at the following URL:
|
||||
|
||||
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/makNNNb.zip
|
||||
|
||||
Note that ports of GNU Make prior to 3.75 didn't support a
|
||||
Unix-like shell, so you won't be able to build Ispell with them.
|
||||
|
||||
c. A DJGPP port of GNU Fileutils, GNU Textutils and GNU Sh-utils,
|
||||
also available from DJGPP archives:
|
||||
|
||||
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/filNNNb.zip
|
||||
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/txtNNNb.zip
|
||||
ftp://ftp.delorie.com/pub/djgpp/current/v2gnu/shlNNNb.zip
|
||||
|
||||
In all of these URLs, NNN is a version number. If there is
|
||||
more than one ported version, get the latest one.
|
||||
|
||||
The build process doesn't need *all* of the programs from these
|
||||
packages, so if you are short on disk space, you should be able
|
||||
to get away with these programs (I hope I didn't forget some):
|
||||
|
||||
Fileutils: rm, mv, chmod, install, mkdir, ln, cp, touch, ls
|
||||
Textutils: cat, head, tail, sort, comm, wc, join, uniq
|
||||
Sh-utils: echo, expr, false, true
|
||||
|
||||
d. GNU Sed (sedNNNb.zip from the DJGPP archives).
|
||||
|
||||
e. GNU Awk (or any other port of Awk). Gawk is available from the
|
||||
DJGPP site above (v2gnu/gwkNNNb.zip).
|
||||
|
||||
f. GNU Bison (bsnNNNb.zip from the DJGPP site).
|
||||
|
||||
g. GNU Grep (grepNNb.zip from the DJGPP site).
|
||||
|
||||
h. ctags and etags (for the `TAGS' and `tags' targets of the
|
||||
Makefile). These are available from the Emacs distribution,
|
||||
also on the DJGPP archive site above (v2gnu/emNNNNb.zip).
|
||||
|
||||
While you probably can find quite a few different ports of the
|
||||
above utilities, I would generally advise against using anything
|
||||
but the DJGPP ports, since the Makefiles and the shell scripts
|
||||
depend on long command lines and will most probably break
|
||||
otherwise. DJGPP ports are a coherent set of tools which will
|
||||
work together well and ensure that the Makefiles and the scripts
|
||||
work as advertised.
|
||||
|
||||
Here is what you should do to build Ispell:
|
||||
|
||||
1) Install the above utilities anywhere along your PATH. Make
|
||||
sure that you don't have any other executable called `sh'
|
||||
either in /bin (if you have such a directory) or anywhere else
|
||||
along your PATH *prior* to the directory where you installed
|
||||
the bash port. When Make runs, it will invoke the first
|
||||
program named `sh' that it finds in /bin or along the PATH, and
|
||||
you need to ensure that the right program is called.
|
||||
|
||||
2) Review the options set in pc/local.djgpp and change them as you
|
||||
see fit. Some things that you might consider changing are the
|
||||
pathnames of the standard directories, the dictionaries that
|
||||
will be built (see below), the backup extension ("~" by
|
||||
default), and the dictionaries you want to build.
|
||||
|
||||
3) By default, the American medium dictionary is built. I
|
||||
recommend building the ``plus'' version, but it requires an
|
||||
extra dictionary that is copyrighted. However, you should be
|
||||
able to find it on any Unix or GNU/Linux box, usually in the file
|
||||
/usr/dict/words or /usr/share/dict/words. If you do decide to
|
||||
build a ``plus'' version of the dictionary, be sure to put its
|
||||
full path in the EXTRADICTS variable in the file local.djgpp
|
||||
(default: "c:/usr/lib/words".
|
||||
|
||||
4) Set the TMPDIR environment variable to point to a place that has
|
||||
at least 20MB of free space, for the temporary files produced
|
||||
by the dictionary build process. This is especially important
|
||||
to those who point TMPDIR to a RAM drive, since these tend to
|
||||
be much smaller than 20MB.
|
||||
|
||||
5) Type these commands:
|
||||
|
||||
pc\configdj
|
||||
make
|
||||
|
||||
This will run for some time, depending on the dictionaries that
|
||||
you've chosen to build. The default setup builds a non-plus
|
||||
version of a medium-sized american dictionary, and should take
|
||||
about 1/2 a minute on a reasonably fast PC. Note that on MS-DOS
|
||||
the build time does not depend so much on the dictionary size as
|
||||
it does on Unix: it takes less than 2 minutes for a 2.4GHz PC to
|
||||
build the extra-large plus version with a 200KB /usr/dict/words
|
||||
file. I believe the reason for this is that the build process is
|
||||
much more I/O-bound on MS-DOS than it is on Unix, since MS-DOS
|
||||
pipes are simulated with disk files.
|
||||
|
||||
If pc/configdj.bat complains that it runs out of environment
|
||||
space, enlarge the environment available to COMMAND.COM (or
|
||||
whatever your interactive command processor is).
|
||||
|
||||
When the dictionaries are built, you might see error messages,
|
||||
about ``Improper links'', like so:
|
||||
|
||||
c:/djgpp/bin/ln: cannot create symbolic link `./english.0' \
|
||||
to `../english/english.0': Improper link (EXDEV)
|
||||
|
||||
You can safely disregard these messages: they are due to the
|
||||
fact that MS-DOS doesn't support symbolic links. The Makefile
|
||||
already has a provision for alternative methods, which are
|
||||
automatically used in case of failures and which do work on
|
||||
MS-DOS.
|
||||
|
||||
Another error message that you might see is something like
|
||||
this:
|
||||
|
||||
Word 'U.S.A' contains illegal characters
|
||||
|
||||
This means that some of the words in the EXTRADICT dictionary
|
||||
are incompatible with Ispell, and Ispell is ignoring them when
|
||||
it builds hashed dictionary. (The file `/usr/dict/words' from
|
||||
Solaris machines is known to have this problem.) The rest of
|
||||
the words are OK and will be used by Ispell, so here, too, you
|
||||
don't have to do anything about the error message.
|
||||
|
||||
6) After Make finishes, install the programs and the dictionaries
|
||||
as you see fit. The dictionary files you need to install are
|
||||
the files with a .hash extension in the subdirectories of
|
||||
languages/ directory (e.g. languages/american/amermedx.hash),
|
||||
the file languages/english/english.aff, and the documentation
|
||||
files ispell.1, ispell.5, fields.3, and english.5. If you say
|
||||
"make install", Make should do this automatically.
|
||||
|
||||
7) If you need to use some of the shell scripts (such as iwhich
|
||||
and Makekit), you will need to edit them to replace the first
|
||||
which says:
|
||||
|
||||
: Use /bin/sh
|
||||
|
||||
to say this instead:
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
4. Dictionary names
|
||||
----------------
|
||||
|
||||
The filenames used for the dictionaries on Unix are too long for
|
||||
MS-DOS, and will cause filename clashes or failed programs.
|
||||
Therefore, the MS-DOS configuration script for DJGPP edits the
|
||||
Makefiles to change these names as follows:
|
||||
|
||||
americansml -> amersml
|
||||
americanmed -> amermed
|
||||
americanlrg -> amerlrg
|
||||
americanxlg -> amerxlg
|
||||
altamersml -> altasml
|
||||
altamermed -> altamed
|
||||
altamerlrg -> altalrg
|
||||
altamerxlg -> altaxlg
|
||||
britishsml -> britsml
|
||||
britishmed -> britmed
|
||||
britishlrg -> britlrg
|
||||
britishxlg -> britxlg
|
||||
|
||||
In addition, the `+' character (which is invalid in MS-DOS
|
||||
filenames) is converted into an `x', and if the `+' is at the end
|
||||
of the extension, it is moved into the first 8 characters of the
|
||||
basename. Thus, americanlrg+.hash is converted into amerlrgx.hash
|
||||
and american.sml+ into americax.sml:
|
||||
|
||||
american.sml+ -> americax.sml
|
||||
american.med+ -> americax.med
|
||||
american.lrg+ -> americax.lrg
|
||||
american.xlg+ -> americax.xlg
|
||||
british.sml+ -> britishx.sml
|
||||
british.med+ -> britishx.med
|
||||
british.lrg+ -> britishx.lrg
|
||||
british.xlg+ -> britishx.xlg
|
||||
|
||||
These DOSified filenames are the ones that you should use if you
|
||||
decide to change the dictionaries generated by the build process.
|
||||
The easiest way to know what are the DOS names of the different
|
||||
dictionaries is to look at the edited Makefiles in languages/
|
||||
subdirectories after you build Ispell once for the default
|
||||
dictionaries.
|
||||
|
||||
|
||||
5. Environment variables
|
||||
---------------------
|
||||
|
||||
Ispell uses environment variables to make it easier to support
|
||||
different installations. Most of these variables tell Ispell
|
||||
where to look for its hashed and private dictionaries. These
|
||||
variables are documented on the ispell.1 man page and in the Info
|
||||
docs for Ispell. Below is the list of DOS-specific environment
|
||||
variables that are not covered by the Ispell docs:
|
||||
|
||||
ISPELL_OPTIONS - the default options to pass to Ispell. These
|
||||
are passed to Ispell as if they were typed by
|
||||
you before all the options you actually
|
||||
mentioned on the Ispell command line. Since
|
||||
Ispell parses options left to right,
|
||||
options from the command line may override
|
||||
those in `ISPELL_OPTIONS' variable.
|
||||
|
||||
ISPELL_DICTDIR - the directory where Ispell will look for the
|
||||
alternate hashed dictionary file. The
|
||||
default dictionary pathname is built into
|
||||
Ispell when it is compiled (see the
|
||||
definition of LIBDIR and DEFHASH on local.h
|
||||
file, local.djgpp or local.emx), but you can
|
||||
set this variable, which will allow you to
|
||||
name alternate dictionaries relative to the
|
||||
directory named by it, avoiding a long
|
||||
pathname.
|
||||
|
||||
ISPELL_HOME - replaces HOME on Unix systems. This is where
|
||||
Ispell looks for a personal dictionary if it
|
||||
is given as a relative pathname.
|
||||
|
||||
ISPELL_COLORS - the colors which will be used by Ispell for
|
||||
the normal and "standout" text. By default,
|
||||
these are the normal and inverse video
|
||||
colors, but you may set them to any colors
|
||||
you like. The color descriptor is a pair of
|
||||
numbers separated by a dot; the first number
|
||||
is the color text attribute that will be set
|
||||
for the normal text, and the second is the
|
||||
attribute for the "standout" text (the
|
||||
misspelled words). The text color attributes
|
||||
are the usual PC background/foreground
|
||||
definitions. My favorite setting is this:
|
||||
|
||||
set ISPELL_COLORS=0x1e.0x74
|
||||
|
||||
which sets the normal colors to yellow on
|
||||
blue and the "standout" colors to red on
|
||||
white. The color descriptor is parsed by a
|
||||
call to `strtoul' library function, so you
|
||||
can use octal and hex numbers as well as
|
||||
decimal ones.
|
||||
|
||||
This color feature is only supported by the
|
||||
DJGPP port of Ispell.
|
||||
|
||||
LINES - the size of the screen to be used by Ispell.
|
||||
Although this is not a DOS-specific variable,
|
||||
it does have a DOS-specific effect on the
|
||||
DJGPP port of Ispell: if the value of this
|
||||
variable is different from the current screen
|
||||
size, Ispell will set the screen size to the
|
||||
size given by LINES (and restore the original
|
||||
size when it exits or shells out to DOS).
|
||||
The following sizes are supported by the
|
||||
DJGPP port on a standard VGA display: 25, 28,
|
||||
35, 40, 43 and 50 lines. If you want to run
|
||||
Ispell in some other non-standard screen
|
||||
size, set the display to that size before
|
||||
running Ispell and set LINES to that size.
|
||||
|
||||
|
||||
Enjoy,
|
||||
Eli Zaretskii <eliz@gnu.org>
|
26
external/ispell/pc/cfglang.sed
vendored
Normal file
26
external/ispell/pc/cfglang.sed
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/sed -f
|
||||
#
|
||||
# Fix up file names which are either invalid on MSDOS, or clash with each
|
||||
# other in the restricted 8+3 file-name space
|
||||
#
|
||||
s/americansml/amersml/g
|
||||
s/americanmed/amermed/g
|
||||
s/americanlrg/amerlrg/g
|
||||
s/americanxlg/amerxlg/g
|
||||
s/altamersml/altasml/g
|
||||
s/altamermed/altamed/g
|
||||
s/altamerlrg/altalrg/g
|
||||
s/altamerxlg/altaxlg/g
|
||||
s/britishsml/britsml/g
|
||||
s/britishmed/britmed/g
|
||||
s/britishlrg/britlrg/g
|
||||
s/britishxlg/britxlg/g
|
||||
s/\(..*\)-alt\./alt\1./g
|
||||
s/+\.hash/x.hash/g
|
||||
s/\([^.]\)\.\([^.+][^.+]*\)+/\1x.\2/g
|
||||
s/americanx/americax/g
|
||||
#
|
||||
# Make sure Bash uses Unix-style PATH
|
||||
#
|
||||
/^SHELL *=/i\
|
||||
PATH_SEPARATOR=:
|
14
external/ispell/pc/cfgmain.sed
vendored
Normal file
14
external/ispell/pc/cfgmain.sed
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
/^ *\$\$SORTTMP/i\
|
||||
-e 's@/munch\\$$\\$$@/mu$$$$@g' \\\
|
||||
-e 's@/faff\\$$\\$$@/fa$$$$@g' \\\
|
||||
-e 's@/sset\\$$\\$$\\.@/se$$$$@g' \\
|
||||
/^ *while \[ "X\$\$LANGUAGES" != X \]/i\
|
||||
[ -r languages/english/Makefile.orig ] \\\
|
||||
|| (cd languages/english; mv -f Makefile Makefile.orig; \\\
|
||||
../../pc/cfglang.sed Makefile.orig > Makefile); \\
|
||||
/^ cd languages\/$$dir; \\/a\
|
||||
[ -r Makefile.orig ] \\\
|
||||
|| (mv -f Makefile Makefile.orig; \\\
|
||||
../../pc/cfglang.sed Makefile.orig > Makefile); \\
|
||||
/^ijoin.o:/i\
|
||||
term.o: pc/djterm.c
|
11
external/ispell/pc/configdj.bat
vendored
Normal file
11
external/ispell/pc/configdj.bat
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
@echo off
|
||||
echo Configuring Ispell for DJGPP...
|
||||
update pc/local.djgpp local.h
|
||||
if not exist Makefile.orig ren Makefile Makefile.orig
|
||||
sed -f pc/cfgmain.sed Makefile.orig > Makefile
|
||||
if "%TMPDIR%"=="" set TMPDIR=.
|
||||
set PATH_SEPARATOR=:
|
||||
set TEST_FINDS_EXE=y
|
||||
rem if not exist %SYSROOT%\tmp\nul md %SYSROOT%\tmp
|
||||
echo You are now ready to run Make
|
||||
:End
|
439
external/ispell/pc/djterm.c
vendored
Normal file
439
external/ispell/pc/djterm.c
vendored
Normal file
|
@ -0,0 +1,439 @@
|
|||
#ifndef lint
|
||||
static char DJGPP_Rcs_Id[] =
|
||||
"$Id";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* djterm.c - DJGPP-specific terminal driver for Ispell
|
||||
*
|
||||
* Eli Zaretskii <eliz@is.elta.co.il>, 1996, 2001
|
||||
*
|
||||
* Copyright 1996, Geoff Kuenning, Granada Hills, CA
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All modifications to the source code must be clearly marked as
|
||||
* such. Binary redistributions based on modified source code
|
||||
* must be clearly marked as modified versions in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 4. The code that causes the 'ispell -v' command to display a prominent
|
||||
* link to the official ispell Web site may not be removed.
|
||||
* 5. The name of Geoff Kuenning may not be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Log: djterm.c,v $
|
||||
* Revision 1.4 2005/05/01 23:03:25 geoff
|
||||
* Updates from Eli Zaretskii.
|
||||
*
|
||||
* Revision 1.3 2005/04/13 23:54:23 geoff
|
||||
* Update license.
|
||||
*
|
||||
* Revision 1.2 2001/09/06 00:33:35 geoff
|
||||
* Make the license consistent, and do some style cleanups.
|
||||
*
|
||||
* Revision 1.1 2001/09/01 06:40:21 geoff
|
||||
* As received from Eli
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
** DJGPP currently doesn't support Unixy ioctl directly, so we
|
||||
** have to define minimal support here via the filesystem extensions.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <conio.h>
|
||||
#include <sys/fsext.h>
|
||||
|
||||
static struct text_info txinfo;
|
||||
static unsigned char * saved_screen;
|
||||
static unsigned char ispell_norm_attr, ispell_sout_attr;
|
||||
|
||||
/* These declarations are on <sys/ioctl.h>, but as of DJGPP v2.03 they
|
||||
are ifdefed away. To accomodate for both old and new versions,
|
||||
where some of the TIOC* commands might be supported, we override
|
||||
any possible definitions of those commands, but provide
|
||||
declarations of structures they use only if they are not provided
|
||||
by the library. */
|
||||
#ifdef TIOCGWINSZ
|
||||
#undef TIOCGWINSZ
|
||||
#else
|
||||
struct winsize
|
||||
{
|
||||
unsigned short ws_row;
|
||||
unsigned short ws_col;
|
||||
unsigned short ws_xpixel;
|
||||
unsigned short ws_ypixel;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef TIOCGETP
|
||||
#undef TIOCGETP
|
||||
#else
|
||||
struct sgttyb
|
||||
{
|
||||
char sg_ispeed;
|
||||
char sg_ospeed;
|
||||
char sg_erase;
|
||||
char sg_kill;
|
||||
short sg_flags;
|
||||
};
|
||||
#endif
|
||||
|
||||
#undef IOCPARM_MASK
|
||||
#undef IOC_OUT
|
||||
#undef IOC_IN
|
||||
#undef IOC_INOUT
|
||||
|
||||
#define IOCPARM_MASK 0x7f
|
||||
#define IOC_OUT 0x40000000
|
||||
#define IOC_IN 0x80000000
|
||||
#define IOC_INOUT (IOC_IN|IOC_OUT)
|
||||
|
||||
#undef _IOR
|
||||
#undef _IOW
|
||||
#undef _IOWR
|
||||
|
||||
#define _IOR(x,y,t) (IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
|
||||
#define _IOW(x,y,t) (IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
|
||||
#define _IOWR(x,y,t) (IOC_INOUT|((sizeof(t)&IOCPARM_MASK)<<16)|(x<<8)|y)
|
||||
|
||||
#undef TIOCGPGRP
|
||||
#undef TIOCSETP
|
||||
#undef CBREAK
|
||||
#undef ECHO
|
||||
|
||||
/* These are the only ones we support here. */
|
||||
#define TIOCGWINSZ _IOR('t', 104, struct winsize)
|
||||
#define TIOCGPGRP _IOR('t', 119, int)
|
||||
#define TIOCGETP _IOR('t', 8, struct sgttyb)
|
||||
#define TIOCSETP _IOW('t', 9, struct sgttyb)
|
||||
#define CBREAK 0x00000002
|
||||
#define ECHO 0x00000008
|
||||
|
||||
/* This will be called by low-level I/O functions. */
|
||||
static int djgpp_term (__FSEXT_Fnumber func, int *retval, va_list rest_args)
|
||||
{
|
||||
int fhandle = va_arg (rest_args, int);
|
||||
|
||||
/*
|
||||
** We only support ioctl on STDIN and write on STDOUT/STDERR.
|
||||
*/
|
||||
if (func == __FSEXT_ioctl && fhandle == fileno (stdin)
|
||||
&& isatty (fhandle))
|
||||
{
|
||||
int cmd = va_arg (rest_args, int);
|
||||
|
||||
switch (cmd)
|
||||
{
|
||||
case TIOCGWINSZ:
|
||||
{
|
||||
struct winsize *winfo = va_arg (rest_args, struct winsize *);
|
||||
|
||||
winfo->ws_row = ScreenRows ();
|
||||
winfo->ws_col = ScreenCols ();
|
||||
winfo->ws_xpixel = 1;
|
||||
winfo->ws_ypixel = 1;
|
||||
*retval = 0;
|
||||
break;
|
||||
}
|
||||
case TIOCGPGRP:
|
||||
*retval = 0;
|
||||
break;
|
||||
case TIOCGETP:
|
||||
{
|
||||
struct sgttyb * gtty = va_arg (rest_args, struct sgttyb *);
|
||||
gtty->sg_ispeed = gtty->sg_ospeed = 0; /* unused */
|
||||
gtty->sg_erase = K_BackSpace;
|
||||
gtty->sg_kill = K_Control_U;
|
||||
gtty->sg_flags = 0; /* unused */
|
||||
*retval = 0;
|
||||
break;
|
||||
}
|
||||
case TIOCSETP:
|
||||
*retval = 0;
|
||||
break;
|
||||
default:
|
||||
*retval = -1;
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
else if (func == __FSEXT_write
|
||||
&& (fhandle == fileno (stdout) || fhandle == fileno (stderr))
|
||||
&& isatty (fhandle) && termchanged)
|
||||
{
|
||||
/*
|
||||
** Cannot write the output as is, because it might include
|
||||
** TABS. We need to expand them into suitable number of spaces.
|
||||
*/
|
||||
int col;
|
||||
int dummy;
|
||||
char * buf = va_arg (rest_args, char *);
|
||||
size_t buflen = va_arg (rest_args, size_t);
|
||||
char * local_buf;
|
||||
char * s;
|
||||
char * d;
|
||||
|
||||
if (!buf)
|
||||
{
|
||||
errno = EINVAL;
|
||||
*retval = -1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
*retval = buflen; /* `_write' expects number of bytes written */
|
||||
local_buf = (char *) alloca (buflen+8+1); /* 8 for TAB, 1 for '\0' */
|
||||
ScreenGetCursor (&dummy, &col);
|
||||
|
||||
for (s = buf, d = local_buf; buflen--; s++)
|
||||
{
|
||||
if (*s == '\0') /* `cputs' treats '\0' as end of string */
|
||||
{
|
||||
*d = *s;
|
||||
cputs (local_buf);
|
||||
putch (*s);
|
||||
d = local_buf;
|
||||
col++;
|
||||
}
|
||||
else if (*s == '\t')
|
||||
{
|
||||
*d++ = ' ';
|
||||
col++;
|
||||
while (col % 8)
|
||||
{
|
||||
*d++ = ' ';
|
||||
col++;
|
||||
}
|
||||
*d = '\0';
|
||||
cputs (local_buf);
|
||||
d = local_buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
*d++ = *s;
|
||||
if (*s == '\r')
|
||||
col = 0;
|
||||
else if (*s != '\n')
|
||||
col++;
|
||||
}
|
||||
}
|
||||
if (d > local_buf)
|
||||
{
|
||||
*d = '\0';
|
||||
cputs (local_buf);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* This is called before `main' to install our terminal handler. */
|
||||
static void __attribute__((constructor))
|
||||
djgpp_ispell_startup (void)
|
||||
{
|
||||
__FSEXT_set_function (fileno (stdin), djgpp_term);
|
||||
__FSEXT_set_function (fileno (stdout), djgpp_term);
|
||||
__FSEXT_set_function (fileno (stderr), djgpp_term);
|
||||
}
|
||||
|
||||
/* DJGPP-specific screen initialization and deinitialization. */
|
||||
static void djgpp_init_terminal (void)
|
||||
{
|
||||
if (li == 0)
|
||||
{
|
||||
/*
|
||||
** On MSDOS/DJGPP platforms, colors are used for normal and
|
||||
** inverse-video displays. The colors and screen size seen
|
||||
** at program startup are saved, to be restored before exit.
|
||||
** The screen contents are also saved and restored.
|
||||
*/
|
||||
char * ispell_colors;
|
||||
|
||||
gettextinfo (&txinfo);
|
||||
saved_screen = (unsigned char *) malloc (
|
||||
txinfo.screenwidth * txinfo.screenheight * 2);
|
||||
if (saved_screen)
|
||||
ScreenRetrieve (saved_screen);
|
||||
|
||||
/*
|
||||
** Let the user specify their favorite colors for normal
|
||||
** and standout text, like so:
|
||||
**
|
||||
** set ISPELL_COLORS=0x1e.0x74
|
||||
** se so
|
||||
*/
|
||||
ispell_colors = getenv ("ISPELL_COLORS");
|
||||
if (ispell_colors != NULL)
|
||||
{
|
||||
char * next;
|
||||
unsigned long coldesc = strtoul (ispell_colors, &next, 0);
|
||||
|
||||
if (next == ispell_colors || coldesc > UCHAR_MAX)
|
||||
ispell_colors = NULL;
|
||||
else
|
||||
{
|
||||
char * endp;
|
||||
|
||||
ispell_norm_attr = (unsigned char) coldesc;
|
||||
coldesc = strtoul (next + 1, &endp, 0);
|
||||
if (endp == next + 1 || coldesc > UCHAR_MAX)
|
||||
ispell_colors = NULL;
|
||||
else
|
||||
ispell_sout_attr = (unsigned char) coldesc;
|
||||
}
|
||||
}
|
||||
if (ispell_colors == NULL)
|
||||
{
|
||||
/* Use dull B&W color scheme */
|
||||
ispell_norm_attr = LIGHTGRAY + (BLACK << 4);
|
||||
ispell_sout_attr = BLACK + (LIGHTGRAY << 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void djgpp_restore_screen (void)
|
||||
{
|
||||
if (li != txinfo.screenheight)
|
||||
_set_screen_lines (txinfo.screenheight);
|
||||
textmode (txinfo.currmode);
|
||||
textattr (txinfo.attribute);
|
||||
gotoxy (1, txinfo.screenheight);
|
||||
clreol ();
|
||||
}
|
||||
|
||||
static void djgpp_deinit_term (void)
|
||||
{
|
||||
termchanged = 0; /* so output uses stdio again */
|
||||
printf ("\n"); /* in case some garbage is pending */
|
||||
fflush (stdout);
|
||||
if (saved_screen)
|
||||
{
|
||||
ScreenUpdate (saved_screen);
|
||||
gotoxy (txinfo.curx, txinfo.cury);
|
||||
}
|
||||
}
|
||||
|
||||
static void djgpp_ispell_screen ()
|
||||
{
|
||||
fflush (stdout);
|
||||
if (li != txinfo.screenheight)
|
||||
_set_screen_lines (li);
|
||||
textattr (ispell_norm_attr);
|
||||
}
|
||||
|
||||
static int djgpp_column;
|
||||
static int djgpp_row;
|
||||
|
||||
char * tgoto (char * cmd, int col, int row)
|
||||
{
|
||||
djgpp_column = col;
|
||||
djgpp_row = row;
|
||||
return "\2";
|
||||
}
|
||||
|
||||
char * tputs (const char * cmd, int cnt, int (*func)(int))
|
||||
{
|
||||
fflush (stdout);
|
||||
if (!cmd)
|
||||
abort ();
|
||||
switch (*cmd)
|
||||
{
|
||||
case '\1': /* erase */
|
||||
clrscr ();
|
||||
break;
|
||||
case '\2': /* move */
|
||||
gotoxy (djgpp_column + 1, djgpp_row + 1);
|
||||
break;
|
||||
case '\3': /* stand-out */
|
||||
textattr (ispell_sout_attr);
|
||||
break;
|
||||
case '\4': /* end stand-out */
|
||||
textattr (ispell_norm_attr);
|
||||
break;
|
||||
case '\5': /* backup */
|
||||
gotoxy (wherex () - cnt, wherey ());
|
||||
break;
|
||||
case '\6': /* terminal init */
|
||||
djgpp_ispell_screen ();
|
||||
clrscr ();
|
||||
break;
|
||||
case '\7': /* terminal termination */
|
||||
djgpp_restore_screen ();
|
||||
djgpp_deinit_term ();
|
||||
break;
|
||||
default:
|
||||
abort ();
|
||||
}
|
||||
}
|
||||
|
||||
int tgetent (char * buf, const char * term_name)
|
||||
{
|
||||
djgpp_init_terminal ();
|
||||
}
|
||||
|
||||
char * tgetstr (const char * cmd, char ** buf)
|
||||
{
|
||||
static struct emulated_cmd
|
||||
{
|
||||
char *external_name;
|
||||
char *internal_code;
|
||||
}
|
||||
commands[] =
|
||||
{
|
||||
{ "cl", "\1" },
|
||||
{ "cm", "\2" },
|
||||
{ "so", "\3" },
|
||||
{ "se", "\4" },
|
||||
{ "bc", "\5" },
|
||||
{ "ti", "\6" },
|
||||
{ "te", "\7" },
|
||||
};
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof (commands) / sizeof (commands[0]); i++)
|
||||
{
|
||||
if (strcmp (cmd, commands[i].external_name) == 0)
|
||||
return commands[i].internal_code;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int tgetnum (const char * cmd)
|
||||
{
|
||||
if (cmd && strcmp (cmd, "co") == 0)
|
||||
return 80;
|
||||
else if (cmd && strcmp (cmd, "li") == 0)
|
||||
return 24;
|
||||
return -1;
|
||||
}
|
356
external/ispell/pc/local.djgpp
vendored
Normal file
356
external/ispell/pc/local.djgpp
vendored
Normal file
|
@ -0,0 +1,356 @@
|
|||
/*
|
||||
* Written by Eli Zaretskii <eliz@gnu.org>
|
||||
*
|
||||
* This is local.h file suitable for compiling Ispell on MS-DOS systems
|
||||
* with version 2.x of DJGPP port of GNU C/C++ compiler.
|
||||
*
|
||||
* $Id: local.djgpp,v 1.4 2005/05/01 23:03:25 geoff Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* WARNING WARNING WARNING
|
||||
*
|
||||
* This file is *NOT* a normal C header file! Although it uses C
|
||||
* syntax and is included in C programs, it is also processed by shell
|
||||
* scripts that are very stupid about format.
|
||||
*
|
||||
* Do not try to use #if constructs to configure this file for more
|
||||
* than one configuration. Do not place whitespace after the "#" in
|
||||
* "#define". Do not attempt to disable lines by commenting them out.
|
||||
* Do not use backslashes to reduce the length of long lines.
|
||||
* None of these things will work the way you expect them to.
|
||||
*
|
||||
* WARNING WARNING WARNING
|
||||
*/
|
||||
|
||||
/*
|
||||
** Things that normally go in a Makefile. Define these just like you
|
||||
** might in the Makefile, except you should use #define instead of
|
||||
** make's assignment syntax. Everything must be double-quoted, and
|
||||
** (unlike make) you can't use any sort of $-syntax to pick up the
|
||||
** values of other definitions.
|
||||
*/
|
||||
|
||||
#define CC "gcc"
|
||||
#define CFLAGS "-O2 -g"
|
||||
#define YACC "bison -y"
|
||||
|
||||
/*
|
||||
** LINK - MS-DOS generally doesn't support links, so use copy instead.
|
||||
*/
|
||||
#define LINK "cp -p"
|
||||
|
||||
/*
|
||||
** TERMLIB - DJGPP doesn't have one, it uses direct screen writes.
|
||||
*/
|
||||
#define TERMLIB ""
|
||||
|
||||
/*
|
||||
** Where to install various components of ispell. BINDIR contains
|
||||
** binaries. LIBDIR contains hash tables and affix files. MAN1DIR
|
||||
** and MAN4DIR will hold the chapter-1 and chapter-4 manual pages,
|
||||
** respectively.
|
||||
**
|
||||
** If you intend to use multiple dictionary files, I would suggest
|
||||
** LIBDIR be a directory that will contain nothing else, so sensible
|
||||
** names can be constructed for the -d option without conflict.
|
||||
**
|
||||
** The magic string "/dev/env/FOO" expands at run time into the value
|
||||
** of the environment variable FOO. DJDIR is defined by the startup
|
||||
** code of every DJGPP program to point to the root of the DJGPP
|
||||
** installation tree.
|
||||
*/
|
||||
#define BINDIR "/dev/env/DJDIR/bin"
|
||||
#define LIBDIR "/dev/env/DJDIR/lib"
|
||||
#define MAN1DIR "/dev/env/DJDIR/man/man1"
|
||||
#define MAN45DIR "/dev/env/DJDIR/man/man5"
|
||||
|
||||
/*
|
||||
** List of all hash files (languages) which will be supported by ispell.
|
||||
**
|
||||
** This variable has a complex format so that many options can be
|
||||
** specified. The format is as follows:
|
||||
**
|
||||
** <language>[,<make-options>...] [<language> [,<make-options> ...] ...]
|
||||
**
|
||||
** where
|
||||
**
|
||||
** language is the name of a subdirectory of the
|
||||
** "languages" directory
|
||||
** make-options are options that are to be passed to "make" in
|
||||
** the specified directory. The make-options
|
||||
** should not, in general, specify a target, as
|
||||
** this will be provided by the make process.
|
||||
**
|
||||
** For example, if LANGUAGES is:
|
||||
**
|
||||
** "{american,MASTERDICTS=american.med+,HASHFILES=americanmed+.hash,EXTRADICT=/usr/dict/words /usr/dict/web2} {deutsch,DICTALWAYS=deutsch.sml,DICTOPTIONS=}"
|
||||
**
|
||||
** then the American-English and Deutsch (German) languages will be supported,
|
||||
** and the following variable settings will be passed to the two Makefiles:
|
||||
**
|
||||
** American:
|
||||
**
|
||||
** MASTERDICTS='american.med+'
|
||||
** HASHFILES='americanmed+.hash'
|
||||
** EXTRADICT='/usr/dict/words /usr/dict/web2'
|
||||
**
|
||||
** Deutsch:
|
||||
**
|
||||
** DICTALWAYS='deutsch.sml'
|
||||
** DICTOPTIONS=''
|
||||
**
|
||||
** Notes on the syntax: The makefile is not very robust. If you have
|
||||
** make problems, or if make seems to to fail in the language-subdirs
|
||||
** dependency, check your syntax. The makefile adds single quotes to
|
||||
** the individual variables in the LANGUAGES specification, so don't
|
||||
** use quotes of any kind.
|
||||
**
|
||||
** In the future, the first language listed in this variable will
|
||||
** become the default, and the DEFHASH, DEFLANG, and DEFPAFF,
|
||||
** variables will all become obsolete. So be sure to put your default
|
||||
** language first, to make later conversion easier!
|
||||
**
|
||||
** Notes on options for the various languages will be found in the
|
||||
** Makefiles for those languages. Some of those languages may require
|
||||
** you to also change various limits limits like MASKBITS or the
|
||||
** length parameters.
|
||||
**
|
||||
** A special note on the English language: because the British and
|
||||
** American dialects use different spelling, you should usually select
|
||||
** one or the other of these. If you select both, the setting of
|
||||
** MASTERHASH will determine which becomes the language linked to
|
||||
** DEFHASH (which will usually be named english.hash).
|
||||
**
|
||||
** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
** !!! Note the pathname for the `words' file: it might be different !!!
|
||||
** !!! If you don't have this file, make EXTRADICT empty !!!
|
||||
** !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
*/
|
||||
|
||||
#define LANGUAGES "{american,MASTERDICTS=american.med,HASHFILES=amermed.hash,EXTRADICT=}"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** If you have acces to a /usr/dict/words file, and wish to check
|
||||
** British spelling in addition to American, you may wish to use this:
|
||||
**
|
||||
*/
|
||||
/*
|
||||
** #define LANGUAGES "{american,MASTERDICTS=americax.med americax.lrg american.xlg,HASHFILES=amermedx.hash amerlrgx.hash amerxlg.hash,EXTRADICT=c:/usr/lib/words} {british,MASTERDICTS=british.med british.lrg british.xlg,HASHFILES=britmed.hash britlrg.hash britxlg.hash}"
|
||||
**
|
||||
**
|
||||
*/
|
||||
|
||||
/*
|
||||
** If your sort command accepts the -T switch to set temp file
|
||||
** locations (try it out; on some systems it exists but is
|
||||
** undocumented), make the following variable the null string.
|
||||
** Otherwise leave it as the sed script.
|
||||
**
|
||||
** With DJGPP, you will probably use GNU Sort which accepts -T, so:
|
||||
*/
|
||||
#define SORTTMP ""
|
||||
|
||||
/*
|
||||
** INSTALL program. Could be a copy program like cp or something fancier
|
||||
** like /usr/ucb/install -c
|
||||
*/
|
||||
#define INSTALL "ginstall -c"
|
||||
|
||||
/*
|
||||
** If your system has the rename(2) system call, define HAS_RENAME and
|
||||
** ispell will use that call to rename backup files. Otherwise, it
|
||||
** will use link/unlink. There is no harm in this except on MS-DOS,
|
||||
** which might not support link/unlink (DJGPP does, but also has rename).
|
||||
*/
|
||||
#define HAS_RENAME 1
|
||||
|
||||
/* environment variable for user's word list */
|
||||
#ifndef PDICTVAR
|
||||
#define PDICTVAR "WORDLIST"
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Prefix part of default private dictionary. Under MS-DOS 8.3
|
||||
** filename limitation, we are in trouble...
|
||||
*/
|
||||
#define DEFPDICT "_isp_"
|
||||
|
||||
/* old place to look for default word list */
|
||||
#define OLDPDICT "_isp_"
|
||||
|
||||
/*
|
||||
** mktemp template for temporary file - MUST contain 6 consecutive X's.
|
||||
**
|
||||
** If this is a relative name, Ispell will try to determine the directory
|
||||
** by checking the environment variables TMPDIR, TEMP, and TMP (in that
|
||||
** order).
|
||||
*/
|
||||
#define TEMPNAME "isXXXXXX"
|
||||
|
||||
/*
|
||||
** If REGEX_LOOKUP is NOT defined, the lookup command (L) will use the look(1)
|
||||
** command (if available) or the egrep command. If REGEX_LOOKUP is defined,
|
||||
** the lookup command will use the internal dictionary and the
|
||||
** regular-expression library (which you must supply separately.
|
||||
** DJGPP v2 has POSIX regexp functions.
|
||||
*/
|
||||
#define REGEX_LOOKUP 1
|
||||
|
||||
/*
|
||||
** Choose the proper type of regular-expression routines here. BSD
|
||||
** and public-domain systems have routines called re_comp and re_exec;
|
||||
** System V uses regcmp and regex.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
#define REGCTYPE regex_t *
|
||||
#define REGCMP(re,str) (regcomp (re, str, 0), re)
|
||||
#define REGEX(re, str, dummy) \
|
||||
(re != 0 && regexec (re, str, 0, 0, 0) == 0 ? (char *)1 : NULL)
|
||||
#define REGFREE(re) \
|
||||
do { \
|
||||
if (re == 0) \
|
||||
re = (regex_t *)calloc (1, sizeof (regex_t)); \
|
||||
else \
|
||||
regfree(re); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
**
|
||||
** The 2 following definitions are only meaningfull if you don't use
|
||||
** any regex library.
|
||||
*/
|
||||
/* path to egrep (use speeded up version if available);
|
||||
defined without explicit path, since there are no
|
||||
standard places for programs on MS-DOS. */
|
||||
#define EGREPCMD "egrep -i"
|
||||
|
||||
/* path to wordlist for Lookup command (typically /usr/dict/{words|web2}) */
|
||||
/* note that /usr/dict/web2 is usually a bad idea due to obscure words */
|
||||
#undef WORDS
|
||||
|
||||
/*
|
||||
** FIXME: The filename truncation below is not flexible enough for DJGPP
|
||||
** which can support long filenames on some platforms, since we
|
||||
** will only know if the support is available at runtime.
|
||||
*/
|
||||
|
||||
/* max file name length (will truncate to fit BAKEXT) if not in sys/param.h */
|
||||
#ifdef NAME_MAX
|
||||
#define MAXNAMLEN NAME_MAX
|
||||
#else
|
||||
#define MAXNAMLEN 12
|
||||
#endif
|
||||
|
||||
#define MAXEXTLEN 4 /* max. extension length including '.' */
|
||||
#define MAXBASENAMELEN 8 /* max. base filename length without ext */
|
||||
|
||||
/* define if you want .bak file names truncated to MAXNAMLEN characters */
|
||||
/* On MS-DOS, we really have no choice... */
|
||||
#define TRUNCATEBAK 1
|
||||
|
||||
/*
|
||||
** This is the extension that will be added to backup files.
|
||||
** On MS-DOS, it makes sense to use the shortest possible extension.
|
||||
*/
|
||||
#define BAKEXT "~"
|
||||
|
||||
/*
|
||||
** Define this if you want to use the shell for interpretation of commands
|
||||
** issued via the "L" command, "^Z" under System V, and "!". If this is
|
||||
** not defined then a direct spawnvp() will be used in place of the
|
||||
** normal system(). This may speed up these operations if the SHELL
|
||||
** environment variable points to a Unix-like shell (such as `sh' or `bash').
|
||||
**
|
||||
** However, if you undefine USESH, commands which use pipes, redirection
|
||||
** and shell wildcards won't work, and you will need support for the SIGTSTP
|
||||
** signal, for the above commands to work at all.
|
||||
*/
|
||||
|
||||
#define USESH 1
|
||||
|
||||
/*
|
||||
** Define this if you want to be able to type any command at a "type space
|
||||
** to continue" prompt.
|
||||
*/
|
||||
#define COMMANDFORSPACE 1
|
||||
|
||||
/*
|
||||
** The next three variables are used to provide a variable-size context
|
||||
** display at the bottom of the screen. Normally, the user will see
|
||||
** a number of lines equal to CONTEXTPCT of his screen, rounded down
|
||||
** (thus, with CONTEXTPCT == 10, a 24-line screen will produce two lines
|
||||
** of context). The context will never be greater than MAXCONTEXT or
|
||||
** less than MINCONTEXT. To disable this feature entirely, set MAXCONTEXT
|
||||
** and MINCONTEXT to the same value. To round context percentages up,
|
||||
** define CONTEXTROUNDUP.
|
||||
**
|
||||
** Warning: don't set MAXCONTEXT ridiculously large. There is a
|
||||
** static buffer of size MAXCONTEXT*BUFSIZ; since BUFSIZ is frequently
|
||||
** 1K or larger, this can create a remarkably large executable.
|
||||
*/
|
||||
#define CONTEXTPCT 20 /* Use 20% of the screen for context */
|
||||
#define MINCONTEXT 2 /* Always show at least 2 lines of context */
|
||||
#define MAXCONTEXT 10 /* Never show more than 10 lines of context */
|
||||
#define CONTEXTROUNDUP 1 /* Round context up */
|
||||
|
||||
/*
|
||||
** Define this if you want the "mini-menu," which gives the most important
|
||||
** options at the bottom of the screen, to be the default (in any case, it
|
||||
** can be controlled with the "-M" switch).
|
||||
*/
|
||||
#define MINIMENU
|
||||
|
||||
/*
|
||||
** Redefine GETKEYSTROKE() to whatever appropriate on some MS-DOS systems
|
||||
** where getchar() doesn't operate properly in raw mode.
|
||||
*/
|
||||
#ifdef __DJGPP__
|
||||
#include <pc.h>
|
||||
#include <keys.h>
|
||||
#define GETKEYSTROKE() getxkey()
|
||||
#else
|
||||
#define GETKEYSTROKE() getch()
|
||||
#endif
|
||||
|
||||
/*
|
||||
** We include <fcntl.h> to have the definition of O_BINARY. The
|
||||
** configuration script will notice this and define MSDOS_BINARY_OPEN.
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
|
||||
/*
|
||||
** We include <unistd.h> to get the definitions of R_OK and W_OK.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
|
||||
/*
|
||||
** Environment variable to use to locate the home directory. On DOS
|
||||
** systems we set this to ISPELL_HOME to avoid conflicts with
|
||||
** other programs that look for a HOME environment variable.
|
||||
*/
|
||||
#define HOME "ISPELL_HOME"
|
||||
#define PDICTHOME "c:"
|
||||
|
||||
/*
|
||||
** On MS-DOS systems, we define the following variables so that
|
||||
** ispell's files have legal suffixes. Note that these suffixes
|
||||
** must agree with the way you've defined dictionary files which
|
||||
** incorporate these suffixes.
|
||||
**
|
||||
** Actually, it is not recommended at all to change the suffixes,
|
||||
** since they are hardwired in the Makefile's under languages/
|
||||
** subdirectory, and MS-DOS will silently truncate excess letters anyway.
|
||||
*/
|
||||
#define HASHSUFFIX ".hash"
|
||||
#define STATSUFFIX ".stat"
|
||||
#define COUNTSUFFIX ".cnt"
|
||||
|
||||
/*
|
||||
** The extension of executable files.
|
||||
*/
|
||||
#define EXEEXT ".exe"
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue